diff options
| author | Dan Crowell <dcrowell@us.ibm.com> | 2019-02-20 09:18:07 -0600 |
|---|---|---|
| committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2019-03-07 16:35:52 -0600 |
| commit | 386165c1c5dad4b0dde4a94401b4feb0435787a9 (patch) | |
| tree | f43ec0e10671d3751a3d3d1eb7160306b1a8da95 /src/usr | |
| parent | ebf6fda9958f1b82742bea22e98388f38a9b62d5 (diff) | |
| download | talos-hostboot-386165c1c5dad4b0dde4a94401b4feb0435787a9.tar.gz talos-hostboot-386165c1c5dad4b0dde4a94401b4feb0435787a9.zip | |
Updates to testcases for Axone
Disabling a few testcases temporarily until Axone gets off
the ground.
Cleaned up some bad traces, etc in existing code.
Add CI support for AXONE config
Change-Id: I7a2140366e225971c91a50cec1f7e822e4847078
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72186
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-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>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/usr')
| -rwxr-xr-x | src/usr/diag/prdf/test/prdf_hb_common_test.mk | 4 | ||||
| -rw-r--r-- | src/usr/expscom/test/expscomtest.H | 83 | ||||
| -rw-r--r-- | src/usr/fapi2/test/fapi2BasicTryTest.H | 16 | ||||
| -rw-r--r-- | src/usr/fapi2/test/fapi2GetChildrenTest.H | 96 | ||||
| -rw-r--r-- | src/usr/fapi2/test/fapi2GetParentTest.H | 21 | ||||
| -rw-r--r-- | src/usr/fapi2/test/fapi2HwpTest.H | 5 | ||||
| -rw-r--r-- | src/usr/fapi2/test/fapi2IsFunctionalTest.H | 5 | ||||
| -rw-r--r-- | src/usr/fapi2/test/fapi2MmioAccessTest.H | 3 | ||||
| -rw-r--r-- | src/usr/fapi2/test/fapi2TestUtils.C | 26 | ||||
| -rw-r--r-- | src/usr/fapi2/test/fapi2TestUtils.H | 13 | ||||
| -rw-r--r-- | src/usr/fapi2/test/fapi2ToStringTest.H | 66 | ||||
| -rwxr-xr-x | src/usr/i2c/test/tpmddtest.H | 5 | ||||
| -rw-r--r-- | src/usr/scom/scomtrans.C | 5 | ||||
| -rw-r--r-- | src/usr/scom/test/scomtest.H | 41 | ||||
| -rw-r--r-- | src/usr/targeting/common/xmltohb/simics_AXONE.system.xml | 4 |
15 files changed, 281 insertions, 112 deletions
diff --git a/src/usr/diag/prdf/test/prdf_hb_common_test.mk b/src/usr/diag/prdf/test/prdf_hb_common_test.mk index 78c116c2a..a148e0c24 100755 --- a/src/usr/diag/prdf/test/prdf_hb_common_test.mk +++ b/src/usr/diag/prdf/test/prdf_hb_common_test.mk @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2012,2018 +# Contributors Listed Below - COPYRIGHT 2012,2019 # [+] International Business Machines Corp. # # @@ -92,7 +92,7 @@ TESTS += ${PRD_USR_TEST_PATH}/prdfTest_XBus.H TESTS += ${PRD_USR_TEST_PATH}/prdfTest_ABus.H TESTS += ${PRD_USR_TEST_PATH}/prdfTest_ProcCentFir.H TESTS += ${PRD_USR_TEST_PATH}/prdfTest_Ex.H -TESTS += ${PRD_USR_TEST_PATH}/prdfTest_NimbusTpLFir.H +TESTS += $(if $(CONFIG_AXONE_BRING_UP),,${PRD_USR_TEST_PATH}/prdfTest_NimbusTpLFir.H) #@TODO RTC:178802 #TESTS += ${PRD_USR_TEST_PATH}/prdfTest_Mcs.H diff --git a/src/usr/expscom/test/expscomtest.H b/src/usr/expscom/test/expscomtest.H index a5741d632..4acb72e21 100644 --- a/src/usr/expscom/test/expscomtest.H +++ b/src/usr/expscom/test/expscomtest.H @@ -92,6 +92,21 @@ errlCommit(l_err, 0x10); class expscomTest: public CxxTest::TestSuite { +private: + fapi2::ReturnCode put_scom(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target, + const uint64_t i_address, + const fapi2::buffer<uint64_t> i_data) + { + return fapi2::putScom(i_target,i_address,i_data); + } + + fapi2::ReturnCode get_scom(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target, + const uint64_t i_address, + fapi2::buffer<uint64_t>& o_data) + { + return fapi2::getScom(i_target,i_address,o_data); + } + public: /** @@ -113,6 +128,11 @@ public: TargetHandleList l_explorerList; do{ +// Causing a data storage exception in c_str... +#ifdef CONFIG_AXONE_BRING_UP +TRACFCOMP( g_trac_expscom,"skipping testExpscomI2c"); +break; +#endif // Get the system's OCMB chips, we will use these as test targets getAllChips( l_explorerList, TYPE_OCMB_CHIP, @@ -159,27 +179,27 @@ public: l_scom_buffer.insert<32,32,0,uint32_t>(l_testEntry.data); } - FAPI_INVOKE_HWP(l_err, fapi2::putScom, + FAPI_INVOKE_HWP(l_err, put_scom, l_firstExpChip_fapi, l_testEntry.addr, l_scom_buffer ); l_tests++; if(l_err) { - FAIL_TEST_RC(l_firstExpChip, + FAIL_TEST_ERRL(l_firstExpChip, "testExpscomI2c>> Failed putScom writing 0x%.16X to 0x%.8X on target w/ huid 0x%.8X"); } // putScom to last OCMB over i2c - FAPI_INVOKE_HWP(l_err, fapi2::putScom, + FAPI_INVOKE_HWP(l_err, put_scom, l_lastExpChip_fapi, - l_testEntry.addr, + l_testEntry.addr, l_scom_buffer ); l_tests++; - if(l_rc) + if(l_err) { - FAIL_TEST_RC(l_lastExpChip, + FAIL_TEST_ERRL(l_lastExpChip, "testExpscomI2c>> Failed putScom writing 0x%.16X to 0x%.8X on target w/ huid 0x%.8X"); } @@ -188,14 +208,14 @@ public: l_scom_buffer.flush<0>(); // getScom to first OCMB over i2c - FAPI_INVOKE_HWP(l_err, fapi2::getScom, + FAPI_INVOKE_HWP(l_err, get_scom, l_firstExpChip_fapi, l_testEntry.addr, l_scom_buffer ); l_tests++; - if(l_rc) + if(l_err) { - FAIL_TEST_RC(l_firstExpChip, + FAIL_TEST_ERRL(l_firstExpChip, "testExpscomI2c>> Failed getScom reading 0x%.16X to 0x%.8X on target w/ huid 0x%.8X") } @@ -213,14 +233,14 @@ public: l_scom_buffer.flush<0>(); // getScom to last OCMB over i2c - FAPI_INVOKE_HWP(l_err, fapi2::getScom, + FAPI_INVOKE_HWP(l_err, get_scom, l_lastExpChip_fapi, l_testEntry.addr, l_scom_buffer ); l_tests++; - if(l_rc) + if(l_err) { - FAIL_TEST_RC(l_lastExpChip, + FAIL_TEST_ERRL(l_lastExpChip, "testExpscomI2c>> Failed getScom reading 0x%.16X to 0x%.8X on target w/ huid 0x%.8X") } @@ -247,7 +267,7 @@ public: void testExpscomI2cPlatform(void) { - TRACFCOMP( g_trac_expscom, ">> Enter testExpscomI2c"); + TRACFCOMP( g_trac_expscom, ">> Enter testExpscomI2cPlatform"); // Keep trace of pass/fails uint32_t l_tests = 0; uint32_t l_fails = 0; @@ -263,6 +283,11 @@ public: TargetHandleList l_explorerList; do{ +// Causing a data storage exception in c_str... +#ifdef CONFIG_AXONE_BRING_UP +TRACFCOMP( g_trac_expscom,"skipping testExpscomI2cPlatformPlatform"); +break; +#endif getAllChips( l_explorerList, TYPE_OCMB_CHIP, @@ -271,7 +296,7 @@ public: if(l_explorerList.size() == 0 ) { - TRACFCOMP( g_trac_expscom, "No OCMB targets found, skipping testExpscomI2cPlatform"); + TRACFCOMP( g_trac_expscom, "No OCMB targets found, skipping testExpscomI2cPlatformPlatform"); break; } @@ -312,7 +337,7 @@ public: if(l_err) { FAIL_TEST_ERRL(l_firstExpChip, - "testExpscomI2c>> Failed putScom writing 0x%.16X to 0x%.8X on target w/ huid 0x%.8X"); + "testExpscomI2cPlatform>> Failed putScom writing 0x%.16X to 0x%.8X on target w/ huid 0x%.8X"); } @@ -324,7 +349,7 @@ public: if(l_err) { FAIL_TEST_ERRL(l_firstExpChip, - "testExpscomI2c>> Failed putScom writing 0x%.16X to 0x%.8X on target w/ huid 0x%.8X"); + "testExpscomI2cPlatform>> Failed putScom writing 0x%.16X to 0x%.8X on target w/ huid 0x%.8X"); } // Flush scom buffers so it doesnt mess up next test @@ -339,14 +364,14 @@ public: if(l_err) { FAIL_TEST_ERRL(l_firstExpChip, - "testExpscomI2c>> Failed getScom reading 0x%.16X to 0x%.8X on target w/ huid 0x%.8X") + "testExpscomI2cPlatform>> Failed getScom reading 0x%.16X to 0x%.8X on target w/ huid 0x%.8X") } l_tests++; if(l_scom_buffer() != l_testEntry.data) { l_fails++; - TS_FAIL("testExpscomI2c>> Expected 0x%.16X but got 0x%.16X on target w/ huid 0x%.8X", + TS_FAIL("testExpscomI2cPlatform>> Expected 0x%.16X but got 0x%.16X on target w/ huid 0x%.8X", l_testEntry.data, l_scom_buffer(), get_huid(l_firstExpChip)); @@ -365,14 +390,14 @@ public: if(l_err) { FAIL_TEST_ERRL(l_firstExpChip, - "testExpscomI2c>> Failed getScom reading 0x%.16X to 0x%.8X on target w/ huid 0x%.8X") + "testExpscomI2cPlatform>> Failed getScom reading 0x%.16X to 0x%.8X on target w/ huid 0x%.8X") } l_tests++; if(l_scom_buffer() != l_testEntry.data) { l_fails++; - TS_FAIL("testExpscomI2c>> Expected 0x%.16X but got 0x%.16X on target w/ huid 0x%.8X", + TS_FAIL("testExpscomI2cPlatform>> Expected 0x%.16X but got 0x%.16X on target w/ huid 0x%.8X", l_testEntry.data, l_scom_buffer(), get_huid(l_firstExpChip)); @@ -384,7 +409,7 @@ public: l_lastExpChip->setAttr<TARGETING::ATTR_SCOM_SWITCHES>(last_ocmb_info); }while(0); - TRACFCOMP( g_trac_expscom, "<< Exit testExpscomI2c"); + TRACFCOMP( g_trac_expscom, "<< Exit testExpscomI2cPlatform"); return; } @@ -432,7 +457,7 @@ public: // } // // // putScom to first OCMB over mmio -// l_rc = fapi2::putScom(l_firstExpChip_fapi, +// l_rc = put_scom(l_firstExpChip_fapi, // l_testEntry.addr, // l_scom_buffer); // l_tests++; @@ -448,7 +473,7 @@ public: // } // // // putScom to last OCMB over mmio -// l_rc = fapi2::putScom(l_lastExpChip_fapi, +// l_rc = put_scom(l_lastExpChip_fapi, // l_testEntry.addr, // l_scom_buffer); // l_tests++; @@ -468,7 +493,7 @@ public: // // // // getScom to first OCMB over mmio -// l_rc = fapi2::getScom(l_firstExpChip_fapi, +// l_rc = get_scom(l_firstExpChip_fapi, // l_testEntry.addr, // l_scom_buffer); // l_tests++; @@ -499,7 +524,7 @@ public: // l_scom_buffer.flush<0>(); // // // getScom to last OCMB over mmio -// l_rc = fapi2::getScom(l_lastExpChip_fapi, +// l_rc = get_scom(l_lastExpChip_fapi, // l_testEntry.addr, // l_scom_buffer); // l_tests++; @@ -586,7 +611,7 @@ public: // } // // // putScom to first OCMB over mmio -// l_rc = fapi2::putScom(l_firstExpChip_fapi, +// l_rc = put_scom(l_firstExpChip_fapi, // l_testEntry.addr, // l_scom_buffer); // l_tests++; @@ -600,7 +625,7 @@ public: // } // // // putScom to last OCMB over mmio -// l_rc = fapi2::putScom(l_lastExpChip_fapi, +// l_rc = put_scom(l_lastExpChip_fapi, // l_testEntry.addr, // l_scom_buffer); // l_tests++; @@ -617,7 +642,7 @@ public: // l_scom_buffer.flush<0>(); // // // getScom to first OCMB over mmio -// l_rc = fapi2::getScom(l_firstExpChip_fapi, +// l_rc = get_scom(l_firstExpChip_fapi, // l_testEntry.addr, // l_scom_buffer); // l_tests++; @@ -657,7 +682,7 @@ public: // l_scom_buffer.flush<0>(); // // // getScom to last OCMB over mmio -// l_rc = fapi2::getScom(l_lastExpChip_fapi, +// l_rc = get_scom(l_lastExpChip_fapi, // l_testEntry.addr, // l_scom_buffer); // l_tests++; diff --git a/src/usr/fapi2/test/fapi2BasicTryTest.H b/src/usr/fapi2/test/fapi2BasicTryTest.H index 1c73f833e..cf1bfe0f8 100644 --- a/src/usr/fapi2/test/fapi2BasicTryTest.H +++ b/src/usr/fapi2/test/fapi2BasicTryTest.H @@ -23,7 +23,7 @@ /* */ /* IBM_PROLOG_END_TAG */ #include <fapi2.H> -// #include <plat_attribute_service.H> +#include <fapi2/plat_hwp_invoker.H> //-------------------------------------------------------------------------- /// @file p9_basicTry.C @@ -148,41 +148,45 @@ class Fapi2BasicTryTest : public CxxTest::TestSuite int numTests = 0; int numFails = 0; fapi2::ReturnCode l_rc; - + errlHndl_t l_err = nullptr; FAPI_INF("fapi2basicTry starting ... "); numTests++; - l_rc = p9_fapi_tryFailure(); + FAPI_INVOKE_HWP_RC(l_err,l_rc,p9_fapi_tryFailure); if ( true == (bool)l_rc ) { numFails++; TS_FAIL(" p9_fapi_tryFailure returned error"); } + if( l_err ) { delete l_err; } numTests++; - l_rc = p9_fapi_assertFailure(); + FAPI_INVOKE_HWP_RC(l_err,l_rc,p9_fapi_assertFailure); if ( true == (bool)l_rc ) { numFails++; TS_FAIL(" p9_fapi_assertFailure returned error"); } + if( l_err ) { delete l_err; } numTests++; - l_rc = p9_fapi_trySuccess(); + FAPI_INVOKE_HWP_RC(l_err,l_rc,p9_fapi_trySuccess); if ( true == (bool)l_rc ) { numFails++; TS_FAIL(" p9_fapi_trySuccess returned error"); } + if( l_err ) { delete l_err; } numTests++; - l_rc = p9_fapi_assertSuccess(); + FAPI_INVOKE_HWP_RC(l_err,l_rc,p9_fapi_assertSuccess); if ( true == (bool)l_rc ) { numFails++; TS_FAIL(" p9_fapi_assertSuccess returned error"); } + if( l_err ) { delete l_err; } FAPI_INF("fapi2basicTry:: Test Complete. %d/%d fails", numFails, numTests); diff --git a/src/usr/fapi2/test/fapi2GetChildrenTest.H b/src/usr/fapi2/test/fapi2GetChildrenTest.H index 04f3863ba..3971c1270 100644 --- a/src/usr/fapi2/test/fapi2GetChildrenTest.H +++ b/src/usr/fapi2/test/fapi2GetChildrenTest.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -31,10 +31,8 @@ #include <cxxtest/TestSuite.H> #include <functional> #include <plat_utils.H> - - #include <error_scope.H> - +#include <config.h> namespace fapi2 { @@ -101,7 +99,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: MCAs per MCBIST mismatch"); + TS_FAIL("test_fapi2GetChildren:: MCAs per MCBIST mismatch"); numFails++; break; } @@ -120,7 +118,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: DMIs per MC mismatch"); + TS_FAIL("test_fapi2GetChildren:: DMIs per MC mismatch"); numFails++; break; } @@ -140,7 +138,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: OMIs per MC mismatch"); + TS_FAIL("test_fapi2GetChildren:: OMIs per MC mismatch"); numFails++; break; } @@ -155,7 +153,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: present cores per proc mismatch"); + TS_FAIL("test_fapi2GetChildren:: present cores per proc mismatch"); numFails++; break; } @@ -170,7 +168,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: functional cores per proc mismatch"); + TS_FAIL("test_fapi2GetChildren:: functional cores per proc mismatch"); numFails++; break; } @@ -188,7 +186,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: MCAs per proc mismatch"); + TS_FAIL("test_fapi2GetChildren:: MCAs per proc mismatch"); numFails++; break; } @@ -207,7 +205,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: DMIs per proc mismatch"); + TS_FAIL("test_fapi2GetChildren:: DMIs per proc mismatch"); numFails++; break; } @@ -227,29 +225,46 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: OMIs per proc mismatch"); + TS_FAIL("test_fapi2GetChildren:: OMIs per proc mismatch"); numFails++; break; } } - if (isHwValid(l_proc, MY_OMIC) + if (isHwValid(l_proc, MY_OMIC2) && isHwValid(l_proc, MY_OMI)) { - l_childOMIs = fapi2_omicTarget.getChildren<fapi2::TARGET_TYPE_OMI>(TARGET_STATE_PRESENT); - l_targetHuid = TARGETING::get_huid(targeting_targets[MY_OMIC]); + l_childOMIs = fapi2_omic2Target.getChildren<fapi2::TARGET_TYPE_OMI>(TARGET_STATE_PRESENT); + l_targetHuid = TARGETING::get_huid(targeting_targets[MY_OMIC2]); l_actualSize = l_childOMIs.size(); - //Set expected size to be the number of OMIs per proc - l_expectedSize = MAX_OMI_PER_OMIC; + // OMIC2 only has 2 OMIs (others have 3) + l_expectedSize = 2; numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: # OMIs foound for OMIC0 proc is %d and not %d", + TS_FAIL("test_fapi2GetChildren:: # OMIs foound for OMIC0 proc is %d and not %d", l_actualSize, l_expectedSize); numFails++; break; } + + bool l_foundme = false; + for( auto omi : l_childOMIs ) + { + if( reinterpret_cast<TARGETING::Target*>(omi.get()) + == targeting_targets[MY_OMI] ) + { + l_foundme = true; + break; + } + } + if( !l_foundme ) + { + TS_FAIL("OMI %.8X not found in child list for OMIC %.8X", + TARGETING::get_huid(targeting_targets[MY_OMI]), + TARGETING::get_huid(targeting_targets[MY_OMIC2])); + } } if (isHwValid(l_proc, MY_OMI) @@ -264,7 +279,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: OCMBs per proc mismatch"); + TS_FAIL("test_fapi2GetChildren:: OCMBs per proc mismatch"); numFails++; break; } @@ -282,7 +297,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: MEM_PORTs per proc mismatch"); + TS_FAIL("test_fapi2GetChildren:: MEM_PORTs per proc mismatch"); numFails++; break; } @@ -298,7 +313,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: cores per EX mismatch"); + TS_FAIL("test_fapi2GetChildren:: cores per EX mismatch"); numFails++; break; } @@ -313,7 +328,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: cores per EQ mismatch"); + TS_FAIL("test_fapi2GetChildren:: cores per EQ mismatch"); numFails++; break; } @@ -329,7 +344,7 @@ void test_fapi2GetChildren() numTests++; if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: EXs per proc mismatch"); + TS_FAIL("test_fapi2GetChildren:: EXs per proc mismatch"); numFails++; break; } @@ -735,7 +750,7 @@ void test_fapi2GetChildren() if(candidateTarget == nullptr) { - FAPI_INF("fapi2TargetTest:: candidateTarget not found"); + TS_FAIL("test_fapi2GetChildren:: candidateTarget not found"); numFails++; break; } @@ -749,7 +764,7 @@ void test_fapi2GetChildren() if(l_actualSize != l_expectedSize) { - FAPI_INF("fapi2TargetTest:: children of pervasive mismatch"); + TS_FAIL("test_fapi2GetChildren:: children of pervasive mismatch"); numFails++; break; } @@ -788,7 +803,7 @@ void test_fapi2GetChildren() l_targetHuid, true/*SW Error*/); errlCommit(l_err,HWPF_COMP_ID); - TS_FAIL("fapi2TargetTest Fail, for HUID: %d , expected %d children , found %d ", l_targetHuid,l_expectedSize,l_actualSize ); + TS_FAIL("test_fapi2GetChildren Fail, for HUID: %d , expected %d children , found %d ", l_targetHuid,l_expectedSize,l_actualSize ); } FAPI_INF("fapi2GetChildrenTest:: Test Complete. %d/%d fails", numFails , numTests); } @@ -837,7 +852,6 @@ void test_fapi2GetChildrenFilter() } else if(targeting_targets[x] == nullptr) { - FAPI_ERR("Unable to find target for item %d in targeting_targets", x); numFails++; TS_FAIL("test_fapi2GetChildrenFilter Fail: Unable to find target for item %d in targeting_targets", x); break; @@ -955,6 +969,7 @@ void test_fapi2getChildTargetsForCDG() size_t l_expectedDimmsUnderPort0 = 0; size_t l_expectedDimmsUnderPort1 = 0; TARGETING::TargetHandleList l_chipList; + do { FAPI_DBG("start of test_fapi2getChildTargetsForCDG()"); @@ -980,18 +995,23 @@ void test_fapi2getChildTargetsForCDG() l_expectedDimmsUnderPort0 = l_expectedDimms; l_expectedDimmsUnderPort1 = 0; } - else if (l_proc->getAttr<TARGETING::ATTR_MODEL>() == TARGETING::MODEL_CUMULUS || - l_proc->getAttr<TARGETING::ATTR_MODEL>() == TARGETING::MODEL_AXONE) + else if (l_proc->getAttr<TARGETING::ATTR_MODEL>() == TARGETING::MODEL_CUMULUS) { l_expectedDimms = 8; l_expectedDimmsUnderPort0 = l_expectedDimms/2; l_expectedDimmsUnderPort1 = l_expectedDimms/2; } + else if (l_proc->getAttr<TARGETING::ATTR_MODEL>() == TARGETING::MODEL_AXONE) + { + l_expectedDimms = 9; + l_expectedDimmsUnderPort0 = 0xFF; //wrong + l_expectedDimmsUnderPort1 = 0xFF; //wrong + } else //both are nullptr { // Should never get here since error should have been returned // above - FAPI_ERR("fapi2getChildTargetsForCDG: Never Should Happen"); + TS_FAIL("fapi2getChildTargetsForCDG: Never Should Happen"); numFails++; break; } @@ -1010,7 +1030,7 @@ void test_fapi2getChildTargetsForCDG() numTests++; if(l_dimmList.size() != l_expectedDimms) { - FAPI_ERR("test_fapi2getChildTargetsForCDG: Dimm count %d not equal expected %d", + TS_FAIL("test_fapi2getChildTargetsForCDG: Dimm count %d not equal expected %d", l_dimmList.size(),l_expectedDimms); numFails++; } @@ -1027,9 +1047,11 @@ void test_fapi2getChildTargetsForCDG() if(l_dimmList.size() != l_expectedDimmsUnderPort0) { - FAPI_ERR("test_fapi2getChildTargetsForCDG: Dimm count %d under port 0 not equal expected %d", +#ifndef CONFIG_AXONE_BRING_UP + TS_FAIL("test_fapi2getChildTargetsForCDG: Dimm count %d under port 0 not equal expected %d", l_dimmList.size(),l_expectedDimmsUnderPort0); numFails++; +#endif } // All dimms under port 1 @@ -1044,9 +1066,11 @@ void test_fapi2getChildTargetsForCDG() if(l_dimmList.size() != l_expectedDimmsUnderPort1) { - FAPI_ERR("test_fapi2getChildTargetsForCDG: Dimm count %d under port 1 not equal expected %d", +#ifndef CONFIG_AXONE_BRING_UP + TS_FAIL("test_fapi2getChildTargetsForCDG: Dimm count %d under port 1 not equal expected %d", l_dimmList.size(),l_expectedDimmsUnderPort1); numFails++; +#endif } // All dimms under socket 0 @@ -1060,9 +1084,11 @@ void test_fapi2getChildTargetsForCDG() numTests++; if(l_dimmList.size() != l_expectedDimms) { - FAPI_ERR("test_fapi2getChildTargetsForCDG: Dimm count %d under socket 0 not equal expected %d", +#ifndef CONFIG_AXONE_BRING_UP + TS_FAIL("test_fapi2getChildTargetsForCDG: Dimm count %d under socket 0 not equal expected %d", l_dimmList.size(),l_expectedDimms); numFails++; +#endif } // All dimms under socket 1 @@ -1076,7 +1102,7 @@ void test_fapi2getChildTargetsForCDG() numTests++; if(l_dimmList.size() != 0) { - FAPI_ERR("test_fapi2getChildTargetsForCDG: Dimm count %d under socket 1 not equal expected %d", + TS_FAIL("test_fapi2getChildTargetsForCDG: Dimm count %d under socket 1 not equal expected %d", l_dimmList.size(),0); numFails++; } diff --git a/src/usr/fapi2/test/fapi2GetParentTest.H b/src/usr/fapi2/test/fapi2GetParentTest.H index 6ac5e9926..5137432e0 100644 --- a/src/usr/fapi2/test/fapi2GetParentTest.H +++ b/src/usr/fapi2/test/fapi2GetParentTest.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -69,7 +69,10 @@ void test_fapi2GetParent() if(TARGETING::get_huid(targeting_targets[PARENT_TEST_TARGET_ID]) != \ TARGETING::get_huid(l_parent)) \ { \ - TS_FAIL("fapi2TargetTest::Unable to find SRC_TYPE's" #PARENT_TYPE "parent!"); \ + TS_FAIL("test_fapi2GetParent::Unable to find " #SRC_TYPE "'s " #PARENT_TYPE " parent!"); \ + FAPI_INF("Found=%.8X, Expected=%.8X", \ + TARGETING::get_huid(l_parent), \ + TARGETING::get_huid(targeting_targets[PARENT_TEST_TARGET_ID])); \ numFails++; \ } \ } @@ -192,12 +195,12 @@ void test_fapi2GetParent() } // OMIC Parent Tests if (isHwValid(l_proc, MY_MC) && - isHwValid(l_proc, MY_OMIC)) + isHwValid(l_proc, MY_OMIC0)) { // Check parent MC - GET_PARENT_TEST_MACRO(MY_OMI, TARGET_TYPE_OMIC, MY_MC, TARGET_TYPE_MC) + GET_PARENT_TEST_MACRO(MY_OMIC0, TARGET_TYPE_OMIC, MY_MC, TARGET_TYPE_MC) // Check parent proc - GET_PARENT_TEST_MACRO(MY_OMI, TARGET_TYPE_OMIC, MY_PROC, TARGET_TYPE_PROC_CHIP) + GET_PARENT_TEST_MACRO(MY_OMIC0, TARGET_TYPE_OMIC, MY_PROC, TARGET_TYPE_PROC_CHIP) } // OMI Parent Tests if (isHwValid(l_proc, MY_OMI)) @@ -209,10 +212,10 @@ void test_fapi2GetParent() // Check parent MCC GET_PARENT_TEST_MACRO(MY_OMI, TARGET_TYPE_OMI, MY_MCC, TARGET_TYPE_MCC) } - if (isHwValid(l_proc, MY_OMIC)) + if (isHwValid(l_proc, MY_OMIC2)) { // Check parent OMIC - GET_PARENT_TEST_MACRO(MY_OMI, TARGET_TYPE_OMI, MY_OMIC, TARGET_TYPE_OMIC) + GET_PARENT_TEST_MACRO(MY_OMI, TARGET_TYPE_OMI, MY_OMIC2, TARGET_TYPE_OMIC) } if (isHwValid(l_proc, MY_MI)) { @@ -354,7 +357,7 @@ void test_fapi2GetParent() {targeting_targets[MY_OMI], [](TARGETING::Target* i_pTarget) {return getPervasiveParent<TARGET_TYPE_OMI>(i_pTarget); }}, - {targeting_targets[MY_OMIC], + {targeting_targets[MY_OMIC0], [](TARGETING::Target* i_pTarget) {return getPervasiveParent<TARGET_TYPE_OMIC>(i_pTarget); }}, }; @@ -443,7 +446,7 @@ void test_fapi2GetParent() true/*SW Error*/); errlCommit(l_err,HWPF_COMP_ID); - TS_FAIL("fapi2TargetTest::Unable to find unit's pervasive!"); + TS_FAIL("test_fapi2GetParent::Unable to find unit's pervasive!"); numFails++; } } diff --git a/src/usr/fapi2/test/fapi2HwpTest.H b/src/usr/fapi2/test/fapi2HwpTest.H index 63ef6af69..a8f8fb6d9 100644 --- a/src/usr/fapi2/test/fapi2HwpTest.H +++ b/src/usr/fapi2/test/fapi2HwpTest.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -100,7 +100,8 @@ void test_fapi2Hwp() HWP_TEST_MODEL_SPECIFIC_MACRO(p9_sample_procedure_mi, fapi2_miTarget, MY_MI) HWP_TEST_MODEL_SPECIFIC_MACRO(p9_sample_procedure_dmi, fapi2_dmiTarget, MY_DMI) HWP_TEST_MODEL_SPECIFIC_MACRO(p9_sample_procedure_omi, fapi2_omiTarget, MY_OMI) - HWP_TEST_MODEL_SPECIFIC_MACRO(p9_sample_procedure_omic, fapi2_omicTarget, MY_OMIC) + HWP_TEST_MODEL_SPECIFIC_MACRO(p9_sample_procedure_omic, fapi2_omic0Target, MY_OMIC0) + HWP_TEST_MODEL_SPECIFIC_MACRO(p9_sample_procedure_omic, fapi2_omic2Target, MY_OMIC2) HWP_TEST_MODEL_SPECIFIC_MACRO(p9_sample_procedure_mcc, fapi2_mccTarget, MY_MCC) HWP_TEST_MODEL_SPECIFIC_MACRO(p9_sample_procedure_ocmb, fapi2_ocmbTarget, MY_OCMB) HWP_TEST_MODEL_SPECIFIC_MACRO(p9_sample_procedure_mem_port, fapi2_memportTarget, MY_MEM_PORT) diff --git a/src/usr/fapi2/test/fapi2IsFunctionalTest.H b/src/usr/fapi2/test/fapi2IsFunctionalTest.H index 6ebebcbcf..3d60f9083 100644 --- a/src/usr/fapi2/test/fapi2IsFunctionalTest.H +++ b/src/usr/fapi2/test/fapi2IsFunctionalTest.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -88,7 +88,8 @@ class Fapi2IsFunctional : public CxxTest::TestSuite IS_FUNCTIONAL_TEST_MACRO(targeting_targets[MY_MI], fapi2_miTarget) IS_FUNCTIONAL_TEST_MACRO(targeting_targets[MY_DMI], fapi2_dmiTarget) IS_FUNCTIONAL_TEST_MACRO(targeting_targets[MY_OMI], fapi2_omiTarget) - IS_FUNCTIONAL_TEST_MACRO(targeting_targets[MY_OMIC], fapi2_omicTarget) + IS_FUNCTIONAL_TEST_MACRO(targeting_targets[MY_OMIC0], fapi2_omic0Target) + IS_FUNCTIONAL_TEST_MACRO(targeting_targets[MY_OMIC2], fapi2_omic2Target) IS_FUNCTIONAL_TEST_MACRO(targeting_targets[MY_MCC], fapi2_mccTarget) IS_FUNCTIONAL_TEST_MACRO(targeting_targets[MY_PROC], fapi2_procTarget) IS_FUNCTIONAL_TEST_MACRO(targeting_targets[MY_OCMB], fapi2_ocmbTarget) diff --git a/src/usr/fapi2/test/fapi2MmioAccessTest.H b/src/usr/fapi2/test/fapi2MmioAccessTest.H index dca8421a0..3ba0f31c0 100644 --- a/src/usr/fapi2/test/fapi2MmioAccessTest.H +++ b/src/usr/fapi2/test/fapi2MmioAccessTest.H @@ -38,6 +38,7 @@ #include <fapi2TestUtils.H> #include <p9_mmiotests.H> #include <plat_hwp_invoker.H> +#include <config.h> using namespace fapi2; @@ -151,6 +152,7 @@ void test_fapi2MmioAccess() int numTests = 0; int numFails = 0; +#ifndef CONFIG_AXONE_BRING_UP errlHndl_t l_errl = nullptr; // Create a vector of TARGETING::Target pointers @@ -211,6 +213,7 @@ void test_fapi2MmioAccess() l_errl = nullptr; } } +#endif FAPI_INF("fapi2MmioAccessTest Test Complete. %d/%d fails", numFails, numTests); } diff --git a/src/usr/fapi2/test/fapi2TestUtils.C b/src/usr/fapi2/test/fapi2TestUtils.C index 3d5c59894..6a6187d11 100644 --- a/src/usr/fapi2/test/fapi2TestUtils.C +++ b/src/usr/fapi2/test/fapi2TestUtils.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2018 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -161,7 +161,7 @@ void generateTargets(TARGETING::Target* i_pMasterProcChip, // when looking up the target l_epath.setType(TARGETING::EntityPath::PATH_AFFINITY); - // Setup OCBM_CHIP and MEM_PORT + // Setup OCMB_CHIP and MEM_PORT GENERATE_TARGET(TYPE_OCMB_CHIP,sys0node0ocmb0,MY_OCMB,0) GENERATE_TARGET(TYPE_MEM_PORT,sys0node0ocmb0memport0,MY_MEM_PORT,0) @@ -173,8 +173,10 @@ void generateTargets(TARGETING::Target* i_pMasterProcChip, l_epath.removeLast(); l_epath.removeLast(); l_epath.removeLast(); - // Setup OMIC - GENERATE_TARGET(TYPE_OMIC,sys0node0proc0mc0omic0,MY_OMIC,0) + // Setup OMICs + GENERATE_TARGET(TYPE_OMIC,sys0node0proc0mc0omic0,MY_OMIC0,0) + l_epath.removeLast(); + GENERATE_TARGET(TYPE_OMIC,sys0node0proc0mc0omic2,MY_OMIC2,2) } // End System Specific P9 Target @@ -193,18 +195,22 @@ bool isHwValid(TARGETING::Target* i_procChip, uint8_t i_hwType) auto l_model = i_procChip->getAttr<TARGETING::ATTR_MODEL>(); if (l_model == TARGETING::MODEL_CUMULUS) { - if (i_hwType == MY_MCS || i_hwType == MY_MCA || i_hwType == MY_MCBIST || - i_hwType == MY_OMI || i_hwType == MY_OMIC || i_hwType == MY_MCC || - i_hwType == MY_OCMB || i_hwType == MY_MEM_PORT) + if (i_hwType == MY_MCS || i_hwType == MY_MCA + || i_hwType == MY_MCBIST || i_hwType == MY_OMI + || i_hwType == MY_OMIC0 || i_hwType == MY_OMIC2 + || i_hwType == MY_MCC || i_hwType == MY_OCMB + || i_hwType == MY_MEM_PORT) { isValid = false; } } else if (l_model == TARGETING::MODEL_NIMBUS) { - if (i_hwType == MY_MC || i_hwType == MY_MI || i_hwType == MY_DMI || - i_hwType == MY_OMI || i_hwType == MY_OMIC || i_hwType == MY_MCC || - i_hwType == MY_OCMB || i_hwType == MY_MEM_PORT) + if (i_hwType == MY_MC || i_hwType == MY_MI + || i_hwType == MY_DMI || i_hwType == MY_OMI + || i_hwType == MY_OMIC0 || i_hwType == MY_OMIC2 + || i_hwType == MY_MCC || i_hwType == MY_OCMB + || i_hwType == MY_MEM_PORT) { isValid = false; } diff --git a/src/usr/fapi2/test/fapi2TestUtils.H b/src/usr/fapi2/test/fapi2TestUtils.H index e49cc0f3a..7b724a094 100644 --- a/src/usr/fapi2/test/fapi2TestUtils.H +++ b/src/usr/fapi2/test/fapi2TestUtils.H @@ -124,7 +124,8 @@ enum FAPI2_TEST_TARGET_ID { MY_MI, MY_DMI, MY_OMI, - MY_OMIC, + MY_OMIC0, + MY_OMIC2, MY_MCC, MY_OCMB, MY_MEM_PORT, @@ -157,7 +158,7 @@ if(l_chipList.size()) } \ else \ { \ - TS_FAIL("TEST_FUNCTION_NAME Fail: could not find any proc, skipping tests"); \ + TS_FAIL(#TEST_FUNCTION_NAME" Fail: could not find any proc, skipping tests"); \ numFails++; \ break; \ } \ @@ -173,7 +174,7 @@ for( uint64_t x = 0; x < NUM_TARGETS; x++ ) } \ else if(targeting_targets[x] == nullptr) \ { \ - FAPI_ERR("TEST_FUNCTION_NAME:: targeting_targets[%d] is null", x); \ + FAPI_ERR(#TEST_FUNCTION_NAME":: targeting_targets[%d] is null", x); \ generationSuccess = false; \ } \ } \ @@ -181,7 +182,7 @@ numTests++; if(!generationSuccess) \ { \ numFails++; \ - TS_FAIL("TEST_FUNCTION_NAME Fail : failed to correctly generate targets"); \ + TS_FAIL(#TEST_FUNCTION_NAME" Fail : failed to correctly generate targets"); \ } \ /* Common Targets */ \ fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> fapi2_procTarget(targeting_targets[MY_PROC]); \ @@ -205,12 +206,14 @@ fapi2::Target<fapi2::TARGET_TYPE_MC> fapi2_mcTarget(targeting_targets[MY fapi2::Target<fapi2::TARGET_TYPE_MI> fapi2_miTarget(targeting_targets[MY_MI]); /* Cumulus / Axone*/\ fapi2::Target<fapi2::TARGET_TYPE_DMI> fapi2_dmiTarget(targeting_targets[MY_DMI]); /* Cumulus */ \ fapi2::Target<fapi2::TARGET_TYPE_OMI> fapi2_omiTarget(targeting_targets[MY_OMI]); /* Axone */\ -fapi2::Target<fapi2::TARGET_TYPE_OMIC> fapi2_omicTarget(targeting_targets[MY_OMIC]); /* Axone */\ +fapi2::Target<fapi2::TARGET_TYPE_OMIC> fapi2_omic0Target(targeting_targets[MY_OMIC0]); /* Axone */\ +fapi2::Target<fapi2::TARGET_TYPE_OMIC> fapi2_omic2Target(targeting_targets[MY_OMIC2]); /* Axone */\ fapi2::Target<fapi2::TARGET_TYPE_MCC> fapi2_mccTarget(targeting_targets[MY_MCC]); /* Axone */\ fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP> fapi2_ocmbTarget(targeting_targets[MY_OCMB]); /* Axone */\ fapi2::Target<fapi2::TARGET_TYPE_MEM_PORT> fapi2_memportTarget(targeting_targets[MY_MEM_PORT]); /* Axone */ + /** * @brief Number of children of given type that applicable pervasive has */ diff --git a/src/usr/fapi2/test/fapi2ToStringTest.H b/src/usr/fapi2/test/fapi2ToStringTest.H index b6824a06d..86affe586 100644 --- a/src/usr/fapi2/test/fapi2ToStringTest.H +++ b/src/usr/fapi2/test/fapi2ToStringTest.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -78,6 +78,70 @@ void test_fapi2ToString() FAPI_INF("test_fapi2ToString Test Complete. %d/%d fails", numFails , numTests); } +void test_fapi2ToStringAll() +{ + FAPI_INF("test_fapi2ToStringAll>"); + int numTests = 0; + int numFails = 0; + + do { + TARGETING::Target* l_pMasterProcChip = NULL; + TARGETING::targetService().masterProcChipTargetHandle(l_pMasterProcChip); + TARGETING::ATTR_MODEL_type procModel = + l_pMasterProcChip->getAttr<TARGETING::ATTR_MODEL>(); + + GENERATE_TEST_TARGETS(test_fapi2GetChildren); + TARGETING::ATTR_FAPI_NAME_type fapiName = {0}; + +#define STRING_TEST(_targ) \ + fapi2::toString(_targ, fapiName, sizeof(fapiName));\ + FAPI_INF("_targ=%s",fapiName); + + STRING_TEST(fapi2_procTarget); + STRING_TEST(fapi2_eqTarget); + STRING_TEST(fapi2_exTarget); + STRING_TEST(fapi2_coreTarget); + STRING_TEST(fapi2_pecTarget); + STRING_TEST(fapi2_phbTarget); + STRING_TEST(fapi2_xbusTarget); + STRING_TEST(fapi2_obusTarget); + STRING_TEST(fapi2_oBrickTarget); + STRING_TEST(fapi2_ppeTarget); + STRING_TEST(fapi2_pervTarget); + STRING_TEST(fapi2_sbeTarget); + STRING_TEST(fapi2_cappTarget); + + if( procModel == TARGETING::MODEL_NIMBUS ) + { + STRING_TEST(fapi2_mcsTarget); + STRING_TEST(fapi2_mcaTarget); + STRING_TEST(fapi2_mcbistTarget); + } + + if( procModel == TARGETING::MODEL_CUMULUS ) + { + STRING_TEST(fapi2_mcTarget); + STRING_TEST(fapi2_miTarget); + STRING_TEST(fapi2_dmiTarget); + } + + if( procModel == TARGETING::MODEL_AXONE ) + { + STRING_TEST(fapi2_mcTarget); + STRING_TEST(fapi2_miTarget); + STRING_TEST(fapi2_omiTarget); + STRING_TEST(fapi2_omic0Target); + STRING_TEST(fapi2_omic2Target); + STRING_TEST(fapi2_mccTarget); + STRING_TEST(fapi2_ocmbTarget); + STRING_TEST(fapi2_memportTarget); + } + } while(0); + + FAPI_INF("test_fapi2ToStringAll:: Test Complete. %d/%d fails", numFails , numTests); + +} + }; diff --git a/src/usr/i2c/test/tpmddtest.H b/src/usr/i2c/test/tpmddtest.H index 9d68d2168..8cd1fbc2c 100755 --- a/src/usr/i2c/test/tpmddtest.H +++ b/src/usr/i2c/test/tpmddtest.H @@ -116,6 +116,11 @@ class TPMDDTest: public CxxTest::TestSuite do { +#ifdef CONFIG_AXONE_BRING_UP + TRACFCOMP( g_trac_tpmdd,"Skipping test on Axone" ); + break; +#endif + // Get a TPM Target TARGETING::Target* testTarget = getTestTarget(); if (NULL == testTarget) diff --git a/src/usr/scom/scomtrans.C b/src/usr/scom/scomtrans.C index e60e75ae6..bb5d8b282 100644 --- a/src/usr/scom/scomtrans.C +++ b/src/usr/scom/scomtrans.C @@ -494,6 +494,11 @@ errlHndl_t p9_translation (TARGETING::Target * &i_target, TRACFCOMP(g_trac_scom, "Target type and scom Addr do not match."); TRACFCOMP(g_trac_scom, "scomTranslate-Invalid Address io_addr=0x%X, Type 0x%.8X, HUID 0x%.8X", io_addr, i_type, TARGETING::get_huid(i_target)); + for(uint32_t i = 0; i < l_scomPairings.size(); i++) + { + TRACFCOMP(g_trac_scom, "Scom Pairing: chipUnitType=%d, chipUnitNum=%d", + l_scomPairings[i].chipUnitType, l_scomPairings[i].chipUnitNum); + } uint32_t userdata32_1 = TWO_UINT16_TO_UINT32( diff --git a/src/usr/scom/test/scomtest.H b/src/usr/scom/test/scomtest.H index 6da3d9f9e..87444367b 100644 --- a/src/usr/scom/test/scomtest.H +++ b/src/usr/scom/test/scomtest.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2018 */ +/* Contributors Listed Below - COPYRIGHT 2011,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -39,7 +39,7 @@ #include <targeting/common/util.H> #include <targeting/common/utilFilter.H> #include <scom/scomif.H> - +#include <config.h> #include <devicefw/driverif.H> @@ -444,10 +444,15 @@ public: uint64_t addr; uint64_t data; bool isFail; + TARGETING::ATTR_MODEL_type model; } test_data[] = { - { scom_targets[myPROC0], 0x80000C010D010C3F ,0x1234432112344321, false}, - { scom_targets[myPROC0], 0x80000C0107011C3F, 0x123443211234ABAB, false }, - { scom_targets[myPROC0], 0x8FFFFFFFFFFFFFFF, 0x123443211234ABAB, true }, + { scom_targets[myPROC0], 0x80000C010D010C3F ,0x1234432112344321, false, TARGETING::MODEL_POWER9 }, + { scom_targets[myPROC0], 0x80000C0107011C3F, 0x123443211234ABAB, false, TARGETING::MODEL_NIMBUS }, + { scom_targets[myPROC0], 0x80000C0107011C3F, 0x123443211234ABAB, false, TARGETING::MODEL_CUMULUS }, +#ifndef CONFIG_AXONE_BRING_UP + { scom_targets[myPROC0], 0x800040000701103F, 0x123443211234ABAB, false, TARGETING::MODEL_AXONE }, +#endif + { scom_targets[myPROC0], 0x8FFFFFFFFFFFFFFF, 0x123443211234ABAB, true, TARGETING::MODEL_POWER9 }, }; const uint64_t NUM_ADDRS = sizeof(test_data)/sizeof(test_data[0]); @@ -462,6 +467,14 @@ public: continue; } + // only run if this is the right kind of target + auto l_model = test_data[x].target->getAttr<TARGETING::ATTR_MODEL>(); + if( (TARGETING::MODEL_POWER9 != test_data[x].model) + && (l_model != test_data[x].model) ) + { + continue; + } + op_size = sizeof(uint64_t); total++; @@ -504,6 +517,14 @@ public: continue; } + // only run if this is the right kind of target + auto l_model = test_data[x].target->getAttr<TARGETING::ATTR_MODEL>(); + if( (TARGETING::MODEL_POWER9 != test_data[x].model) + && (l_model != test_data[x].model) ) + { + continue; + } + op_size = sizeof(uint64_t); total++; @@ -1165,12 +1186,14 @@ public: { scom_targets[myNV0], 0x12012826, 0x12012826, true, TARGETING::MODEL_POWER9}, { scom_targets[myNV1], 0x24030008, 0x24030008, true, TARGETING::MODEL_POWER9}, { scom_targets[myCAPP0],0x2010803, 0x2010803, false, TARGETING::MODEL_POWER9}, - { scom_targets[myMC0],0x0701008, 0x0701008, false, TARGETING::MODEL_AXONE}, - { scom_targets[myMC1],0x0701008, 0x0801008, false, TARGETING::MODEL_AXONE}, + { scom_targets[myMC0],0x07010008, 0x07010008, false, TARGETING::MODEL_AXONE}, + { scom_targets[myMC1],0x07010008, 0x08010008, false, TARGETING::MODEL_AXONE}, { scom_targets[myMC0],0x0FFFFFFF, 0x0FFFFFFF, true, TARGETING::MODEL_AXONE}, { scom_targets[myMC1],0x0FFFFFFF, 0x0FFFFFFF, true, TARGETING::MODEL_AXONE}, - { scom_targets[myMI0],0x2010803, 0x2010803, false, TARGETING::MODEL_AXONE}, - { scom_targets[myMI3],0x2010803, 0x3010803, false, TARGETING::MODEL_AXONE}, +#ifndef CONFIG_AXONE_BRING_UP + { scom_targets[myMI0],0x02010803, 0x02010803, false, TARGETING::MODEL_AXONE}, + { scom_targets[myMI3],0x02010803, 0x03010803, false, TARGETING::MODEL_AXONE}, +#endif { scom_targets[myMI0],0x0FFFFFFF, 0x0FFFFFFF, true, TARGETING::MODEL_AXONE}, { scom_targets[myMI3],0x0FFFFFFF, 0x0FFFFFFF, true, TARGETING::MODEL_AXONE}, { scom_targets[myMCC0],0x07010900, 0x07010900, false, TARGETING::MODEL_AXONE}, diff --git a/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml b/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml index dba5a368c..35177ce76 100644 --- a/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml +++ b/src/usr/targeting/common/xmltohb/simics_AXONE.system.xml @@ -6473,7 +6473,7 @@ </attribute> <attribute> <id>HUID</id> - <default>0x00450000</default> + <default>0x00440000</default> </attribute> <attribute> <id>ORDINAL_ID</id> @@ -6535,7 +6535,7 @@ </attribute> <attribute> <id>HUID</id> - <default>0x00450001</default> + <default>0x00440001</default> </attribute> <attribute> <id>ORDINAL_ID</id> |

