diff options
| author | Matt Derksen <mderkse1@us.ibm.com> | 2017-05-30 15:25:20 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-06-12 11:42:37 -0400 |
| commit | 94010840e9551be4711ac135c9855b7f0cecb3a3 (patch) | |
| tree | 2398d28f8123c7f262160e6b87f993756be98eb7 /src/usr/vpd/runtime | |
| parent | 1c2fcebe0a3fde901e9a621a6f7362fb2cf1d200 (diff) | |
| download | talos-hostboot-94010840e9551be4711ac135c9855b7f0cecb3a3.tar.gz talos-hostboot-94010840e9551be4711ac135c9855b7f0cecb3a3.zip | |
Consolidating HBRT reserved memory (ATTR,ATTR_OVERRIDE,VPD) into a single entry
Change-Id: I9fc5846d9901ac79c59bb149b8f55b5c7ca2fa73
RTC: 171863
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41141
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/vpd/runtime')
| -rw-r--r-- | src/usr/vpd/runtime/rt_vpd.C | 47 |
1 files changed, 12 insertions, 35 deletions
diff --git a/src/usr/vpd/runtime/rt_vpd.C b/src/usr/vpd/runtime/rt_vpd.C index 44ca261bf..e83889381 100644 --- a/src/usr/vpd/runtime/rt_vpd.C +++ b/src/usr/vpd/runtime/rt_vpd.C @@ -32,6 +32,7 @@ #include <i2c/eepromif.H> #include <runtime/interface.h> #include <targeting/common/util.H> +#include <util/runtime/util_rt.H> #include "vpd.H" #include "mvpd.H" #include "cvpd.H" @@ -96,51 +97,27 @@ errlHndl_t getPnorAddr( pnorInformation & i_pnorInfo, // Get the reserved_mem_addr only once if( g_reserved_mem_addr == 0 ) { - if( g_hostInterfaces != NULL && - g_hostInterfaces->get_reserved_mem) - { - g_reserved_mem_addr = - g_hostInterfaces->get_reserved_mem("ibm,hbrt-vpd-image",0); + uint64_t l_vpdSize; + g_reserved_mem_addr = hb_get_rt_rsvd_mem(HBRT_MEM_LABEL_VPD, + 0, + l_vpdSize); - if( g_reserved_mem_addr == 0 ) - { - TRACFCOMP(g_trac_vpd,ERR_MRK"rt_vpd: Failed to get VPD addr. " - "vpd_type: %d", - i_pnorInfo.pnorSection); - /*@ - * @errortype - * @moduleid VPD::VPD_RT_GET_ADDR - * @reasoncode VPD::VPD_RT_NULL_VPD_PTR - * @userdata1 VPD type - * @userdata2 0 - * @devdesc Hypervisor returned NULL address for VPD - */ - err = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_INFORMATIONAL, - VPD::VPD_RT_GET_ADDR, - VPD::VPD_RT_NULL_VPD_PTR, - i_pnorInfo.pnorSection, - 0); - - err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, - HWAS::SRCI_PRIORITY_HIGH); - - err->collectTrace( "VPD", 256); - } - } - else // interface not set + if( g_reserved_mem_addr == 0 ) { - TRACFCOMP(g_trac_vpd,ERR_MRK"Hypervisor vpd interface not linked"); + TRACFCOMP(g_trac_vpd,ERR_MRK"rt_vpd: Failed to get VPD addr. " + "vpd_type: %d", + i_pnorInfo.pnorSection); /*@ * @errortype * @moduleid VPD::VPD_RT_GET_ADDR - * @reasoncode VPD::VPD_RT_NOT_INITIALIZED + * @reasoncode VPD::VPD_RT_NULL_VPD_PTR * @userdata1 VPD type * @userdata2 0 - * @devdesc Runtime VPD interface not linked. + * @devdesc Hypervisor returned NULL address for VPD */ err = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_INFORMATIONAL, VPD::VPD_RT_GET_ADDR, - VPD::VPD_RT_NOT_INITIALIZED, + VPD::VPD_RT_NULL_VPD_PTR, i_pnorInfo.pnorSection, 0); |

