summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/accessors/ddimm_get_efd.C
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2019-07-30 13:21:43 -0500
committerChristian R Geddes <crgeddes@us.ibm.com>2019-08-06 17:19:31 -0500
commit0606bb79551a9e1941bd64eea86951dabf098821 (patch)
tree85a6ab8248c8ca6b74ad1f7c47625e1cdaa882c0 /src/import/chips/p9/procedures/hwp/accessors/ddimm_get_efd.C
parentaf4454c3056fc1b2287183965972d10cdf9eb3cd (diff)
downloadtalos-hostboot-0606bb79551a9e1941bd64eea86951dabf098821.tar.gz
talos-hostboot-0606bb79551a9e1941bd64eea86951dabf098821.zip
Honor DDIMM EFD metadata to choose OMI frequencies
There are two places where the list of supported frequencies are listed. First, there are a couple of bytes that list the overall support. Second, there are the EFD buckets themselves. The previous code walked all the buckets but ignored the summary bytes. In order to avoid drastically unique SPD images for Gemini, we are adding support to honor the summary bytes so we can choose specific speeds to run at. Change-Id: I82477468eca06d9c23fd8cdc70fa583d49f7d4bf Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/81385 Reviewed-by: ANDRE A MARIN <aamarin@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/81447 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/accessors/ddimm_get_efd.C')
-rwxr-xr-x[-rw-r--r--]src/import/chips/p9/procedures/hwp/accessors/ddimm_get_efd.C26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/import/chips/p9/procedures/hwp/accessors/ddimm_get_efd.C b/src/import/chips/p9/procedures/hwp/accessors/ddimm_get_efd.C
index 4f939789c..d1877bf28 100644..100755
--- a/src/import/chips/p9/procedures/hwp/accessors/ddimm_get_efd.C
+++ b/src/import/chips/p9/procedures/hwp/accessors/ddimm_get_efd.C
@@ -82,6 +82,8 @@ const uint16_t SPD_EFD_COUNT_MASK = 0x003F;
// Offset to the EFD meta data within the SPD.
// size is 128 bytes; address 288 to 415; 32 EFD meta data's sized 4 bytes each
const size_t SPD_EFD_META_DATA_ADDR = 288;
+// Offset to Host Interface Speed Supported within the SPD.
+const size_t SPD_SUPPORTED_HOST_SPEEDS_ADDR = 205;
/// SPD - EFD meta data constants
// Size of the EFD meta data's within the SPD
@@ -448,6 +450,8 @@ extern "C"
const uint8_t* l_efdMetaDataNptr(nullptr);
// Pointer to an individual EFD
const uint8_t* l_efdDataNptr(nullptr);
+ // Host Interface Supported Speeds field
+ uint16_t l_supportedSpeeds(0);
// Fill in a data buffer for FFDC purposes that contains
// the first 8 bytes from the SPD (freq,rank,channel,dimms)
@@ -683,7 +687,7 @@ extern "C"
// No need to swap endian, already in host format
l_freqMask = ddrFrequencyToBitMask(io_vpdInfo.iv_omi_freq_mhz);
- FAPI_DBG ( "ddr4_get_efd: Caller supplied frquency = %d",
+ FAPI_DBG ( "ddr4_get_efd: Caller supplied frequency = %d",
io_vpdInfo.iv_omi_freq_mhz );
// Confirm that mapping the frequency succeeded
@@ -719,7 +723,7 @@ extern "C"
FAPI_TRY(fapi2::FAPI2_RC_FALSE);
}
- FAPI_DBG ("ddr4_get_efd: Caller supplied frquency = %d, "
+ FAPI_DBG ("ddr4_get_efd: Caller supplied frequency = %d, "
"converted to frequency bit value mask = 0x%.4X",
io_vpdInfo.iv_omi_freq_mhz, l_freqMask);
@@ -767,6 +771,24 @@ extern "C"
//// Fourthly, find the EFD that matches the given frequency
//// and master rank
+ // Check the master list of supported frequencies before walking
+ // through the EFDs
+ l_supportedSpeeds = *reinterpret_cast<const uint16_t*>
+ (i_spdBuffer + SPD_SUPPORTED_HOST_SPEEDS_ADDR);
+ l_supportedSpeeds = le16toh(l_supportedSpeeds);
+ FAPI_ASSERT( l_freqMask & l_supportedSpeeds,
+ fapi2::DDIMM_UNSUPPORTED_FREQUENCY().
+ set_UNSUPPORTED_FREQ(static_cast<uint32_t>
+ (io_vpdInfo.iv_omi_freq_mhz)).
+ set_SUPPORTED_FREQS(l_supportedSpeeds).
+ set_OCMB_CHIP_TARGET(i_ocmbFapi2Target).
+ set_VPD_TYPE(io_vpdInfo.iv_vpd_type).
+ set_DDR_TYPE(static_cast<uint32_t>
+ (i_spdBuffer[SPD_MEM_TYPE_ADDR])),
+ "Invalid frequency for this DIMM - request=%d, supported mask=%.4X",
+ io_vpdInfo.iv_omi_freq_mhz, l_supportedSpeeds );
+
+
// Point to the beginning of the EFD meta data, AKA EFD[0] meta data.
l_efdMetaDataPtr = i_spdBuffer + SPD_EFD_META_DATA_ADDR;
OpenPOWER on IntegriCloud