diff options
author | Missy Connell <missyc@us.ibm.com> | 2013-02-20 16:30:51 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-04-09 14:33:13 -0500 |
commit | 63b344dd0fcbd2318a8fd46978970a08f3eb9ca9 (patch) | |
tree | ac68337341709cee0a5ccc54936c0557b2238170 /src/usr/hwpf/hwp/dram_initialization | |
parent | 84d81bdda49213dcde23c604a2d6ab7ace90f1d6 (diff) | |
download | talos-hostboot-63b344dd0fcbd2318a8fd46978970a08f3eb9ca9.tar.gz talos-hostboot-63b344dd0fcbd2318a8fd46978970a08f3eb9ca9.zip |
Call Dump Collect from call_host_mpipl_service
Change-Id: I4c449177618f00d64b90b81403144649d0df756f
RTC:46996
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3339
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/dram_initialization')
-rw-r--r-- | src/usr/hwpf/hwp/dram_initialization/dram_initialization.C | 171 |
1 files changed, 146 insertions, 25 deletions
diff --git a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C index 3ae989ddc..c0eae1734 100644 --- a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C +++ b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C @@ -75,7 +75,8 @@ #include <vpd/spdenums.H> #include <sys/time.h> #include <sys/mm.h> - +#include <dump/dumpif.H> +#include <vfs/vfs.H> namespace DRAM_INITIALIZATION { @@ -706,39 +707,46 @@ void* call_proc_exit_cache_contained( void *io_pArgs ) "ERROR : call_proc_exit_cache_contained, errorlog PLID=0x%x", l_errl->plid() ); } + // no errors so extend VMM. else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : call_proc_exit_cache_contained" ); - } - // Call the function to extend VMM to 32MEG - int rc = mm_extend(); - if (rc!=0) - { - /*@ - * @errortype - * @moduleid fapi::MOD_EXIT_CACHE_CONTAINED - * @reasoncode fapi::RC_MM_EXTEND_FAILED - * @userdata1 rc from mm_extend - * @userdata2 <UNUSED> - * - * @devdesc Failure extending memory to 32MEG after - * exiting cache contained mode. - */ - l_errl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, - fapi::MOD_EXIT_CACHE_CONTAINED, - fapi::RC_MM_EXTEND_FAILED, - rc, - 0); + // Call the function to extend VMM to 32MEG + int rc = mm_extend(); - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR : call_proc_exit_cache_contained - extendVMM, rc=0x%x", - rc ); - } + if (rc!=0) + { + /*@ + * @errortype + * @moduleid fapi::MOD_EXIT_CACHE_CONTAINED + * @reasoncode fapi::RC_MM_EXTEND_FAILED + * @userdata1 rc from mm_extend + * @userdata2 <UNUSED> + * + * @devdesc Failure extending memory to 32MEG after + * exiting cache contained mode. + */ + l_errl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE, + fapi::MOD_EXIT_CACHE_CONTAINED, + fapi::RC_MM_EXTEND_FAILED, + rc, + 0); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : call_proc_exit_cache_contained - extendVMM, rc=0x%x", + rc ); + } + else + { + // trace out the extend VMM was successful + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : call_proc_exit_cache_contained - extendVMM"); + } + } if ( l_errl ) { /*@ @@ -845,6 +853,117 @@ void* call_host_mpipl_service( void *io_pArgs ) } } + // No error on the procedure.. proceed to collect the dump. + if (!l_err) + { + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : proc_mpipl_ex_cleanup" ); + + + // currently according to Adriana, the dump calls should only cause an + // istep failure when the dump collect portion of this step fails.. We + // will not fail the istep on any mbox message failures. instead we will + // simply commit the errorlog and continue. + + errlHndl_t l_errMsg = NULL; + + // Need to load the dump module + l_err = VFS::module_load( "libdump.so" ); + + // If dump module successfull loaded then continue with DumpCollect and + // messaging + if (!l_err) + { + 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 ); + + // 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 + { + 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 DUMP::sendMboxMsg" ); + + errlCommit( l_errMsg, HWPF_COMP_ID ); + } + + + // Need to unload the dump module regardless of whether we have + // an error or not. + errlHndl_t l_errUnLoad = VFS::module_unload( "libdump.so" ); + + if (l_errUnLoad) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : returned from VFS::module_unload (libdump.so)" ); + + errlCommit( l_errUnLoad, HWPF_COMP_ID ); + } + + } + else + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : returned from VFS::module_load (libdump.so)" ); + } + + } + + // If got an error in the procedure or collection of the dump kill the istep if( l_err ) { @@ -871,6 +990,8 @@ void* call_host_mpipl_service( void *io_pArgs ) errlCommit( l_err, HWPF_COMP_ID ); } + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_mpipl_service exit" ); |