diff options
Diffstat (limited to 'src/usr')
| -rwxr-xr-x | src/usr/targeting/attrrp_common.C | 11 | ||||
| -rw-r--r-- | src/usr/targeting/runtime/attrrp_rt.C | 5 | ||||
| -rw-r--r-- | src/usr/vpd/runtime/rt_vpd.C | 28 |
3 files changed, 30 insertions, 14 deletions
diff --git a/src/usr/targeting/attrrp_common.C b/src/usr/targeting/attrrp_common.C index 173c249ec..a78017e29 100755 --- a/src/usr/targeting/attrrp_common.C +++ b/src/usr/targeting/attrrp_common.C @@ -58,13 +58,13 @@ namespace TARGETING AttrRP::~AttrRP() { - if (iv_sections) // @TODO RTC:186585 move if... to #ifndef clause +#ifndef __HOSTBOOT_RUNTIME + if (iv_sections) { delete[] iv_sections; iv_sections = nullptr; - } // @TODO RTC:186585 move if... to #ifndef clause + } -#ifndef __HOSTBOOT_RUNTIME msg_q_destroy(iv_msgQ); TARG_ASSERT(false, "Assert to exit ~AttrRP"); #else @@ -72,11 +72,6 @@ namespace TARGETING { if (iv_nodeContainer[i].pSections) { - if((i == NODE0) && (iv_sections == nullptr)) - { - iv_nodeContainer[i].pSections = nullptr; - continue; - } // @TODO RTC:186585 move if... delete[] iv_nodeContainer[i].pSections; iv_nodeContainer[i].pSections = nullptr; } diff --git a/src/usr/targeting/runtime/attrrp_rt.C b/src/usr/targeting/runtime/attrrp_rt.C index 8d260cf75..9f8cce8a6 100644 --- a/src/usr/targeting/runtime/attrrp_rt.C +++ b/src/usr/targeting/runtime/attrrp_rt.C @@ -277,11 +277,6 @@ namespace TARGETING io_nodeCont.sectionCount = i_header->numSections; io_nodeCont.pSections = new AttrRP_Section[io_nodeCont.sectionCount](); - if (i_nodeId == NODE0) // @TODO RTC:186585 remove - { // @TODO RTC:186585 remove - iv_sectionCount = io_nodeCont.sectionCount; // @TODO RTC:186585 - iv_sections = io_nodeCont.pSections; // @TODO RTC:186585 remove - } // @TODO RTC:186585 remove // Find start to the first section: // (header address + size of header + offset in header) 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] = |

