From d99b1eddcac8a7f43a0d087921fbb83be450f347 Mon Sep 17 00:00:00 2001 From: Dean Sanner Date: Wed, 4 Dec 2019 12:34:54 -0600 Subject: Add SBE Arch dump area for both OPAL & PHYP Currently Hostboot only sets up the architected dump capture on the SBE for OPAL based systems. This commit adds the setup to PHYP based systems as well. Change-Id: I96271a57f7c15c571495ed56ea72dbeeebab8d94 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/88095 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: MURULIDHAR NATARAJU Reviewed-by: Daniel M Crowell --- src/usr/isteps/istep21/call_host_runtime_setup.C | 46 ++++++++++++++---------- 1 file changed, 28 insertions(+), 18 deletions(-) (limited to 'src/usr/isteps') diff --git a/src/usr/isteps/istep21/call_host_runtime_setup.C b/src/usr/isteps/istep21/call_host_runtime_setup.C index 5367d65bf..db0fc2d5f 100644 --- a/src/usr/isteps/istep21/call_host_runtime_setup.C +++ b/src/usr/isteps/istep21/call_host_runtime_setup.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2019 */ +/* Contributors Listed Below - COPYRIGHT 2015,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -70,6 +70,9 @@ #include #endif +#include + + using namespace ERRORLOG; using namespace ISTEP; using namespace ISTEP_ERROR; @@ -864,6 +867,15 @@ void* call_host_runtime_setup (void *io_pArgs) TargetService& l_targetService = targetService(); Target* l_sys = nullptr; l_targetService.getTopLevelTarget(l_sys); + + // Default captured data to 0s -- MPIPL if check fills in if + // valid + uint32_t threadRegSize = sizeof(DUMP::hostArchRegDataHdr)+ + (95 * sizeof(DUMP::hostArchRegDataEntry)); + uint8_t threadRegFormat = REG_DUMP_SBE_HB_STRUCT_VER; + uint64_t capThreadArrayAddr = 0; + uint64_t capThreadArraySize = 0; + if(l_sys->getAttr()) { uint32_t l_mdrtCount = @@ -875,25 +887,23 @@ void* call_host_runtime_setup (void *io_pArgs) l_mdrtCount); } - // Update PDA Table entries - if ( !INITSERVICE::spBaseServicesEnabled() ) - { - uint32_t threadRegSize = - l_sys->getAttr(); - uint8_t threadRegFormat = - l_sys->getAttr(); - uint64_t capThreadArrayAddr = - l_sys->getAttr(); - uint64_t capThreadArraySize = - l_sys->getAttr(); - - // Ignore return value - RUNTIME::updateHostProcDumpActual( RUNTIME::PROC_DUMP_AREA_TBL, - threadRegSize, threadRegFormat, - capThreadArrayAddr, capThreadArraySize); - } + + threadRegSize = + l_sys->getAttr(); + threadRegFormat = + l_sys->getAttr(); + capThreadArrayAddr = + l_sys->getAttr(); + capThreadArraySize = + l_sys->getAttr(); } + // Ignore return value + RUNTIME::updateHostProcDumpActual( RUNTIME::PROC_DUMP_AREA_TBL, + threadRegSize, threadRegFormat, + capThreadArrayAddr, capThreadArraySize); + + //Update the MDRT value (for MS Dump) l_err = RUNTIME::writeActualCount(RUNTIME::MS_DUMP_RESULTS_TBL); if(l_err != NULL) -- cgit v1.2.3