summaryrefslogtreecommitdiffstats
path: root/src/usr/runtime
diff options
context:
space:
mode:
authorRaja Das <rajadas2@in.ibm.com>2018-10-25 11:26:25 +0530
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-03-21 13:11:36 -0500
commitb8f4e5009a347a0201fbe09b3701ceeb6edd9bf2 (patch)
tree943d5166fc775006987ecf7a6c57b5f91dbc0bc7 /src/usr/runtime
parentd09e67a0a55418f2878d016f372bc751b549d535 (diff)
downloadtalos-hostboot-b8f4e5009a347a0201fbe09b3701ceeb6edd9bf2.tar.gz
talos-hostboot-b8f4e5009a347a0201fbe09b3701ceeb6edd9bf2.zip
OPAL/MPIPL: Processor Dump Area Table interfaces
This patch adds support to collect processor architected register data. SBE <--> Hostboot : ------------------- During first boot, hostboot reserves memory to copy architected register data by SBE and sends address to each SBE (see commit 9f49d11b). During MPIPL SBE collects architected register data and copies to reserved memory. Hostboot <--> Hypervisor : -------------------------- HDAT/SPIRAH has new ntuple (Processor Dump Area) to pass various architected register data. During IPL/runtime hypervisor reserves memory for architected register data and updates SPIRAH. During MPIPL (istep 14.8), hostboot converts SBE formated architected registers data to HDAT format and copies to hypervisor reserved memory. It uses NACA/SPIRAH pointers to get hypervisor reserved memory details. Hostboot has to update SPIRAH ntuple after loading new LID to memory. Hence this patch introdues below new attributes: - PDA_CAPTURED_THREAD_REG_ARRAY_ADDR - PDA_CAPTURED_THREAD_REG_ARRAY_SIZE - PDA_THREAD_REG_ENTRY_SIZE - PDA_THREAD_REG_STATE_ENTRY_FORMAT Change-Id: Idc7489e8cf6fc68fe80f028ba6deb97aa72486bf CC: Sampa Misra <sampmisr@in.ibm.com> CC: Daniel M. Crowell <dcrowell@us.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/61627 Tested-by: Jenkins Server <pfd-jenkins+hostboot@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> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/runtime')
-rw-r--r--src/usr/runtime/hdatservice.C67
-rw-r--r--src/usr/runtime/hdatservice.H17
-rw-r--r--src/usr/runtime/hdatstructs.H3
3 files changed, 86 insertions, 1 deletions
diff --git a/src/usr/runtime/hdatservice.C b/src/usr/runtime/hdatservice.C
index c9d8c3681..f82d7bfe4 100644
--- a/src/usr/runtime/hdatservice.C
+++ b/src/usr/runtime/hdatservice.C
@@ -39,6 +39,7 @@
#include "errlud_hdat.H"
#include <errl/errlmanager.H>
#include <targeting/attrrp.H>
+#include <dump/dumpif.H>
//#define REAL_HDAT_TEST
@@ -912,6 +913,21 @@ errlHndl_t hdatService::getHostDataSection( SectionId i_section,
if( errhdl ) { break; }
}
+ // Processor Dump Area table
+ else if( RUNTIME::PROC_DUMP_AREA_TBL == i_section )
+ {
+ // Find the right tuple and verify it makes sense
+ errhdl = getAndCheckTuple(i_section, tuple);
+ if( errhdl ) { break; }
+ TRACUCOMP( g_trac_runtime, "PROCESSOR_DUMP_AREA_TBL tuple=%p", tuple );
+
+ //Note - there is no header for the Processor dump area table
+ //return the total allocated size since it is empty at first
+ o_dataSize = tuple->hdatAllocSize * tuple->hdatAllocCnt;
+ record_size = tuple->hdatAllocSize;
+ errhdl = getSpiraTupleVA(tuple, o_dataAddr);
+ if( errhdl ) { break; }
+ }
else if( RUNTIME::HRMOR_STASH == i_section )
{
//Look up the tuple that this section is located in
@@ -1236,6 +1252,42 @@ errlHndl_t hdatService::findSpira( void )
return errhdl;
}
+errlHndl_t hdatService::updateHostProcDumpActual( SectionId i_section,
+ uint32_t threadRegSize,
+ uint8_t threadRegVersion,
+ uint64_t capArrayAddr,
+ uint32_t capArraySize)
+{
+ errlHndl_t errhdl = nullptr;
+ TRACFCOMP( g_trac_runtime,
+ "RUNTIME::updateHostProcDumpActual ( i_section=%d )", i_section);
+
+ do
+ {
+ uint64_t l_hostDataAddr = 0;
+ uint64_t l_hostDataSize = 0;
+ DUMP::procDumpAreaEntry *procDumpTable = nullptr;
+
+ // Get proc dump area ntuple address
+ errhdl = getHostDataSection(i_section, 0,
+ l_hostDataAddr, l_hostDataSize);
+ if (errhdl)
+ {
+ TRACFCOMP( g_trac_runtime, "updateHostProcDumpActual> Failed to "
+ "get host data section (i_section=%d )", i_section);
+ break;
+ }
+
+ procDumpTable = reinterpret_cast<DUMP::procDumpAreaEntry *>(l_hostDataAddr);
+ procDumpTable->threadRegSize = threadRegSize;
+ procDumpTable->threadRegVersion = threadRegVersion;
+ procDumpTable->capArrayAddr = capArrayAddr;
+ procDumpTable->capArraySize = capArraySize;
+ } while(0);
+
+ return errhdl;
+}
+
errlHndl_t hdatService::updateHostDataSectionActual( SectionId i_section,
uint16_t i_count )
{
@@ -1550,6 +1602,10 @@ errlHndl_t hdatService::getAndCheckTuple(const SectionId i_section,
l_spiraH = SPIRAH_MS_DUMP_RSLT_TBL;
l_spiraL = SPIRAL_MS_DUMP_RSLT_TBL;
break;
+ case RUNTIME::PROC_DUMP_AREA_TBL:
+ l_spiraH = SPIRAH_PROC_DUMP_TBL;
+ l_spiraL = SPIRAL_INVALID;
+ break;
case RUNTIME::HSVC_SYSTEM_DATA:
case RUNTIME::HSVC_NODE_DATA:
l_spiraS = SPIRAS_HSVC_DATA;
@@ -1773,6 +1829,17 @@ errlHndl_t writeActualCount( SectionId i_id )
return Singleton<hdatService>::instance().writeActualCount(i_id);
}
+errlHndl_t updateHostProcDumpActual( SectionId i_section,
+ uint32_t threadRegSize,
+ uint8_t threadRegVersion,
+ uint64_t capArrayAddr,
+ uint32_t capArraySize)
+{
+ return Singleton<hdatService>::instance().updateHostProcDumpActual(i_section,
+ threadRegSize, threadRegVersion,
+ capArrayAddr, capArraySize);
+}
+
void useRelocatedPayloadAddr(bool val)
{
return Singleton<hdatService>::instance().useRelocatedPayloadAddr(val);
diff --git a/src/usr/runtime/hdatservice.H b/src/usr/runtime/hdatservice.H
index 44ff12a58..1ea48d8f2 100644
--- a/src/usr/runtime/hdatservice.H
+++ b/src/usr/runtime/hdatservice.H
@@ -129,6 +129,23 @@ namespace RUNTIME
uint16_t i_count );
/**
+ * @brief Update Processor Dump area section.
+ *
+ * @param[in] i_section Chunk of data to find
+ * @param[in] threadRegSize Size of each thread register data
+ * @param[in] threadRegVersion Register data format version
+ * @param[in] capArrayAddr Destination memory address
+ * @param[in] capArraySize Destination memory size
+ *
+ * @return errlHndl_t NULL on success
+ */
+ errlHndl_t updateHostProcDumpActual( SectionId i_section,
+ uint32_t threadRegSize,
+ uint8_t threadRegVersion,
+ uint64_t capArrayAddr,
+ uint32_t capArraySize);
+
+ /**
* @brief Retrieve and log FFDC data relevant to a given section of
* host data memory
*
diff --git a/src/usr/runtime/hdatstructs.H b/src/usr/runtime/hdatstructs.H
index 2f05a2a70..94f4c1b71 100644
--- a/src/usr/runtime/hdatstructs.H
+++ b/src/usr/runtime/hdatstructs.H
@@ -121,7 +121,8 @@ enum hdatSpiraHDataAreas
SPIRAH_MS_DUMP_SRC_TBL = 3, // mainstore dump source table
SPIRAH_MS_DUMP_DST_TBL = 4, // mainstore dump destination table
SPIRAH_MS_DUMP_RSLT_TBL = 5, // mainstore dump results table
- SPIRAH_LAST = 5
+ SPIRAH_PROC_DUMP_TBL = 6, // Proc reg dump area table
+ SPIRAH_LAST = 6
};
/** @enum hdatSpiraSDataAreas
OpenPOWER on IntegriCloud