summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/vpd/spdenums.H8
-rw-r--r--src/usr/fapi2/plat_spd_access.C5
-rw-r--r--src/usr/hwas/hwasPlat.C10
-rw-r--r--src/usr/vpd/ocmb_spd.C19
-rwxr-xr-xsrc/usr/vpd/spdDDR4_DDIMM.H3
5 files changed, 23 insertions, 22 deletions
diff --git a/src/include/usr/vpd/spdenums.H b/src/include/usr/vpd/spdenums.H
index ecfe51098..f1dc7aa29 100644
--- a/src/include/usr/vpd/spdenums.H
+++ b/src/include/usr/vpd/spdenums.H
@@ -356,9 +356,15 @@ enum
LRMM_CRC = SPD_FIRST_MOD_SPEC | 0xb4,
SPD_LAST_MOD_SPEC = SPD_FIRST_MOD_SPEC | 0xb5,
+ // Latest DDR SPD specifcations have standard SPD
+ // in the front followed by extendable function
+ // descriptors (EFDs). ENTIRE_SPD will grab everything
+ // ENTIRE_SPD_WITHOUT_EFD will skip getting the EFD info
+ ENTIRE_SPD_WITHOUT_EFD = 0xFFFD,
+ //read entire SPD contents
+ ENTIRE_SPD = 0xFFFE,
// This keyword should be last in the list
// Invalid Keyword
- ENTIRE_SPD = 0xFFFE, //read entire SPD
INVALID_SPD_KEYWORD = 0xFFFF,
};
diff --git a/src/usr/fapi2/plat_spd_access.C b/src/usr/fapi2/plat_spd_access.C
index 0d354020d..6f3107f0c 100644
--- a/src/usr/fapi2/plat_spd_access.C
+++ b/src/usr/fapi2/plat_spd_access.C
@@ -108,7 +108,10 @@ fapi2::ReturnCode getSPD(
if( l_memModule == SPD::MEM_DDIMM )
{
- o_size = SPD::DDIMM_DDR4_SPD_SIZE;
+ // currently getSPD only supports the ENTIRE_SPD
+ // keyword. In the DDIMM case this include the EFD
+ // data so be sure to reflect that in the size we return.
+ o_size = SPD::OCMB_SPD_EFD_COMBINED_SIZE;
}
else
{
diff --git a/src/usr/hwas/hwasPlat.C b/src/usr/hwas/hwasPlat.C
index 46911bca1..9f60de51d 100644
--- a/src/usr/hwas/hwasPlat.C
+++ b/src/usr/hwas/hwasPlat.C
@@ -589,7 +589,7 @@ errlHndl_t ocmbIdecPhase1(const TARGETING::TargetHandle_t& i_target)
errlHndl_t l_errl = nullptr;
// Allocate buffer to hold SPD and init to 0
- size_t l_spdBufferSize = SPD::OCMB_SPD_EFD_COMBINED_SIZE;
+ size_t l_spdBufferSize = SPD::DDIMM_DDR4_SPD_SIZE;
uint8_t* l_spdBuffer = new uint8_t[l_spdBufferSize];
memset(l_spdBuffer, 0, l_spdBufferSize);
uint16_t l_chipId = 0;
@@ -597,11 +597,11 @@ errlHndl_t ocmbIdecPhase1(const TARGETING::TargetHandle_t& i_target)
do {
- // Read the full SPD.
+ // Read the SPD off the ocmb but skip reading the EFD to save time.
l_errl = deviceRead(i_target,
l_spdBuffer,
l_spdBufferSize,
- DEVICE_SPD_ADDRESS(SPD::ENTIRE_SPD));
+ DEVICE_SPD_ADDRESS(SPD::ENTIRE_SPD_WITHOUT_EFD));
// If unable to retrieve the SPD buffer then can't
// extract the IDEC data, so return error.
@@ -614,11 +614,11 @@ errlHndl_t ocmbIdecPhase1(const TARGETING::TargetHandle_t& i_target)
}
// Make sure we got back the size we were expecting.
- assert(l_spdBufferSize == SPD::OCMB_SPD_EFD_COMBINED_SIZE,
+ assert(l_spdBufferSize == SPD::DDIMM_DDR4_SPD_SIZE,
"ocmbIdecPhase1> OCMB SPD read size %d "
"doesn't match the expected size %d",
l_spdBufferSize,
- SPD::OCMB_SPD_EFD_COMBINED_SIZE);
+ SPD::DDIMM_DDR4_SPD_SIZE);
l_errl = getOcmbIdecFromSpd(i_target,
l_spdBuffer,
diff --git a/src/usr/vpd/ocmb_spd.C b/src/usr/vpd/ocmb_spd.C
index 442eb3672..2767efca7 100644
--- a/src/usr/vpd/ocmb_spd.C
+++ b/src/usr/vpd/ocmb_spd.C
@@ -152,25 +152,16 @@ errlHndl_t ocmbGetSPD(T::TargetHandle_t i_target,
}
}
- // For ENTIRE_SPD, we must read OCMB SPD and EFD combined size.
- size_t dataSize = entry->length;
- if (i_keyword == ENTIRE_SPD)
- {
- assert(((io_buflen >= OCMB_SPD_EFD_COMBINED_SIZE)
- || (io_buffer == nullptr)),
- "Buffer must be at least 2 KB in ocmbGetSPD for ENTIRE_SPD");
- dataSize = OCMB_SPD_EFD_COMBINED_SIZE;
- }
-
// Support passing in nullptr buffer to return VPD field size.
if (io_buffer == nullptr)
{
- io_buflen = dataSize;
+ io_buflen = entry->length;
break;
}
+
l_errl = spdCheckSize(io_buflen,
- dataSize,
+ entry->length,
i_keyword);
if (l_errl != nullptr)
@@ -180,7 +171,7 @@ errlHndl_t ocmbGetSPD(T::TargetHandle_t i_target,
l_errl = ocmbFetchData(i_target,
entry->offset,
- dataSize,
+ entry->length,
io_buffer,
i_location);
@@ -190,7 +181,7 @@ errlHndl_t ocmbGetSPD(T::TargetHandle_t i_target,
}
// Return the size read.
- io_buflen = dataSize;
+ io_buflen = entry->length;
} while(0);
diff --git a/src/usr/vpd/spdDDR4_DDIMM.H b/src/usr/vpd/spdDDR4_DDIMM.H
index 759c9c3df..db115d36a 100755
--- a/src/usr/vpd/spdDDR4_DDIMM.H
+++ b/src/usr/vpd/spdDDR4_DDIMM.H
@@ -127,7 +127,8 @@ const KeywordData ddr4DDIMMData[] =
{ TCKMAX_FINE_OFFSET, 0x7c, 0x01, 0x00, 0x00, false, false, ALL },
{ BASE_CONFIG_CRC, 0x7f, 0x02, 0x00, 0x00, true, false, ALL },
// Module Specific fields supported on DDR4 only
- { ENTIRE_SPD, 0x00, 0x280, 0x00, 0x00, false, false, ALL },
+ { ENTIRE_SPD_WITHOUT_EFD, 0x00, 0x280, 0x00, 0x00, false, false, ALL },
+ { ENTIRE_SPD, 0x00, 0x800, 0x00, 0x00, false, false, ALL },
//---------------------------------------------------------------------------------------
};
OpenPOWER on IntegriCloud