diff options
author | Corey Swenson <cswenson@us.ibm.com> | 2017-01-31 12:06:13 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-02-28 11:51:33 -0500 |
commit | 600d2fb18f8566e50bb1036c664ed576753ad8c1 (patch) | |
tree | 5740bfba01c9041c353225ac64351b116ae03f3d /src/usr/hdat/hdatmsvpd.C | |
parent | 2f76aef57ebc1c12e5d19e90a8d6872fbd67664e (diff) | |
download | talos-hostboot-600d2fb18f8566e50bb1036c664ed576753ad8c1.tar.gz talos-hostboot-600d2fb18f8566e50bb1036c664ed576753ad8c1.zip |
Update the HDAT HB reserved memory fields
Change-Id: I45fb3144836877b3b495e62d06289f70af7dbdf6
RTC:168523
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35855
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@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: NAGENDRA K. GURRAM <nagendra.g@in.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/hdat/hdatmsvpd.C')
-rwxr-xr-x | src/usr/hdat/hdatmsvpd.C | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/usr/hdat/hdatmsvpd.C b/src/usr/hdat/hdatmsvpd.C index c87d714da..f835da10e 100755 --- a/src/usr/hdat/hdatmsvpd.C +++ b/src/usr/hdat/hdatmsvpd.C @@ -142,7 +142,7 @@ void HdatMsVpd::hdatInit(hdatMsAddr_t &i_maxMsAddr, iv_RHBaddrRngArrayHdr.hdatAllocSize = sizeof(hdatMsVpdRhbAddrRange_t); iv_RHBaddrRngArrayHdr.hdatActSize = sizeof(hdatMsVpdRhbAddrRange_t); - iv_maxRHBAddrRngCnt = hdatGetMaxCecNodes(); + iv_maxRHBAddrRngCnt = HDAT_RHB_MAX_RANGE_ENTRIES * hdatGetMaxCecNodes(); // Allocate space for the mainstore area entries and IMT Addr Range array iv_msAreaPtrs = new HdatMsArea*[iv_maxMsAreaCnt]; @@ -328,7 +328,8 @@ errlHndl_t HdatMsVpd::addRHBAddrRange(uint32_t i_dbob_id, hdatMsAddr_t &i_start, <char*>(iv_RHBaddrRangeArray) + (iv_RHBaddrRngArrayHdr.hdatArrayCnt * sizeof(hdatMsVpdRhbAddrRange_t))); - l_addr->hdatDbobID = i_dbob_id; + l_addr->hdatRhbRngType = 0x0; + l_addr->hdatRhbRngId = i_dbob_id; l_addr->hdatRhbAddrRngStrAddr = i_start; l_addr->hdatRhbAddrRngEndAddr = i_end; //TODO : : RTC Story 159684 @@ -343,7 +344,7 @@ errlHndl_t HdatMsVpd::addRHBAddrRange(uint32_t i_dbob_id, hdatMsAddr_t &i_start, } memset(l_addr->hdatRhbLabelString, 0x00, HDAT_MS_RHB_LABEL_LEN); - + if (i_labelStringPtr != NULL) { for(uint8_t l_idx = 0; l_idx < l_addr->hdatRhbLabelSize; l_idx++) @@ -1192,7 +1193,7 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count) l_hdatNhtmStartAddr.lo = l_nhtmStartAddr & 0x00000000FFFFFFFFull; l_hdatNhtmStartAddr.hi |= HDAT_REAL_ADDRESS_MASK; - + l_nhtmSize = l_nhtmStartAddr + l_nhtmSize; l_hdatNhtmEndAddr.hi = (l_nhtmSize & 0xFFFFFFFF00000000ull) >> 32; @@ -1572,7 +1573,7 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count) // TODO : RTC Story 159682 // Further CHTM support needs to be added which contains // the trace array for 24 cores - // Reinitializing the NHTM size + // Reinitializing the NHTM size l_nhtmSize = l_pProcTarget->getAttr <TARGETING::ATTR_PROC_NHTM_BAR_SIZE>(); @@ -1638,7 +1639,7 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count) &l_functionalnode); TARGETING::ATTR_HB_RSV_MEM_SIZE_MB_type l_rhbSize = - l_pSysTarget->getAttr<TARGETING::ATTR_HB_RSV_MEM_SIZE_MB>(); + l_pSysTarget->getAttr<TARGETING::ATTR_HB_RSV_MEM_SIZE_MB>(); if( 0 != l_rhbSize ) { for(;l_nodes;++l_nodes) @@ -1682,9 +1683,25 @@ errlHndl_t HdatMsVpd::hdatLoadMsData(uint32_t &o_size, uint32_t &o_count) uint32_t l_rhbLabelSize = 0; uint8_t* l_rhbLabelStringPtr = NULL; - addRHBAddrRange(l_dbobId, l_hdatRhbStartAddr, + addRHBAddrRange(l_dbobId, l_hdatRhbStartAddr, l_hdatRhbEndAddr, l_rhbLabelSize, l_rhbLabelStringPtr); + + TARGETING::ATTR_HB_RSV_MEM_SIZE_MB_type l_rhbEntries = + l_pSysTarget->getAttr + <TARGETING::ATTR_HDAT_RSV_MEM_NUM_SECTIONS>(); + + l_dbobId = 0x0; + l_hdatRhbStartAddr.lo = 0x0; + l_hdatRhbStartAddr.hi = 0x0; + l_hdatRhbEndAddr.lo = 0x0; + l_hdatRhbEndAddr.hi = 0x0; + for(uint32_t l_entry=0; l_entry<l_rhbEntries; l_entry++) + { + addRHBAddrRange(l_dbobId, l_hdatRhbStartAddr, + l_hdatRhbEndAddr, l_rhbLabelSize, + l_rhbLabelStringPtr); + } } } else |