summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarty Gloff <mgloff@us.ibm.com>2018-03-15 08:52:50 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2018-04-10 16:14:46 -0400
commit67de094e51e209b16622bee4788a97dd28b538c6 (patch)
treea785b4673e61a8e85032f2eb86979f5917a76ca3
parent7a4cb95b51a4090a1a4c3506bf206915bb73de21 (diff)
downloadtalos-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>
-rw-r--r--src/include/usr/targeting/attrrp.H13
-rw-r--r--src/include/usr/vpd/vpdreasoncodes.H3
-rwxr-xr-xsrc/usr/targeting/attrrp_common.C11
-rw-r--r--src/usr/targeting/runtime/attrrp_rt.C5
-rw-r--r--src/usr/vpd/runtime/rt_vpd.C28
5 files changed, 39 insertions, 21 deletions
diff --git a/src/include/usr/targeting/attrrp.H b/src/include/usr/targeting/attrrp.H
index 897e6dec4..cb7e9e35e 100644
--- a/src/include/usr/targeting/attrrp.H
+++ b/src/include/usr/targeting/attrrp.H
@@ -342,7 +342,7 @@ class AttrRP
iv_isMpipl(false)
#else
: iv_isTempInstance(false), iv_instanceStatus(SINGLE_NODE),
- iv_sections(NULL), iv_sectionCount(0), iv_isMpipl(false)
+ iv_isMpipl(false)
#endif
{
};
@@ -546,6 +546,12 @@ class AttrRP
// Message Queue for VMM requests
msg_q_t iv_msgQ;
+
+ // Parsed structures of the attribute sections.
+ AttrRP_Section* iv_sections;
+
+ // Count of attribute sections.
+ size_t iv_sectionCount;
#else
// Indicator that AttrRP instance is a temporary one, not the singleton
bool iv_isTempInstance;
@@ -556,11 +562,6 @@ class AttrRP
// Node instance status
NodeInstanceStatus iv_instanceStatus;
#endif
- // Parsed structures of the attribute sections.
- AttrRP_Section* iv_sections; // @TODO RTC:186585 move to #ifndef clause
-
- // Count of attribute sections.
- size_t iv_sectionCount; // @TODO RTC:186585 move to #ifndef clause
bool iv_isMpipl;
};
diff --git a/src/include/usr/vpd/vpdreasoncodes.H b/src/include/usr/vpd/vpdreasoncodes.H
index 282bed144..45652bf05 100644
--- a/src/include/usr/vpd/vpdreasoncodes.H
+++ b/src/include/usr/vpd/vpdreasoncodes.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2017 */
+/* Contributors Listed Below - COPYRIGHT 2013,2018 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -146,6 +146,7 @@ enum vpdReasonCode
VPD_RC_XXX = VPD_COMP_ID | 0x38,
VPD_TARGET_CHIP_NOT_FOUND = VPD_COMP_ID | 0x39,
VPD_EEPROM_VPD_PRIMARY_INFO_MISSING = VPD_COMP_ID | 0x3a,
+ VPD_RT_NODE_TOO_LARGE = VPD_COMP_ID | 0x3b,
};
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] =
OpenPOWER on IntegriCloud