diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2015-04-02 12:29:45 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-04-09 21:39:53 -0500 |
commit | 190797041cf52f4c02d84582fce18ec77a7c475a (patch) | |
tree | d9debc6d08abc3b003bb3b37b24e4f0c29ab0971 | |
parent | 9419597dac3c8e59da79023acdbda64f1ab0d5ca (diff) | |
download | talos-hostboot-190797041cf52f4c02d84582fce18ec77a7c475a.tar.gz talos-hostboot-190797041cf52f4c02d84582fce18ec77a7c475a.zip |
Fix constant refresh of vpd cache
Code was inadvertantly detecting mismatched pnor cache contents
on every boot.
Change-Id: I631dc758e03316a28d13f6d19032c1a76e3cffc1
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16839
Tested-by: Jenkins Server
Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com>
Reviewed-by: William H. Schwartz <whs@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r-- | src/usr/vpd/ipvpd.C | 18 | ||||
-rw-r--r-- | src/usr/vpd/ipvpd.H | 5 | ||||
-rwxr-xr-x | src/usr/vpd/vpd.C | 2 |
3 files changed, 17 insertions, 8 deletions
diff --git a/src/usr/vpd/ipvpd.C b/src/usr/vpd/ipvpd.C index b409c503f..9db9bc525 100644 --- a/src/usr/vpd/ipvpd.C +++ b/src/usr/vpd/ipvpd.C @@ -397,6 +397,9 @@ errlHndl_t IpVpdFacade::cmpPnorToSeeprom ( TARGETING::Target * i_target, l_dataSeeprom, l_sizePnor ) != 0 ) { + TRACFCOMP( g_trac_vpd, "cmpPnorToSeeprom found mismatch for HUID %.8X 0x%X:0x%X", TARGETING::get_huid(i_target), i_record, i_keyword ); + TRACFBIN( g_trac_vpd, "EEPROM", l_dataSeeprom, l_sizeSeeprom ); + TRACFBIN( g_trac_vpd, "PNOR", l_dataPnor, l_sizePnor ); break; } @@ -961,8 +964,9 @@ bool IpVpdFacade::hasVpdPresent( TARGETING::Target * i_target, } vpdPresent = recordPresent( recordName, - recordOffset, - i_target ); + recordOffset, + i_target, + VPD::AUTOSELECT ); }while( 0 ); @@ -981,7 +985,8 @@ bool IpVpdFacade::hasVpdPresent( TARGETING::Target * i_target, // ------------------------------------------------------------------ bool IpVpdFacade::recordPresent( const char * i_record, uint16_t & o_offset, - TARGETING::Target * i_target ) + TARGETING::Target * i_target, + VPD::vpdCmdTarget i_location ) { errlHndl_t err = NULL; uint64_t tmpOffset = 0x0; @@ -1009,7 +1014,7 @@ bool IpVpdFacade::recordPresent( const char * i_record, RECORD_BYTE_SIZE, record, i_target, - VPD::AUTOSELECT ); + i_location ); tmpOffset += RECORD_BYTE_SIZE; if( err ) @@ -1026,7 +1031,7 @@ bool IpVpdFacade::recordPresent( const char * i_record, RECORD_ADDR_BYTE_SIZE, &o_offset, i_target, - VPD::AUTOSELECT ); + i_location ); if( err ) { break; @@ -1066,7 +1071,8 @@ errlHndl_t IpVpdFacade::findRecordOffsetPnor ( const char * i_record, matchFound = recordPresent( i_record, offset, - i_target ); + i_target, + i_args.location ); if( !matchFound ) { diff --git a/src/usr/vpd/ipvpd.H b/src/usr/vpd/ipvpd.H index 7a38c3e28..5cc7bec7e 100644 --- a/src/usr/vpd/ipvpd.H +++ b/src/usr/vpd/ipvpd.H @@ -374,11 +374,14 @@ class IpVpdFacade * * @param[in] i_target - The target to retrieve the data for. * + * @param[in] i_location - VPD location to fetch data from (PNOR/SEEPROM) + * * @return bool - True if the record is found, False otherwise. */ bool recordPresent( const char * i_record, uint16_t & offset, - TARGETING::Target * i_target ); + TARGETING::Target * i_target, + VPD::vpdCmdTarget i_location ); /** * @brief This function will read the VPD TOC to find the offset where the diff --git a/src/usr/vpd/vpd.C b/src/usr/vpd/vpd.C index fa32478e5..9b4e1f82c 100755 --- a/src/usr/vpd/vpd.C +++ b/src/usr/vpd/vpd.C @@ -567,7 +567,7 @@ errlHndl_t ensureCacheIsInSync ( TARGETING::Target * i_target ) // If we did not match, we need to load SEEPROM VPD data into PNOR if( l_matchPN && l_matchSN ) { - TRACFCOMP(g_trac_vpd,"VPD::ensureCacheIsInSync: PNOR_PN/SN = SEEPROM_PN/SN for target %.8X",TARGETING::get_huid(i_target)); + TRACFCOMP(g_trac_vpd,"VPD::ensureCacheIsInSync: PNOR_PN/SN == SEEPROM_PN/SN for target %.8X",TARGETING::get_huid(i_target)); } else { |