summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/pm
diff options
context:
space:
mode:
authorPrem Shanker Jha <premjha2@in.ibm.com>2018-08-23 06:24:01 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2018-09-07 15:24:15 -0500
commit29f9ee17713de9f1b88aaf8e93a880feff35b891 (patch)
tree934ceee41469a4dba5e22c2136f780015623461e /src/import/chips/p9/procedures/hwp/pm
parentc4f75d02931063dd4a8b787c24e0a6a5aa437b66 (diff)
downloadtalos-hostboot-29f9ee17713de9f1b88aaf8e93a880feff35b891.tar.gz
talos-hostboot-29f9ee17713de9f1b88aaf8e93a880feff35b891.zip
24x7: Populated Abus bits in UAV for cumulus based system.
commit checks obus chiplet configuration to determine if it is configured in SMP mode. If so, it uses OBUS position to populate bit position meant for Abus in UAV. CQ: SW444776 Change-Id: I5629fef6227596b111f858a3de21ae0318b1e3cd Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65064 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65069 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/pm')
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_check_proc_config.C59
1 files changed, 55 insertions, 4 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_check_proc_config.C b/src/import/chips/p9/procedures/hwp/pm/p9_check_proc_config.C
index b4bd98a6d..536727f7f 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_check_proc_config.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_check_proc_config.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* Contributors Listed Below - COPYRIGHT 2015,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -70,6 +70,7 @@ enum
PHB_POS = 30,
CAPP_POS = 37,
OBUS_POS = 41,
+ ABUS_POS = 41,
NVLINK_POS = 45,
OBUS_BRICK_0_POS = 0,
OBUS_BRICK_1_POS = 1,
@@ -109,6 +110,48 @@ fapi_try_exit:
//-----------------------------------------------------------------------------------------
/**
+ * @brief checks configuration of OBUS and populates UAV with ABUS info
+ * @param[in] i_procTgt fapi2 target for P9
+ * @param[io] i_configBuf fapi2 buffer
+ * @return fapi2 return code.
+ */
+fapi2::ReturnCode checkAbusConfig( CONST_FAPI2_PROC& i_procTgt, uint64_t& io_configVector )
+{
+ FAPI_INF( ">> checkAbusConfig" );
+ auto l_obusList = i_procTgt.getChildren<fapi2::TARGET_TYPE_OBUS>( );
+ uint8_t l_obusPos = 0;
+ uint8_t l_configMode = 0;
+ uint64_t l_tempVector = 0;
+
+ for( auto l_obus : l_obusList )
+ {
+ FAPI_TRY( FAPI_ATTR_GET( fapi2::ATTR_OPTICS_CONFIG_MODE, l_obus, l_configMode ),
+ "Failed To Read ATTR_OPTICS_CONFIG_MODE" );
+
+ FAPI_TRY( FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS, l_obus, l_obusPos ),
+ "Error from FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS)" );
+
+ FAPI_DBG( "ABUS %d SMP : %s ", l_obusPos,
+ ( l_configMode == fapi2::ENUM_ATTR_OPTICS_CONFIG_MODE_SMP ) ? "Yes" : "No" );
+
+ if( fapi2::ENUM_ATTR_OPTICS_CONFIG_MODE_SMP == l_configMode )
+ {
+
+ l_tempVector |= ((0x8000000000000000ull) >> ( ABUS_POS + l_obusPos ));
+ }
+ }
+
+ io_configVector |= l_tempVector;
+
+ FAPI_DBG( "UAV with Abus: 0x%016llx", io_configVector );
+
+fapi_try_exit:
+ FAPI_INF( "<< checkAbusConfig" );
+ return fapi2::current_err;
+}
+//-----------------------------------------------------------------------------------------
+
+/**
* @brief checks Memory buf configuration and updates config vector buffer.
* @param[in] i_procTgt fapi2 target for P9
* @param[in] i_configBuf fapi2 buffer
@@ -307,11 +350,19 @@ fapi2::ReturnCode p9_check_proc_config ( CONST_FAPI2_PROC& i_procTgt, void* i_pH
( i_procTgt, fapi2::TARGET_TYPE_CAPP, l_configVectVal, CAPP_POS ),
"Failed to get CAPP configuration" );
- FAPI_TRY( checkObusChipletHierarchy ( i_procTgt, l_configVectVal, OBUS_POS, NVLINK_POS ),
- "Failed to get OBUS Hierarchy configuration" );
-
FAPI_ATTR_GET_PRIVILEGED(fapi2::ATTR_NAME, i_procTgt, l_chipName );
+ if( fapi2::ENUM_ATTR_NAME_NIMBUS == l_chipName )
+ {
+ FAPI_TRY( checkObusChipletHierarchy ( i_procTgt, l_configVectVal, OBUS_POS, NVLINK_POS ),
+ "Failed to get OBUS Hierarchy configuration" );
+ }
+ else
+ {
+ FAPI_TRY( checkAbusConfig( i_procTgt, l_configVectVal ) ,
+ "Failed to get Abus configuration" );
+ }
+
if( fapi2::ENUM_ATTR_NAME_CUMULUS == l_chipName )
{
FAPI_TRY( checkMemConfig( i_procTgt, l_configVectVal ),
OpenPOWER on IntegriCloud