diff options
| author | Dan Crowell <dcrowell@us.ibm.com> | 2018-06-18 23:05:31 -0500 |
|---|---|---|
| committer | William G. Hoffa <wghoffa@us.ibm.com> | 2018-07-03 09:18:52 -0400 |
| commit | e5dfc3ab0ec51ee63205c7064b7b4a4c4b8ba46f (patch) | |
| tree | 76ccf82718d46c0bb7bbb5cbcf451d2bbd03aaf6 /src/usr/vpd/test | |
| parent | 691894a135de3e81f4318a5498c4a964fdebb8ae (diff) | |
| download | talos-hostboot-e5dfc3ab0ec51ee63205c7064b7b4a4c4b8ba46f.tar.gz talos-hostboot-e5dfc3ab0ec51ee63205c7064b7b4a4c4b8ba46f.zip | |
Allow SPDX override as part of FW load
Memory VPD contents have changed since the cards have been
built so we need to provide a method to override the data
as part of a FW build. We have done the same thing
previously for the MEMD record on the Nimbus machines
so will use the same design here for SPDX.
As part of this change, the previous MEMD support was
refactored to be completely generic so a single code path
can be used for any arbitrary record.
Change-Id: I5af5e965429c881be3de0d18c82b1d7918ac9c22
CQ: SW430659
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/61190
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60980
Diffstat (limited to 'src/usr/vpd/test')
| -rwxr-xr-x | src/usr/vpd/test/dvpdtest.H | 54 |
1 files changed, 48 insertions, 6 deletions
diff --git a/src/usr/vpd/test/dvpdtest.H b/src/usr/vpd/test/dvpdtest.H index e7c61cdd2..b0d62a062 100755 --- a/src/usr/vpd/test/dvpdtest.H +++ b/src/usr/vpd/test/dvpdtest.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2016 */ +/* Contributors Listed Below - COPYRIGHT 2013,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -37,6 +37,7 @@ #include <errl/errlentry.H> #include <devicefw/driverif.H> #include <targeting/common/predicates/predicatectm.H> +#include <config.h> #include <vpd/dvpdenums.H> #include <vpd/vpdreasoncodes.H> @@ -204,6 +205,7 @@ class DVPDTest: public CxxTest::TestSuite /** * @brief This function will test DVPD writes. + * Note: this forces the path to not use the FW override */ void testDvpdWrite ( void ) { @@ -234,7 +236,9 @@ class DVPDTest: public CxxTest::TestSuite err = deviceRead( theTarget, testData, theSize, - DEVICE_DVPD_ADDRESS(DVPD::MEMD,TSTKEYWD) ); + DEVICE_DVPD_FORCE_ADDRESS(DVPD::MEMD, + TSTKEYWD, + VPD::USEVPD) ); if( err ) { fails++; @@ -254,7 +258,9 @@ class DVPDTest: public CxxTest::TestSuite err = deviceRead( theTarget, origData, theSize, - DEVICE_DVPD_ADDRESS(DVPD::MEMD,TSTKEYWD) ); + DEVICE_DVPD_FORCE_ADDRESS(DVPD::MEMD, + TSTKEYWD, + VPD::USEVPD) ); if( err ) { fails++; @@ -282,7 +288,9 @@ class DVPDTest: public CxxTest::TestSuite err = deviceWrite( theTarget, testData, theSize, - DEVICE_DVPD_ADDRESS(DVPD::MEMD,TSTKEYWD) ); + DEVICE_DVPD_FORCE_ADDRESS(DVPD::MEMD, + TSTKEYWD, + VPD::USEVPD) ); if( err ) { fails++; @@ -302,7 +310,9 @@ class DVPDTest: public CxxTest::TestSuite err = deviceRead( theTarget, verifyData, theSize, - DEVICE_DVPD_ADDRESS(DVPD::MEMD,TSTKEYWD) ); + DEVICE_DVPD_FORCE_ADDRESS(DVPD::MEMD, + TSTKEYWD, + VPD::USEVPD) ); if( err ) { fails++; @@ -334,7 +344,9 @@ class DVPDTest: public CxxTest::TestSuite err = deviceWrite( theTarget, origData, theSize, - DEVICE_DVPD_ADDRESS(DVPD::MEMD,TSTKEYWD) ); + DEVICE_DVPD_FORCE_ADDRESS(DVPD::MEMD, + TSTKEYWD, + VPD::USEVPD) ); if( err ) { fails++; @@ -716,6 +728,36 @@ class DVPDTest: public CxxTest::TestSuite "testDvpdCheckStructOrder - %d fails", fails ); } + + DVPDTest() : CxxTest::TestSuite() + { + TRACFCOMP( g_trac_vpd, "Starting DVPDTest" ); +#ifdef CONFIG_SECUREBOOT +#ifndef __HOSTBOOT_RUNTIME + errlHndl_t l_err = loadSecureSection(PNOR::MEMD); + if(l_err) + { + TS_FAIL( "DVPDTest : loadSecureSection" ); + delete l_err; + } +#endif +#endif + } + + ~DVPDTest() + { +#ifdef CONFIG_SECUREBOOT +#ifndef __HOSTBOOT_RUNTIME + errlHndl_t l_err = unloadSecureSection(PNOR::MEMD); + TRACFCOMP( g_trac_vpd, "Ending DVPDTest" ); + if(l_err) + { + TS_FAIL( "DVPDTest : unloadSecureSection" ); + delete l_err; + } +#endif +#endif + } }; #endif |

