summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorRoland Veloz <rveloz@us.ibm.com>2019-01-29 16:57:38 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-03-07 21:59:14 -0600
commit6e84cce39773b6409d2d0ab2a8f6ea5065684a3a (patch)
tree4f531f53c4c5785f996c76936e352f29418a46a0 /src/include/usr
parent4470dc33a126dfdbd7db7b30e499c1d6dc63e16e (diff)
downloadtalos-hostboot-6e84cce39773b6409d2d0ab2a8f6ea5065684a3a.tar.gz
talos-hostboot-6e84cce39773b6409d2d0ab2a8f6ea5065684a3a.zip
Force VPD IO through HW (Axone) ,add plat function to get OCMB VPD
This commit follows up on previous work that pulled in the code that can find the correct EFD given a SPD blob of data which has the DDR SPD and the EFD for the DDIMM. This commit adds ocmb_spd.C which provides a DeviceFW::SPD read interface for OCBM targets, and hooks is up to the platform implementation of the FAPI interface platGetVPD for OCMB target. Also this commit forces all VPD IO in Axone to go through HW, which will actually read from the new EEPROM cache in pnor. RTC: 203718 Change-Id: I270500898c422d4c78daa3b917b1b2e5b049e856 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/72165 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r--src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H3
-rw-r--r--src/include/usr/fapi2/plat_vpd_access.H38
-rw-r--r--src/include/usr/vpd/spdenums.H5
-rw-r--r--src/include/usr/vpd/vpdreasoncodes.H3
4 files changed, 44 insertions, 5 deletions
diff --git a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
index 9794a6aa1..f0ae90b3a 100644
--- a/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
+++ b/src/include/usr/fapi2/hwpf_fapi2_reasoncodes.H
@@ -54,7 +54,7 @@ namespace fapi2
MOD_FAPI2_PLAT_GET_CHILDREN_FILTER_TEST = 0x0B,
MOD_FAPI2_GET_TARGETING_ATTR = 0x0C,
MOD_FAPI2_SET_TARGETING_ATTR = 0x0D,
- MOD_FAPI2_PLAT_GET_VPD = 0x0E,
+ MOD_FAPI2_PLAT_GET_VPD_MCS = 0x0E,
MOD_FAPI2_PIB_ERR_MASK = 0x0F,
MOD_FAPI2_PLAT_PARSE_WOF_TABLES = 0x10,
MOD_FAPI2_CVPD_ACCESS = 0x11,
@@ -67,6 +67,7 @@ namespace fapi2
MOD_FAPI2_SET_ATTR_FREQ_MCA_MHZ = 0x18,
MOD_FAPI2_PLAT_GET_PROC_TEST = 0x19,
MOD_FAPI2_MONITOR_FOR_FSP_MSGS = 0x1A,
+ MOD_FAPI2_PLAT_GET_VPD_OCMB = 0x1B,
};
/**
diff --git a/src/include/usr/fapi2/plat_vpd_access.H b/src/include/usr/fapi2/plat_vpd_access.H
index 0bde2f363..b3adb52a0 100644
--- a/src/include/usr/fapi2/plat_vpd_access.H
+++ b/src/include/usr/fapi2/plat_vpd_access.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -47,9 +47,39 @@ namespace fapi2
/// @note passing nullptr for o_blob will return the size of the keyword
fapi2::ReturnCode platGetVPD(
- const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target,
- VPDInfo<fapi2::TARGET_TYPE_MCS>& io_vpd_info,
- uint8_t* o_blob);
+ const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_target,
+ VPDInfo<fapi2::TARGET_TYPE_MCS>& io_vpd_info,
+ uint8_t* o_blob);
+
+/// @brief Return a blob of memory VPD data associated with the input target
+/// If looking for blob to match keyword EFD, then search criteria
+/// frequency and master rank must be supplied.
+///
+/// Platform specific getVPD implmentation for OCMB_CHIP target type
+///
+/// @param[in] i_target, a valid fapi2 OCMB_CHIP target
+/// @param[in] io_vpd_info, fapi2::VPDInfo class that specifies the criteria of
+//// the desired data to be returned and meta data about returned data
+/// @param[in] io_vpd_info.iv_vpd_type, currently only keyword EFD supported
+/// @param[in/out] io_vpd_info.iv_size, as in param - the size of the keyword
+/// as an out param - size of keyword if o_blob is a nullptr
+/// @param[in] io_vpd_info.iv_omi_freq_mhz, frequency of attached OMI bus
+/// @param[in] io_vpd_info.iv_rank_count, number of master ranks
+/// @param[in] io_vpd_info.iv_is_config_ffdc_enabled, flag to collect FFDC or not
+/// @param[out] io_vpd_info.iv_efd_type, type of DDIMM SPD
+/// @param[out] io_vpd_info.iv_dmb_mfg_id, buffer manufacturer
+/// @param[out] io_vpd_info.iv_dmb_revision, buffer revision
+/// @param[out] io_vpd_info.iv_ddr_mode, DDR4 or DDR5
+/// @param[out] o_blob, the blob of raw data from the vpd
+/// @return FAPI2_RC_SUCCESS if there's no problem
+/// @note The size of returned data may be less than or equal to the initial value of iv_size.
+/// The value of iv_size will be adjusted to match the actual size of the returned data.
+/// @note If data is returned for o_blob (EFD), it will be in little endian
+/// @note passing nullptr for o_blob will return the size of the keyword
+fapi2::ReturnCode platGetVPD(
+ const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target,
+ VPDInfo<fapi2::TARGET_TYPE_OCMB_CHIP>& io_vpd_info,
+ uint8_t* o_blob);
};
#endif // _FAPI2_PLAT_VPDACCESS_H_
diff --git a/src/include/usr/vpd/spdenums.H b/src/include/usr/vpd/spdenums.H
index fd3df0aea..a6577ed12 100644
--- a/src/include/usr/vpd/spdenums.H
+++ b/src/include/usr/vpd/spdenums.H
@@ -40,6 +40,11 @@ enum
SPD_FIRST_MOD_SPEC = 0x8000,
};
+enum
+{
+ OCMB_SPD_EFD_COMBINED_SIZE = 0x800 // 2 KB
+};
+
/**
* @brief Enumerations for fields that can be accessed in the SPD
*/
diff --git a/src/include/usr/vpd/vpdreasoncodes.H b/src/include/usr/vpd/vpdreasoncodes.H
index fe81435c3..af51e4c37 100644
--- a/src/include/usr/vpd/vpdreasoncodes.H
+++ b/src/include/usr/vpd/vpdreasoncodes.H
@@ -97,6 +97,9 @@ enum vpdModuleId
VPD_FILL_I2C_LOCK_MSG = 0x86,
// Centaur FRU VPD
+ // OCMB SPD
+ VPD_OCMB_GET_SPD = 0x90,
+
};
OpenPOWER on IntegriCloud