summaryrefslogtreecommitdiffstats
path: root/src/usr/vpd/test
diff options
context:
space:
mode:
authorwhs <whs@us.ibm.com>2016-04-04 10:19:37 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-06-30 23:52:31 -0400
commitc9219373d4320bf513046e69903ce33243e84be6 (patch)
tree93494842bf5a673b00910edc756f19d3e1e1a026 /src/usr/vpd/test
parentf07603a9f2eab60e8e524ff487787086b9a5304e (diff)
downloadtalos-hostboot-c9219373d4320bf513046e69903ce33243e84be6.tar.gz
talos-hostboot-c9219373d4320bf513046e69903ce33243e84be6.zip
Changes related to packaging of memory vpd on Nimbus - part 2
Add the "upper" half of the NIMBUS direct memory support. Add ATTR_MEMVPD_FREQS_MHZ and ATTR_MEMVPD_POS attributes. Implement plat_vpd_access to call p9_getmem_vpd_keyword which decodes which vpd keyword to read for MR and MT. Update dvpd DD with record and keyword list. Update dvpd.dat simics vpd file to include MR and MT that map to J0 and X0. Change-Id: Ife00aa4266a7c16dcff2f0f72837f4d547988b82 RTC: 144519 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23245 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/vpd/test')
-rwxr-xr-xsrc/usr/vpd/test/dvpdtest.H53
1 files changed, 21 insertions, 32 deletions
diff --git a/src/usr/vpd/test/dvpdtest.H b/src/usr/vpd/test/dvpdtest.H
index c192d326c..30daedafa 100755
--- a/src/usr/vpd/test/dvpdtest.H
+++ b/src/usr/vpd/test/dvpdtest.H
@@ -47,6 +47,9 @@ extern trace_desc_t* g_trac_vpd;
using namespace TARGETING;
+//Use this keyword for general testing where just some keyword is needed.
+constexpr uint64_t TSTKEYWD = DVPD::J4;
+
/**
* @brief Structure to define record/keyword pairs for DVPD tests.
*/
@@ -61,20 +64,8 @@ struct dvpdTestData
*/
dvpdTestData dvpdData[] =
{
- { DVPD::VEIR, DVPD::pdI },
- { DVPD::MER0, DVPD::pdI },
- { DVPD::VSPD, DVPD::pdI },
- { DVPD::VSPD, DVPD::MT },
- { DVPD::VSPD, DVPD::MR },
- { DVPD::VSPD, DVPD::pdA },
- { DVPD::VSPD, DVPD::EL },
- { DVPD::VSPD, DVPD::LM },
- { DVPD::VSPD, DVPD::MW },
- { DVPD::VSPD, DVPD::MV },
- { DVPD::VSPD, DVPD::AM },
- { DVPD::VINI, DVPD::VZ },
- { DVPD::VSPD, DVPD::MX },
-
+ { DVPD::MEMD, DVPD::MR },
+ { DVPD::MEMD, DVPD::MT },
};
TARGETING::Target* getFunctionalMcsTarget()
@@ -239,13 +230,13 @@ class DVPDTest: public CxxTest::TestSuite
err = deviceRead( theTarget,
testData,
theSize,
- DEVICE_DVPD_ADDRESS(DVPD::VEIR,DVPD::pdI) );
+ DEVICE_DVPD_ADDRESS(DVPD::MEMD,TSTKEYWD) );
if( err )
{
fails++;
TRACFCOMP( g_trac_vpd,
ERR_MRK"testDvpdWrite() - "
- "failure getting size of VEIR/#I, RC=%.4X",
+ "failure getting size of MEMD/J4, RC=%.4X",
err->reasonCode() );
TS_FAIL( "testDvpdWrite() - Failure calling deviceRead!" );
errlCommit( err,
@@ -259,13 +250,13 @@ class DVPDTest: public CxxTest::TestSuite
err = deviceRead( theTarget,
origData,
theSize,
- DEVICE_DVPD_ADDRESS(DVPD::VEIR,DVPD::pdI) );
+ DEVICE_DVPD_ADDRESS(DVPD::MEMD,TSTKEYWD) );
if( err )
{
fails++;
TRACFCOMP( g_trac_vpd,
ERR_MRK"testDvpdWrite() - "
- "failure reading VEIR/#I, RC=%.4X",
+ "failure reading MEMD/J4, RC=%.4X",
err->reasonCode() );
TS_FAIL( "testDvpdWrite() - Failure calling deviceRead!" );
errlCommit( err,
@@ -287,13 +278,13 @@ class DVPDTest: public CxxTest::TestSuite
err = deviceWrite( theTarget,
testData,
theSize,
- DEVICE_DVPD_ADDRESS(DVPD::VEIR,DVPD::pdI) );
+ DEVICE_DVPD_ADDRESS(DVPD::MEMD,TSTKEYWD) );
if( err )
{
fails++;
TRACFCOMP( g_trac_vpd,
ERR_MRK"testDvpdWrite() - "
- "failure writing VEIR/#I, RC=%.4X",
+ "failure writing MEMD/J4, RC=%.4X",
err->reasonCode() );
TS_FAIL( "testDvpdWrite() - Failure calling deviceWrite!" );
errlCommit( err,
@@ -307,13 +298,13 @@ class DVPDTest: public CxxTest::TestSuite
err = deviceRead( theTarget,
verifyData,
theSize,
- DEVICE_DVPD_ADDRESS(DVPD::VEIR,DVPD::pdI) );
+ DEVICE_DVPD_ADDRESS(DVPD::MEMD,TSTKEYWD) );
if( err )
{
fails++;
TRACFCOMP( g_trac_vpd,
ERR_MRK"testDvpdWrite() - "
- "failure reading VEIR/#I to verify, RC=%.4X",
+ "failure reading MEMD/J4 to verify, RC=%.4X",
err->reasonCode() );
TS_FAIL( "testDvpdWrite() - Failure calling deviceRead!" );
errlCommit( err,
@@ -339,13 +330,13 @@ class DVPDTest: public CxxTest::TestSuite
err = deviceWrite( theTarget,
origData,
theSize,
- DEVICE_DVPD_ADDRESS(DVPD::VEIR,DVPD::pdI) );
+ DEVICE_DVPD_ADDRESS(DVPD::MEMD,TSTKEYWD) );
if( err )
{
fails++;
TRACFCOMP( g_trac_vpd,
ERR_MRK"testDvpdWrite() - "
- "failure writing original data back into VEIR/#I, RC=%.4X",
+ "failure writing original data back into MEMD/J4, RC=%.4X",
err->reasonCode() );
TS_FAIL( "testDvpdWrite() - Failure calling deviceRead!" );
errlCommit( err,
@@ -416,7 +407,7 @@ class DVPDTest: public CxxTest::TestSuite
theData,
theSize,
DEVICE_DVPD_ADDRESS( DVPD::DVPD_LAST_RECORD,
- DVPD::pdI ) );
+ TSTKEYWD ) );
if( NULL == err )
{
@@ -474,7 +465,7 @@ class DVPDTest: public CxxTest::TestSuite
theData,
theSize,
DEVICE_DVPD_ADDRESS( DVPD::DVPD_TEST_RECORD,
- DVPD::pdI ) );
+ TSTKEYWD ) );
if( NULL == err )
{
@@ -493,7 +484,6 @@ class DVPDTest: public CxxTest::TestSuite
theData = NULL;
}
} while( 0 );
-
TRACFCOMP( g_trac_vpd,
"testDvpdMissingRecord - %d/%d fails",
fails, cmds );
@@ -568,7 +558,6 @@ class DVPDTest: public CxxTest::TestSuite
TRACFCOMP( g_trac_vpd,
ENTER_MRK"testDvpdInvalidKeyword()" );
-
do
{
TARGETING::Target * theTarget = getFunctionalMcsTarget();
@@ -585,7 +574,7 @@ class DVPDTest: public CxxTest::TestSuite
err = deviceRead(theTarget,
theData,
theSize,
- DEVICE_DVPD_ADDRESS(DVPD::VEIR,
+ DEVICE_DVPD_ADDRESS(DVPD::MEMD,
DVPD::DVPD_LAST_KEYWORD));
if( NULL == err )
@@ -621,7 +610,7 @@ class DVPDTest: public CxxTest::TestSuite
*/
void testDvpdInvalidBufferSize ( void )
{
- errlHndl_t err = NULL;
+ errlHndl_t err = NULL;
uint64_t cmds = 0x0;
uint64_t fails = 0x0;
@@ -644,8 +633,8 @@ class DVPDTest: public CxxTest::TestSuite
err = deviceRead( theTarget,
theData,
theSize,
- DEVICE_DVPD_ADDRESS( DVPD::VEIR,
- DVPD::pdI ) );
+ DEVICE_DVPD_ADDRESS( DVPD::MEMD,
+ TSTKEYWD ) );
if( NULL == err )
{
OpenPOWER on IntegriCloud