diff options
author | Corey Swenson <cswenson@us.ibm.com> | 2014-10-23 13:56:48 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-11-06 14:21:31 -0600 |
commit | 50a9492653790825a28bcdb2fc0292a5e441335a (patch) | |
tree | 714294d2132456ece300c704b2b869cfb3a7f59d /src/usr/hwpf/hwp | |
parent | 12b9ca8651e96ffc03b9e3581d829427e8dddfce (diff) | |
download | talos-hostboot-50a9492653790825a28bcdb2fc0292a5e441335a.tar.gz talos-hostboot-50a9492653790825a28bcdb2fc0292a5e441335a.zip |
BMC: Fixes to enable ISDIMM support with live vpd
Change-Id: I914d2ad7b43e33f5e51bd1748284d60cf6dc3255
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14167
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp')
-rw-r--r-- | src/usr/hwpf/hwp/dram_training/makefile | 2 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/mc_config/makefile | 4 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_config.C | 8 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/mvpd_accessors/getMBvpdAddrMirrorData.C | 36 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.C | 8 |
5 files changed, 48 insertions, 10 deletions
diff --git a/src/usr/hwpf/hwp/dram_training/makefile b/src/usr/hwpf/hwp/dram_training/makefile index 816cb353f..4e378005e 100644 --- a/src/usr/hwpf/hwp/dram_training/makefile +++ b/src/usr/hwpf/hwp/dram_training/makefile @@ -27,7 +27,7 @@ ROOTPATH = ../../../../.. MODULE = dram_training -CFLAGS += $(if $(CONFIG_PALMETTO_VDDR), -D FAPI_MSSLABONLY -D FAPI_LRDIMM) +CFLAGS += $(if $(CONFIG_VPD_GETMACRO_USE_EFF_ATTR), -D FAPI_MSSLABONLY -D FAPI_LRDIMM) ## support for Targeting and fapi EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer diff --git a/src/usr/hwpf/hwp/mc_config/makefile b/src/usr/hwpf/hwp/mc_config/makefile index aa9c9f31e..07a8d838b 100644 --- a/src/usr/hwpf/hwp/mc_config/makefile +++ b/src/usr/hwpf/hwp/mc_config/makefile @@ -26,8 +26,8 @@ ROOTPATH = ../../../../.. MODULE = mc_config -CFLAGS += $(if $(CONFIG_PALMETTO_VDDR), -D FAPI_MSSLABONLY -D FAPI_LRDIMM) -EXTRAINCDIR += $(if $(CONFIG_PALMETTO_VDDR), ${ROOTPATH}/src/usr/hwpf/hwp/dram_training/mss_draminit) +CFLAGS += $(if $(CONFIG_VPD_GETMACRO_USE_EFF_ATTR), -D FAPI_MSSLABONLY -D FAPI_LRDIMM) +EXTRAINCDIR += $(if $(CONFIG_VPD_GETMACRO_USE_EFF_ATTR), ${ROOTPATH}/src/usr/hwpf/hwp/dram_training/mss_draminit) ## support for Targeting and fapi EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer diff --git a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_config.C b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_config.C index 294054b78..fb8d2c78c 100644 --- a/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_config.C +++ b/src/usr/hwpf/hwp/mc_config/mss_eff_config/mss_eff_config.C @@ -2315,6 +2315,12 @@ fapi::ReturnCode mss_eff_config(const fapi::Target i_target_mba) // Removed call to mss_eff_config_cke_map(), //rc = mss_eff_config_cke_map(i_target_mba); if(rc) break; + // @fixme - this change is in v1.48 of the HWP + // @todo - RTC:117484 replace with v1.49 from ekb + // Removed call to mss_eff_config_termination() for Palmetto and + // Habanero using ifdef "FAPI_MSSLABONLY", moving to liveVPD. + // Note: Stradale, KG3, and DDR4 will still need ifdef "FAPI_MSSLABONLY" +#ifdef FAPI_MSSLABONLY // If MSS Lab/Development override, for now everything except DDR3 CDIMMs if ((p_l_atts->eff_custom_dimm == fapi::ENUM_ATTR_EFF_CUSTOM_DIMM_NO) || (p_l_atts->eff_dram_gen == fapi::ENUM_ATTR_EFF_DRAM_GEN_DDR4)) { rc = mss_eff_config_termination(i_target_mba); if(rc) break; @@ -2324,7 +2330,7 @@ fapi::ReturnCode mss_eff_config(const fapi::Target i_target_mba) break; } } - +#endif // Removed call to mss_eff_config_thermal(), it is now called externally. //rc = mss_eff_config_thermal(i_target_mba); if(rc) break; 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: |