diff options
| author | Sakethan R Kotta <sakkotta@in.ibm.com> | 2018-03-29 07:10:59 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-06-19 17:24:01 -0400 |
| commit | 1ec6201b896c5cbc22fef03df1a063faa8cd6411 (patch) | |
| tree | 4eec7df976c14204aef99de916e2ff0612aca161 /src/usr/runtime | |
| parent | 34d086e3e67827f0496b838d5d05a9964aa1346c (diff) | |
| download | blackbird-hostboot-1ec6201b896c5cbc22fef03df1a063faa8cd6411.tar.gz blackbird-hostboot-1ec6201b896c5cbc22fef03df1a063faa8cd6411.zip | |
HBRT Reserved Mem Trace Buffer implementation.
-Hostboot master Drawer will create TRACEBUF section in the HB
Rsvd Mem and HBRT, while booting, gets the TRACEBUF section
details and initializes the circual buffer, if available.
-If a valid data is present in the buffer, HBRT will create an
info log ERRL, otherwise initializes the buffer.
-Traces from all components are serialized and stored in the
single TRACEBUF in the same format (fsp-binary Trace). When
buffer is full, it deletes the oldest entry/entries to store
the new ones.
-ERRL->collectTrace() works similar to other buffers.
-A new test case is added to dump the traces from TRACEBUF.
Change-Id: I4ce943231a2ba30e3a13ca34d1c40ff68464a994
RTC:188726
RTC:191302
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56450
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/runtime')
| -rw-r--r-- | src/usr/runtime/populate_hbruntime.C | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C index f36851b7d..7672a572a 100644 --- a/src/usr/runtime/populate_hbruntime.C +++ b/src/usr/runtime/populate_hbruntime.C @@ -462,12 +462,14 @@ errlHndl_t setNextHbRsvMemEntry(const HDAT::hdatMsVpdRhbAddrRangeType i_type, * @param[in] i_startAddressValid Is io_start_address valid? * @param[out] io_size if not zero, maxSize in bytes allowed * returns Total 64kb aligned size for all the data + * @param[in] i_master_node = true if we are the master hb instance * @return Error handle if error */ errlHndl_t fill_RsvMem_hbData(uint64_t & io_start_address, uint64_t & io_end_address, bool i_startAddressValid, - uint64_t & io_size) + uint64_t & io_size, + bool i_master_node) { TRACFCOMP( g_trac_runtime, ENTER_MRK"fill_RsvMem_hbData> io_start_address=0x%.16llX,io_end_address=0x%.16llX,startAddressValid=%d", io_start_address, io_end_address, i_startAddressValid?1:0 ); @@ -563,6 +565,17 @@ errlHndl_t fill_RsvMem_hbData(uint64_t & io_start_address, ALIGN_PAGE(l_hbTOC.entry[l_hbTOC.total_entries].size); l_hbTOC.total_entries++; + // Fill in the TRACEBUF only for Master Node + if(i_master_node == true ) + { + // Fill in TRACEBUF size + l_hbTOC.entry[l_hbTOC.total_entries].label = Util::HBRT_MEM_LABEL_TRACEBUF; + l_hbTOC.entry[l_hbTOC.total_entries].offset = 0; + l_hbTOC.entry[l_hbTOC.total_entries].size = Util::HBRT_RSVD_TRACEBUF_SIZE; + l_totalSectionSize += + ALIGN_PAGE(l_hbTOC.entry[l_hbTOC.total_entries].size); + l_hbTOC.total_entries++; + } l_totalSectionSize += sizeof(l_hbTOC); // Add 4KB Table of Contents // Fill in PADDING size @@ -758,6 +771,14 @@ errlHndl_t fill_RsvMem_hbData(uint64_t & io_start_address, } break; } + + case Util::HBRT_MEM_LABEL_TRACEBUF: + + TRACFCOMP( g_trac_runtime, "fill_RsvMem_hbData> TRACEBUF v address 0x%.16llX, size: %lld", l_prevDataAddr, aligned_size); + //Nothing much to do here, except zero-ing the memory + memset(reinterpret_cast<uint8_t*>(l_prevDataAddr),0,aligned_size); + break; + default: break; } @@ -1103,7 +1124,7 @@ errlHndl_t populate_HbRsvMem(uint64_t i_nodeId, bool i_master_node) // fills in the reserved memory with HB Data and // will update addresses and totalSize l_elog = fill_RsvMem_hbData(l_startAddr, l_endAddr, - startAddressValid, l_totalSizeAligned); + startAddressValid, l_totalSizeAligned,i_master_node); if (l_elog) { @@ -3114,7 +3135,7 @@ errlHndl_t populate_hbRuntimeData( void ) bool startAddressValid = true; l_elog = fill_RsvMem_hbData(l_startAddr, l_endAddr, - startAddressValid, l_totalSizeAligned); + startAddressValid, l_totalSizeAligned,true); if(l_elog != nullptr) { TRACFCOMP( g_trac_runtime, "fill_RsvMem_hbData failed" ); |

