summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorcrgeddes <crgeddes@us.ibm.com>2016-04-29 17:06:27 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2016-05-05 15:20:57 -0400
commitc3d3e344210055c1070c4af070a7877d7ec77bd4 (patch)
tree37bb825e4ddbd2195ee172a920e7bfc9c1fc4450 /src/include
parent9ffe7c2c5d8555b5d35d968dbff3e4f07bb5fc8f (diff)
downloadtalos-hostboot-c3d3e344210055c1070c4af070a7877d7ec77bd4.tar.gz
talos-hostboot-c3d3e344210055c1070c4af070a7877d7ec77bd4.zip
Implement GET_POUNDV_BUCKET_DATA_MACRO and backing function
The fapi2 PM attribute poundv_bucket_data is backed in HB by a function that calls FAPI2 code that reads MVPD data off of pnor in order to find the proper #V bucket data. This commit sets up that macro and function as well as adds some testing to make sure it is working properly Change-Id: Ie506230c1270bdff43c3d8a8ec95ebb75010cf53 RTC:127421 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/23901 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/fapi2/attribute_service.H22
-rw-r--r--src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H6
2 files changed, 26 insertions, 2 deletions
diff --git a/src/include/usr/fapi2/attribute_service.H b/src/include/usr/fapi2/attribute_service.H
index 7e7cecfcb..008e432de 100644
--- a/src/include/usr/fapi2/attribute_service.H
+++ b/src/include/usr/fapi2/attribute_service.H
@@ -204,6 +204,20 @@ ReturnCode platGetTargetPos(const Target<TARGET_TYPE_ALL>& i_pFapiTarget,
///
ReturnCode platGetFusedCoreMode(uint8_t & o_isFused);
+///
+/// @brief This function is called by the FAPI_ATTR_GET macro when getting
+/// ATTR_POUNDV_BUCKET_DATA. It should not be called directly
+///
+///
+/// @param[in] i_fapiTarget FAPI2 Target reference
+/// @param[out] o_pos Output pound v bucket 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 platGetPoundVBucketData(const Target<TARGET_TYPE_EQ>& i_fapiTarget,
+ uint8_t * o_poundVData);
+
// -----------------------------------------------------------------------------
// End TODO: End to be supported functions
// -----------------------------------------------------------------------------
@@ -269,4 +283,12 @@ fapiToTargeting::ID, sizeof(VAL), &(VAL))
? fapi2::ReturnCode() : \
fapi2::platAttrSvc::platGetFusedCoreMode(VAL)
+//------------------------------------------------------------------------------
+// MACRO to route ATTR_POUNDV_BUCKET_DATA access to the correct HB function
+//------------------------------------------------------------------------------
+#define ATTR_POUNDV_BUCKET_DATA_GETMACRO(ID, TARGET, VAL) \
+ AttrOverrideSync::getAttrOverrideFunc(ID, TARGET, &VAL)\
+ ? fapi2::ReturnCode() : \
+ fapi2::platAttrSvc::platGetPoundVBucketData(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 5e8578cec..efd67303a 100644
--- a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
+++ b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
@@ -66,10 +66,12 @@ namespace fapi2
RC_UNKNOWN_MODEL = HWPF_COMP_ID | 0x09,
RC_NULL_FAPI_TARGET = HWPF_COMP_ID | 0x0A,
RC_LOOKING_FOR_TYPE_NA = HWPF_COMP_ID | 0x0B,
+ RC_INCORRECT_TARGET = HWPF_COMP_ID | 0x0C,
// MVPD generated errors
- RC_INVALID_RECORD = HWPF_COMP_ID | 0x0C,
- RC_INVALID_KEYWORD = HWPF_COMP_ID | 0x0D,
+ RC_INVALID_RECORD = HWPF_COMP_ID | 0x0D,
+ RC_INVALID_KEYWORD = HWPF_COMP_ID | 0x0E,
+
//Platform generated errors
RC_NO_PROCS_FOUND = FAPI2_COMP_ID | 0x0B,
OpenPOWER on IntegriCloud