Set default package to build for POWER10
Set default package to build for p10 (since that is latest code)
Add PLDM as requirement for building p10
Default build will not enable PHAL support by default because of current
build limitations of the PHAL code.
The pldm Interface class will no longer be created in the Manager object
constructor to prevent issues with unit test.
Tested on Rainier
Change-Id: I8060e70b5656bd0d762d52bf9fdff62f8720a5c6
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/occ_manager.hpp b/occ_manager.hpp
index 0c573b6..640f21e 100644
--- a/occ_manager.hpp
+++ b/occ_manager.hpp
@@ -5,8 +5,10 @@
#ifdef PLDM
#include "pldm.hpp"
+#ifdef PHAL_SUPPORT
#include <libphal.H>
#endif
+#endif
#include "powercap.hpp"
#include "utils.hpp"
#ifdef POWER10
@@ -88,17 +90,6 @@
sdbusRule::argN(0, AMBIENT_INTERFACE) +
sdbusRule::interface("org.freedesktop.DBus.Properties"),
std::bind(&Manager::ambientCallback, this, std::placeholders::_1))
-#ifdef PLDM
- ,
- pldmHandle(std::make_unique<pldm::Interface>(
- std::bind(std::mem_fn(&Manager::updateOCCActive), this,
- std::placeholders::_1, std::placeholders::_2),
- std::bind(std::mem_fn(&Manager::sbeHRESETResult), this,
- std::placeholders::_1, std::placeholders::_2),
- std::bind(std::mem_fn(&Manager::updateOccSafeMode), this,
- std::placeholders::_1),
- event))
-#endif
#ifdef POWER10
,
discoverTimer(
@@ -127,6 +118,8 @@
readAltitude();
}
+ void createPldmHandle();
+
/** @brief Return the number of bound OCCs */
inline auto getNumOCCs() const
{
@@ -305,6 +298,7 @@
*/
void sbeHRESETResult(instanceID instance, bool success);
+#ifdef PHAL_SUPPORT
/** @brief Helper function to check whether an SBE dump should be collected
* now.
*
@@ -332,6 +326,7 @@
/** @brief Whether pdbg_targets_init has been called */
bool pdbgInitialized = false;
+#endif
std::unique_ptr<pldm::Interface> pldmHandle = nullptr;
#endif