summaryrefslogtreecommitdiffstats
path: root/src/usr/errl/test
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2013-06-25 16:43:53 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-09-12 14:03:33 -0500
commitd8fdb9f6399d602c3314fe8a0a6578364e886120 (patch)
treef4cf27fee9911626b62fbee5f9d7744520cd0f07 /src/usr/errl/test
parent23c61636fe51145db2d7554ea8022aa4d58179b6 (diff)
downloadtalos-hostboot-d8fdb9f6399d602c3314fe8a0a6578364e886120.tar.gz
talos-hostboot-d8fdb9f6399d602c3314fe8a0a6578364e886120.zip
rework gard interfaces to handle new hwsv functions
the FSP gard records will now be stored in the system model, so the gard functions change to support new platform specific functions. Change-Id: I9a847a3defa7e613d128b1077763640e124360a8 RTC: 73818 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5806 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: SHELDON R. BAILEY <baileysh@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl/test')
-rw-r--r--src/usr/errl/test/errltest.H102
-rw-r--r--src/usr/errl/test/errluserdetailtest.H26
2 files changed, 79 insertions, 49 deletions
diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H
index 07a453e9e..708c46084 100644
--- a/src/usr/errl/test/errltest.H
+++ b/src/usr/errl/test/errltest.H
@@ -344,27 +344,27 @@ public:
#else
do
{
- // find some cores that we can play with
+ // find some ex units that we can play with
TARGETING::Target * pSys;
TARGETING::targetService().getTopLevelTarget(pSys);
- TARGETING::PredicateCTM predCore(TARGETING::CLASS_UNIT,
- TARGETING::TYPE_CORE);
+ TARGETING::PredicateCTM predEx(TARGETING::CLASS_UNIT,
+ TARGETING::TYPE_EX);
TARGETING::PredicateHwas predFunctional;
predFunctional.poweredOn(true).present(true).functional(true);
TARGETING::PredicatePostfixExpr checkExpr;
- checkExpr.push(&predCore).push(&predFunctional).And();
- TARGETING::TargetHandleList pCoreList;
- TARGETING::targetService().getAssociated( pCoreList, pSys,
+ checkExpr.push(&predEx).push(&predFunctional).And();
+ TARGETING::TargetHandleList pExList;
+ TARGETING::targetService().getAssociated( pExList, pSys,
TARGETING::TargetService::CHILD, TARGETING::TargetService::ALL,
&checkExpr );
- if (pCoreList.empty())
+ if (pExList.empty())
{
- TS_FAIL("testErrl3: empty pCoreList");
+ TS_FAIL("testErrl3: empty pExList");
break;
}
- TARGETING::TargetHandle_t pTarget = *pCoreList.begin();
+ TARGETING::TargetHandle_t pTarget = *pExList.begin();
errlHndl_t gard_errl = NULL;
HWAS::DeconfigGard::DeconfigureRecords_t l_deconfigRecords;
@@ -389,7 +389,7 @@ public:
}
gard_errl = HWAS::theDeconfigGard().getGardRecords(
- HWAS::DeconfigGard::GET_ALL_GARD_RECORDS, l_gardRecords);
+ NULL, l_gardRecords);
if (gard_errl)
{
TS_FAIL("testErrl3: Error from getGardRecords");
@@ -441,11 +441,11 @@ public:
HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR,
HWAS::SRCI_PRIORITY_HIGH);
- if (pCoreList.size() > 1)
+ if (pExList.size() > 1)
{
errl->addBusCallout(
- pCoreList[0],
- pCoreList[1],
+ pExList[0],
+ pExList[1],
HWAS::A_BUS_TYPE,
HWAS::SRCI_PRIORITY_LOW);
}
@@ -454,7 +454,7 @@ public:
// confirm there are the correct number of deconfig and gard records
gard_errl = HWAS::theDeconfigGard().getGardRecords(
- HWAS::DeconfigGard::GET_ALL_GARD_RECORDS, l_gardRecords);
+ NULL, l_gardRecords);
if (gard_errl)
{
TS_FAIL("testCallout: Error from getGardRecords");
@@ -481,7 +481,7 @@ public:
// delete these deconfigure and gard records
HWAS::theDeconfigGard().clearDeconfigureRecords(NULL);
- gard_errl = HWAS::theDeconfigGard().clearGardRecords(0);
+ gard_errl = HWAS::theDeconfigGard().clearGardRecords(NULL);
if (gard_errl)
{
errlCommit(gard_errl,HWAS_COMP_ID);
@@ -513,13 +513,29 @@ public:
#else
do
{
- // find a proc target
- TARGETING::PredicateCTM procChipFilter(
- TARGETING::CLASS_CHIP, TARGETING::TYPE_PROC);
- TARGETING::TargetRangeFilter pProc(
- TARGETING::targetService().begin(),
- TARGETING::targetService().end(),
- &procChipFilter);
+ // find a ex unit that we can play with
+ TARGETING::Target * pSys;
+ TARGETING::targetService().getTopLevelTarget(pSys);
+
+ TARGETING::PredicateCTM predEx(TARGETING::CLASS_UNIT,
+ TARGETING::TYPE_EX);
+ TARGETING::PredicateHwas predFunctional;
+ predFunctional.poweredOn(true).present(true).functional(true);
+ TARGETING::PredicatePostfixExpr checkExpr;
+ checkExpr.push(&predEx).push(&predFunctional).And();
+
+ TARGETING::TargetHandleList pExList;
+ TARGETING::targetService().getAssociated( pExList, pSys,
+ TARGETING::TargetService::CHILD, TARGETING::TargetService::ALL,
+ &checkExpr );
+
+ if (pExList.empty())
+ {
+ TS_FAIL("test callout: empty pExList");
+ break;
+ }
+
+ TARGETING::TargetHandle_t l_target = *pExList.begin();
TARGETING::PredicateCTM l_L4s(TARGETING::CLASS_UNIT,
TARGETING::TYPE_L4);
@@ -535,11 +551,9 @@ public:
ERRL_TEST_MOD_ID,
ERRL_TEST_REASON_CODE);
- printk("\n\nelog = 0x%X\n\n", errl->eid() );
-
// test the different callout types
- TS_TRACE( "test callout pProc %p", *pProc);
- ERRORLOG::ErrlUserDetailsTarget(*pProc).addToLog(errl);
+ TS_TRACE( "test callout pEx %p", l_target);
+ ERRORLOG::ErrlUserDetailsTarget(l_target).addToLog(errl);
errl->addHwCallout(*pL4,
HWAS::SRCI_PRIORITY_HIGH,
@@ -548,7 +562,7 @@ public:
// make this one high too - should end up with B120 src
// as the first high priority callout is mem subsys
- errl->addHwCallout( *pProc,
+ errl->addHwCallout( l_target,
HWAS::SRCI_PRIORITY_HIGH,
HWAS::DECONFIG,
HWAS::GARD_NULL);
@@ -585,13 +599,29 @@ public:
#else
do
{
- // find a proc target
- TARGETING::PredicateCTM procChipFilter(
- TARGETING::CLASS_CHIP, TARGETING::TYPE_PROC);
- TARGETING::TargetRangeFilter pProc(
- TARGETING::targetService().begin(),
- TARGETING::targetService().end(),
- &procChipFilter);
+ // find a ex unit that we can play with
+ TARGETING::Target * pSys;
+ TARGETING::targetService().getTopLevelTarget(pSys);
+
+ TARGETING::PredicateCTM predEx(TARGETING::CLASS_UNIT,
+ TARGETING::TYPE_EX);
+ TARGETING::PredicateHwas predFunctional;
+ predFunctional.poweredOn(true).present(true).functional(true);
+ TARGETING::PredicatePostfixExpr checkExpr;
+ checkExpr.push(&predEx).push(&predFunctional).And();
+
+ TARGETING::TargetHandleList pExList;
+ TARGETING::targetService().getAssociated( pExList, pSys,
+ TARGETING::TargetService::CHILD, TARGETING::TargetService::ALL,
+ &checkExpr );
+
+ if (pExList.empty())
+ {
+ TS_FAIL("test callout: empty pExList");
+ break;
+ }
+
+ TARGETING::TargetHandle_t l_target = *pExList.begin();
// find a membuf target
TARGETING::PredicateCTM membufChipFilter(
@@ -608,8 +638,8 @@ public:
ERRL_TEST_REASON_CODE);
// test the different callout types
- TS_TRACE( "test callout pProc %p", *pProc);
- ERRORLOG::ErrlUserDetailsTarget(*pProc).addToLog(errl);
+ TS_TRACE( "test callout pEx %p", l_target);
+ ERRORLOG::ErrlUserDetailsTarget(l_target).addToLog(errl);
errl->addHwCallout(*pMembuf,
HWAS::SRCI_PRIORITY_HIGH,
diff --git a/src/usr/errl/test/errluserdetailtest.H b/src/usr/errl/test/errluserdetailtest.H
index 3fdf714d0..92b65578e 100644
--- a/src/usr/errl/test/errluserdetailtest.H
+++ b/src/usr/errl/test/errluserdetailtest.H
@@ -490,7 +490,7 @@ public:
}
gard_errl = HWAS::theDeconfigGard().getGardRecords(
- HWAS::DeconfigGard::GET_ALL_GARD_RECORDS, l_gardRecords);
+ NULL, l_gardRecords);
if (gard_errl)
{
TS_FAIL("testCallout: Error from getGardRecords");
@@ -540,25 +540,25 @@ public:
HWAS::DELAYED_DECONFIG,
HWAS::GARD_NULL).addToLog(errl);
- // find some cores that we can play with
+ // find some ex units that we can play with
Target * pSys;
targetService().getTopLevelTarget(pSys);
- PredicateCTM predCore(CLASS_UNIT, TYPE_CORE);
+ PredicateCTM predEx(CLASS_UNIT, TYPE_EX);
PredicateHwas predFunctional;
predFunctional.poweredOn(true).present(true).functional(true);
PredicatePostfixExpr checkExpr;
- checkExpr.push(&predCore).push(&predFunctional).And();
- TargetHandleList pCoreList;
- targetService().getAssociated( pCoreList, pSys,
+ checkExpr.push(&predEx).push(&predFunctional).And();
+ TargetHandleList pExList;
+ targetService().getAssociated( pExList, pSys,
TargetService::CHILD, TargetService::ALL, &checkExpr );
- if (pCoreList.empty())
+ if (pExList.empty())
{
- TS_FAIL("testCallout: empty pCoreList");
+ TS_FAIL("testCallout: empty pExList");
break;
}
- TargetHandle_t l_pTarget = *pCoreList.begin();
+ TargetHandle_t l_pTarget = *pExList.begin();
TARGETING::EntityPath ep;
ep = l_pTarget->getAttr<TARGETING::ATTR_PHYS_PATH>();
@@ -580,10 +580,10 @@ public:
HWAS::EPUB_PRC_FSI_PATH,
HWAS::SRCI_PRIORITY_HIGH).addToLog(errl);
- if (pCoreList.size() > 1)
+ if (pExList.size() > 1)
{
TARGETING::EntityPath ep2;
- ep2 = pCoreList[1]->getAttr<TARGETING::ATTR_PHYS_PATH>();
+ ep2 = pExList[1]->getAttr<TARGETING::ATTR_PHYS_PATH>();
// size is total EntityPath size minus unused path elements
uint32_t ep2_size = sizeof(ep2) -
(TARGETING::EntityPath::MAX_PATH_ELEMENTS - ep2.size()) *
@@ -604,7 +604,7 @@ public:
#if 0 // GARD records are created asynchronously, so can't really test this
// confirm there are the correct number of deconfig and gard records
gard_errl = HWAS::theDeconfigGard().getGardRecords(
- HWAS::DeconfigGard::GET_ALL_GARD_RECORDS, l_gardRecords);
+ NULL, l_gardRecords);
if (gard_errl)
{
TS_FAIL("testCallout: Error from getGardRecords");
@@ -632,7 +632,7 @@ public:
// delete these deconfigure and gard records
HWAS::theDeconfigGard().clearDeconfigureRecords(NULL);
- gard_errl = HWAS::theDeconfigGard().clearGardRecords(0);
+ gard_errl = HWAS::theDeconfigGard().clearGardRecords(NULL);
if (gard_errl)
{
errlCommit(gard_errl,HWAS_COMP_ID);
OpenPOWER on IntegriCloud