summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2019-05-10 13:48:50 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2019-05-15 10:40:28 -0500
commitca47ced07c4c49f25c3302d37871cdd14d1e4f7b (patch)
treea5a877f512e1d4748c3b4acce625e48e5512266b /src/usr/diag/prdf/common
parent05847c16cfe6f93796764d9bd1460329b30c5059 (diff)
downloadtalos-hostboot-ca47ced07c4c49f25c3302d37871cdd14d1e4f7b.tar.gz
talos-hostboot-ca47ced07c4c49f25c3302d37871cdd14d1e4f7b.zip
PRD: replaced MODEL_EXPLORER with MODEL_OCMB
In addition, ensured PRD doesn't assert if there is a Gemini, in which we have no functional support. Change-Id: Id293b48005fc044102ce2bfa768fec05e3102dcd Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77271 Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/common')
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C23
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/prdfTargetServices.C14
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/prdfTargetServices.H18
3 files changed, 52 insertions, 3 deletions
diff --git a/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C b/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C
index e37cffcd3..48a198155 100755
--- a/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C
+++ b/src/usr/diag/prdf/common/plat/p9/prdfP9Configurator.C
@@ -243,7 +243,7 @@ errlHndl_t PlatConfigurator::addDomainChips( TARGETING::TYPE i_type,
{
errlHndl_t errl = nullptr;
- std::map<TARGETING::MODEL, std::map<TARGETING::TYPE, const char *>> fnMap =
+ std::map<uint32_t, std::map<TARGETING::TYPE, const char *>> fnMap =
{
{ MODEL_NIMBUS, { { TYPE_PROC, nimbus_proc },
{ TYPE_EQ, nimbus_eq },
@@ -285,7 +285,9 @@ errlHndl_t PlatConfigurator::addDomainChips( TARGETING::TYPE i_type,
{ TYPE_MI, axone_mi },
{ TYPE_MCC, axone_mcc },
{ TYPE_OMIC, axone_omic }, } },
- { MODEL_EXPLORER, { { TYPE_OCMB_CHIP, explorer_ocmb }, } },
+ #ifdef __HOSTBOOT_MODULE
+ { POWER_CHIPID::EXPLORER, { { TYPE_OCMB_CHIP, explorer_ocmb }, } },
+ #endif
};
// Get references to factory objects.
@@ -299,7 +301,22 @@ errlHndl_t PlatConfigurator::addDomainChips( TARGETING::TYPE i_type,
// Iterate all the targets for this type and add to given domain.
for ( const auto & trgt : getFunctionalTargetList(i_type) )
{
- TARGETING::MODEL model = getChipModel( trgt );
+ uint32_t model = getChipModel( trgt );
+
+ #ifdef __HOSTBOOT_MODULE
+ // TODO: remove depricated MODEL_EXPLORER once MODEL_OCMB is supported.
+ if ( MODEL_EXPLORER == model ) continue;
+
+ // Special case for OCMBs (hostboot only issue for P9).
+ if ( MODEL_OCMB == model )
+ {
+ // Use the chip ID instead of model.
+ model = getChipId( trgt );
+
+ // Skip Gemini OCMBs. They can exist, but PRD won't support them.
+ if ( POWER_CHIPID::GEMINI == model ) continue;
+ }
+ #endif
// Ensure this model is supported.
if ( fnMap.end() == fnMap.find(model) )
diff --git a/src/usr/diag/prdf/common/plat/prdfTargetServices.C b/src/usr/diag/prdf/common/plat/prdfTargetServices.C
index fce6dee9e..915426ea9 100755
--- a/src/usr/diag/prdf/common/plat/prdfTargetServices.C
+++ b/src/usr/diag/prdf/common/plat/prdfTargetServices.C
@@ -365,6 +365,20 @@ TARGETING::MODEL getChipModel( TARGETING::TargetHandle_t i_trgt )
//------------------------------------------------------------------------------
+#ifdef __HOSTBOOT_MODULE
+uint32_t getChipId( TARGETING::TargetHandle_t i_trgt )
+{
+ PRDF_ASSERT( NULL != i_trgt );
+
+ TargetHandle_t parent = getParentChip( i_trgt );
+ PRDF_ASSERT( NULL != parent );
+
+ return parent->getAttr<ATTR_CHIP_ID>();
+}
+#endif
+
+//------------------------------------------------------------------------------
+
uint8_t getChipLevel( TARGETING::TargetHandle_t i_trgt )
{
PRDF_ASSERT( NULL != i_trgt );
diff --git a/src/usr/diag/prdf/common/plat/prdfTargetServices.H b/src/usr/diag/prdf/common/plat/prdfTargetServices.H
index 8793e8c61..bd02cc44c 100755
--- a/src/usr/diag/prdf/common/plat/prdfTargetServices.H
+++ b/src/usr/diag/prdf/common/plat/prdfTargetServices.H
@@ -42,6 +42,10 @@
#include <targeting/common/target.H>
#include <prdfParserEnums.H>
+#ifdef __HOSTBOOT_MODULE
+ #include <chipids.H>
+#endif
+
//------------------------------------------------------------------------------
namespace PRDF
@@ -145,6 +149,20 @@ TARGETING::CLASS getTargetClass( TARGETING::TargetHandle_t i_target );
*/
TARGETING::MODEL getChipModel( TARGETING::TargetHandle_t i_trgt );
+#ifdef __HOSTBOOT_MODULE
+
+// NOTE: This should be used instead of getChipModel() because of the case of
+// MODEL_OCMB, where we need the chip ID to distinguish between Explorer
+// and Gemini.
+
+/**
+ * @param i_trgt A chip target or any unit target within the chip.
+ * @return The chip ID.
+ */
+uint32_t getChipId( TARGETING::TargetHandle_t i_trgt );
+
+#endif
+
/**
* @param i_trgt A chip target or any unit target within the chip.
* @return The level (EC level) of a chip.
OpenPOWER on IntegriCloud