diff options
author | Prem Shanker Jha <premjha2@in.ibm.com> | 2017-06-13 02:40:04 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-06-15 12:25:10 -0400 |
commit | cf636ad2527070d3d7da277e03ba2b394ed77a29 (patch) | |
tree | 7f5b328c9d4dd4df056463d6848b16641e01fa66 | |
parent | 87cf91da75417c4596a6f18b4ca4586ebcfe9e71 (diff) | |
download | talos-hostboot-cf636ad2527070d3d7da277e03ba2b394ed77a29.tar.gz talos-hostboot-cf636ad2527070d3d7da277e03ba2b394ed77a29.zip |
PM: CPMR magic word correction.
Hcode image build temporarily adds dd level specific magic word
in HOMER. This broke STOP API and HOMER parser which check for
a DD1 specific magic word to validate CPMR region of HOMER. Commit
makes those check independent of DD level variation.
Change-Id: I2c59c5367c462506c05c1703865b9a4a7ec198c3
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41736
Dev-Ready: Joseph J. McGill <jmcgill@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: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41825
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
3 files changed, 6 insertions, 2 deletions
diff --git a/src/import/chips/p9/procedures/hwp/lib/p9_hcd_memmap_base.H b/src/import/chips/p9/procedures/hwp/lib/p9_hcd_memmap_base.H index 7de2e438a..1b7fa4903 100644 --- a/src/import/chips/p9/procedures/hwp/lib/p9_hcd_memmap_base.H +++ b/src/import/chips/p9/procedures/hwp/lib/p9_hcd_memmap_base.H @@ -60,6 +60,7 @@ HCD_CONST(SGPE_BUILD_VERSION, 0x001) // SGPE_1.0 HCD_CONST(PGPE_BUILD_VERSION, 0x001) // PGPE_1.0 HCD_CONST64(CPMR_MAGIC_NUMBER_BASE, ULL(0x43504d525f302e30)) // CPMR_0.0 +HCD_CONST(CPMR_REGION_CHECK_WORD, (0x43504d52)) // CPMR HCD_CONST64(CME_MAGIC_NUMBER_BASE , ULL(0x434d455f5f302e30)) // CME__0.0 HCD_CONST64(QPMR_MAGIC_NUMBER_BASE, ULL(0x51504d525f302e30)) // QPMR_0.0 HCD_CONST64(SGPE_MAGIC_NUMBER_BASE, ULL(0x534750455f302e30)) // SGPE_0.0 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 2bfb7ea1c..1b536348d 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 @@ -3810,7 +3810,7 @@ void customizeMagicWord( Homerlayout_t* i_pHomer, uint8_t i_ecLevel ) magicWordCustom[i] += ecMajor; *pMagicWord[i] = SWIZZLE_8_BYTE( magicWordCustom[i]); memcpy( tempBuf, pMagicWord[i], sizeof(uint64_t) ); - FAPI_INF("%s\t\t:\t\t %s ( 0x%016lx ) ", &magicWord[i], tempBuf, *pMagicWord[i] ); + FAPI_INF("%s\t\t:\t\t %s ( 0x%016lx ) ", &magicWord[i], tempBuf, SWIZZLE_8_BYTE(*pMagicWord[i]) ); } FAPI_INF("=========== Header Magic Words Info Ends ==========="); diff --git a/src/import/chips/p9/procedures/utils/stopreg/p9_stop_util.C b/src/import/chips/p9/procedures/utils/stopreg/p9_stop_util.C index f745a1738..6fb8d679f 100755 --- a/src/import/chips/p9/procedures/utils/stopreg/p9_stop_util.C +++ b/src/import/chips/p9/procedures/utils/stopreg/p9_stop_util.C @@ -66,7 +66,10 @@ static StopReturnCode_t isFusedMode( void* const i_pImage, bool* o_fusedMode ) } - if( SWIZZLE_8_BYTE(CPMR_MAGIC_NUMBER) != pHomer->cpmrMagicWord ) + uint64_t cpmrCheckWord = SWIZZLE_8_BYTE(pHomer->cpmrMagicWord); + cpmrCheckWord = cpmrCheckWord >> 32; + + if( CPMR_REGION_CHECK_WORD != cpmrCheckWord ) { MY_ERR("corrupt or invalid HOMER image location 0x%016llx", SWIZZLE_8_BYTE(pHomer->cpmrMagicWord) ); |