summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorVan Lee <vanlee@us.ibm.com>2012-01-13 09:57:41 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-02-09 09:57:37 -0600
commit8802f986037017ba5a2e3efa2cb7c054b8bcea7a (patch)
tree7cbeaa363dac607b7c9cc7b3d865e5b90f385066 /src/include/usr
parent5b9f174f56e2dbb77178b767f7cb92668ec78e43 (diff)
downloadtalos-hostboot-8802f986037017ba5a2e3efa2cb7c054b8bcea7a.tar.gz
talos-hostboot-8802f986037017ba5a2e3efa2cb7c054b8bcea7a.zip
HWPF Attribute Support: DIMM SPD Attributes - RTC4590
Change-Id: I4557a6a67ea73f13e2bcca6e05af57cba8d5a9e1 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/613 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/hwpf/fapi/fapiHwAccess.H1
-rw-r--r--src/include/usr/hwpf/fapi/fapiPlatHwAccess.H1
-rwxr-xr-xsrc/include/usr/hwpf/plat/fapiPlatAttributeService.H104
3 files changed, 104 insertions, 2 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiHwAccess.H b/src/include/usr/hwpf/fapi/fapiHwAccess.H
index 73405a55a..bb8dcfbbb 100644
--- a/src/include/usr/hwpf/fapi/fapiHwAccess.H
+++ b/src/include/usr/hwpf/fapi/fapiHwAccess.H
@@ -145,7 +145,6 @@ fapi::ReturnCode fapiModifyCfamRegister(const fapi::Target& i_target,
ecmdDataBufferBase & i_data,
const fapi::ChipOpModifyMode i_modifyMode);
-
} // extern "C"
#endif // FAPIHWACCESS_H_
diff --git a/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H b/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H
index eb6451d66..95ebe08e8 100644
--- a/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H
+++ b/src/include/usr/hwpf/fapi/fapiPlatHwAccess.H
@@ -159,7 +159,6 @@ fapi::ReturnCode platModifyCfamRegister(const fapi::Target& i_target,
ecmdDataBufferBase & i_data,
const fapi::ChipOpModifyMode i_modifyMode);
-
} // extern "C"
#endif // FAPIPLATHWACCESS_H_
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
index ebbec599d..90331cd01 100755
--- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
+++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
@@ -121,6 +121,110 @@ namespace platAttrSvc
FAPI_PLAT_ATTR_SVC_MACRO_DIRECT_FAPI_##ID>(VAL)) \
? fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::createAttrAccessError( \
FAPI_PLAT_ATTR_SVC_MACRO_DIRECT_FAPI_##ID,fapi::ID,PTARGET)
+
+/**
+ * @brief This function is called by the FAPI_ATTR_GET macro when accessing
+ * SPD ATTR. IT should not be called directly
+ *
+ * @param[in] i_target Target pointer to operate on
+ * @param[in] i_keyword SPD keyword
+ * @param[out] o_data Address of Storage for saving the attribute value
+ * @param[in] i_len Size of storage
+ * @return ReturnCode. Zero on success, else platform specified error
+ */
+ReturnCode fapiPlatGetSpdAttr(const Target * i_target,
+ const uint16_t i_keyword,
+ void * o_data, size_t i_len );
+
+#define ATTR_SPD_DRAM_DEVICE_TYPE_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::BASIC_MEMORY_TYPE, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MODULE_TYPE_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_TYPE, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_SDRAM_BANKS_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::BANK_ADDRESS_BITS, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_SDRAM_DENSITY_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::DENSITY, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_SDRAM_ROWS_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::ROW_ADDRESS, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_SDRAM_COLUMNS_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::COL_ADDRESS, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MODULE_NOMINAL_VOLTAGE_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_NOMINAL_VOLTAGE, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_NUM_RANKS_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_RANKS, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_DRAM_WIDTH_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_DRAM_WIDTH, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MODULE_MEMORY_BUS_WIDTH_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_MEMORY_BUS_WIDTH, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_FTB_DIVIDEND_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::FTB_DIVIDEND, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_FTB_DIVISOR_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::FTB_DIVISOR, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MTB_DIVIDEND_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MTB_DIVIDEND, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MTB_DIVISOR_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MTB_DIVISOR, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TCKMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TCK_MIN, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_CAS_LATENCIES_SUPPORTED_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::CAS_LATENCIES_SUPPORTED, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TAAMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MIN_CAS_LATENCY, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TWRMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TWR_MIN, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TRCDMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRCD_MIN, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TRRDMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRRD_MIN, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TRPMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRP_MIN, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TRASMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRAS_MIN, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TRCMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRC_MIN, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TRFCMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRFC_MIN, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TWTRMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TWTR_MIN, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TRTPMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRTP_MIN, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_TFAWMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TFAW_MIN, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_SDRAM_OPTIONAL_FEATURES_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::SPD_SDRAM_OPTIONAL_FEATURES, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_SDRAM_THERMAL_AND_REFRESH_OPTIONS_GETMACRO(ID, PTARGET, VAL ) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::SPD_SDRAM_THERMAL_REFRESH_OPTIONS, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MODULE_THERMAL_SENSOR_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::SPD_MODULE_THERMAL_SENSOR, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_FINE_OFFSET_TCKMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TCKMIN_FINE_OFFSET, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_FINE_OFFSET_TAAMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TAAMIN_FINE_OFFSET, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_FINE_OFFSET_TRCDMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRCDMIN_FINE_OFFSET, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_FINE_OFFSET_TRPMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRPMIN_FINE_OFFSET, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_FINE_OFFSET_TRCMIN_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::TRCMIN_FINE_OFFSET, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MODULE_SPECIFIC_SECTION_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_TYPE_SPECIFIC_SECTION, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MODULE_ID_MODULE_MANUFACTURERS_JEDEC_ID_CODE_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_MANUFACTURER_ID, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MODULE_ID_MODULE_MANUFACTURING_LOCATION_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_MANUFACTURING_LOCATION, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MODULE_ID_MODULE_MANUFACTURING_DATE_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_MANUFACTURING_DATE, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MODULE_ID_MODULE_SERIAL_NUMBER_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_SERIAL_NUMBER, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_CYCLICAL_REDUNDANCY_CODE_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_CRC, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MODULE_PART_NUMBER_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_PART_NUMBER, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_MODULE_REVISION_CODE_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::MODULE_REVISION_CODE, &(VAL), sizeof(VAL) )
+#define ATTR_SPD_DRAM_MANUFACTURER_JEDEC_ID_CODE_GETMACRO(ID, PTARGET, VAL) \
+ platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::DRAM_MANUFACTURER_ID, &(VAL), sizeof(VAL) )
+
}
}
OpenPOWER on IntegriCloud