summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Baiocchi <mbaiocch@us.ibm.com>2019-04-19 08:49:20 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2019-05-16 11:07:15 -0500
commit4f842cf1d6febb37ca7917e40a9fb0a1e9e3e6e4 (patch)
tree478a17720159c864be8faab70692906fa74016fb
parent686bbf502fc63b486fb54816e3f7d4e7a7ce6bd7 (diff)
downloadblackbird-hostboot-4f842cf1d6febb37ca7917e40a9fb0a1e9e3e6e4.tar.gz
blackbird-hostboot-4f842cf1d6febb37ca7917e40a9fb0a1e9e3e6e4.zip
Combine 'generic' and 'explorer' OCMB chip targets
This commit moves the Explorer-specific OCMB_CHIP target into the 'generic' OCMB_CHIP target so that there is only one target. This target will also be used for Gemini. Changes were also made to look for Gemini vs Explorer where appropriate based on ATTR_CHIP_ID. Change-Id: I91b79195bf997a6af4e2ae0a3326ed5a1c7887ec RTC:205563 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77220 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: Glenn Miles <milesg@ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
-rw-r--r--src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H1
-rw-r--r--src/usr/expaccess/expscom_utils.C15
-rw-r--r--src/usr/fapi2/attribute_service.C48
-rwxr-xr-xsrc/usr/fapi2/fapi2.mk1
-rw-r--r--src/usr/targeting/common/xmltohb/simics_AXONE.system.xml32
-rw-r--r--src/usr/targeting/common/xmltohb/target_types.xml30
6 files changed, 84 insertions, 43 deletions
diff --git a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
index 3e1429b63..9d276b67c 100644
--- a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
+++ b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
@@ -129,6 +129,7 @@ namespace fapi2
RC_SET_ATTR_NOT_VALID = FAPI2_COMP_ID | 0x3F,
RC_FAILED_TO_GET_RING_LIST = FAPI2_COMP_ID | 0x40,
RC_ATTR_OVERRIDE_DISALLOWED = FAPI2_COMP_ID | 0x41,
+ RC_UNKNOWN_OCMB_CHIP_TYPE = FAPI2_COMP_ID | 0x42,
// HWP generated errors
RC_HWP_GENERATED_ERROR = HWPF_COMP_ID | 0x0f,
diff --git a/src/usr/expaccess/expscom_utils.C b/src/usr/expaccess/expscom_utils.C
index 5ea7eeeb2..c4818379c 100644
--- a/src/usr/expaccess/expscom_utils.C
+++ b/src/usr/expaccess/expscom_utils.C
@@ -55,20 +55,21 @@ errlHndl_t validateInputs(DeviceFW::OperationType i_opType,
errlHndl_t l_err = nullptr;
uint32_t l_commonPlid = 0; // If there are multiple issues found link logs with first
- TARGETING::ATTR_MODEL_type l_targetModel =
- i_target->getAttr<TARGETING::ATTR_MODEL>();
+ // Verify that the target is of type OCMB_CHIP
+ TARGETING::ATTR_TYPE_type l_targetType =
+ i_target->getAttr<TARGETING::ATTR_TYPE>();
- // Only target we can perform ocmb scoms on are explorer OCMB chip targets
- if( l_targetModel != TARGETING::MODEL_EXPLORER )
+ // Only target we can perform ocmb scoms on are OCMB chip targets
+ if( l_targetType != TARGETING::TYPE_OCMB_CHIP )
{
- TRACFCOMP( g_trac_expscom, ERR_MRK "validateInputs> Invalid target type : l_targetModel=%d", l_targetModel );
+ TRACFCOMP( g_trac_expscom, ERR_MRK "validateInputs> Invalid target type : l_targetType=0x%X", l_targetType );
/*@
* @errortype
* @moduleid EXPSCOM::MOD_OCMB_UTILS
* @reasoncode EXPSCOM::RC_INVALID_MODEL_TYPE
* @userdata1 SCOM Address
* @userdata2 Model Type
- * @devdesc validateInputs> Invalid target type (!= OCMB_CHP)
+ * @devdesc validateInputs> Invalid target type (!= OCMB_CHIP)
* @custdesc A problem occurred during the IPL of the system:
* Invalid target type for a SCOM operation.
*/
@@ -76,7 +77,7 @@ errlHndl_t validateInputs(DeviceFW::OperationType i_opType,
EXPSCOM::MOD_OCMB_UTILS,
EXPSCOM::RC_INVALID_MODEL_TYPE,
i_scomAddr,
- l_targetModel,
+ l_targetType,
ERRORLOG::ErrlEntry::ADD_SW_CALLOUT);
l_err->collectTrace(EXPSCOM_COMP_NAME);
diff --git a/src/usr/fapi2/attribute_service.C b/src/usr/fapi2/attribute_service.C
index a6e998143..cf7fb8022 100644
--- a/src/usr/fapi2/attribute_service.C
+++ b/src/usr/fapi2/attribute_service.C
@@ -49,6 +49,7 @@
#include <target.H>
#include <target_types.H>
#include <hwpf_fapi2_reasoncodes.H>
+#include <chipids.H>
#include <devicefw/driverif.H>
#include <plat_attr_override_sync.H>
@@ -366,9 +367,52 @@ ReturnCode platGetTargetName(const Target<TARGET_TYPE_ALL>& i_pFapiTarget,
{
o_name = ENUM_ATTR_NAME_AXONE;
}
- else if (l_model == TARGETING::MODEL_EXPLORER)
+ else if (l_model == TARGETING::MODEL_OCMB)
{
- o_name = ENUM_ATTR_NAME_EXPLORER;
+ // For MODEL_OCMB the ATTR_CHIP_ID determines if it is a
+ // Gemini or an Explorer chip
+ uint32_t l_chipID =
+ l_pHbTarget->getAttr<TARGETING::ATTR_CHIP_ID>();
+
+ if (l_chipID == POWER_CHIPID::EXPLORER_16)
+ {
+ o_name = ENUM_ATTR_NAME_EXPLORER;
+ }
+ else if (l_chipID == POWER_CHIPID::GEMINI_16)
+ {
+ o_name = ENUM_ATTR_NAME_GEMINI;
+ }
+ else
+ {
+ FAPI_ERR("platGetTargetName. Unknown CHIP_ID 0x%x for MODEL_OCMB 0x%x", l_chipID, l_model);
+
+ /*@
+ * @errortype
+ * @moduleid fapi2::MOD_FAPI2_GET_TARGETING_TARGET
+ * @reasoncode RC_UNKNOWN_OCMB_CHIP_TYPE
+ * @userdata1[0:31] FAPI2 Type
+ * @userdata1[32:63] HB Target HUID
+ * @userdata2[0:31] HB Type
+ * @userdata2[32:63] HB Target CHIP_ID
+ * @devdesc HB OCMB_CHIP target found with unknown
+ * model based on ATTR_CHIP_ID
+ * @custdesc Firmware Error
+ */
+ l_errl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ MOD_FAPI2_GET_TARGETING_TARGET,
+ RC_UNKNOWN_OCMB_CHIP_TYPE,
+ TWO_UINT32_TO_UINT64(
+ i_pFapiTarget.getType(),
+ TARGETING::get_huid(l_pHbTarget)
+ ),
+ TWO_UINT32_TO_UINT64(
+ l_pHbTarget->
+ getAttr<TARGETING::ATTR_TYPE>(),
+ l_chipID));
+
+ l_rc.setPlatDataPtr(reinterpret_cast<void *> (l_errl));
+ break;
+ }
}
else
{
diff --git a/src/usr/fapi2/fapi2.mk b/src/usr/fapi2/fapi2.mk
index ebad0987c..47bf2d5f4 100755
--- a/src/usr/fapi2/fapi2.mk
+++ b/src/usr/fapi2/fapi2.mk
@@ -59,6 +59,7 @@ EXTRAINCDIR += ${HWP_PATH_2}/hwp/memory/lib/shared/
EXTRAINCDIR += ${HWP_PATH_2}/hwp/memory/lib/utils/
EXTRAINCDIR += ${HWP_PATH_2}/vpd_accessors/
EXTRAINCDIR += ${ROOTPATH}/src/usr/scom/
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/
include ${ROOTPATH}/src/build/mkrules/verbose.rules.mk
define __CLEAN_TARGET
diff --git a/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml b/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml
index 2b1b0a3ef..c3dfb86eb 100644
--- a/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml
+++ b/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml
@@ -8612,7 +8612,7 @@
<!-- ===================================================================== -->
<targetInstance>
<id>sys0node0ocmb0</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-0/mi-0/mcc-0/omi-0/ocmb_chip-0</default>
@@ -8679,7 +8679,7 @@
<targetInstance>
<id>sys0node0ocmb1</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-0/mi-0/mcc-0/omi-1/ocmb_chip-0</default>
@@ -8746,7 +8746,7 @@
<targetInstance>
<id>sys0node0ocmb2</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-0/mi-0/mcc-1/omi-0/ocmb_chip-0</default>
@@ -8813,7 +8813,7 @@
<targetInstance>
<id>sys0node0ocmb3</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-0/mi-0/mcc-1/omi-1/ocmb_chip-0</default>
@@ -8880,7 +8880,7 @@
<targetInstance>
<id>sys0node0ocmb4</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-0/mi-1/mcc-0/omi-0/ocmb_chip-0</default>
@@ -8947,7 +8947,7 @@
<targetInstance>
<id>sys0node0ocmb5</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-0/mi-1/mcc-0/omi-1/ocmb_chip-0</default>
@@ -9014,7 +9014,7 @@
<targetInstance>
<id>sys0node0ocmb6</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-0/mi-1/mcc-1/omi-0/ocmb_chip-0</default>
@@ -9081,7 +9081,7 @@
<targetInstance>
<id>sys0node0ocmb7</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-0/mi-1/mcc-1/omi-1/ocmb_chip-0</default>
@@ -9148,7 +9148,7 @@
<targetInstance>
<id>sys0node0ocmb8</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-1/mi-0/mcc-0/omi-0/ocmb_chip-0</default>
@@ -9214,7 +9214,7 @@
<targetInstance>
<id>sys0node0ocmb9</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-1/mi-0/mcc-0/omi-1/ocmb_chip-0</default>
@@ -9280,7 +9280,7 @@
<targetInstance>
<id>sys0node0ocmb10</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-1/mi-0/mcc-1/omi-0/ocmb_chip-0</default>
@@ -9346,7 +9346,7 @@
<targetInstance>
<id>sys0node0ocmb11</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-1/mi-0/mcc-1/omi-1/ocmb_chip-0</default>
@@ -9412,7 +9412,7 @@
<targetInstance>
<id>sys0node0ocmb12</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-1/mi-1/mcc-0/omi-0/ocmb_chip-0</default>
@@ -9478,7 +9478,7 @@
<targetInstance>
<id>sys0node0ocmb13</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-1/mi-1/mcc-0/omi-1/ocmb_chip-0</default>
@@ -9544,7 +9544,7 @@
<targetInstance>
<id>sys0node0ocmb14</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-1/mi-1/mcc-1/omi-0/ocmb_chip-0</default>
@@ -9610,7 +9610,7 @@
<targetInstance>
<id>sys0node0ocmb15</id>
- <type>chip-ocmb-explorer</type>
+ <type>chip-ocmb</type>
<attribute>
<id>AFFINITY_PATH</id>
<default>affinity:sys-0/node-0/proc-0/mc-1/mi-1/mcc-1/omi-1/ocmb_chip-0</default>
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index c04afc747..190ea86fc 100644
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -404,7 +404,7 @@
</attribute>
</targetType>
- <!-- Generic OCMB -->
+ <!-- Generic OCMB, used for Exlporer, Gemini, etc -->
<targetType>
<id>chip-ocmb</id>
<parent>chip</parent>
@@ -480,6 +480,10 @@
<id>HWAS_STATE_CHANGED_SUBSCRIPTION_MASK</id>
</attribute>
<attribute>
+ <default>OCMB</default>
+ <id>MODEL</id>
+ </attribute>
+ <attribute>
<default>
<field>
<id>childRollupAllowed</id>
@@ -497,23 +501,6 @@
<id>PARENT_DECONFIG_RULES</id>
</attribute>
<attribute>
- <default>OCMB_CHIP</default>
- <id>TYPE</id>
- </attribute>
- <attribute>
- <id>VPD_REC_NUM</id>
- </attribute>
- </targetType>
-
- <!-- Explorer OCMB -->
- <targetType>
- <id>chip-ocmb-explorer</id>
- <parent>chip-ocmb</parent>
- <attribute>
- <default>EXPLORER</default>
- <id>MODEL</id>
- </attribute>
- <attribute>
<default>
<field>
<id>reserved</id>
@@ -563,6 +550,13 @@
</default>
<id>SCOM_SWITCHES</id>
</attribute>
+ <attribute>
+ <default>OCMB_CHIP</default>
+ <id>TYPE</id>
+ </attribute>
+ <attribute>
+ <id>VPD_REC_NUM</id>
+ </attribute>
</targetType>
<targetType>
OpenPOWER on IntegriCloud