diff options
author | Abhishek Agarwal <abagarw8@in.ibm.com> | 2016-06-17 10:38:47 +0200 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-06-21 11:58:58 -0400 |
commit | 1a8da4a52d672ffada80daf1eac27f30ae41d43b (patch) | |
tree | 5ffeeb91993eb6627faf343d21b45675560df3fa | |
parent | 7159c48a5e6e5eefa2e2a1c9492152042e11a506 (diff) | |
download | talos-hostboot-1a8da4a52d672ffada80daf1eac27f30ae41d43b.tar.gz talos-hostboot-1a8da4a52d672ffada80daf1eac27f30ae41d43b.zip |
Level 2 HWP p9_getecid
Updated wrapper file with decoding fuse String
Updated C code requirement with variable Buffer
Change-Id: I2be396ca3ea25e9eb23379b43f48787ac49a190d
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25974
Tested-by: Jenkins Server
Tested-by: Hostboot CI
Reviewed-by: Soma Bhanutej <soma.bhanu@in.ibm.com>
Reviewed-by: Sunil Kumar <skumar8j@in.ibm.com>
Reviewed-by: PARVATHI RACHAKONDA <prachako@in.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25975
Tested-by: FSP CI Jenkins
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r-- | src/import/chips/p9/procedures/hwp/perv/p9_getecid.C | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_getecid.C b/src/import/chips/p9/procedures/hwp/perv/p9_getecid.C index 077beb945..9ed26a802 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_getecid.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_getecid.C @@ -53,8 +53,6 @@ fapi2::ReturnCode p9_getecid(const bool secure_mode = false; fapi2::buffer<uint64_t> l_ecid_part0_data64 = 0; fapi2::buffer<uint64_t> l_ecid_part1_data64 = 0; - fapi2::buffer<uint64_t> l_ecid_part1_data48 = 0; - fapi2::buffer<uint64_t> l_local = 0; FAPI_INF("Entering ..."); FAPI_DBG("determine if security is enabled"); @@ -75,18 +73,19 @@ fapi2::ReturnCode p9_getecid(const FAPI_DBG("extract and manipulate ECID data"); FAPI_TRY(fapi2::getScom(i_target_chip, PU_OTPROM0_ECID_PART0_REGISTER, l_ecid_part0_data64)); FAPI_TRY(fapi2::getScom(i_target_chip, PU_OTPROM0_ECID_PART1_REGISTER, l_ecid_part1_data64)); + l_ecid_part0_data64.reverse(); l_ecid_part1_data64.reverse(); - l_local.insertFromRight<0, 64>(l_ecid_part0_data64); - attr_data[0] = l_local; - l_local.insertFromRight<0, 64>(l_ecid_part1_data64); - attr_data[1] = l_local; - o_fuseString.insert(l_ecid_part0_data64, 0, 64, 0); - l_ecid_part1_data64.extractToRight<0, 48>(l_ecid_part1_data48); - o_fuseString.insert(l_ecid_part1_data48, 64, 48, 0); + attr_data[0] = l_ecid_part0_data64(); + attr_data[1] = l_ecid_part1_data64(); + + FAPI_TRY(o_fuseString.insert(l_ecid_part0_data64(), 0, 64)); + + FAPI_TRY(o_fuseString.insert(l_ecid_part1_data64(), 64, 48)); FAPI_DBG("push fuse string into attribute"); + FAPI_TRY(FAPI_ATTR_SET(fapi2::ATTR_ECID, i_target_chip, attr_data)); FAPI_DBG("restore ECC enable setting (insecure mode only)"); @@ -106,3 +105,4 @@ fapi_try_exit: return fapi2::current_err; } + |