summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas/test
diff options
context:
space:
mode:
authorMarty Gloff <mgloff@us.ibm.com>2016-12-30 15:25:42 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-02-13 14:16:34 -0500
commit54896a9c0e2dd4991899e3f9ee07766786814b48 (patch)
tree5b803a04a14184d8c011d5a62278e39b4012aa02 /src/usr/hwas/test
parent3192051cd7b428aa85469525ce1595ab669332fe (diff)
downloadtalos-hostboot-54896a9c0e2dd4991899e3f9ee07766786814b48.tar.gz
talos-hostboot-54896a9c0e2dd4991899e3f9ee07766786814b48.zip
Disable bad MCAs based on CRP0:Lx keyword data
The CRP0 record has 8 records (L1-L8) that correspond to the 8 ports (MCA targets) for the chip. One of the fields inside the keyword indicates if the port is disabled. This field marks the MCA as non-functional, but the MCA remains present. Change-Id: I2c7c89c9567ec9f048a426b2204b18e10ccda601 RTC:166354 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34256 Tested-by: Jenkins Server <pfd-jenkins+hostboot@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> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/hwas/test')
-rw-r--r--src/usr/hwas/test/hwas1test.H53
1 files changed, 46 insertions, 7 deletions
diff --git a/src/usr/hwas/test/hwas1test.H b/src/usr/hwas/test/hwas1test.H
index cf7461623..08a9c1425 100644
--- a/src/usr/hwas/test/hwas1test.H
+++ b/src/usr/hwas/test/hwas1test.H
@@ -1545,6 +1545,8 @@ public:
using namespace HWAS;
using namespace TARGETING;
+ TS_INFO( "testHWASpervStates entry" );
+
// find top level target
Target * pSys;
targetService().getTopLevelTarget(pSys);
@@ -1638,30 +1640,67 @@ public:
TS_INFO( "testHWASplatReadLx entry" );
// call platReadLx with target that isn't in the VPD
- errlHndl_t l_errl;
+ errlHndl_t l_errl = nullptr;
+ // Get system target
Target* pSys;
targetService().getTopLevelTarget(pSys);
+ // Get processor targets
TARGETING::TargetHandleList l_procList;
getAllChips(l_procList, TYPE_PROC);
- TargetHandleList l_mcaList;
- getChildChiplets(l_mcaList, *(l_procList.begin()), TYPE_MCA, true);
+ // Get children of first processor target
+ TargetHandleList l_childList;
+ getChildChiplets(l_childList, *(l_procList.begin()), TYPE_NA, false);
- uint8_t lxData[HWAS::VPD_CRP0_LX_DATA_LENGTH];
+ uint8_t lxData[HWAS::VPD_CRP0_LX_HDR_DATA_LENGTH];
- l_errl = HWAS::platReadLx(pSys, *(l_mcaList.begin()), lxData);
+ // Try using system target which does not have a chip unit attribute
+ l_errl = HWAS::platReadLx(pSys, lxData);
+ // Check that an error log is returned
if (l_errl)
{
// error log is expected case, delete it
delete l_errl;
+ l_errl = nullptr;
}
else
{
- TS_FAIL("testHWASplatReadLx>"
- "No error from platReadLx(pSys, *(l_mcaList.begin()).");
+ TS_FAIL("testHWASplatReadLx> No error from platReadLx(pSys).");
+ }
+
+ // Find a target that has a large chip unit and use that target
+ for( const auto & l_child_target: l_childList )
+ {
+ uint8_t l_chip_unit;
+ if (l_child_target->
+ tryGetAttr<TARGETING::ATTR_CHIP_UNIT>(l_chip_unit))
+ {
+ // Check if chip unit attribute is large enough
+ if(l_chip_unit >= HWAS::VPD_CRP0_LX_MAX_X)
+ {
+ // Try using target which has larger than expected chip unit
+ l_errl = HWAS::platReadLx(l_child_target, lxData);
+
+ // Check that an error log is returned
+ if (l_errl)
+ {
+ // error log is expected case, delete it
+ delete l_errl;
+ l_errl = nullptr;
+ }
+ else
+ {
+ TS_FAIL("testHWASplatReadLx> No error from "
+ "platReadLx(l_child_target 0x%8X).",
+ l_child_target->getAttr<ATTR_HUID>());
+ }
+
+ break;
+ }
+ }
}
TS_INFO( "testHWASplatReadLx exit" );
OpenPOWER on IntegriCloud