diff options
author | Raja Das <rajadas2@in.ibm.com> | 2018-05-10 04:22:56 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-07-20 12:55:10 -0500 |
commit | 529bf938bf0ee224f01ed8a2c28fe74729042fd1 (patch) | |
tree | 8dd13d72d54c75abd8cd9ee2f937e22206a616ad /src/usr/isteps/istep14/call_host_mpipl_service.C | |
parent | 7f37a0717a296178892b541db5defe88e3413817 (diff) | |
download | talos-hostboot-529bf938bf0ee224f01ed8a2c28fe74729042fd1.tar.gz talos-hostboot-529bf938bf0ee224f01ed8a2c28fe74729042fd1.zip |
Use Attr to Save/Fetch MDRT Count
MDRT count is saved out into an attribute in istep14 and the same
is fetched out in istep21 for Phyp as well as Opal(ZZ-L) system.
Added libruntime.so to istep14, Since Dump relies upon runtime module
Moved 'useRelocatedPayloadAddr' setting to call_host_mpipl_service(),
So that we have everything set before calling doDumpCollect()
Change-Id: I5d30135d86a1477a68509aaff0516efb4d620410
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/58636
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-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>
Diffstat (limited to 'src/usr/isteps/istep14/call_host_mpipl_service.C')
-rw-r--r-- | src/usr/isteps/istep14/call_host_mpipl_service.C | 131 |
1 files changed, 57 insertions, 74 deletions
diff --git a/src/usr/isteps/istep14/call_host_mpipl_service.C b/src/usr/isteps/istep14/call_host_mpipl_service.C index 7eb7395fb..7367e8e4b 100644 --- a/src/usr/isteps/istep14/call_host_mpipl_service.C +++ b/src/usr/isteps/istep14/call_host_mpipl_service.C @@ -35,6 +35,8 @@ #include <targeting/common/utilFilter.H> #include <targeting/targplatutil.H> +#include <runtime/runtime.H> + #include <p9_mpipl_chip_cleanup.H> #include <fapi2/plat_hwp_invoker.H> @@ -150,99 +152,80 @@ void* call_host_mpipl_service (void *io_pArgs) errlHndl_t l_errMsg = NULL; - // Dump relies upon the runtime module - // Not declaring in istep DEP list cause if we load it - // we want it to stay loaded - if ( !VFS::module_is_loaded( "libruntime.so" ) ) - { - l_err = VFS::module_load( "libruntime.so" ); - - if ( l_err ) - { - // load module returned with errl set - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Could not load runtime module" ); - } - } + // Use relocated payload base to get MDST, MDDT, MDRT details + RUNTIME::useRelocatedPayloadAddr(true); - // If dump module successfully loaded then continue with DumpCollect - // and messaging - if (!l_err) + do { - do - { - // send the start message - l_errMsg = DUMP::sendMboxMsg(DUMP::DUMP_MSG_START_MSG_TYPE); - - // If error, commit and send error message. - if (l_errMsg) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR : returned from DUMP::sendMboxMsg - dump start" ); - - errlCommit( l_errMsg, HWPF_COMP_ID ); + // send the start message + l_errMsg = DUMP::sendMboxMsg(DUMP::DUMP_MSG_START_MSG_TYPE); - // don't break in this case because we not want to fail - // the istep on the dump collect so we will continue - // after we log the errhandle that we can't send a - // message. - } - - // Call the dump collect - l_err = DUMP::doDumpCollect(); - - // Got a Dump Collect error.. Commit the dumpCollect - // errorlog and then send an dump Error mbox message - // and FSP will decide what to do. - // We do not want dump Collect failures to terminate the - // istep. - if (l_err) - { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR : returned from DUMP::HbDumpCopySrcToDest"); - - break; - } - - } while(0); - - DUMP::DUMP_MSG_TYPE msgType = DUMP::DUMP_MSG_END_MSG_TYPE; - - // Send dumpCollect success trace - if (!l_err) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : doDumpCollect" ); - } - // got an error that we need to send a ERROR message to FSP - // and commit the errorlog from dumpCollect. - else + // If error, commit and send error message. + if (l_errMsg) { - msgType = DUMP::DUMP_MSG_ERROR_MSG_TYPE; + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : returned from DUMP::sendMboxMsg - dump start" ); - // Commit the dumpCollect errorlog from above as - // we dont want dump collect to kill the istep - errlCommit( l_err, HWPF_COMP_ID ); + errlCommit( l_errMsg, HWPF_COMP_ID ); + // don't break in this case because we not want to fail + // the istep on the dump collect so we will continue + // after we log the errhandle that we can't send a + // message. } - // Send an Error mbox msg to FSP (either end or error) - l_errMsg = DUMP::sendMboxMsg(msgType); + // Call the dump collect + l_err = DUMP::doDumpCollect(); - if (l_errMsg) + // Got a Dump Collect error.. Commit the dumpCollect + // errorlog and then send an dump Error mbox message + // and FSP will decide what to do. + // We do not want dump Collect failures to terminate the + // istep. + if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR : returned from DUMP::sendMboxMsg" ); + "ERROR : returned from DUMP::HbDumpCopySrcToDest"); - errlCommit( l_errMsg, HWPF_COMP_ID ); + break; } + } while(0); + + DUMP::DUMP_MSG_TYPE msgType = DUMP::DUMP_MSG_END_MSG_TYPE; + + // Send dumpCollect success trace + if (!l_err) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : doDumpCollect" ); } + // got an error that we need to send a ERROR message to FSP + // and commit the errorlog from dumpCollect. else { + msgType = DUMP::DUMP_MSG_ERROR_MSG_TYPE; + + // Commit the dumpCollect errorlog from above as + // we dont want dump collect to kill the istep + errlCommit( l_err, HWPF_COMP_ID ); + + } + + // Send an Error mbox msg to FSP (either end or error) + l_errMsg = DUMP::sendMboxMsg(msgType); + + if (l_errMsg) + { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR : returned from VFS::module_load (libruntime.so)"); + "ERROR : returned from DUMP::sendMboxMsg" ); + + errlCommit( l_errMsg, HWPF_COMP_ID ); } + + RUNTIME::useRelocatedPayloadAddr(false); + // Wipe out our cache of the NACA/SPIRA pointers + RUNTIME::rediscover_hdat(); } // If got an error in the procedure or collection of the dump kill the |