summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/pm
diff options
context:
space:
mode:
authorPrem Shanker Jha <premjha2@in.ibm.com>2018-12-06 04:31:22 -0600
committerChristian R. Geddes <crgeddes@us.ibm.com>2019-01-15 13:50:46 -0600
commitf5dd1c1283bad3f20c6d791f9f0fc5658a360163 (patch)
tree9025a018aad85864211ff0f276fa5121818d3c9b /src/import/chips/p9/procedures/hwp/pm
parente7a324f7574b3c05020b8e0fdcfc187c53ef700f (diff)
downloadtalos-hostboot-f5dd1c1283bad3f20c6d791f9f0fc5658a360163.tar.gz
talos-hostboot-f5dd1c1283bad3f20c6d791f9f0fc5658a360163.zip
SMF: Fixes to enable SMF on correct DD levels of Nimbus, Cumulus and Axone.
- engages new layout if SMF keyword is found in self restore image. - engages old layout if SMF keyword is not found in self restore image. - updates CPMR header indicating, URMOR bug workaround, STOP API version and self restore version. Key_Cronus_Test=PM_REGRESS Change-Id: I293cc2a1d15736e85c6565896ecfa4b00a8feb24 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69512 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69513 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-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_hcode_image_build.C28
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_scan_ring_util.C18
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_scan_ring_util.H8
3 files changed, 29 insertions, 25 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C
index d113b8735..c408c1dd8 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C
@@ -1410,9 +1410,9 @@ void updateCpmrCmeRegion( Homerlayout_t* i_pChipHomer )
* @brief updates various CPMR fields which are associated with self restore code.
* @param[in] i_pChipHomer points to start of P9 HOMER.
* @param[in] i_fuseState core fuse status
- * @param[in] i_urmorFix true if URMOR correction is needed else false.
+ * @param[in] i_smfEnabled true if SMF is enabled else false.
*/
-void updateCpmrHeaderSR( Homerlayout_t* i_pChipHomer, uint8_t i_fusedState, uint8_t i_urmorFix, uint32_t i_smfSign )
+void updateCpmrHeaderSR( Homerlayout_t* i_pChipHomer, uint8_t i_fusedState, uint8_t i_smfEnabled, uint32_t i_smfSign )
{
FAPI_INF(">> updateCpmrHeaderSR");
cpmrHeader_t* pCpmrHdr =
@@ -1423,17 +1423,22 @@ void updateCpmrHeaderSR( Homerlayout_t* i_pChipHomer, uint8_t i_fusedState, uint
pCpmrHdr->fusedModeStatus = i_fusedState ? uint32_t(FUSED_CORE_MODE) :
uint32_t(NONFUSED_CORE_MODE);
- if( i_urmorFix )
+ if( i_smfEnabled )
{
- if( SMF_SELF_SIGNATURE == i_smfSign )
- {
- pCpmrHdr->selfRestoreVer = 0x01;
- pCpmrHdr->stopApiVer = 0x01;
- }
-
pCpmrHdr->urmorFix = 0x01;
}
+ if( SMF_SELF_SIGNATURE == i_smfSign )
+ {
+ pCpmrHdr->selfRestoreVer = 0x01;
+ pCpmrHdr->stopApiVer = 0x01;
+ }
+ else
+ {
+ pCpmrHdr->selfRestoreVer = 0x00;
+ pCpmrHdr->stopApiVer = 0x00;
+ }
+
pCmeHdr->g_cme_mode_flags = SWIZZLE_4_BYTE(i_fusedState ? 1 : 0);
FAPI_INF("CPMR SR");
@@ -1819,7 +1824,7 @@ fapi2::ReturnCode buildCoreRestoreImage( void* const i_pImageIn,
//Padding SPR restore area with ATTN Opcode
FAPI_INF("Padding CPMR Core Restore portion with Attn opcodes");
- if( i_procFuncModel.hasUrmorBug() && ( SMF_SELF_SIGNATURE == l_pSmfSignature ) ) // Nimbus >= DD22 and Cumulus >= DD13
+ if( SMF_SELF_SIGNATURE == l_pSmfSignature ) // Nimbus >= DD22 and Cumulus >= DD13
{
FAPI_TRY( initSelfRestoreRegion( i_pChipHomer ),
"Failed To Initialize The Self-Restore Region" );
@@ -1832,10 +1837,9 @@ fapi2::ReturnCode buildCoreRestoreImage( void* const i_pImageIn,
FAPI_TRY( initSmfDisabledSelfRestore( i_pChipHomer ),
"Failed To Initialize Self-Restore Region In Non SMF Mode" );
}
-
}
- updateCpmrHeaderSR( i_pChipHomer, i_fusedState, i_procFuncModel.hasUrmorBug(), l_pSmfSignature );
+ updateCpmrHeaderSR( i_pChipHomer, i_fusedState, i_procFuncModel.isSmfEnabled(), l_pSmfSignature );
if( i_imgType.coreScomBuild )
{
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_scan_ring_util.C b/src/import/chips/p9/procedures/hwp/pm/p9_scan_ring_util.C
index 62b1b9d3d..ba0387bc3 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_scan_ring_util.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_scan_ring_util.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -777,7 +777,7 @@ P9FuncModel::P9FuncModel( ):
iv_funcQuads(0),
iv_ddLevel(0),
iv_chipName(0),
- iv_urmorBug(0)
+ iv_smfEn(0)
{ }
//-------------------------------------------------------------------------
@@ -789,7 +789,8 @@ P9FuncModel::P9FuncModel( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP >& i_
auto l_core_functional_vector =
i_procTgt.getChildren<fapi2::TARGET_TYPE_CORE>(fapi2::TARGET_STATE_FUNCTIONAL);
- uint8_t l_corePos = 0;
+ uint8_t l_corePos = 0;
+ const fapi2::Target<fapi2::TARGET_TYPE_SYSTEM> FAPI_SYSTEM;
for( auto it : l_core_functional_vector )
{
@@ -802,12 +803,12 @@ P9FuncModel::P9FuncModel( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP >& i_
FAPI_ATTR_GET_PRIVILEGED(fapi2::ATTR_EC, i_procTgt, iv_ddLevel);
FAPI_ATTR_GET_PRIVILEGED(fapi2::ATTR_NAME, i_procTgt, iv_chipName);
- FAPI_ATTR_GET(fapi2::ATTR_CHIP_EC_FEATURE_HW403111, i_procTgt, iv_urmorBug);
+ FAPI_ATTR_GET(fapi2::ATTR_SMF_ENABLED, FAPI_SYSTEM, iv_smfEn );
FAPI_DBG("functional core : 0x%08x Ex : 0x%08x quad 0x%08x"
- "EC : 0x%02x ChipName : 0x%02x URMOR Bug 0x%02x",
+ "EC : 0x%02x ChipName : 0x%02x SMF Enable : %s",
iv_funcCores, iv_funcExes, iv_funcQuads, iv_ddLevel,
- iv_chipName, iv_urmorBug );
+ iv_chipName, iv_smfEn ? "Yes" : "No" );
}
//---------------------------------------------------------------------------
@@ -851,11 +852,10 @@ uint8_t P9FuncModel::getChipName() const
}
//-------------------------------------------------------------------------
-bool P9FuncModel::hasUrmorBug() const
+bool P9FuncModel::isSmfEnabled() const
{
- return iv_urmorBug ? true : false;
+ return iv_smfEn ? true : false;
}
-
//-------------------------------------------------------------------------
}
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_scan_ring_util.H b/src/import/chips/p9/procedures/hwp/pm/p9_scan_ring_util.H
index 21f252f2f..f52832ff3 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_scan_ring_util.H
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_scan_ring_util.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -321,9 +321,9 @@ class P9FuncModel
uint8_t getChipName() const;
/**
- * returns true if URMOR has a hw bug else false.
+ * reutrns true if SMF is enabled else false.
*/
- bool hasUrmorBug() const;
+ bool isSmfEnabled() const;
/**
* @brief constructor
@@ -338,7 +338,7 @@ class P9FuncModel
uint8_t iv_funcQuads;
uint8_t iv_ddLevel;
uint8_t iv_chipName;
- uint8_t iv_urmorBug;
+ uint8_t iv_smfEn;
uint8_t iv_reserve[2];
};
OpenPOWER on IntegriCloud