diff options
author | Mark Pizzutillo <Mark.Pizzutillo@ibm.com> | 2019-09-23 13:00:13 -0400 |
---|---|---|
committer | Christian R Geddes <crgeddes@us.ibm.com> | 2019-09-27 13:47:26 -0500 |
commit | d80f7fc83df78b24c9d04fd4a17bfa7ba34b33a4 (patch) | |
tree | 160f15b436470224d9a669528eda6635872eec8f /src/import/chips/p9/procedures/hwp/accessors/ddimm_get_efd.C | |
parent | 7148b00bf103186339013b70d936edf8a048749d (diff) | |
download | talos-hostboot-d80f7fc83df78b24c9d04fd4a17bfa7ba34b33a4.tar.gz talos-hostboot-d80f7fc83df78b24c9d04fd4a17bfa7ba34b33a4.zip |
Fix dmb_revision size in ddimm_get_efd
Change-Id: I159682143e4c8f65d9a154fc3ebc6e0cedbf34b4
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84131
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Dev-Ready: Mark Pizzutillo <mark.pizzutillo@ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Louis Stermole <stermole@us.ibm.com>
Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84147
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 | src/import/chips/p9/procedures/hwp/accessors/ddimm_get_efd.C | 8 |
1 files changed, 3 insertions, 5 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 00ed2b7d3..ca161ed46 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 @@ -222,7 +222,7 @@ bool check_valid_mfg_id(const uint16_t i_mfg_id) /// @param[in] i_dmb_revision DMB revision /// @return expected DMB revision for ID /// -uint16_t check_valid_dmb_revision(const uint16_t i_mfg_id, const uint16_t i_dmb_revision) +bool check_valid_dmb_revision(const uint16_t i_mfg_id, const uint8_t i_dmb_revision) { if (i_mfg_id == SPD_DDR4_DMB_MFG_ID_IBM) { @@ -459,7 +459,7 @@ extern "C" uint16_t l_efdCount{0}; // The number of EFDs size_t l_efdSize{0}; // The size of an EFD, not EFD meta data uint16_t l_dmbMfgId{0}; // The DMB manufacture ID - uint16_t l_dmb_revision{0}; + uint8_t l_dmb_revision{0}; uint16_t l_freqMask{0}; // The frequency mask as found in EFD uint8_t l_rankMask{0}; // The rank mask as found in EFD size_t ii{0}; // A loop index @@ -670,9 +670,7 @@ extern "C" FAPI_DBG ( "ddr4_get_efd: SPD DMB manufacturer ID = 0x%.4X", io_vpdInfo.iv_dmb_mfg_id); - l_dmb_revision = *reinterpret_cast<const uint16_t*>(&i_spdBuffer[SPD_DMB_REVISION_ADDR]); - // Swap endianess to host format. - l_dmb_revision = le16toh(l_dmb_revision); + l_dmb_revision = *reinterpret_cast<const uint8_t*>(&i_spdBuffer[SPD_DMB_REVISION_ADDR]); // Confirm that the DMB revision is what is expected FAPI_ASSERT( check_valid_dmb_revision(l_dmbMfgId, l_dmb_revision), |