summaryrefslogtreecommitdiffstats
path: root/src/import/chips/centaur/procedures
diff options
context:
space:
mode:
authorLuis Fernandez <Luis.Fernandez@ibm.com>2019-03-15 10:34:55 -0500
committerChristian R. Geddes <crgeddes@us.ibm.com>2019-03-26 10:16:52 -0500
commitab6efc5935dceb9d7e5a7df64f1700fa909370c4 (patch)
tree579f4aa324801c47a36383cd41cac5a4098d1765 /src/import/chips/centaur/procedures
parentc2a9006d0552862dd315ec8d3919a0620c9b5ed7 (diff)
downloadtalos-hostboot-ab6efc5935dceb9d7e5a7df64f1700fa909370c4.tar.gz
talos-hostboot-ab6efc5935dceb9d7e5a7df64f1700fa909370c4.zip
HB Improvements: Fix compiler warnings on modern compilers
Resolve warnings when compiling with gcc 4.8. Compiling HB with GCC 7.3. Change-Id: Id180af6b174d34009c451a23fc3ec1803fa0130a RTC: 202716 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/73418 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@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: ANDRE A. MARIN <aamarin@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Prem Shanker Jha <premjha2@in.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/73429 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/centaur/procedures')
-rw-r--r--src/import/chips/centaur/procedures/hwp/memory/p9c_mss_access_delay_reg.C5
-rw-r--r--src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt.C8
-rw-r--r--src/import/chips/centaur/procedures/vpd_accessors/getMBvpdMemoryDataVersion.C33
-rw-r--r--src/import/chips/centaur/procedures/xml/error_info/p9c_memory_mss_volt_errors.xml6
4 files changed, 32 insertions, 20 deletions
diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_access_delay_reg.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_access_delay_reg.C
index 7b636b68b..a1aa68276 100644
--- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_access_delay_reg.C
+++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_access_delay_reg.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -3653,7 +3653,8 @@ extern "C" {
fapi2::CEN_MSS_ACCESS_DELAY_REG_SCHMOO_BAD_MBA_POS(),
"Bad position from ATTR_CHIP_UNIT_POS (%d)", l_mbapos);
- FAPI_ASSERT(l_dram_width == fapi2::ENUM_ATTR_CEN_EFF_DRAM_WIDTH_X4 || fapi2::ENUM_ATTR_CEN_EFF_DRAM_WIDTH_X8,
+ FAPI_ASSERT(l_dram_width == fapi2::ENUM_ATTR_CEN_EFF_DRAM_WIDTH_X4 ||
+ l_dram_width == fapi2::ENUM_ATTR_CEN_EFF_DRAM_WIDTH_X8,
fapi2::CEN_MSS_ACCESS_DELAY_REG_SCHMOO_BAD_DRAM_WIDTH().
set_DRAM_WIDTH(l_dram_width),
"Bad dram width from ATTR_EFF_DRAM_WIDTH (%d)", l_dram_width);
diff --git a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt.C b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt.C
index ba4182c72..474d4e6f5 100644
--- a/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt.C
+++ b/src/import/chips/centaur/procedures/hwp/memory/p9c_mss_volt.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -144,6 +144,8 @@ fapi2::ReturnCode p9c_mss_volt(const std::vector<fapi2::Target<fapi2::TARGET_TYP
// note: only support DDR3=1.35V and DDR4=1.2xV
// Mixed Dimms, Deconfig the DDR4.
+ // note: Running DDR4 at DDR3 voltage will damage the DDR4, so deconfig the
+ // DDR3 DIMMs.
if (l_dram_ddr3_found_flag && l_dram_ddr4_found_flag)
{
// Iterate through the list of centaurs
@@ -162,9 +164,9 @@ fapi2::ReturnCode p9c_mss_volt(const std::vector<fapi2::Target<fapi2::TARGET_TYP
{
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CEN_SPD_DRAM_DEVICE_TYPE, l_dimm, l_spd_dramtype));
- FAPI_ASSERT(l_spd_dramtype = ! fapi2::ENUM_ATTR_CEN_SPD_DRAM_DEVICE_TYPE_DDR4,
+ FAPI_ASSERT(l_spd_dramtype == fapi2::ENUM_ATTR_CEN_SPD_DRAM_DEVICE_TYPE_DDR4,
fapi2::CEN_MSS_VOLT_DDR_TYPE_MIXING_UNSUPPORTED().
- set_DIMM_DDR4_TARGET(l_dimm).
+ set_DIMM_DDR3_TARGET(l_dimm).
set_DEVICE_TYPE(l_spd_dramtype),
"mss_volt: DDR3 and DDR4 mixing not allowed");
}//end of dimms loop
diff --git a/src/import/chips/centaur/procedures/vpd_accessors/getMBvpdMemoryDataVersion.C b/src/import/chips/centaur/procedures/vpd_accessors/getMBvpdMemoryDataVersion.C
index b12ddc18f..049f8d71c 100644
--- a/src/import/chips/centaur/procedures/vpd_accessors/getMBvpdMemoryDataVersion.C
+++ b/src/import/chips/centaur/procedures/vpd_accessors/getMBvpdMemoryDataVersion.C
@@ -59,11 +59,17 @@ extern "C"
const fapi2::Target<fapi2::TARGET_TYPE_MEMBUF_CHIP>& i_mbTarget,
uint32_t& o_val)
{
+ union l_KeywordUnion
+ {
+ uint32_t vpdMemoryDataVersion;
+ MBvpdVMKeyword mBvpdVMKeyword;
+ };
+
fapi2::ReturnCode l_fapi2rc;
DimmType l_dimmType = DimmType::ISDIMM;
fapi2::MBvpdRecord l_record = fapi2::MBVPD_RECORD_SPDX;
- uint32_t l_vpdMemoryDataVersion = VM_KEYWORD_DEFAULT_VALUE;
- size_t l_bufSize = sizeof(l_vpdMemoryDataVersion);
+ l_KeywordUnion l_vpdMDataUnion = {VM_KEYWORD_DEFAULT_VALUE};
+ size_t l_bufSize = sizeof(l_vpdMDataUnion.vpdMemoryDataVersion);
FAPI_DBG("getMBvpdMemoryDataVersion: entry ");
@@ -116,7 +122,7 @@ extern "C"
l_fapi2rc = getMBvpdField(l_record,
fapi2::MBVPD_KEYWORD_VM,
i_mbTarget,
- reinterpret_cast<uint8_t*>(&l_vpdMemoryDataVersion),
+ reinterpret_cast<uint8_t*>(&l_vpdMDataUnion.vpdMemoryDataVersion),
l_bufSize);
if (l_fapi2rc)
@@ -127,30 +133,33 @@ extern "C"
}
// Check that sufficient size was returned.
- FAPI_ASSERT(l_bufSize >= sizeof(l_vpdMemoryDataVersion),
+ FAPI_ASSERT(l_bufSize >= sizeof(l_vpdMDataUnion.vpdMemoryDataVersion),
fapi2::CEN_MBVPD_INSUFFICIENT_VPD_RETURNED().
set_KEYWORD(fapi2::MBVPD_KEYWORD_VM).
set_RETURNED_SIZE(l_bufSize).
set_CHIP_TARGET(i_mbTarget),
"getMBvpdMemoryDataVersion:"
" less keyword data returned than expected %d < %d",
- l_bufSize, sizeof(l_vpdMemoryDataVersion));
-
- // Check if the format byte in the value returned is in between valid range
- FAPI_ASSERT(( ((MBvpdVMKeyword*)(&l_vpdMemoryDataVersion))->iv_version <= VM_SUPPORTED_HIGH_VER ) &&
- ( ((MBvpdVMKeyword*)(&l_vpdMemoryDataVersion))->iv_version != VM_NOT_SUPPORTED ),
+ l_bufSize, sizeof(l_vpdMDataUnion.vpdMemoryDataVersion));
+
+ // Check if the format byte in the value returned is in between valid
+ // range
+ FAPI_ASSERT(( l_vpdMDataUnion.mBvpdVMKeyword.iv_version <=
+ VM_SUPPORTED_HIGH_VER ) &&
+ ( l_vpdMDataUnion.mBvpdVMKeyword.iv_version !=
+ VM_NOT_SUPPORTED ),
fapi2::CEN_MBVPD_INVALID_VM_DATA_RETURNED().
set_KEYWORD(fapi2::MBVPD_KEYWORD_VM).
- set_RETURNED_VALUE(l_vpdMemoryDataVersion).
+ set_RETURNED_VALUE(l_vpdMDataUnion.vpdMemoryDataVersion).
set_RECORD_NAME(l_record).
set_DIMM_TYPE(l_dimmType).
set_CHIP_TARGET(i_mbTarget),
"getMBvpdMemoryDataVersion:"
" keyword data returned is invalid : %d ",
- l_vpdMemoryDataVersion);
+ l_vpdMDataUnion.vpdMemoryDataVersion);
// return value
- o_val = static_cast<uint32_t>(be16toh(l_vpdMemoryDataVersion));
+ o_val = static_cast<uint32_t>(be16toh(l_vpdMDataUnion.vpdMemoryDataVersion));
FAPI_DBG("getMBvpdMemoryDataVersion: Memory Data version=0x%08x",
o_val);
diff --git a/src/import/chips/centaur/procedures/xml/error_info/p9c_memory_mss_volt_errors.xml b/src/import/chips/centaur/procedures/xml/error_info/p9c_memory_mss_volt_errors.xml
index 189bfa36f..c919de917 100644
--- a/src/import/chips/centaur/procedures/xml/error_info/p9c_memory_mss_volt_errors.xml
+++ b/src/import/chips/centaur/procedures/xml/error_info/p9c_memory_mss_volt_errors.xml
@@ -5,7 +5,7 @@
<!-- -->
<!-- OpenPOWER HostBoot Project -->
<!-- -->
-<!-- Contributors Listed Below - COPYRIGHT 2016,2018 -->
+<!-- Contributors Listed Below - COPYRIGHT 2016,2019 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
@@ -53,11 +53,11 @@
<description>Mixing of DDR3 and DDR4 not supported.</description>
<ffdc>DEVICE_TYPE</ffdc>
<callout>
- <target>DIMM_DDR4_TARGET</target>
+ <target>DIMM_DDR3_TARGET</target>
<priority>HIGH</priority>
</callout>
<deconfigure>
- <target>DIMM_DDR4_TARGET</target>
+ <target>DIMM_DDR3_TARGET</target>
</deconfigure>
</hwpError>
<hwpError>
OpenPOWER on IntegriCloud