summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/plat
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2013-09-13 14:59:14 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-10-10 12:02:04 -0500
commitae5f2aa9194b6f26893bfb21b1fc115d3cae0dcb (patch)
tree01d6128e1c9f8c8aa3b412160d08af827093a7d2 /src/usr/hwpf/plat
parent95bf47c534737019f956fbcca2c622c98dacc266 (diff)
downloadblackbird-hostboot-ae5f2aa9194b6f26893bfb21b1fc115d3cae0dcb.tar.gz
blackbird-hostboot-ae5f2aa9194b6f26893bfb21b1fc115d3cae0dcb.zip
HWPF Error XML: Allow callout/deconfigure/gard of DIMM(s) related to MBA
Change-Id: Ibd067f73cf381b18eab5e48cf1f72f961450a1f2 RTC:81669 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6208 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/plat')
-rw-r--r--src/usr/hwpf/plat/fapiPlatHwpInvoker.C101
-rw-r--r--src/usr/hwpf/plat/fapiPlatUtil.C11
2 files changed, 96 insertions, 16 deletions
diff --git a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C
index 6739be5b2..a4ff9b3a3 100644
--- a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C
+++ b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C
@@ -28,6 +28,7 @@
#include <fapiTarget.H>
#include <fapiReturnCode.H>
+#include <fapiSystemConfig.H>
#include <fapiPlatTrace.H>
#include <fapiErrorInfo.H>
#include <hwpf/hwpf_reasoncodes.H>
@@ -132,6 +133,10 @@ HWAS::epubProcedureID xlateProcedureCallout(
return l_proc;
}
+void getChildTargetsForCDG(
+ TARGETING::Target * i_pParent, TARGETING::TYPE i_childType,
+ TARGETING::TargetHandleList & o_childTargets, uint8_t i_childPort,
+ uint8_t i_childNumber);
/**
* @brief Translates a FAPI target type to a Targeting target type
@@ -404,6 +409,10 @@ void processEIChildrenCDGs(const ErrorInfo & i_errInfo,
i_errInfo.iv_childrenCDGs.begin();
l_itr != i_errInfo.iv_childrenCDGs.end(); ++l_itr)
{
+
+ uint8_t l_childNumber = (*l_itr)->iv_childNumber;
+ uint8_t l_childPort = (*l_itr)->iv_childPort;
+
TARGETING::TYPE l_childType =
xlateTargetType((*l_itr)->iv_childType);
@@ -414,9 +423,9 @@ void processEIChildrenCDGs(const ErrorInfo & i_errInfo,
}
else
{
- TARGETING::Target * l_pParentChip =
- reinterpret_cast<TARGETING::Target*>(
- (*l_itr)->iv_parentChip.get());
+ TARGETING::Target * l_pParent =
+ reinterpret_cast<TARGETING::Target *>
+ ((*l_itr)->iv_parent.get());
HWAS::callOutPriority l_priority =
xlateCalloutPriority((*l_itr)->iv_calloutPriority);
@@ -435,14 +444,18 @@ void processEIChildrenCDGs(const ErrorInfo & i_errInfo,
// Get a list of functional children
TARGETING::TargetHandleList l_children;
- TARGETING::getChildChiplets(l_children, l_pParentChip, l_childType);
+
+ getChildTargetsForCDG( l_pParent, l_childType, l_children,
+ l_childPort, l_childNumber );
// Callout/Deconfigure/GARD each child as appropriate
for (TARGETING::TargetHandleList::const_iterator
l_itr = l_children.begin();
- l_itr != l_children.end(); ++l_itr)
+ l_itr != l_children.end(); ++l_itr)
{
- FAPI_ERR("processEIChildrenCDGs: Calling out target (type: 0x%02x, pri:%d, deconf:%d, gard:%d)",
+
+ FAPI_ERR("processEIChildrenCDGs: Calling out target"
+ " (type: 0x%02x, pri:%d, deconf:%d, gard:%d)",
l_childType, l_priority, l_deconfig, l_gard);
io_pError->addHwCallout(*l_itr, l_priority, l_deconfig, l_gard);
}
@@ -450,6 +463,78 @@ void processEIChildrenCDGs(const ErrorInfo & i_errInfo,
}
}
+void getChildTargetsForCDG(
+ TARGETING::Target * i_pParent, TARGETING::TYPE i_childType,
+ TARGETING::TargetHandleList & o_childTargets, uint8_t i_childPort,
+ uint8_t i_childNumber )
+{
+ o_childTargets.clear();
+ bool l_functional = true;
+
+ // dimms are not considered as a chiplet but
+ // a logical card so we need special processing here
+ if( i_childType == TARGETING::TYPE_DIMM )
+ {
+ TARGETING::TargetHandleList l_dimmList;
+
+ TARGETING:: getChildAffinityTargets( l_dimmList, i_pParent,
+ TARGETING::CLASS_LOGICAL_CARD,
+ TARGETING::TYPE_DIMM, l_functional);
+
+ for (TARGETING::TargetHandleList::const_iterator
+ l_itr = l_dimmList.begin();
+ l_itr != l_dimmList.end();
+ ++l_itr)
+ {
+
+ uint8_t l_mbaPort =
+ (*l_itr)->getAttr<TARGETING::ATTR_MBA_PORT>();
+
+ uint8_t l_mbaDimm =
+ (*l_itr)->getAttr<TARGETING::ATTR_MBA_DIMM>();
+
+ // if childPort was not set in the callout
+ // the caller is trying to callout either all dimms
+ // connected to this MBA or a specific dimm number on both
+ // ports
+ if( i_childPort == FAPI_ALL_MBA_PORTS )
+ {
+ // if the caller reqested all children on all ports
+ // or if this dimm matches the requested dimm on
+ // either port then add it
+ if( ( i_childNumber == FAPI_ALL_MBA_DIMMS ) ||
+ ( i_childNumber == l_mbaDimm ))
+ {
+ FAPI_DBG("adding callout for i_childNumber=%d "
+ "and i_childPort %d ",
+ i_childNumber, i_childPort );
+
+ o_childTargets.push_back( *l_itr );
+ }
+ }
+ else
+ {
+ // if caller requested all dimms on a specific port or if this
+ // child is the one requested then add it
+ if((( i_childNumber == FAPI_ALL_MBA_DIMMS ) ||
+ ( i_childNumber == l_mbaDimm )) &&
+ ( i_childPort == l_mbaPort ))
+ {
+ FAPI_DBG("adding callout for i_childNumber=%d "
+ " and i_childPort %d",
+ i_childNumber, i_childPort );
+
+ o_childTargets.push_back( *l_itr );
+ }
+ }
+ }
+ }
+ else
+ {
+ TARGETING::getChildChiplets(o_childTargets, i_pParent, i_childType);
+ }
+}
+
//******************************************************************************
// fapiRcToErrl function. Converts a fapi::ReturnCode to an error log
//******************************************************************************
@@ -468,7 +553,7 @@ errlHndl_t fapiRcToErrl(ReturnCode & io_rc,
{
// PLAT error. Release the errlHndl_t
FAPI_ERR("fapiRcToErrl: PLAT error: 0x%08x",
- static_cast<uint32_t>(io_rc));
+ static_cast<uint32_t>(io_rc));
l_pError = reinterpret_cast<errlHndl_t> (io_rc.releasePlatData());
}
else if (l_creator == ReturnCode::CREATOR_HWP)
@@ -492,7 +577,7 @@ errlHndl_t fapiRcToErrl(ReturnCode & io_rc,
// Add the rcValue as FFDC. This will explain what the error was
l_pError->addFFDC(HWPF_COMP_ID, &l_rcValue, sizeof(l_rcValue), 1,
- HWPF_UDT_HWP_RCVALUE);
+ HWPF_UDT_HWP_RCVALUE);
// Get the Error Information Pointer
const ErrorInfo * l_pErrorInfo = io_rc.getErrorInfo();
diff --git a/src/usr/hwpf/plat/fapiPlatUtil.C b/src/usr/hwpf/plat/fapiPlatUtil.C
index 939f695cf..0aad15fbf 100644
--- a/src/usr/hwpf/plat/fapiPlatUtil.C
+++ b/src/usr/hwpf/plat/fapiPlatUtil.C
@@ -92,20 +92,15 @@ fapi::ReturnCode fapiDelay(uint64_t i_nanoSeconds, uint64_t i_simCycles)
// fapiLogError
//******************************************************************************
void fapiLogError(fapi::ReturnCode & io_rc,
- fapi::fapiErrlSeverity_t i_sev)
+ fapi::fapiErrlSeverity_t i_sev,
+ bool i_unitTestError)
{
// ENUM CONVERSION FAPI to PLATFORM
errlHndl_t l_pError = NULL;
- bool l_unitTestError = false;
FAPI_ERR("fapiLogError: logging error");
- if (fapi::RC_TEST_ERROR_A == static_cast<uint32_t>(io_rc))
- {
- l_unitTestError = true;
- }
-
// Convert a FAPI severity to a ERRORLOG severity
ERRORLOG::errlSeverity_t l_sev = ERRORLOG::ERRL_SEV_UNRECOVERABLE;
switch (i_sev)
@@ -130,7 +125,7 @@ void fapiLogError(fapi::ReturnCode & io_rc,
// Commit the error log. This will delete the error log and set the handle
// to NULL.
- if (l_unitTestError)
+ if (i_unitTestError)
{
errlCommit(l_pError, CXXTEST_COMP_ID);
}
OpenPOWER on IntegriCloud