summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2012-03-22 08:40:50 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-03-23 15:33:50 -0500
commit2b799ae5c3683fa7753bfe9527c517000c91a1d4 (patch)
tree631fdb01a4d01e9d5c7229f1f1819244cdf8dabb /src/include
parentb519667966e373477febd4b3f1c84ffa1aa5e6a7 (diff)
downloadtalos-hostboot-2b799ae5c3683fa7753bfe9527c517000c91a1d4.tar.gz
talos-hostboot-2b799ae5c3683fa7753bfe9527c517000c91a1d4.zip
HWPF: Infrastructure to allow HWPs to look for specific PLAT errors
Currently when PLAT firmware (e.g. FSP, Hostboot, Cronus) attaches an error log to a fapi::ReturnCode, the ReturnCode value is FAPI_RC_PLAT_ERR_SEE_DATA, all a HWP receiving the ReturnCode knows is that there is a PLAT error and it cannot look at the data (it is PLAT specific). There will be future scenarios where HWPs need to look for specific errors code from PLAT. The example given by Joe McGill is ADU_LOCKED, a HWP may want to retry a SCOM operation if the error is ADU_LOCKED. The way to do this will be to define a PLAT return code value in fapiReturnCodes.H called FAPI_RC_PLAT_ADU_ERR. PLAT code would set this special value and attach its error log. Then HWP code can look for this special value. This change is simply to allow PLAT code to specify the return code value when attaching an error log to the ReturnCode. Change-Id: I6bc3f0b4d3350cc3eed52fa947a5bf4a885095a5 RTC: 37970 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/785 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/hwpf/fapi/fapiReturnCode.H20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiReturnCode.H b/src/include/usr/hwpf/fapi/fapiReturnCode.H
index 34271c1a9..3aa96575b 100644
--- a/src/include/usr/hwpf/fapi/fapiReturnCode.H
+++ b/src/include/usr/hwpf/fapi/fapiReturnCode.H
@@ -41,6 +41,7 @@
* mjjones 01/12/2012 Enforce correct usage
* mjjones 02/22/2012 Allow user to add Target FFDC
* mjjones 03/16/2012 Add type to FFDC data
+ * mjjones 03/16/2012 Allow different PLAT errors
*/
#ifndef FAPIRETURNCODE_H_
@@ -197,18 +198,25 @@ public:
void setEcmdError(const uint32_t i_rcValue);
/**
- * @brief Sets a PLAT error. Sets the rcValue to FAPI_RC_PLAT_ERR_SEE_DATA,
- * deletes any associated data and associates the supplied heap based
+ * @brief Sets a PLAT error. Sets the rcValue to the supplied value, deletes
+ * any associated data and associates the supplied heap based
* PlatData with the ReturnCode. The ReturnCode object takes
* responsibility for deleting the data (platform code implements the
* delete function and must know the type and how to delete it).
*
- * This is called by PLAT. The expected use-case is to associate a platform
- * error log with the ReturnCode.
+ * This is called by PLAT code to generate an error. The expected use-case
+ * is to associate a platform error log with the ReturnCode. If the error is
+ * one that a HWP can look for (e.g. the HWP may want to retry in a specific
+ * error) then one of the specific FAPI_RC_PLAT errors in fapiReturnCodes.H
+ * can be used else it defaults to FAPI_RC_PLAT_ERR_SEE_DATA which means
+ * that there is a platform error that the HWP cannot decode.
*
- * @param[in] i_pData Pointer to PlatData (on the heap)
+ * @param[in] i_pData Pointer to PlatData (on the heap). Can be NULL if
+ * the platform does not attach data
+ * @param[in] i_rcValue Error value to set
*/
- void setPlatError(void * i_pData);
+ void setPlatError(void * i_pData,
+ const ReturnCodes i_rcValue = FAPI_RC_PLAT_ERR_SEE_DATA);
/**
* @brief Sets a HWP error. Sets the rcValue to the supplied value (from
OpenPOWER on IntegriCloud