summaryrefslogtreecommitdiffstats
path: root/procedures/p9/cleanup_pcie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'procedures/p9/cleanup_pcie.cpp')
-rw-r--r--procedures/p9/cleanup_pcie.cpp35
1 files changed, 22 insertions, 13 deletions
diff --git a/procedures/p9/cleanup_pcie.cpp b/procedures/p9/cleanup_pcie.cpp
index 8d1145a..68b6649 100644
--- a/procedures/p9/cleanup_pcie.cpp
+++ b/procedures/p9/cleanup_pcie.cpp
@@ -19,6 +19,7 @@
#include "targeting.hpp"
#include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/File/error.hpp>
namespace openpower
{
@@ -29,6 +30,7 @@ using namespace phosphor::logging;
using namespace openpower::cfam::access;
using namespace openpower::cfam::p9;
using namespace openpower::targeting;
+namespace file_error = sdbusplus::xyz::openbmc_project::Common::File::Error;
/**
* @brief Disables PCIE drivers and receiver in the PCIE root ctrl 1 register
@@ -36,24 +38,31 @@ using namespace openpower::targeting;
*/
void cleanupPcie()
{
- Targeting targets;
+ try
+ {
+ Targeting targets;
- log<level::INFO>("Running P9 procedure cleanupPcie");
+ log<level::INFO>("Running P9 procedure cleanupPcie");
- // Disable the PCIE drivers and receiver on all CPUs
- for (const auto& target : targets)
- {
- try
- {
- writeReg(target, P9_ROOT_CTRL1_CLEAR, 0x00001C00);
- }
- catch (std::exception& e)
+ // Disable the PCIE drivers and receiver on all CPUs
+ for (const auto& target : targets)
{
- // Don't need an error log coming from the power off
- // path, just keep trying on the other processors.
- continue;
+ try
+ {
+ writeReg(target, P9_ROOT_CTRL1_CLEAR, 0x00001C00);
+ }
+ catch (std::exception& e)
+ {
+ // Don't need an error log coming from the power off
+ // path, just keep trying on the other processors.
+ continue;
+ }
}
}
+ catch (file_error::Open& e)
+ {
+ // For this procedure we can ignore the ::Open error
+ }
}
REGISTER_PROCEDURE("cleanupPcie", cleanupPcie);
OpenPOWER on IntegriCloud