summaryrefslogtreecommitdiffstats
path: root/src/usr/runtime/hdatservice.C
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-03-31 13:40:50 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-04-11 12:18:33 -0400
commitedb74f80cc2a8a0e51de869c2a77517e0184b50e (patch)
tree1f6e835da4a87a3988c83df122bb3b33c379f65b /src/usr/runtime/hdatservice.C
parent97d6fee68a3980cbedb37d7daf30cdb338efabda (diff)
downloadblackbird-hostboot-edb74f80cc2a8a0e51de869c2a77517e0184b50e.tar.gz
blackbird-hostboot-edb74f80cc2a8a0e51de869c2a77517e0184b50e.zip
Bug fixes and workarounds for Hostboot Reserved Memory
Set type to invalid (0xFF) for unallocated ranges Silently handle both old and new HDAT formats to allow for roll-in of other code without changes here. Change-Id: I5558a6a3476e8d4a1b3b885eef1df1e7f74a898b Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38741 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@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> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/runtime/hdatservice.C')
-rw-r--r--src/usr/runtime/hdatservice.C25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/usr/runtime/hdatservice.C b/src/usr/runtime/hdatservice.C
index ab306c381..0b6201df9 100644
--- a/src/usr/runtime/hdatservice.C
+++ b/src/usr/runtime/hdatservice.C
@@ -709,8 +709,29 @@ errlHndl_t hdatService::getHostDataSection( SectionId i_section,
hdatMsReservedMemArrayHeader_t* reservedMemArrayHeader =
reinterpret_cast<hdatMsReservedMemArrayHeader_t *>(resvMemHdatAddr);
- assert(i_instance < reservedMemArrayHeader->arrayEntryCount,
- "Instance entered exceeds max reserved mem entry count");
+ if( i_instance >= reservedMemArrayHeader->arrayEntryCount )
+ {
+ TRACFCOMP( g_trac_runtime, "Instance %d exceeds max reserved mem entry count %d", i_instance, reservedMemArrayHeader->arrayEntryCount );
+ /*@
+ * @errortype
+ * @moduleid RUNTIME::MOD_HDATSERVICE_GETHOSTDATASECTION
+ * @reasoncode RUNTIME::RC_INVALID_RHB_INSTANCE
+ * @userdata1 Requested instance
+ * @userdata2 Entry count
+ * @devdesc Invalid instance requested for Reserved
+ * Hostboot Memory section
+ * @custdesc Firmware error during boot
+ */
+ errhdl = new ERRORLOG::ErrlEntry(
+ ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ RUNTIME::MOD_HDATSERVICE_GETHOSTDATASECTION,
+ RUNTIME::RC_INVALID_RHB_INSTANCE,
+ i_instance,
+ reservedMemArrayHeader->arrayEntryCount,
+ true /*Add HB Software Callout*/);
+ errhdl->collectTrace(RUNTIME_COMP_NAME,KILOBYTE);
+ break;
+ }
o_dataAddr = reinterpret_cast<uint64_t>(
resvMemHdatAddr + reservedMemArrayHeader->offsetToArray + (i_instance * sizeof(hdatMsVpdRhbAddrRange_t)));
OpenPOWER on IntegriCloud