From d80f7fc83df78b24c9d04fd4a17bfa7ba34b33a4 Mon Sep 17 00:00:00 2001 From: Mark Pizzutillo Date: Mon, 23 Sep 2019 13:00:13 -0400 Subject: 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 Tested-by: Jenkins Server Dev-Ready: Mark Pizzutillo Tested-by: Hostboot CI Reviewed-by: Louis Stermole Reviewed-by: STEPHEN GLANCY Reviewed-by: Jennifer A Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/84147 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R Geddes --- src/import/chips/p9/procedures/hwp/accessors/ddimm_get_efd.C | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/import/chips/p9/procedures/hwp') 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(&i_spdBuffer[SPD_DMB_REVISION_ADDR]); - // Swap endianess to host format. - l_dmb_revision = le16toh(l_dmb_revision); + l_dmb_revision = *reinterpret_cast(&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), -- cgit v1.2.1