diff options
author | Elizabeth Liner <eliner@us.ibm.com> | 2017-09-18 20:58:29 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-09-19 16:02:41 -0400 |
commit | 97f44cca542f90537956f5f3932c3fdd1a4a829c (patch) | |
tree | 57ad90b641f34cf7137b575a3eb79aa666f29cf3 /src | |
parent | 66978d176b39eef7528c7a1a053ee82b33392793 (diff) | |
download | talos-hostboot-97f44cca542f90537956f5f3932c3fdd1a4a829c.tar.gz talos-hostboot-97f44cca542f90537956f5f3932c3fdd1a4a829c.zip |
Removing static variable and fixing MEMD error traces
The static variable for the MEMD checker wasn't working
properly and was causing us to not set the MEMD section
as our correct VPD at all.
Change-Id: I66c8fc4111893dcf13b5caa5c2bdb613178aef69
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46387
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
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: Prachi Gupta <pragupta@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/fapi2/plat_vpd_access.C | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/usr/fapi2/plat_vpd_access.C b/src/usr/fapi2/plat_vpd_access.C index dd360e8d1..164062c9d 100644 --- a/src/usr/fapi2/plat_vpd_access.C +++ b/src/usr/fapi2/plat_vpd_access.C @@ -262,7 +262,7 @@ fapi2::ReturnCode platGetVPD( l_rc.setPlatDataPtr(reinterpret_cast<void *>( l_errl )); break; } - l_full_dvpdVM = reinterpret_cast<uint32_t*>(l_dvpd_vm); + l_full_dvpdVM = (reinterpret_cast<uint32_t*>(l_dvpd_vm)); l_memd_found = find_memd_in_pnor(l_dvpd_vm, l_header, l_pMcsTarget, theSize); @@ -273,7 +273,7 @@ fapi2::ReturnCode platGetVPD( { FAPI_INF("platGetVPD: Matching MEMD data was found in the " "PNOR section, VM value is %llx. Reading in at " - "offset %llx",l_full_dvpdVM, l_memd_offset_bytes); + "offset %llx",l_full_dvpdVM[0], l_memd_offset_bytes); l_errl = deviceRead((TARGETING::Target *)l_pMcsTarget, l_pMapping, l_buffSize, @@ -284,7 +284,7 @@ fapi2::ReturnCode platGetVPD( { FAPI_INF("platGetVPD: Matching MEMD data was not found in " "the PNOR section, DVPD VM value is %llx", - l_full_dvpdVM); + l_full_dvpdVM[0]); } }while(0); @@ -301,7 +301,7 @@ fapi2::ReturnCode platGetVPD( { FAPI_INF("platGetVPD: MEMD data was not found in the PNOR " "section. Using EEPROM. VM value is: %llx", - l_full_dvpdVM); + l_full_dvpdVM[0]); l_errl = deviceRead((TARGETING::Target *)l_pMcsTarget, l_pMapping, @@ -455,7 +455,7 @@ bool find_memd_in_pnor(uint8_t* i_eepromVM, MemdHeader_t i_header, { errlHndl_t l_errl = nullptr; - static bool memdFoundInPnor = false; + bool memdFoundInPnor = false; bool l_valid_memd = ((i_header.eyecatch == MEMD_VALID_HEADER) & (i_header.header_version == MEMD_VALID_HEADER_VERSION) & (i_header.memd_version == MEMD_VALID_MEMD_VERSION) ); @@ -466,6 +466,7 @@ bool find_memd_in_pnor(uint8_t* i_eepromVM, MemdHeader_t i_header, if(l_valid_memd && !memdFoundInPnor) { + FAPI_INF("find_memd_in_pnor: MEMD is valid!"); // Reset memd offset before we start the first iteration i_target->setAttr<TARGETING::ATTR_MEMD_OFFSET>(0); @@ -480,6 +481,7 @@ bool find_memd_in_pnor(uint8_t* i_eepromVM, MemdHeader_t i_header, uint64_t l_memd_offset = i_target->getAttr< TARGETING::ATTR_MEMD_OFFSET>(); + FAPI_INF("find_memd_in_pnor: attempting to read MEMD VM keyword"); l_errl = deviceRead( i_target, l_memd_vm, i_vm_size, DEVICE_MEMD_VPD_ADDRESS( MEMD_VPD::MEMD, MEMD_VPD::VM)); @@ -499,8 +501,8 @@ bool find_memd_in_pnor(uint8_t* i_eepromVM, MemdHeader_t i_header, // VM's don't match, we need to keep looking FAPI_INF("find_memd_in_pnor: DVPD and MEMD VM's last nibble" " don't match: %llx and %llx", - reinterpret_cast<uint32_t*>(i_eepromVM), - reinterpret_cast<uint32_t*>(l_memd_vm) ); + (reinterpret_cast<uint32_t*>(i_eepromVM))[0], + (reinterpret_cast<uint32_t*>(l_memd_vm))[0] ); i_target->setAttr<TARGETING::ATTR_MEMD_OFFSET >(l_memd_offset + (i_header.expected_size_kb * 1000)); @@ -509,8 +511,10 @@ bool find_memd_in_pnor(uint8_t* i_eepromVM, MemdHeader_t i_header, { FAPI_INF("find_memd_in_pnor: Matching MEMD data was found in " "the PNOR section. VM value is: %llx. Offset " - "is %llx", reinterpret_cast<uint32_t*>(l_memd_vm), - l_memd_offset); + "is %llx, DVPD VM is %llx", + (reinterpret_cast<uint32_t*>(l_memd_vm))[0], + l_memd_offset, + (reinterpret_cast<uint32_t*>(i_eepromVM))[0]); memdFoundInPnor = true; l_retValue = true; break; |