summaryrefslogtreecommitdiffstats
path: root/src/usr/fapi2/attribute_service.C
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/usr/fapi2/attribute_service.C
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/usr/fapi2/attribute_service.C')
-rw-r--r--src/usr/fapi2/attribute_service.C38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/usr/fapi2/attribute_service.C b/src/usr/fapi2/attribute_service.C
index a59a881c9..c45caafe2 100644
--- a/src/usr/fapi2/attribute_service.C
+++ b/src/usr/fapi2/attribute_service.C
@@ -52,7 +52,7 @@
#include <devicefw/driverif.H>
#include <plat_attr_override_sync.H>
#include <vpd/spdenums.H>
-
+#include <p9_pm_get_poundv_bucket.H>
#include <errl/errlmanager.H>
#include <targeting/common/targetservice.H>
@@ -391,6 +391,42 @@ ReturnCode platGetFusedCoreMode(uint8_t & o_isFused)
return fapi2::ReturnCode();
}
+//******************************************************************************
+// fapi2::platAttrSvc::platGetPoundVBucketData function
+//******************************************************************************
+ReturnCode platGetPoundVBucketData(const Target<TARGET_TYPE_EQ>& i_fapiTarget,
+ uint8_t * o_poundVData)
+{
+ fapi2::ReturnCode rc;
+ if(i_fapiTarget.getType() != TARGET_TYPE_EQ)
+ {
+ /*@
+ * @errortype ERRORLOG::ERRL_SEV_UNRECOVERABLE
+ * @moduleid fapi2::MOD_FAPI2_MVPD_ACCESS
+ * @reasoncode RC_INCORRECT_TARGET
+ * @userdata1 Actual Target Type
+ * @userdata2 Expected Target Type
+ * @devdesc Attempted to read attribute from wrong target type
+ * @custdesc Firmware Error
+ */
+ errlHndl_t l_errl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ MOD_FAPI2_MVPD_ACCESS,
+ RC_INCORRECT_TARGET,
+ i_fapiTarget.getType(),
+ TARGET_TYPE_EQ,
+ true);
+ rc.setPlatDataPtr(reinterpret_cast<void *> (l_errl));
+ }
+ else
+ {
+ rc = p9_pm_get_poundv_bucket_attr(i_fapiTarget,o_poundVData);
+ }
+ return rc;
+}
+
+
+
+
} // End platAttrSvc namespace
} // End fapi2 namespace
OpenPOWER on IntegriCloud