diff options
author | Ilya Smirnov <ismirno@us.ibm.com> | 2018-02-07 12:14:48 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-02-13 14:35:56 -0500 |
commit | 05736e87c0ec5628188b04a2186e72751454b370 (patch) | |
tree | 93b529e29791c2059a3b6636a9deafb5338d2145 /src/usr/vpd | |
parent | 6cb8ac2dc748d94d931728f0ea2e20b9cf63fcf5 (diff) | |
download | talos-hostboot-05736e87c0ec5628188b04a2186e72751454b370.tar.gz talos-hostboot-05736e87c0ec5628188b04a2186e72751454b370.zip |
Check TYPE_NODE Targets Twice for Serial/Part Number Updates
There was an issue where the system serial number was not
updating properly in hostboot. The problem is that changing
just the system serial/part number does not trigger FRU update on
our side. The fix is to add an explicit check for SN/PN in
the code path that compares SEEPROM and PNOR records/keywords
for TYPE_NODE targets only.
Change-Id: I3c4d43e2ca9ade0e03c8f37198b67dd7e7efbbde
CQ:SW414411
Backport:release-op910
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53754
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@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/usr/vpd')
-rwxr-xr-x | src/usr/vpd/vpd.C | 78 |
1 files changed, 77 insertions, 1 deletions
diff --git a/src/usr/vpd/vpd.C b/src/usr/vpd/vpd.C index d8c3ae5af..e50b673f5 100755 --- a/src/usr/vpd/vpd.C +++ b/src/usr/vpd/vpd.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2017 */ +/* Contributors Listed Below - COPYRIGHT 2013,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -27,6 +27,7 @@ #include <errl/errlmanager.H> #include <errl/errludtarget.H> #include <vpd/vpdreasoncodes.H> +#include <vpd/pvpdenums.H> #include <initservice/initserviceif.H> #include <devicefw/driverif.H> #include <hwas/hwasPlat.H> @@ -698,6 +699,81 @@ errlHndl_t ensureCacheIsInSync ( TARGETING::Target * i_target ) break; } + //Check the serial number and part number of the system if the previous + //record/key pair matched. Note that this time the record/key pairs + //are OSYS/SS and OSYS/MM for serial number and part number,respectively + if(l_type == TARGETING::TYPE_NODE && + (l_matchSN && l_matchPN)) + { + + bool l_zeroPN = false; + bool l_zeroSN = false; + l_err = l_ipvpd->cmpSeepromToZero(i_target, + PVPD::OSYS, + PVPD::MM, + l_zeroPN); + if(l_err) + { + TRACDCOMP(g_trac_vpd,ERR_MRK"VPD::ensureCacheIsInSync: " + "cmpSeepromToZero returned an error. Assuming this error is " + "related to OSYS/MM not being present in SEEPROM. Skipping " + "this error. HUID: 0x%.8X", + TARGETING::get_huid(i_target)); + delete l_err; + l_err = nullptr; + l_zeroPN = true; + + } + + l_err = l_ipvpd->cmpSeepromToZero(i_target, + PVPD::OSYS, + PVPD::SS, + l_zeroSN); + if(l_err) + { + TRACDCOMP(g_trac_vpd,ERR_MRK"VPD::ensureCacheIsInSync: " + "cmpSeepromToZero returned an error. Assuming this error is " + "related to OSYS/SS not being present in SEEPROM. Skipping " + "this error. HUID: 0x%.8X", + TARGETING::get_huid(i_target)); + delete l_err; + l_err = nullptr; + l_zeroSN = true; + } + + //Only compare the SN/PN between SEEPROM and PNOR if they are + //nonzero. + if(!l_zeroPN) + { + l_err = l_ipvpd->cmpPnorToSeeprom(i_target, + PVPD::OSYS, + PVPD::MM, + l_matchPN); + if(l_err) + { + TRACFCOMP(g_trac_vpd,ERR_MRK"VPD::ensureCacheIsInSync: Error" + " checking for PNOR/SEEPROM PN match for NODE target 0x%.8X", + TARGETING::get_huid(i_target)); + break; + } + } + + if(!l_zeroSN) + { + l_err = l_ipvpd->cmpPnorToSeeprom(i_target, + PVPD::OSYS, + PVPD::SS, + l_matchSN); + if(l_err) + { + TRACFCOMP(g_trac_vpd,ERR_MRK"VPD::ensureCacheIsInSync: Error" + " checking for PNOR/SEEPROM SN match for NODE target 0x%.8X", + TARGETING::get_huid(i_target)); + break; + } + } + } + // If we did not match, we need to load SEEPROM VPD data into PNOR if( l_matchPN && l_matchSN ) { |