diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2017-03-31 13:40:50 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-04-11 12:18:33 -0400 |
commit | edb74f80cc2a8a0e51de869c2a77517e0184b50e (patch) | |
tree | 1f6e835da4a87a3988c83df122bb3b33c379f65b /src/usr/hdat | |
parent | 97d6fee68a3980cbedb37d7daf30cdb338efabda (diff) | |
download | talos-hostboot-edb74f80cc2a8a0e51de869c2a77517e0184b50e.tar.gz talos-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/hdat')
-rwxr-xr-x | src/usr/hdat/hdatmsvpd.C | 2 | ||||
-rwxr-xr-x | src/usr/hdat/hdatmsvpd.H | 30 |
2 files changed, 18 insertions, 14 deletions
diff --git a/src/usr/hdat/hdatmsvpd.C b/src/usr/hdat/hdatmsvpd.C index 32ab77fd1..5808561d6 100755 --- a/src/usr/hdat/hdatmsvpd.C +++ b/src/usr/hdat/hdatmsvpd.C @@ -289,7 +289,7 @@ errlHndl_t HdatMsVpd::addRHBAddrRange(uint32_t i_dbob_id, hdatMsAddr_t &i_start, <char*>(iv_RHBaddrRangeArray) + (iv_RHBaddrRngArrayHdr.hdatArrayCnt * sizeof(hdatMsVpdRhbAddrRange_t))); - l_addr->hdatRhbRngType = 0x0; + l_addr->hdatRhbRngType = HDAT::RHB_TYPE_INVALID; l_addr->hdatRhbRngId = i_dbob_id; l_addr->hdatRhbAddrRngStrAddr = i_start; l_addr->hdatRhbAddrRngEndAddr = i_end; diff --git a/src/usr/hdat/hdatmsvpd.H b/src/usr/hdat/hdatmsvpd.H index c530db9e3..273de55d1 100755 --- a/src/usr/hdat/hdatmsvpd.H +++ b/src/usr/hdat/hdatmsvpd.H @@ -67,10 +67,6 @@ const uint32_t HDAT_RHB_MAX_RANGE_ENTRIES = 15; */ const uint16_t HDAT_MS_VPD_VERSION = 0x24; -/** @brief Other constants - */ -const uint16_t HDAT_MS_RHB_LABEL_LEN = 64; //Reserved HB length - /** @enum hdatDataPtrs * Constants for the internal data pointers that are added to the base class */ @@ -176,20 +172,27 @@ struct hdatMsVpdUEAddrRange_t hdatMsAddr_t hdatUEAddr; // 0x0000 UE area starting address } __attribute__ ((packed)); -/** @brief In Reserved Hostboot Memory iaddress range array element information- +/** @brief In Reserved Hostboot Memory iaddress range array element information */ struct hdatMsVpdRhbAddrRange_t { - uint32_t hdatRhbRngType:8; // 0x0000 Range type - uint32_t hdatRhbRngId:24; // 0x0001 Range ID - hdatMsAddr_t hdatRhbAddrRngStrAddr; // 0x0004 Range starting - // address - hdatMsAddr_t hdatRhbAddrRngEndAddr; // 0x000C Range ending - // address+1 - uint32_t hdatRhbLabelSize; // 0x0014 Label size - uint8_t hdatRhbLabelString[HDAT_MS_RHB_LABEL_LEN];// 0x0019 Label string Ptr + uint32_t hdatRhbRngType:8; // 0x0000 Range type + uint32_t hdatRhbRngId:24; // 0x0001 Range ID + hdatMsAddr_t hdatRhbAddrRngStrAddr; // 0x0004 Range starting + // address + hdatMsAddr_t hdatRhbAddrRngEndAddr; // 0x000C Range ending + // address+1 + uint32_t hdatRhbLabelSize; // 0x0014 Label size + uint8_t hdatRhbLabelString[64]; // 0x0018 Label string Ptr + uint8_t reserved[8]; // 0x0058 Reserved } __attribute__ ((packed)); +/** @brief Reserved HB length + */ +const uint16_t HDAT_MS_RHB_LABEL_LEN = + sizeof(hdatMsVpdRhbAddrRange_t::hdatRhbLabelString); + + struct hdatMsVpd_t { @@ -200,6 +203,7 @@ struct hdatMsVpd_t hdatMsVpdUEAddrRange_t hdatUEAddrRange; hdatMsVpdRhbAddrRange_t hdatRhbAddrRange; }__attribute__ ((packed)); + /*----------------------------------------------------------------------------*/ /* Constants */ /*----------------------------------------------------------------------------*/ |