diff options
author | Marty Gloff <mgloff@us.ibm.com> | 2018-03-15 08:52:50 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2018-04-10 16:14:46 -0400 |
commit | 67de094e51e209b16622bee4788a97dd28b538c6 (patch) | |
tree | a785b4673e61a8e85032f2eb86979f5917a76ca3 /src/usr/vpd/runtime | |
parent | 7a4cb95b51a4090a1a4c3506bf206915bb73de21 (diff) | |
download | talos-hostboot-67de094e51e209b16622bee4788a97dd28b538c6.tar.gz talos-hostboot-67de094e51e209b16622bee4788a97dd28b538c6.zip |
Support multiple nodes in HBRT - Remove Single Node Items
There are some items that applied to a single node implementation that can
be removed after all dependencies on them have been removed by other tasks.
This single node support is being moved/removed. Also a check is being
added to the VPD support so the node value does not index beyond the end
of the array of reserved memory addresses.
Change-Id: I7fea5ac9cdfa9f37caa57905d320633a8039e79d
RTC: 186585
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/55917
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/vpd/runtime')
-rw-r--r-- | src/usr/vpd/runtime/rt_vpd.C | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/usr/vpd/runtime/rt_vpd.C b/src/usr/vpd/runtime/rt_vpd.C index e10759b82..4ced81370 100644 --- a/src/usr/vpd/runtime/rt_vpd.C +++ b/src/usr/vpd/runtime/rt_vpd.C @@ -58,6 +58,7 @@ extern trace_desc_t* g_trac_vpd; // host interface get_reserved_mem function. We only want to call the // function once as memory is allocated with every call. static uint64_t g_reserved_mem_addr[] = {0, 0, 0, 0}; +#define MAX_RSVD_MEM_ADDRS (sizeof(g_reserved_mem_addr) / sizeof(uint64_t)) namespace VPD @@ -103,8 +104,33 @@ errlHndl_t getPnorAddr( pnorInformation & i_pnorInfo, { errlHndl_t err = NULL; + if( i_instance >= MAX_RSVD_MEM_ADDRS ) + { + TRACFCOMP(g_trac_vpd,ERR_MRK"rt_vpd: Node %d is too large for size " + "of reserved memory address array %d", + i_instance, + MAX_RSVD_MEM_ADDRS); + /*@ + * @errortype + * @moduleid VPD::VPD_RT_GET_ADDR + * @reasoncode VPD::VPD_RT_NODE_TOO_LARGE + * @userdata1 Node ID + * @userdata2 Rsvd Mem Address array size + * @devdesc Node for VPD is too large + */ + err = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_INFORMATIONAL, + VPD::VPD_RT_GET_ADDR, + VPD::VPD_RT_NODE_TOO_LARGE, + i_instance, + MAX_RSVD_MEM_ADDRS); + + err->addProcedureCallout(HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_HIGH); + + err->collectTrace( "VPD", 256); + } // Get the reserved_mem_addr only once - if( g_reserved_mem_addr[i_instance] == 0 ) + else if( g_reserved_mem_addr[i_instance] == 0 ) { uint64_t l_vpdSize; g_reserved_mem_addr[i_instance] = |