summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2013-03-22 16:00:47 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-04-04 17:08:36 -0500
commitd80544e716c93297feb4c64fceabcdec6c2efbc7 (patch)
treec1652e24fd8487cbf5ce6fdc67734938c2f28a4e /src/usr
parentf3af02b13688f74136c9983fb9919bf64b9eb304 (diff)
downloadtalos-hostboot-d80544e716c93297feb4c64fceabcdec6c2efbc7.tar.gz
talos-hostboot-d80544e716c93297feb4c64fceabcdec6c2efbc7.zip
HWPF: Support Procedure Callouts
Change-Id: I250472ba4125944ba17433c759c915b30a9bc93e RTC: 50323 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3699 Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/hwpf/fapi/fapiErrorInfo.C27
-rwxr-xr-xsrc/usr/hwpf/fapi/fapiParseErrorInfo.pl32
-rw-r--r--src/usr/hwpf/fapi/fapiReturnCode.C46
-rw-r--r--src/usr/hwpf/hwp/fapiHwpErrorInfo.xml5
-rw-r--r--src/usr/hwpf/plat/fapiPlatHwpInvoker.C132
-rw-r--r--src/usr/hwpf/test/fapiRcTest.C146
6 files changed, 317 insertions, 71 deletions
diff --git a/src/usr/hwpf/fapi/fapiErrorInfo.C b/src/usr/hwpf/fapi/fapiErrorInfo.C
index 5d4e9e716..1879fefd2 100644
--- a/src/usr/hwpf/fapi/fapiErrorInfo.C
+++ b/src/usr/hwpf/fapi/fapiErrorInfo.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -38,6 +38,7 @@
* mjjones 08/14/2012 Merge Callout/Deconfig/Gard
* structures into one
* mjjones 09/19/2012 Replace FFDC type with ID
+ * mjjones 03/22/2013 Support Procedure Callouts
*/
#include <fapiErrorInfo.H>
@@ -77,11 +78,23 @@ const void * ErrorInfoFfdc::getData(uint32_t & o_size) const
}
//******************************************************************************
+// ErrorInfoProcedureCallout Constructor
+//******************************************************************************
+ErrorInfoProcedureCallout::ErrorInfoProcedureCallout(
+ const ProcedureCallouts::ProcedureCallout i_procedure,
+ const CalloutPriorities::CalloutPriority i_calloutPriority)
+: iv_procedure(i_procedure), iv_calloutPriority(i_calloutPriority)
+{
+
+}
+
+//******************************************************************************
// ErrorInfoCDG Constructor
//******************************************************************************
ErrorInfoCDG::ErrorInfoCDG(const Target & i_target)
-: iv_target(i_target), iv_callout(false), iv_calloutPriority(PRI_LOW),
- iv_deconfigure(false), iv_gard(false)
+: iv_target(i_target), iv_callout(false),
+ iv_calloutPriority(CalloutPriorities::LOW), iv_deconfigure(false),
+ iv_gard(false)
{
}
@@ -98,6 +111,14 @@ ErrorInfo::~ErrorInfo()
(*l_itr) = NULL;
}
+ for (ErrorInfo::ErrorInfoProcedureCalloutItr_t l_itr =
+ iv_procedureCallouts.begin();
+ l_itr != iv_procedureCallouts.end(); ++l_itr)
+ {
+ delete (*l_itr);
+ (*l_itr) = NULL;
+ }
+
for (ErrorInfo::ErrorInfoCDGItr_t l_itr = iv_CDGs.begin();
l_itr != iv_CDGs.end(); ++l_itr)
{
diff --git a/src/usr/hwpf/fapi/fapiParseErrorInfo.pl b/src/usr/hwpf/fapi/fapiParseErrorInfo.pl
index 2ddc8c1a8..996ec414c 100755
--- a/src/usr/hwpf/fapi/fapiParseErrorInfo.pl
+++ b/src/usr/hwpf/fapi/fapiParseErrorInfo.pl
@@ -51,6 +51,7 @@
# mjjones 11/09/12 Generate fapiSetSbeError.H
# mjjones 01/09/13 Fix CFAM register capture
# mjjones 03/14/13 Allow 64bit literals for SCOM reg capture
+# mjjones 03/22/13 Support Procedure Callouts
#
# End Change Log ******************************************************
@@ -461,12 +462,12 @@ foreach my $argnum (1 .. $#ARGV)
$eiEntryCount++;
}
- # Target callouts
+ # Procedure/Target callouts
foreach my $callout (@{$err->{callout}})
{
- if (! exists $callout->{target})
+ if ((! exists $callout->{target}) && (! exists $callout->{procedure}))
{
- print ("fapiParseErrorInfo.pl ERROR. Callout target missing\n");
+ print ("fapiParseErrorInfo.pl ERROR. Callout procedure/target missing\n");
exit(1);
}
@@ -476,18 +477,33 @@ foreach my $argnum (1 .. $#ARGV)
exit(1);
}
- # Check the type
- print EIFILE "fapi::fapiCheckType<const fapi::Target *>(&$callout->{target}); ";
+ my $objNum = 0;
+ if (exists $callout->{target})
+ {
+ # Check the type
+ print EIFILE
+ "fapi::fapiCheckType<const fapi::Target *>(&$callout->{target}); ";
- # Add the Target to the objectlist if it doesn't already exist
- my $objNum = addEntryToArray(\@eiObjects, $callout->{target});
+ # Add the Target to the objectlist if it doesn't already exist
+ $objNum = addEntryToArray(\@eiObjects, $callout->{target});
+ }
# Add an EI entry to eiEntryStr
if ($eiEntryCount > 0)
{
$eiEntryStr .= ", ";
}
- $eiEntryStr .= "{fapi::ReturnCode::EI_TYPE_CALLOUT, $objNum, fapi::PRI_$callout->{priority}, 0}";
+
+ if (exists $callout->{target})
+ {
+ $eiEntryStr .=
+ "{fapi::ReturnCode::EI_TYPE_CALLOUT, $objNum, fapi::CalloutPriorities::$callout->{priority}, 0}";
+ }
+ else
+ {
+ $eiEntryStr .=
+ "{fapi::ReturnCode::EI_TYPE_PROCEDURE_CALLOUT, 0, fapi::CalloutPriorities::$callout->{priority}, fapi::ProcedureCallouts::$callout->{procedure}}";
+ }
$eiEntryCount++;
}
diff --git a/src/usr/hwpf/fapi/fapiReturnCode.C b/src/usr/hwpf/fapi/fapiReturnCode.C
index b8dae8bed..0de6126cb 100644
--- a/src/usr/hwpf/fapi/fapiReturnCode.C
+++ b/src/usr/hwpf/fapi/fapiReturnCode.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2011,2012 */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
/* */
/* p1 */
/* */
@@ -48,6 +48,7 @@
* brianh 07/31/2012 performance/size optimizations
* mjjones 08/14/2012 Use new ErrorInfo structure
* mjjones 09/19/2012 Add FFDC ID to error info
+ * mjjones 03/22/2013 Support Procedure Callouts
*/
#include <fapiReturnCode.H>
@@ -230,7 +231,7 @@ void ReturnCode::addErrorInfo(const void * const * i_pObjects,
{
for (uint32_t i = 0; i < i_count; i++)
{
- // Figure out the object that this FFDC refers to
+ // Figure out the object that this ErrorInfo refers to
const void * l_pObject = i_pObjects[i_pEntries[i].iv_object];
if (i_pEntries[i].iv_type == EI_TYPE_FFDC)
@@ -277,15 +278,30 @@ void ReturnCode::addErrorInfo(const void * const * i_pObjects,
FAPI_ERR("addErrorInfo: Unrecognized FFDC data: %d", l_size);
}
}
+ else if (i_pEntries[i].iv_type == EI_TYPE_PROCEDURE_CALLOUT)
+ {
+ ProcedureCallouts::ProcedureCallout l_proc =
+ static_cast<ProcedureCallouts::ProcedureCallout>
+ (i_pEntries[i].iv_data2);
+ CalloutPriorities::CalloutPriority l_pri =
+ static_cast<CalloutPriorities::CalloutPriority>
+ (i_pEntries[i].iv_data1);
+
+ // Add the ErrorInfo
+ FAPI_ERR("addErrorInfo: Adding proc callout, proc: %d, pri: %d",
+ l_proc, l_pri);
+ addEIProcedureCallout(l_proc, l_pri);
+ }
else if (i_pEntries[i].iv_type == EI_TYPE_CALLOUT)
{
// Get a pointer to the Target to callout and the priority
const Target * l_pTarget = static_cast<const Target *>(l_pObject);
- CalloutPriority l_pri =
- static_cast<CalloutPriority>(i_pEntries[i].iv_data1);
+ CalloutPriorities::CalloutPriority l_pri =
+ static_cast<CalloutPriorities::CalloutPriority>
+ (i_pEntries[i].iv_data1);
// Add the ErrorInfo
- FAPI_ERR("addErrorInfo: Adding callout, pri: %d", l_pri);
+ FAPI_ERR("addErrorInfo: Adding target callout, pri: %d", l_pri);
addEICallout(*l_pTarget, l_pri);
}
else if (i_pEntries[i].iv_type == EI_TYPE_DECONF)
@@ -394,10 +410,26 @@ void ReturnCode::forgetData()
}
//******************************************************************************
+// addEIProcedureCallout function
+//******************************************************************************
+void ReturnCode::addEIProcedureCallout(
+ const ProcedureCallouts::ProcedureCallout i_procedure,
+ const CalloutPriorities::CalloutPriority i_priority)
+{
+ // Create an ErrorInfoProcedureCallout object and add it to the Error
+ // Information
+ ErrorInfoProcedureCallout * l_pCallout = new ErrorInfoProcedureCallout(
+ i_procedure, i_priority);
+ getCreateReturnCodeDataRef().getCreateErrorInfo().
+ iv_procedureCallouts.push_back(l_pCallout);
+}
+
+//******************************************************************************
// addEICallout function
//******************************************************************************
-void ReturnCode::addEICallout(const Target & i_target,
- const CalloutPriority i_priority)
+void ReturnCode::addEICallout(
+ const Target & i_target,
+ const CalloutPriorities::CalloutPriority i_priority)
{
// Get/Create a ErrorInfoCDG object for the target and update the callout
ErrorInfoCDG & l_errorInfoCdg = getCreateReturnCodeDataRef().
diff --git a/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml b/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml
index ff91a801a..4acbe2815 100644
--- a/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml
+++ b/src/usr/hwpf/hwp/fapiHwpErrorInfo.xml
@@ -47,6 +47,11 @@
<ffdc>UNIT_TEST_FFDC_DATA_BUF</ffdc>
<!-- Add a Target as FFDC -->
<ffdc>UNIT_TEST_FFDC_MASTER_CHIP_TARGET</ffdc>
+ <!-- Callout next level of support -->
+ <callout>
+ <procedure>LVL_SUPPORT</procedure>
+ <priority>MEDIUM</priority>
+ </callout>
<!-- Callout MASTER_CHIP HIGH -->
<!-- Commented out to avoid actually calling out a chip in UT
<callout>
diff --git a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C
index 66753c655..dd392dc7e 100644
--- a/src/usr/hwpf/plat/fapiPlatHwpInvoker.C
+++ b/src/usr/hwpf/plat/fapiPlatHwpInvoker.C
@@ -36,10 +36,78 @@
namespace fapi
{
-//******************************************************************************
-// processEIFfdcs.
-// Processes any FFDC in the ReturnCode Error Information
-//******************************************************************************
+/**
+ * @brief Translates a FAPI callout priority to an HWAS callout priority
+ *
+ * @param[i] i_fapiPri FAPI callout priority
+ *
+ * @return HWAS callout priority
+ */
+HWAS::callOutPriority xlateCalloutPriority(
+ const fapi::CalloutPriorities::CalloutPriority i_fapiPri)
+{
+ // Use the CalloutPriority enum value as an index
+ HWAS::callOutPriority l_priority = HWAS::SRCI_PRIORITY_HIGH;
+ size_t l_index = i_fapiPri;
+
+ const HWAS::callOutPriority HWAS_PRI[] = {HWAS::SRCI_PRIORITY_LOW,
+ HWAS::SRCI_PRIORITY_MED,
+ HWAS::SRCI_PRIORITY_HIGH};
+
+ if (l_index < (sizeof(HWAS_PRI)/sizeof(HWAS::callOutPriority)))
+ {
+ l_priority = HWAS_PRI[i_fapiPri];
+ }
+ else
+ {
+ FAPI_ERR(
+ "fapi::xlateCalloutPriority: Unknown priority 0x%x, assuming HIGH",
+ i_fapiPri);
+ }
+
+ return l_priority;
+}
+
+/**
+ * @brief Translates a FAPI procedure callout to an HWAS procedure callout
+ *
+ * @param[i] i_fapiProc FAPI procedure callout
+ *
+ * @return HWAS procedure callout
+ */
+HWAS::epubProcedureID xlateProcedureCallout(
+ const fapi::ProcedureCallouts::ProcedureCallout i_fapiProc)
+{
+ // Use the ProcedureCallout enum value as an index
+ HWAS::epubProcedureID l_proc = HWAS::EPUB_PRC_HB_CODE;
+ size_t l_index = i_fapiProc;
+
+ const HWAS::epubProcedureID HWAS_PROC[] = {
+ HWAS::EPUB_PRC_HB_CODE,
+ HWAS::EPUB_PRC_LVL_SUPP,
+ HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR};
+
+ if (l_index < (sizeof(HWAS_PROC)/sizeof(HWAS::epubProcedureID)))
+ {
+ l_proc = HWAS_PROC[i_fapiProc];
+ }
+ else
+ {
+ FAPI_ERR(
+ "fapi::xlateProcedureCallout: Unknown proc 0x%x, assuming CODE",
+ i_fapiProc);
+ }
+
+ return l_proc;
+}
+
+/**
+ * @brief Processes any FFDC in the ReturnCode Error Information and adds them
+ * to the error log
+ *
+ * @param[i] i_errInfo Reference to ReturnCode Error Information
+ * @param[io] io_pError Errorlog Handle
+ */
void processEIFfdcs(const ErrorInfo & i_errInfo,
errlHndl_t io_pError)
{
@@ -63,11 +131,39 @@ void processEIFfdcs(const ErrorInfo & i_errInfo,
}
}
-//******************************************************************************
-// processEICDGs
-// Processes any Callout/Deconfigure/GARD requests in the ReturnCode Error
-// Information
-//******************************************************************************
+/**
+ * @brief Processes any Procedure callouts requests in the ReturnCode Error
+ * Information and adds them to the error log
+ *
+ * @param[i] i_errInfo Reference to ReturnCode Error Information
+ * @param[io] io_pError Errorlog Handle
+ */
+void processEIProcCallouts(const ErrorInfo & i_errInfo,
+ errlHndl_t io_pError)
+{
+ // Iterate through the procedure callout requests, adding each to the error
+ // log
+ for (ErrorInfo::ErrorInfoProcedureCalloutCItr_t l_itr =
+ i_errInfo.iv_procedureCallouts.begin();
+ l_itr != i_errInfo.iv_procedureCallouts.end(); ++l_itr)
+ {
+ HWAS::epubProcedureID l_procedure =
+ xlateProcedureCallout((*l_itr)->iv_procedure);
+
+ HWAS::callOutPriority l_priority =
+ xlateCalloutPriority((*l_itr)->iv_calloutPriority);
+
+ io_pError->addProcedureCallout(l_procedure, l_priority);
+ }
+}
+
+/**
+ * @brief Processes any Callout/Deconfigure/GARD requests in the ReturnCode Error
+ * Information and adds them to the error log
+ *
+ * @param[i] i_errInfo Reference to ReturnCode Error Information
+ * @param[io] io_pError Errorlog Handle
+ */
void processEICDGs(const ErrorInfo & i_errInfo,
errlHndl_t io_pError)
{
@@ -76,22 +172,15 @@ void processEICDGs(const ErrorInfo & i_errInfo,
// by calling out Target pairs, then the HWAS::SRCI_PRIORITY will need to
// be a 'grouping' priority (MEDA/B/C)
- // Iterate through the CGD requests, adding each to the error log
+ // Iterate through the CGD requests, adding each to the error log
for (ErrorInfo::ErrorInfoCDGCItr_t l_itr = i_errInfo.iv_CDGs.begin();
l_itr != i_errInfo.iv_CDGs.end(); ++l_itr)
{
TARGETING::Target * l_pTarget =
reinterpret_cast<TARGETING::Target*>((*l_itr)->iv_target.get());
- HWAS::callOutPriority l_priority = HWAS::SRCI_PRIORITY_HIGH;
- if ((*l_itr)->iv_calloutPriority == fapi::PRI_MEDIUM)
- {
- l_priority = HWAS::SRCI_PRIORITY_MED;
- }
- else if ((*l_itr)->iv_calloutPriority == fapi::PRI_LOW)
- {
- l_priority = HWAS::SRCI_PRIORITY_LOW;
- }
+ HWAS::callOutPriority l_priority =
+ xlateCalloutPriority((*l_itr)->iv_calloutPriority);
HWAS::DeconfigEnum l_deconfig = HWAS::NO_DECONFIG;
if ((*l_itr)->iv_deconfigure)
@@ -161,6 +250,7 @@ errlHndl_t fapiRcToErrl(ReturnCode & io_rc)
{
// There is error information associated with the ReturnCode
processEIFfdcs(*l_pErrorInfo, l_pError);
+ processEIProcCallouts(*l_pErrorInfo, l_pError);
processEICDGs(*l_pErrorInfo, l_pError);
}
else
@@ -185,13 +275,15 @@ errlHndl_t fapiRcToErrl(ReturnCode & io_rc)
MOD_FAPI_RC_TO_ERRL,
l_reasonCode);
- // FAPI may have added FFDC Error Information.
+ // FAPI may have added Error Information.
// Get the Error Information Pointer
const ErrorInfo * l_pErrorInfo = io_rc.getErrorInfo();
if (l_pErrorInfo)
{
processEIFfdcs(*l_pErrorInfo, l_pError);
+ processEIProcCallouts(*l_pErrorInfo, l_pError);
+ processEICDGs(*l_pErrorInfo, l_pError);
}
}
diff --git a/src/usr/hwpf/test/fapiRcTest.C b/src/usr/hwpf/test/fapiRcTest.C
index 182520caa..4ace61dbc 100644
--- a/src/usr/hwpf/test/fapiRcTest.C
+++ b/src/usr/hwpf/test/fapiRcTest.C
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/usr/hwpf/test/fapiRcTest.C $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2011-2012
- *
- * p1
- *
- * Object Code Only (OCO) source materials
- * Licensed Internal Code Source Materials
- * IBM HostBoot Licensed Internal Code
- *
- * The source code for this program is not published or other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END_TAG
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/test/fapiRcTest.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
/**
* @file fapiTargetTest.C
*
@@ -36,6 +35,7 @@
* mjjones 09/23/2011 Updated test for ErrorInfo
* mjjones 01/13/2012 Use new ReturnCode interfaces
* mjjones 08/14/2012 Use new ErrorInfo structures
+ * mjjones 03/28/2013 Added proc-callout tests
*/
#include <fapi.H>
@@ -618,10 +618,13 @@ uint32_t rcTest12()
fapi::ReturnCode::ErrorInfoEntry l_entries[] =
{{fapi::ReturnCode::EI_TYPE_FFDC, 0,
fapi::ReturnCodeFfdc::getErrorInfoFfdcSize(l_ffdc)},
- {fapi::ReturnCode::EI_TYPE_CALLOUT, 1, fapi::PRI_MEDIUM},
+ {fapi::ReturnCode::EI_TYPE_PROCEDURE_CALLOUT, 0,
+ fapi::CalloutPriorities::HIGH, fapi::ProcedureCallouts::CODE},
+ {fapi::ReturnCode::EI_TYPE_CALLOUT, 1,
+ fapi::CalloutPriorities::MEDIUM},
{fapi::ReturnCode::EI_TYPE_DECONF, 1},
{fapi::ReturnCode::EI_TYPE_GARD, 1}};
- l_rc.addErrorInfo(l_objects, l_entries, 4);
+ l_rc.addErrorInfo(l_objects, l_entries, 5);
do
{
@@ -686,9 +689,11 @@ uint32_t rcTest12()
break;
}
- if (l_pErrInfo->iv_CDGs[0]->iv_calloutPriority != PRI_MEDIUM)
+ if (l_pErrInfo->iv_CDGs[0]->iv_calloutPriority !=
+ CalloutPriorities::MEDIUM)
{
- FAPI_ERR("rcTest12. callout priority mismatch");
+ FAPI_ERR("rcTest12. callout priority mismatch (%d)",
+ l_pErrInfo->iv_CDGs[0]->iv_calloutPriority);
l_result = 8;
break;
}
@@ -707,6 +712,31 @@ uint32_t rcTest12()
break;
}
+ if (l_pErrInfo->iv_procedureCallouts.size() != 1)
+ {
+ FAPI_ERR("rcTest12. %d proc-callouts",
+ l_pErrInfo->iv_procedureCallouts.size());
+ l_result = 11;
+ break;
+ }
+
+ if (l_pErrInfo->iv_procedureCallouts[0]->iv_procedure !=
+ ProcedureCallouts::CODE)
+ {
+ FAPI_ERR("rcTest12. procedure callout mismatch (%d)",
+ l_pErrInfo->iv_procedureCallouts[0]->iv_procedure);
+ l_result = 12;
+ break;
+ }
+
+ if (l_pErrInfo->iv_procedureCallouts[0]->iv_calloutPriority !=
+ CalloutPriorities::HIGH)
+ {
+ FAPI_ERR("rcTest12. procedure callout priority mismatch (%d)",
+ l_pErrInfo->iv_procedureCallouts[0]->iv_calloutPriority);
+ l_result = 13;
+ break;
+ }
FAPI_INF("rcTest12. Success!");
}
@@ -955,12 +985,16 @@ uint32_t rcTest16()
fapi::ReturnCodeFfdc::getErrorInfoFfdcSize(l_ffdc)},
{fapi::ReturnCode::EI_TYPE_FFDC, 1,
fapi::ReturnCodeFfdc::getErrorInfoFfdcSize(l_ffdc2)},
- {fapi::ReturnCode::EI_TYPE_CALLOUT, 2, fapi::PRI_HIGH},
- {fapi::ReturnCode::EI_TYPE_CALLOUT, 3, fapi::PRI_LOW},
+ {fapi::ReturnCode::EI_TYPE_CALLOUT, 2, fapi::CalloutPriorities::HIGH},
+ {fapi::ReturnCode::EI_TYPE_CALLOUT, 3, fapi::CalloutPriorities::LOW},
{fapi::ReturnCode::EI_TYPE_DECONF, 2},
{fapi::ReturnCode::EI_TYPE_DECONF, 3},
- {fapi::ReturnCode::EI_TYPE_GARD, 2}};
- l_rc.addErrorInfo(l_objects, l_entries, 7);
+ {fapi::ReturnCode::EI_TYPE_GARD, 2},
+ {fapi::ReturnCode::EI_TYPE_PROCEDURE_CALLOUT, 0,
+ fapi::CalloutPriorities::HIGH, fapi::ProcedureCallouts::CODE},
+ {fapi::ReturnCode::EI_TYPE_PROCEDURE_CALLOUT, 0,
+ fapi::CalloutPriorities::MEDIUM, fapi::ProcedureCallouts::LVL_SUPPORT}};
+ l_rc.addErrorInfo(l_objects, l_entries, 9);
do
{
@@ -1035,7 +1069,8 @@ uint32_t rcTest16()
break;
}
- if (l_pErrInfo->iv_CDGs[0]->iv_calloutPriority != PRI_HIGH)
+ if (l_pErrInfo->iv_CDGs[0]->iv_calloutPriority !=
+ CalloutPriorities::HIGH)
{
FAPI_ERR("rcTest16. CDG[0] callout priority mismatch");
l_result = 9;
@@ -1063,7 +1098,8 @@ uint32_t rcTest16()
break;
}
- if (l_pErrInfo->iv_CDGs[1]->iv_calloutPriority != PRI_LOW)
+ if (l_pErrInfo->iv_CDGs[1]->iv_calloutPriority !=
+ CalloutPriorities::LOW)
{
FAPI_ERR("rcTest16. CDG[1] callout priority mismatch");
l_result = 13;
@@ -1084,6 +1120,50 @@ uint32_t rcTest16()
break;
}
+ if (l_pErrInfo->iv_procedureCallouts.size() != 2)
+ {
+ FAPI_ERR("rcTest16. %d proc-callouts",
+ l_pErrInfo->iv_procedureCallouts.size());
+ l_result = 16;
+ break;
+ }
+
+ if (l_pErrInfo->iv_procedureCallouts[0]->iv_procedure !=
+ ProcedureCallouts::CODE)
+ {
+ FAPI_ERR("rcTest16. procedure[0] callout mismatch (%d)",
+ l_pErrInfo->iv_procedureCallouts[0]->iv_procedure);
+ l_result = 17;
+ break;
+ }
+
+ if (l_pErrInfo->iv_procedureCallouts[0]->iv_calloutPriority !=
+ CalloutPriorities::HIGH)
+ {
+ FAPI_ERR("rcTest16. procedure[0] callout priority mismatch (%d)",
+ l_pErrInfo->iv_procedureCallouts[0]->iv_calloutPriority);
+ l_result = 18;
+ break;
+ }
+
+ if (l_pErrInfo->iv_procedureCallouts[1]->iv_procedure !=
+ ProcedureCallouts::LVL_SUPPORT)
+ {
+ FAPI_ERR("rcTest16. procedure[1] callout mismatch (%d)",
+ l_pErrInfo->iv_procedureCallouts[1]->iv_procedure);
+ l_result = 19;
+ break;
+ }
+
+ if (l_pErrInfo->iv_procedureCallouts[1]->iv_calloutPriority !=
+ CalloutPriorities::MEDIUM)
+ {
+ FAPI_ERR("rcTest16. procedure[1] callout priority mismatch (%d)",
+ l_pErrInfo->iv_procedureCallouts[1]->iv_calloutPriority);
+ l_result = 20;
+ break;
+ }
+
FAPI_INF("rcTest16. Success!");
}
while(0);
OpenPOWER on IntegriCloud