summaryrefslogtreecommitdiffstats
path: root/src/include/usr/fapi2
diff options
context:
space:
mode:
authorDzuy Nguyen <dzuy@us.ibm.com>2017-11-01 08:54:12 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-12-01 15:22:31 -0500
commitc71ed1c414501ce568f914e38b2ddbbc9c258cb6 (patch)
treecb222fe6f89fc1905454576f0a75745cdc70282b /src/include/usr/fapi2
parent6bc72e2973d1868fcccf74f696bcb9bf08a62951 (diff)
downloadtalos-hostboot-c71ed1c414501ce568f914e38b2ddbbc9c258cb6.tar.gz
talos-hostboot-c71ed1c414501ce568f914e38b2ddbbc9c258cb6.zip
Add support for OBUS PLL buckets
Add MRW support for ATTR_FREQ_O_MHZ attribute Add MACRO functions for ATTR_OB[0-3]_PLL_BUCKET attribute Change-Id: I75d02192bc09c9814fccadadb6aed69606508a58 RTC: 176188 CMVC-Prereq: 1039767 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48890 Reviewed-by: Christian R. Geddes <crgeddes@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> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@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.H32
-rw-r--r--src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H6
2 files changed, 37 insertions, 1 deletions
diff --git a/src/include/usr/fapi2/attribute_service.H b/src/include/usr/fapi2/attribute_service.H
index 47538d00c..dfdd23803 100644
--- a/src/include/usr/fapi2/attribute_service.H
+++ b/src/include/usr/fapi2/attribute_service.H
@@ -429,6 +429,14 @@ ReturnCode platGetMBvpdAttr(
sizeof(T));
}
+/// @brief Function to be called by GETMACRO_OB[0,1,2,3]_PLL_BUCKET
+/// functions
+/// @param[in] i_fapiTarget FAPI2 Target pointer
+/// @param[out] o_bucket_val corresponding number in PLL frequency list
+/// @param[in] i_index The index number of the OBUS (0,1,2,3)
+ReturnCode getPllBucket(const Target<TARGET_TYPE_ALL>& i_fapiTarget,
+ uint8_t &o_bucket_val,
+ const uint8_t i_index);
// -----------------------------------------------------------------------------
// End TODO: End to be supported functions
@@ -462,6 +470,29 @@ platAttrSvc::setTargetingAttr(PTARGET, (const TARGETING::ATTRIBUTE_ID)\
fapiToTargeting::ID, sizeof(VAL), &(VAL))
//------------------------------------------------------------------------------
+// MACRO to route ATTR_OB[0..3]_PLL_BUCKET access to the correct HB function
+//------------------------------------------------------------------------------
+#define ATTR_OB0_PLL_BUCKET_GETMACRO(ID,PTARGET,VAL) \
+ AttrOverrideSync::getAttrOverrideFunc(ID, PTARGET, &VAL)\
+ ? fapi2::ReturnCode() : \
+ fapi2::platAttrSvc::getPllBucket(PTARGET, VAL, 0)
+
+#define ATTR_OB1_PLL_BUCKET_GETMACRO(ID,PTARGET,VAL) \
+ AttrOverrideSync::getAttrOverrideFunc(ID, PTARGET, &VAL)\
+ ? fapi2::ReturnCode() : \
+ fapi2::platAttrSvc::getPllBucket(PTARGET, VAL, 1)
+
+#define ATTR_OB2_PLL_BUCKET_GETMACRO(ID,PTARGET,VAL) \
+ AttrOverrideSync::getAttrOverrideFunc(ID, PTARGET, &VAL)\
+ ? fapi2::ReturnCode() : \
+ fapi2::platAttrSvc::getPllBucket(PTARGET, VAL, 2)
+
+#define ATTR_OB3_PLL_BUCKET_GETMACRO(ID,PTARGET,VAL) \
+ AttrOverrideSync::getAttrOverrideFunc(ID, PTARGET, &VAL)\
+ ? fapi2::ReturnCode() : \
+ fapi2::platAttrSvc::getPllBucket(PTARGET, VAL, 3)
+
+//------------------------------------------------------------------------------
// MACRO to route ATTR_NAME access to the correct Hostboot function
//------------------------------------------------------------------------------
#define ATTR_NAME_GETMACRO(ID, PTARGET, VAL) \
@@ -1424,4 +1455,5 @@ fapiToTargeting::ID, sizeof(VAL), &(VAL))
fapi2::platAttrSvc::\
platGetMBvpdAttr<fapi2::ATTR_CEN_VPD_MT_DATA_CONTROL_BYTE_Type>(ID, 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 0018d3c57..b9b963d28 100644
--- a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
+++ b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
@@ -61,7 +61,8 @@ namespace fapi2
MOD_FAPI2_BAD_DQ_BITMAP = 0x12,
MOD_FAPI2_GET_CHIP_CFAM_TARGET = 0x13,
MOD_FAPI2_GET_ATTR_CEN_VPD_VERSION = 0x14,
- MOD_FAPI2_GET_MB_VPD_ATTR = 0x15
+ MOD_FAPI2_GET_MB_VPD_ATTR = 0x15,
+ MOD_FAPI2_GET_PLL_BUCKET = 0x16,
};
/**
@@ -140,6 +141,9 @@ namespace fapi2
// DIMM SPD generated errors
RC_BAD_DQ_MFG_MODE_BITS = HWPF_COMP_ID | 0x30,
+ // PLL_BUCKET generated errors
+ RC_NO_MATCHING_FREQ = HWPF_COMP_ID | 0x31,
+ RC_FREQ_LIST_NOT_FOUND = HWPF_COMP_ID | 0x32,
};
OpenPOWER on IntegriCloud