summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Swenson <cswenson@us.ibm.com>2017-02-09 21:19:33 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-02-28 09:01:31 -0500
commitae4fd75edc4a363f667a40d3c776493b5c9b0983 (patch)
treeaac4a605c4b8cf44f6ccc964e03d8cb95f329d50
parente5b630dccc4168ac7f90c9bbf22f776557b80899 (diff)
downloadtalos-hostboot-ae4fd75edc4a363f667a40d3c776493b5c9b0983.tar.gz
talos-hostboot-ae4fd75edc4a363f667a40d3c776493b5c9b0983.zip
Add attribute for HDAT HB Reserved Memory number-of-sections
Change-Id: Iaa4e93e5dcb838e16c44666493504258587658bc RTC:169102 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36259 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: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/include/usr/runtime/runtime.H6
-rw-r--r--src/usr/isteps/istep16/call_host_ipl_complete.C21
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml15
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/target_types.xml2
4 files changed, 36 insertions, 8 deletions
diff --git a/src/include/usr/runtime/runtime.H b/src/include/usr/runtime/runtime.H
index bde444d0d..3b9dfefe1 100644
--- a/src/include/usr/runtime/runtime.H
+++ b/src/include/usr/runtime/runtime.H
@@ -90,10 +90,14 @@ errlHndl_t populate_RtDataByNode(uint64_t iNodeId);
// How many pointers/sections there are in HB runtime data
#define HBRT_NUM_PTRS 2
-// sections defined by above literal
+// Sections defined by above literal
#define HBRT_VPD_SECTION 0
#define HBRT_ATTRIB_SECTION 1
+// How many pointers/sections there are in HB reserved memory data
+// HOMER*8/OCC_Common/VPD/ATTR/HBRT_Image/Res/Res/Res
+#define HB_RSV_MEM_NUM_PTRS 15
+
//Note this means the Reserved Mem sub-section is the 6th
//(0 based) of the MDT section (See HDAT spec)
#define MDT_RESERVED_HB_MEM_SECTION 5
diff --git a/src/usr/isteps/istep16/call_host_ipl_complete.C b/src/usr/isteps/istep16/call_host_ipl_complete.C
index 9c25e00a5..30857d73c 100644
--- a/src/usr/isteps/istep16/call_host_ipl_complete.C
+++ b/src/usr/isteps/istep16/call_host_ipl_complete.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -70,27 +70,34 @@ void* call_host_ipl_complete (void *io_pArgs)
TARGETING::targetService().getTopLevelTarget( sys );
assert(sys != NULL);
- // Set number of pointer pairs for HDAT
+
+ // Set number of pointer pairs for HDAT HB RESERVED MEM
//@TODO RTC:142908 Support multiple nodes in HBRT
const uint32_t NUM_NODES = 1;
- uint32_t l_numSections = NUM_NODES * HBRT_NUM_PTRS;
- sys->setAttr<ATTR_HDAT_HBRT_NUM_SECTIONS>(l_numSections);
+ uint32_t l_numRsvMemSections = NUM_NODES * HB_RSV_MEM_NUM_PTRS;
+ sys->setAttr<ATTR_HDAT_RSV_MEM_NUM_SECTIONS>(l_numRsvMemSections);
+
+
+ // Set number of pointer pairs for HDAT HBRT
+ //@TODO RTC:142908 Support multiple nodes in HBRT
+ uint32_t l_numHbrtSections = NUM_NODES * HBRT_NUM_PTRS;
+ sys->setAttr<ATTR_HDAT_HBRT_NUM_SECTIONS>(l_numHbrtSections);
uint64_t l_maxSecSize = VMM_RT_VPD_SIZE;
- // Set max size of a section for HDAT
+ // Set max size of a HBRT section for HDAT
TARGETING::ATTR_HDAT_HBRT_SECTION_SIZE_type l_secSize = {0};
uint64_t *l_p_secSize =
reinterpret_cast<uint64_t *>(&l_secSize);
uint32_t l_attrArraySize =
sizeof(ATTR_HDAT_HBRT_SECTION_SIZE_type) / sizeof(l_secSize[0]);
- assert(l_numSections <= l_attrArraySize);
+ assert(l_numHbrtSections <= l_attrArraySize);
uint64_t l_attrSize = AttrRP::maxSize();
l_maxSecSize = (l_attrSize > l_maxSecSize) ? l_attrSize : l_maxSecSize;
- for (uint32_t l_sect=0; (l_sect < l_numSections); l_sect++)
+ for (uint32_t l_sect=0; (l_sect < l_numHbrtSections); l_sect++)
{
l_p_secSize[l_sect] = l_maxSecSize;
}
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index feeb16384..e052f8848 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -18939,6 +18939,21 @@ Measured in GB</description>
<attribute>
+ <id>HDAT_RSV_MEM_NUM_SECTIONS</id>
+ <description>
+ Number of internal data pointers we have in
+ the hostboot reserved memory section.
+ </description>
+ <simpleType>
+ <uint32_t>
+ </uint32_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+</attribute>
+
+<attribute>
<id>HDAT_HBRT_NUM_SECTIONS</id>
<description>
Number of internal data pointers we have in
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index a696e5672..833597df8 100755
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -739,6 +739,7 @@
<attribute><id>PROC_FABRIC_CAPI_MODE</id></attribute>
<attribute><id>PROC_FABRIC_ADDR_BAR_MODE</id></attribute>
<!-- HDAT Hostboot Runtime Data Info -->
+ <attribute><id>HDAT_RSV_MEM_NUM_SECTIONS</id></attribute>
<attribute><id>HDAT_HBRT_NUM_SECTIONS</id></attribute>
<attribute><id>HDAT_HBRT_SECTION_SIZE</id></attribute>
<attribute><id>PIB_I2C_REFCLOCK</id></attribute>
@@ -937,6 +938,7 @@
<attribute><id>MSS_VOLT_DDR4_VDDR_SLOPE_EFF_CONFIG</id></attribute>
<attribute><id>MSS_VOLT_DDR4_VDDR_INTERCEPT_EFF_CONFIG</id></attribute>
<attribute><id>MRW_DDR4_VDDR_MAX_LIMIT_EFF_CONFIG</id></attribute>
+ <attribute><id>HDAT_RSV_MEM_NUM_SECTIONS</id></attribute>
<attribute><id>HDAT_HBRT_NUM_SECTIONS</id></attribute>
<attribute><id>HDAT_HBRT_SECTION_SIZE</id></attribute>
<attribute><id>VPD_REC_NUM</id></attribute>
OpenPOWER on IntegriCloud