summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/mvpd_accessors
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/hwpf/hwp/mvpd_accessors')
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.C36
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C8
2 files changed, 38 insertions, 6 deletions
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.C
index f180d2e00..41b5c1240 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.C
+++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.C
@@ -5,7 +5,9 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* [+] International Business Machines Corp. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -20,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: getMBvpdAddrMirrorData.C,v 1.4 2014/02/12 22:11:32 mjjones Exp $
+// $Id: getMBvpdAddrMirrorData.C,v 1.5 2014/10/23 22:01:31 dcrowell Exp $
/**
* @file getMBvpdAddrMirrorData.C
*
@@ -72,6 +74,27 @@ fapi::ReturnCode getMBvpdAddrMirrorData(
FAPI_DBG("getMBvpdAddrMirrorData: entry ");
do {
+ // Determine which VPD format we are using
+ uint8_t l_customDimm = 0;
+ l_fapirc=FAPI_ATTR_GET(ATTR_EFF_CUSTOM_DIMM,&i_mbaTarget,l_customDimm);
+ if(l_fapirc)
+ {
+ FAPI_ERR("getMBvpdAddrMirrorData: Read of Custom Dimm failed");
+ break;
+ }
+
+ //if not a custom_dimm then assume ISDIMM
+ if(fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_NO == l_customDimm)
+ {
+ // Planar CVPD (==ISDIMM) has no AM keyword, by default there is
+ // no mirrored data
+ for (uint8_t l_port=0; l_port<NUM_PORTS; l_port++)
+ {
+ o_val[l_port][0] = 0;
+ o_val[l_port][1] = 0;
+ }
+ break;
+ }
// find the position of the passed mba on the centuar
l_fapirc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS,&i_mbaTarget,l_mbaPos);
@@ -133,12 +156,15 @@ fapi::ReturnCode getMBvpdAddrMirrorData(
} while (0);
- delete l_pMaBuffer;
- l_pMaBuffer = NULL;
+ if( l_pMaBuffer )
+ {
+ delete l_pMaBuffer;
+ l_pMaBuffer = NULL;
+ }
FAPI_DBG("getMBvpdAddrMirrorData: exit rc=0x%08x",
static_cast<uint32_t>(l_fapirc));
return l_fapirc;
}
-} // extern "C"
+} // extern "C" \ No newline at end of file
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C
index 6fa6a4d54..49afc18dc 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C
+++ b/src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C
@@ -22,7 +22,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: getMBvpdTermData.C,v 1.16 2014/10/27 16:12:56 eliner Exp $
+// $Id: getMBvpdTermData.C,v 1.17 2014/11/03 16:52:04 cswenson Exp $
/**
* @file getMBvpdTermData.C
*
@@ -596,6 +596,8 @@ fapi::ReturnCode getMBvpdTermData(
case TERM_DATA_CEN_RD_VREF:
case TERM_DATA_DRAM_WR_VREF:
{
+ // @fixme - make this only read 8 bits after modifying
+ // the byte offset
uint32_t (* l_pVal)[2] = (uint32_t (*)[2])o_pVal;
uint32_t l_value = 0;
@@ -1055,6 +1057,10 @@ fapi::ReturnCode translate_CEN_RD_VREF (const fapi::MBvpdTermData i_attr,
const uint8_t RD_VREF_VDD61750 = 0x17;
const uint8_t RD_VREF_VDD60375 = 0x16;
+ // Even though the attribute value is 32 bits, the data in VPD is
+ // only 8 bits wide (the last 8 bits)
+ io_value &= 0x000000FF;
+
switch(io_value)
{
case RD_VREF_VDD61000:
OpenPOWER on IntegriCloud