summaryrefslogtreecommitdiffstats
path: root/src/usr/fapi2
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2018-03-20 16:01:35 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-03-21 16:24:52 -0400
commit3f639460a8f1b85cdc22539675b8e2e6bae4981e (patch)
tree5628b8b382b827f562b3383b701ee8f18548b2e6 /src/usr/fapi2
parent7ce93122ca1e7a9eeebd88225b7e0c65c0e2a4df (diff)
downloadtalos-hostboot-3f639460a8f1b85cdc22539675b8e2e6bae4981e.tar.gz
talos-hostboot-3f639460a8f1b85cdc22539675b8e2e6bae4981e.zip
ATTR_CEN_VPD_DRAM_ADDRESS_MIRRORING: add function backed to this attribute
Change-Id: I95814e68937e82e9ba7ab1ce7a9dc2baca804532 CQ: SW415651 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56109 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Elizabeth K. Liner <eliner@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/fapi2')
-rw-r--r--src/usr/fapi2/attribute_service.C32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/usr/fapi2/attribute_service.C b/src/usr/fapi2/attribute_service.C
index dfcaff74a..fa3de0bf7 100644
--- a/src/usr/fapi2/attribute_service.C
+++ b/src/usr/fapi2/attribute_service.C
@@ -71,6 +71,7 @@
#include<vpd_accessors/getDQAttrISDIMM.H>
#include<vpd_accessors/getDQSAttrISDIMM.H>
#include<vpd_accessors/getISDIMMTOC4DAttrs.H>
+#include<vpd_accessors/getMBvpdAddrMirrorData.H>
#include<vpd_accessors/getMBvpdDram2NModeEnabled.H>
#include<vpd_accessors/getMBvpdMemoryDataVersion.H>
#include<vpd_accessors/getMBvpdSPDXRecordVersion.H>
@@ -1692,6 +1693,37 @@ ReturnCode platGetDQSAttrISDIMM(
}
//-----------------------------------------------------------------------------
+ReturnCode platGetMBvpdDramAddressMirroring(
+ const Target<TARGET_TYPE_ALL>& i_fapiTarget,
+ ATTR_CEN_VPD_DRAM_ADDRESS_MIRRORING_Type& o_dramAddressMirroring
+ )
+{
+ ReturnCode rc;
+
+ // Don't need to check the type here, the FAPI_ATTR_GET macro clause
+ // "fapi2::Target<ID##_TargetType>(TARGET)" does it for us. However,
+ // to enable a streamlined dump of the attributes, all plat code must use
+ // the generic TARGET_TYPE_ALL -- so convert back to the correct type
+ // manually
+ TARGETING::Target * l_pTarget = NULL;
+ errlHndl_t l_errl = getTargetingTarget(i_fapiTarget, l_pTarget);
+
+ if (l_errl)
+ {
+ FAPI_ERR("platGetMBvpdDramAddressMirroring: "
+ "Error from getTargetingTarget");
+ rc.setPlatDataPtr(reinterpret_cast<void *> (l_errl));
+ }
+ else
+ {
+ fapi2::Target<fapi2::TARGET_TYPE_MBA> l_fapiTarget(l_pTarget);
+ rc = getMBvpdAddrMirrorData(l_fapiTarget, o_dramAddressMirroring);
+ }
+
+ return rc;
+}
+
+//-----------------------------------------------------------------------------
ReturnCode platGetMBvpdDram2NModeEnabled(
const Target<TARGET_TYPE_ALL>& i_fapiTarget,
ATTR_CEN_VPD_DRAM_2N_MODE_ENABLED_Type& o_dram2NModeEnabled
OpenPOWER on IntegriCloud