summaryrefslogtreecommitdiffstats
path: root/src/usr/sbe/test
diff options
context:
space:
mode:
authorMarty Gloff <mgloff@us.ibm.com>2016-08-09 17:01:59 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-09-07 23:52:38 -0400
commit33a392720347794d6dd0f6d7502e615930241e1d (patch)
tree7ae1ec963f60a5c13dd005ec2a208049760c4b65 /src/usr/sbe/test
parente65b72fd34e9ca3eeacbaac3367053eb165566e7 (diff)
downloadtalos-hostboot-33a392720347794d6dd0f6d7502e615930241e1d.tar.gz
talos-hostboot-33a392720347794d6dd0f6d7502e615930241e1d.zip
Implement XIP Customization for Core Information
Loop to run xip_customize on the pnor image for each core must still be implemented. This commit also enables the call of p9_xip_customize only when not in the FSP environment. Change-Id: Iafc04e2ba05def7794315f9178b55dd2f2de35e4 RTC:158044 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28098 Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Matt Derksen <v2cibmd@us.ibm.com> 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/sbe/test')
-rw-r--r--src/usr/sbe/test/sbeupdatetest.H62
1 files changed, 60 insertions, 2 deletions
diff --git a/src/usr/sbe/test/sbeupdatetest.H b/src/usr/sbe/test/sbeupdatetest.H
index 8160fc3b6..2a2383a74 100644
--- a/src/usr/sbe/test/sbeupdatetest.H
+++ b/src/usr/sbe/test/sbeupdatetest.H
@@ -182,8 +182,66 @@ class SBEUpdateTest: public CxxTest::TestSuite
{
public:
- // @TODO RTC:158044 testTrimBitMask removed after earlier review comment
- // may still be needed. Use Story 158044 to replace.
+ /**
+ * @brief This function will test __trimCoreMask
+ */
+ void testTrimBitMask( void )
+ {
+
+ uint64_t fails = 0x0;
+ uint64_t total = 0x0;
+
+ do{
+
+ TRACFCOMP( g_trac_sbe,
+ ENTER_MRK"testTrimBitMask()" );
+
+ struct
+ {
+ uint32_t inMask;
+ uint32_t maxBits;
+ uint32_t outMask;
+ } testData[] =
+ {
+ {0xFFFFFFFF, 10, 0x000003FF},
+ {0xFFFFFFFF, 32, 0xFFFFFFFF},
+ {0x0000FF00, 4, 0x00000F00},
+ {0x0000FA30, 3, 0x00000230},
+ {0x0000FF00, 8, 0x0000FF00},
+ {0x0000FF50, 16, 0x0000FF50},
+ {0x0000EC50, 4, 0x00000C50},
+ {0x000000FF, 5, 0x0000001F},
+ {0x000000FF, 8, 0x000000FF},
+ {0x11111111, 5, 0x00011111},
+ {0x55555555, 11, 0x00155555},
+ };
+ const uint32_t NUM_TESTS = sizeof(testData)/sizeof(testData[0]);
+
+ uint32_t retMask = 0;
+
+ for(uint32_t i=0; i < NUM_TESTS; i++)
+ {
+ retMask = trimBitMask(testData[i].inMask,
+ testData[i].maxBits);
+ total++;
+ if(retMask != testData[i].outMask)
+ {
+ fails++;
+ TRACFCOMP( g_trac_sbe, ERR_MRK"testTrimBitMask() - i=%d, "
+ "retMask=0x%.8X, expMask=0x%.8X",
+ i, retMask, testData[i].outMask);
+ TS_FAIL("testTrimBitMask() - Return data did not match "
+ "expected data.");
+ }
+ }
+
+ }while(0);
+
+ TRACFCOMP( g_trac_sbe,
+ EXIT_MRK"testTrimBitMask - %d/%d fails",
+ fails, total );
+ }
+
/**
* @brief This function will test SBE Update's ability
OpenPOWER on IntegriCloud