diff options
author | Prem Shanker Jha <premjha2@in.ibm.com> | 2019-02-14 09:59:33 -0600 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2019-03-16 14:54:27 -0500 |
commit | 143d0395280671e9829927df16761c7c588923ce (patch) | |
tree | 45097c20ce2661cc7dec1b01ffd4ed39ffe6ecfc /src/import/chips | |
parent | 395f284926ab9d6e920296d1bbc9d2f734ad284d (diff) | |
download | talos-hostboot-143d0395280671e9829927df16761c7c588923ce.tar.gz talos-hostboot-143d0395280671e9829927df16761c7c588923ce.zip |
Image Build: Fixed handling of unsecure HOMER address field.
Commit initializes CME image header field pointing to unsecure HOMER
with address of CPMR region of regular HOMER. This is done only if SMF
is disabled on a machine. This reduces some complexity in CME hcode.
Key_Cronus_Test=PM_REGRESS
Change-Id: If621311a61ac9ff9cc3f76c2c2bc3104a3e32619
CQ: SW458466
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71890
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Tested-by: Cronus HW CI <cronushw-ci+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: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71907
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')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C | 22 |
1 files changed, 16 insertions, 6 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 26b86098c..3619279b5 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 @@ -144,7 +144,7 @@ enum CORE_REST_WORDS_PER_THREAD = (CORE_RESTORE_SIZE_PER_THREAD >> 2), TWO_MB_ALIGNMENT_CHECK = 0x1FFFFF, SMF_BIT_CHECK = 0x0001000000000000ull, - INST_VALUE_SC2 = 0x44400042, + INST_VALUE_SC2 = 0x44000042, SRESET_WORD_POS = 0x40, }; @@ -4801,13 +4801,15 @@ fapi_try_exit: /** * @brief populates CME image header with base address of unsecure HOMER. - * @param[in] i_procTgt fapi2 target for P9 chip - * @param[in] i_pHomer points to HOMER + * @param[in] i_procTgt fapi2 target for P9 chip + * @param[in] i_pHomer points to HOMER + * @param[in] i_smfEnabled SMF enable status * @return fapi2 return code * @note: initializes CME image header irrespective of SMF enable state for * simplicity. It will be a behave as NOP for SMF disabled system. */ -fapi2::ReturnCode populateUnsecureHomerAddress( CONST_FAPI2_PROC& i_procTgt, Homerlayout_t* i_pHomer ) +fapi2::ReturnCode populateUnsecureHomerAddress( CONST_FAPI2_PROC& i_procTgt, Homerlayout_t* i_pHomer, + uint8_t i_smfEnabled ) { uint64_t l_unsecureHomerAdd = 0; uint8_t l_invalidAddress = 0; @@ -4815,6 +4817,14 @@ fapi2::ReturnCode populateUnsecureHomerAddress( CONST_FAPI2_PROC& i_procTgt, Hom (cmeHeader_t*) & i_pHomer->cpmrRegion.cmeSramRegion[CME_INT_VECTOR_SIZE]; FAPI_DBG( ">> populateUnsecureHomerAddress" ); + if( !i_smfEnabled ) + { + //if SMF is disabled, populating Us-Secure HOMER address field with as Regular HOMER + //address. This approach keeps hcode design simple. + pCmeHdr->g_cme_unsec_cpmr_PhyAddr = pCmeHdr->g_cme_cpmr_PhyAddr; + goto fapi_try_exit; + } + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_UNSECURE_HOMER_ADDRESS, i_procTgt, l_unsecureHomerAdd), @@ -4885,7 +4895,7 @@ fapi2::ReturnCode initUnsecureHomer( void* const i_pBuf2, const uint32_t i_s memcpy( l_pWord + wordCnt, &l_initInst, sizeof(uint32_t) ); } - l_initInst = INST_VALUE_SC2; + l_initInst = SWIZZLE_4_BYTE(INST_VALUE_SC2); memcpy( l_pWord + SRESET_WORD_POS, &l_initInst, sizeof(uint32_t) ); fapi_try_exit: @@ -5071,7 +5081,7 @@ fapi2::ReturnCode p9_hcode_image_build( CONST_FAPI2_PROC& i_procTgt, l_riskLevel, l_qpmrHdr, i_imgType ), "Failed To Layout Quad Rings" ); - FAPI_TRY( populateUnsecureHomerAddress( i_procTgt, pChipHomer ), + FAPI_TRY( populateUnsecureHomerAddress( i_procTgt, pChipHomer, l_chipFuncModel.isSmfEnabled() ), "Failed To Populate Unsecure HOMER Region with sc2 instruction" ); //Update CPMR Header with Scan Ring details |