summaryrefslogtreecommitdiffstats
path: root/src/usr/fapi2
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2016-02-03 15:39:30 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-02-26 16:23:15 -0600
commit65bc26d54dcffb32bd1959f1447b8dba79627e0f (patch)
tree476dc4ea74b8342aa62bc7625185af2d190aa9df /src/usr/fapi2
parentda0248159af1297255bd018180b1f8b3e220503c (diff)
downloadblackbird-hostboot-65bc26d54dcffb32bd1959f1447b8dba79627e0f.tar.gz
blackbird-hostboot-65bc26d54dcffb32bd1959f1447b8dba79627e0f.zip
Need an option to allow a HWP to return an error log to platform code.
-Modify FFDC code to capture error log pointer in RC plat pointer Change-Id: I02266468795ea345610f237b50b14d79cbaef202 RTC:132220 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23663 Tested-by: Jenkins Server Reviewed-by: Christian Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/fapi2')
-rw-r--r--src/usr/fapi2/plat_utils.C45
1 files changed, 30 insertions, 15 deletions
diff --git a/src/usr/fapi2/plat_utils.C b/src/usr/fapi2/plat_utils.C
index aa146e45b..6a3fd749d 100644
--- a/src/usr/fapi2/plat_utils.C
+++ b/src/usr/fapi2/plat_utils.C
@@ -816,10 +816,9 @@ errlHndl_t rcToErrl(ReturnCode & io_rc,
ReturnCode::returnCodeCreator l_creator = io_rc.getCreator();
if (l_creator == ReturnCode::CREATOR_PLAT)
{
- // PLAT error. Release the errlHndl_t
+ // PLAT error, get the platform data from the return code
FAPI_ERR("rcToErrl: PLAT error: 0x%08x", l_rcValue);
- //@TODO RTC:143127
- //l_pError = reinterpret_cast<errlHndl_t> (io_rc.releaseData());
+ l_pError = reinterpret_cast<errlHndl_t>(io_rc.getPlatDataPtr());
}
else if (l_creator == ReturnCode::CREATOR_HWP)
{
@@ -836,7 +835,7 @@ errlHndl_t rcToErrl(ReturnCode & io_rc,
* @custdesc Error initializing processor/memory subsystem
* during boot. See FRU list for repair actions
*/
- l_pError = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ l_pError = new ERRORLOG::ErrlEntry(i_sev,
MOD_FAPI2_RC_TO_ERRL,
RC_HWP_GENERATED_ERROR,
l_rcValue);
@@ -901,20 +900,17 @@ errlHndl_t rcToErrl(ReturnCode & io_rc,
return l_pError;
}
-///
-/// @brief Log an error.
-///
-void logError(
- fapi2::ReturnCode & io_rc,
- fapi2::errlSeverity_t i_sev,
- bool i_unitTestError )
+// Convert the RC passed in to a platform error log and
+// assign it to the platform data pointer of the RC
+void createPlatLog(
+ fapi2::ReturnCode & io_rc,
+ fapi2::errlSeverity_t i_sev
+ )
{
- FAPI_DBG("Entering logError");
- // ENUM CONVERSION FAPI to PLATFORM
- errlHndl_t l_pError = NULL;
+ FAPI_DBG("Entering createLog");
- FAPI_INF("logError");
+ errlHndl_t l_pError = NULL;
// Convert a FAPI severity to a ERRORLOG severity
ERRORLOG::errlSeverity_t l_sev = ERRORLOG::ERRL_SEV_UNRECOVERABLE;
@@ -939,6 +935,25 @@ void logError(
// PLAT Data, HWP FFDC data, and Error Target associated with it.
l_pError = rcToErrl(io_rc, l_sev);
+ io_rc.setPlatDataPtr(reinterpret_cast<void *>(l_pError));
+
+}
+
+///
+/// @brief Log an error - Create a platform error from the passed
+// RC passed in and commit it.
+///
+void logError(
+ fapi2::ReturnCode & io_rc,
+ fapi2::errlSeverity_t i_sev,
+ bool i_unitTestError )
+{
+ FAPI_DBG("Entering logError" );
+
+ createPlatLog( io_rc, i_sev );
+
+ errlHndl_t l_pError = reinterpret_cast<errlHndl_t>(io_rc.getPlatDataPtr());
+
// Commit the error log. This will delete the error log and set the handle
// to NULL.
if (i_unitTestError)
OpenPOWER on IntegriCloud