summaryrefslogtreecommitdiffstats
path: root/src/import/hwpf/fapi2/include/plat
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2019-01-17 08:57:31 -0600
committerRAJA DAS <rajadas2@in.ibm.com>2019-01-24 02:49:25 -0600
commit2e253cebdaffb92d67fe19999d818e327daca1fb (patch)
tree8b3c98812d3c9612ff4b587fc4a89ab9a7766edc /src/import/hwpf/fapi2/include/plat
parent0121de3404a4cc217f8c5445d8a2e14684718886 (diff)
downloadtalos-sbe-2e253cebdaffb92d67fe19999d818e327daca1fb.tar.gz
talos-sbe-2e253cebdaffb92d67fe19999d818e327daca1fb.zip
Interface for OCMB getVPD
Add new getVPD interface to support the OCMB chip with the DDIMM SPD. Change-Id: I7bb8b7958aeeaca2fda788b013e9e5e244013c27 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70596 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/70600 Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
Diffstat (limited to 'src/import/hwpf/fapi2/include/plat')
-rw-r--r--src/import/hwpf/fapi2/include/plat/plat_vpd_access.H45
-rw-r--r--src/import/hwpf/fapi2/include/plat/vpd_access.H10
2 files changed, 50 insertions, 5 deletions
diff --git a/src/import/hwpf/fapi2/include/plat/plat_vpd_access.H b/src/import/hwpf/fapi2/include/plat/plat_vpd_access.H
index bc82a1d3..430aad87 100644
--- a/src/import/hwpf/fapi2/include/plat/plat_vpd_access.H
+++ b/src/import/hwpf/fapi2/include/plat/plat_vpd_access.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -50,10 +50,47 @@ inline fapi2::ReturnCode platGetVPD(const fapi2::Target<fapi2::TARGET_TYPE_MCS>&
else
{
o_blob[0] = 111;
+ }
+
+ return l_rc;
+}
+
+// platform specific for OCMB target -- test code only
+inline 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)
+{
+ fapi2::ReturnCode l_rc = fapi2::FAPI2_RC_SUCCESS;
+
+ if( o_blob == nullptr )
+ {
+ io_vpd_info.iv_size = 128;
+ }
+ else
+ {
+ //-- Implementation Example/Suggestion for 'EFD' --
+ // Check byte 2 for DDR4 or DDR5
+ // Check bytes 205-206 of SPD for supported speeds
+ // Look at EFD metadata in 277-415
+ // Walk through all present EFD blocks looking for
+ // a match for speed, rank, channel/position
+ // Copy entire EFD block into o_blob
+ // Update output variables with the metadata that
+ // should be used to decode the block
+
+ if( io_vpd_info.iv_omi_freq_mhz == 25600 )
+ {
+ o_blob[0] = 0x40;
+ }
+ else if( io_vpd_info.iv_omi_freq_mhz == 21330 )
+ {
+ o_blob[0] = 0x10;
+ }
- io_vpd_info.iv_freq_mhz = 10000;
- io_vpd_info.iv_rank_count_dimm_0 = 1;
- io_vpd_info.iv_rank_count_dimm_1 = 8;
+ io_vpd_info.iv_efd_type = 0x11;
+ io_vpd_info.iv_dmb_mfg_id = 0x2980;
+ io_vpd_info.iv_dmb_revision = 0x00;
+ io_vpd_info.iv_ddr_mode = 0x0C;
}
diff --git a/src/import/hwpf/fapi2/include/plat/vpd_access.H b/src/import/hwpf/fapi2/include/plat/vpd_access.H
index bf8ca7cc..18e8f9cb 100644
--- a/src/import/hwpf/fapi2/include/plat/vpd_access.H
+++ b/src/import/hwpf/fapi2/include/plat/vpd_access.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -47,6 +47,14 @@ template<> fapi2::ReturnCode getVPD(const fapi2::Target<fapi2::TARGET_TYPE_MCS>&
return platGetVPD( i_target, io_vpd_info, o_blob );
}
+// specialization for MCS target
+template<> fapi2::ReturnCode getVPD(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target,
+ VPDInfo<fapi2::TARGET_TYPE_OCMB_CHIP>& io_vpd_info,
+ uint8_t* o_blob)
+{
+ return platGetVPD( i_target, io_vpd_info, o_blob );
+}
+
};
#endif // _FAPI2_VPDACCESS_H_
OpenPOWER on IntegriCloud