summaryrefslogtreecommitdiffstats
path: root/src/include/usr/fapi2
diff options
context:
space:
mode:
authorCorey Swenson <cswenson@us.ibm.com>2017-04-13 13:51:00 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-04-29 23:39:38 -0400
commit75d116c859dfac3cf279fb99c35a8e18fb44c2db (patch)
tree584462738718aeea09f39a4087a5de8800517457 /src/include/usr/fapi2
parent65933dc2985b91be71ac35a6df2786f0e43ab779 (diff)
downloadtalos-hostboot-75d116c859dfac3cf279fb99c35a8e18fb44c2db.tar.gz
talos-hostboot-75d116c859dfac3cf279fb99c35a8e18fb44c2db.zip
Add support for selecting WOF tables
Change-Id: I23cfd9b1156d44a0a3277a0c2696d034a741d0ba RTC:158589 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38724 Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/fapi2')
-rw-r--r--src/include/usr/fapi2/attribute_service.H27
-rw-r--r--src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H8
2 files changed, 34 insertions, 1 deletions
diff --git a/src/include/usr/fapi2/attribute_service.H b/src/include/usr/fapi2/attribute_service.H
index d02e29df7..d4c21af4a 100644
--- a/src/include/usr/fapi2/attribute_service.H
+++ b/src/include/usr/fapi2/attribute_service.H
@@ -236,6 +236,25 @@ ReturnCode platGetPoundVBucketData(const Target<TARGET_TYPE_ALL>& i_fapiTarget,
ReturnCode platGetPoundWBucketData(const Target<TARGET_TYPE_ALL>& i_fapiTarget,
uint8_t * o_poundWData);
+///
+/// @brief This function is called by the FAPI_ATTR_GET macro when getting
+/// ATTR_WOF_TABLE_DATA. It should not be called directly
+///
+///
+/// @param[in] i_fapiTarget FAPI2 Target reference
+/// Currently system target and unused,
+/// Could change to proc target later.
+/// Don't need to check the type here, get macro
+/// does it for us, thus use the all type to
+/// allow streamlined dump of ATTR
+/// @param[out] o_pos Output WOF table data
+/// @return ReturnCode Always FAPI2_RC_SUCCESS, this cannot fail
+/// if a toplevel target cannot be found then
+/// an assert triggers in the platform call
+///
+ReturnCode platGetWOFTableData(const Target<TARGET_TYPE_ALL>& i_fapiTarget,
+ uint8_t * o_wofTableData);
+
// -----------------------------------------------------------------------------
// End TODO: End to be supported functions
// -----------------------------------------------------------------------------
@@ -317,4 +336,12 @@ fapiToTargeting::ID, sizeof(VAL), &(VAL))
? fapi2::ReturnCode() : \
fapi2::platAttrSvc::platGetPoundWBucketData(TARGET,VAL)
+//------------------------------------------------------------------------------
+// MACRO to route ATTR_WOF_TABLE_DATA access to the correct HB function
+//------------------------------------------------------------------------------
+#define ATTR_WOF_TABLE_DATA_GETMACRO(ID, TARGET, VAL) \
+ AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\
+ ? fapi2::ReturnCode() : \
+ fapi2::platAttrSvc::platGetWOFTableData(TARGET,VAL)
+
#endif // ATTRIBUTESERVICE_H_
diff --git a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
index e095e126b..78101fe95 100644
--- a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
+++ b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -56,6 +56,7 @@ namespace fapi2
MOD_FAPI2_SET_TARGETING_ATTR = 0x0D,
MOD_FAPI2_PLAT_GET_VPD = 0x0E,
MOD_FAPI2_PIB_ERR_MASK = 0x0F,
+ MOD_FAPI2_PLAT_PARSE_WOF_TABLES = 0x10,
};
/**
@@ -113,6 +114,11 @@ namespace fapi2
RC_INVALID_TYPE = FAPI2_COMP_ID | 0x28,
RC_RETURNED_VPD_TOO_SMALL = FAPI2_COMP_ID | 0x29,
RC_INVALID_ATTRIBUTE = FAPI2_COMP_ID | 0x2A,
+ RC_WOF_IMAGE_MAGIC_MISMATCH = FAPI2_COMP_ID | 0x2B,
+ RC_WOF_TABLES_MAGIC_MISMATCH = FAPI2_COMP_ID | 0x2C,
+ RC_WOF_TABLE_NOT_FOUND = FAPI2_COMP_ID | 0x2D,
+ RC_WOF_IMAGE_VERSION_MISMATCH = FAPI2_COMP_ID | 0x2E,
+ RC_WOF_TABLES_VERSION_MISMATCH = FAPI2_COMP_ID | 0x2F,
// HWP generated errors
RC_HWP_GENERATED_ERROR = HWPF_COMP_ID | 0x0f,
OpenPOWER on IntegriCloud