summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2018-06-13 15:11:48 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-06-14 13:56:55 -0400
commitd50263f51eb430a0737367d8bcdacab1476015d6 (patch)
treebd8f6e7e17296746de3c881d34ec304a8c62d1d2
parent36b343d78a73b9d923329c41a8863ebe4f285b7e (diff)
downloadtalos-hostboot-d50263f51eb430a0737367d8bcdacab1476015d6.tar.gz
talos-hostboot-d50263f51eb430a0737367d8bcdacab1476015d6.zip
getMBvpdAttr: Updates for DDR3 support
Changed the check from if (rc == false) to if (rc != success). This way we are not relying on plat code to return a specific rc in case VPD rec/kw is not found. This HWP relies on a few VPD rec/kw combinations that will not work and we need to ignore errors in that case. The HWP tries the combinations in the following order: VSPD+VM, VSPD+VD, VINI+VZ. For DDR3, first two combinations do not work. Change-Id: I43966493a1d7e9e2f6d9447dd3fda9c3206de417 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60488 Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Dev-Ready: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60493 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/import/chips/centaur/procedures/vpd_accessors/getMBvpdAttr.C21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/import/chips/centaur/procedures/vpd_accessors/getMBvpdAttr.C b/src/import/chips/centaur/procedures/vpd_accessors/getMBvpdAttr.C
index c3dab7b67..6ff3ff90c 100644
--- a/src/import/chips/centaur/procedures/vpd_accessors/getMBvpdAttr.C
+++ b/src/import/chips/centaur/procedures/vpd_accessors/getMBvpdAttr.C
@@ -403,12 +403,14 @@ extern "C"
if( l_version != 0)
{
o_version = static_cast<VpdVersion>(l_version);
- FAPI_DBG("getVersion: vpd version=0x%x,", o_version);
+ FAPI_DBG("%s getVersion: vpd version=0x%x,", mss::c_str(i_mbaTarget),
+ o_version);
return fapi2::FAPI2_RC_SUCCESS;
}
else
{
- FAPI_INF("getVersion: read of MBVPD_VERSION attribute failed");
+ FAPI_INF("%s getVersion: read of MBVPD_VERSION attribute failed",
+ mss::c_str(i_mbaTarget));
}
// Couldn't get the Version from attribute
@@ -434,8 +436,8 @@ extern "C"
if((fapi2::current_err == fapi2::FAPI2_RC_SUCCESS) && (!l_sizeMismatch))
{
- FAPI_INF("getVersion:"
- " returned vm data : 0x%x ",
+ FAPI_INF("getVersion: %s"
+ " returned vm data : 0x%x ", mss::c_str(i_mbaTarget),
l_vmVersionBuf.iv_version);
// Get the first byte from VM keyword which has version value.
@@ -461,7 +463,7 @@ extern "C"
// Get the VD in case of VM read error or
// VM returned size is fine but with value 0, then the Version is in
// VD format.
- if((fapi2::current_err == fapi2::FAPI2_RC_FALSE) ||
+ if((fapi2::current_err != fapi2::FAPI2_RC_SUCCESS) ||
((!l_sizeMismatch) && (l_versionBuf == VM_NOT_SUPPORTED)))
{
o_version = VD_VER; // initialize to finding VD keyword
@@ -483,11 +485,12 @@ extern "C"
{
o_version = static_cast<VpdVersion>(o_version |
static_cast<VpdVersion>(be16toh(l_versionBuf)));
+ l_sizeMismatch = false;
}
}
// try record VINI keyword VZ (should work)
- if (fapi2::current_err == fapi2::FAPI2_RC_FALSE)
+ if (fapi2::current_err != fapi2::FAPI2_RC_SUCCESS)
{
o_version = VZ_VER; // VZ keyword
l_record = fapi2::MBVPD_RECORD_VINI;
@@ -508,10 +511,11 @@ extern "C"
{
o_version = static_cast<VpdVersion>(o_version |
static_cast<VpdVersion>(be16toh(l_versionBuf)));
+ l_sizeMismatch = false;
}
}
- if (fapi2::current_err == fapi2::FAPI2_RC_FALSE)
+ if (fapi2::current_err != fapi2::FAPI2_RC_SUCCESS)
{
FAPI_ERR("getVersion: Read of VM,VD and VZ keyword failed");
return fapi2::current_err;
@@ -529,7 +533,8 @@ extern "C"
l_bufSize, sizeof(l_versionBuf));
}
- FAPI_INF("getVersion: vpd version=0x%x keyword=%d",
+ FAPI_INF("getVersion: %s vpd version=0x%x keyword=%d",
+ mss::c_str(i_mbaTarget),
o_version, l_keyword);
// cache the version value by updating attribute
OpenPOWER on IntegriCloud