summaryrefslogtreecommitdiffstats
path: root/src/usr/runtime/hdatstructs.H
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2017-05-11 15:14:56 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-05-31 13:05:32 -0400
commite2cd6a048a9fd39cf37f4c5657a3515a43e2b081 (patch)
tree07c776b4215034c811d56c9f08bd7faa271bb984 /src/usr/runtime/hdatstructs.H
parentb4970bb63c2a517a384c335d7553c684919b6378 (diff)
downloadtalos-hostboot-e2cd6a048a9fd39cf37f4c5657a3515a43e2b081.tar.gz
talos-hostboot-e2cd6a048a9fd39cf37f4c5657a3515a43e2b081.zip
Refactor populate_HbRsvMem to use a function to fill entries
Change-Id: Ia16001250e9c7c6612b683458d8e8b593739f0f3 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40411 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/runtime/hdatstructs.H')
-rw-r--r--src/usr/runtime/hdatstructs.H22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/usr/runtime/hdatstructs.H b/src/usr/runtime/hdatstructs.H
index f601053a3..d0470fecf 100644
--- a/src/usr/runtime/hdatstructs.H
+++ b/src/usr/runtime/hdatstructs.H
@@ -28,6 +28,7 @@
#include <stdint.h>
#include <vmmconst.h>
#include <string.h>
+#include <hdat/hdat.H>
// Copied from FipS:src/hdat/fsp/hdatnaca.H
// offset in mainstore where NACA starts
@@ -329,7 +330,25 @@ struct hdatMsReservedMemArrayHeader_t
*/
struct hdatMsVpdRhbAddrRange_t
{
- uint8_t hdatRhbRngType; // 0x0000 Range type
+ hdatMsVpdRhbAddrRange_t(): hdatRhbRngType(HDAT::RHB_TYPE_INVALID),
+ hdatRhbRngId(0), hdatRhbAddrRngStrAddr(0),
+ hdatRhbAddrRngEndAddr(0), hdatRhbLabelSize(1),
+ hdatRhbLabelString{}, reserved{} {}
+
+ /**
+ * Set all member variables of class
+ * @param[in] i_type, Range type
+ * @param[in] i_rangeId, Range ID
+ * @param[in] i_startAddr, Range Starting Address
+ * @param[in] i_size, Size of memory region
+ * @param[in] i_label, Label String Ptr
+ * @note size of i_label is calculated in function versus a input parameter.
+ */
+ void set(const HDAT::hdatMsVpdRhbAddrRangeType i_type,
+ const uint16_t i_rangeId, const uint64_t i_startAddr,
+ const uint64_t i_endAddr, const char* i_label);
+
+ HDAT::hdatMsVpdRhbAddrRangeType hdatRhbRngType; // 0x0000 Range type
uint8_t hdatRhbRngRes; // 0x0001 Reserved
uint16_t hdatRhbRngId; // 0x0002 Range ID
uint64_t hdatRhbAddrRngStrAddr; // 0x0004 Range starting
@@ -339,5 +358,4 @@ struct hdatMsVpdRhbAddrRange_t
uint8_t reserved[8]; // 0x0058 Reserved
} __attribute__ ((packed));
-
#endif
OpenPOWER on IntegriCloud