diff options
author | Srikantha Meesala <srikantha@in.ibm.com> | 2019-03-18 05:30:05 -0500 |
---|---|---|
committer | RAJA DAS <rajadas2@in.ibm.com> | 2019-06-26 23:10:10 -0500 |
commit | 959bcf49938d2a862ec18da97b4b9144061dc16d (patch) | |
tree | 7b99f11a768db527beb473cf188126a4d1ba79bd /src/sbefw | |
parent | 94df8bea72bdeaa19fbc8be94b92dd87c8cdbfc1 (diff) | |
download | talos-sbe-959bcf49938d2a862ec18da97b4b9144061dc16d.tar.gz talos-sbe-959bcf49938d2a862ec18da97b4b9144061dc16d.zip |
Support Collect DUMP in ZZ-L system
Update the sbeCollectDumpMpipl() to return response
data in the case of success
Change-Id: Ifeafb05b3e3ba39eaf868b88bb926e7836ad5203
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/73533
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: MURULIDHAR NATARAJU <murulidhar@in.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
Diffstat (limited to 'src/sbefw')
-rw-r--r-- | src/sbefw/app/power/chipop_table.C | 9 | ||||
-rw-r--r-- | src/sbefw/app/power/sbecmdgeneric.C | 3 | ||||
-rw-r--r-- | src/sbefw/app/power/sbecmdmpipl.C | 49 | ||||
-rw-r--r-- | src/sbefw/app/power/sbecmdmpipl.H | 12 | ||||
-rw-r--r-- | src/sbefw/core/sbe_sp_intf.H | 2 |
5 files changed, 71 insertions, 4 deletions
diff --git a/src/sbefw/app/power/chipop_table.C b/src/sbefw/app/power/chipop_table.C index 3cba24e8..37c6daae 100644 --- a/src/sbefw/app/power/chipop_table.C +++ b/src/sbefw/app/power/chipop_table.C @@ -202,7 +202,14 @@ CMD_ARR( {sbeStopClocks, SBE_CMD_MPIPL_STOPCLOCKS, HARDWARE_FENCED_STATE|SBE_FENCE_AT_DUMPING, - } + }, + + {sbeCollectDumpMpipl, + SBE_CMD_MPIPL_COLLECT_DUMP, + HARDWARE_FENCED_STATE|SBE_FENCE_AT_ISTEP| + SBE_FENCE_AT_RUNTIME|SBE_FENCE_AT_DUMPING, + // Only allowed State is MPIPL + } ) ////////////////////////////////////////////////////////////// diff --git a/src/sbefw/app/power/sbecmdgeneric.C b/src/sbefw/app/power/sbecmdgeneric.C index c91ceec4..81b01af3 100644 --- a/src/sbefw/app/power/sbecmdgeneric.C +++ b/src/sbefw/app/power/sbecmdgeneric.C @@ -154,7 +154,8 @@ void updateFifoCapabilities(uint32_t * capability) capability[MPIPL_CAPABILITY_START_IDX] = ENTER_MPIPL_SUPPORTED | CONTINUE_MPIPL_SUPPORTED | - STOP_CLOCKS_MPIPL_SUPPORTED; + STOP_CLOCKS_MPIPL_SUPPORTED | + MPIPL_COLLECT_DUMP_SUPPORTED; capability[MPIPL_CAPABILITY_START_IDX+1] = RESERVED_A9_CAPABILITIES; diff --git a/src/sbefw/app/power/sbecmdmpipl.C b/src/sbefw/app/power/sbecmdmpipl.C index d45803a3..2244b7e0 100644 --- a/src/sbefw/app/power/sbecmdmpipl.C +++ b/src/sbefw/app/power/sbecmdmpipl.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -38,6 +38,7 @@ #include "sberegaccess.H" #include "sbefapiutil.H" #include "sbecmdiplcontrol.H" +#include "sbearchregdump.H" #include "p9_hcd_core_stopclocks.H" #include "p9_hcd_cache_stopclocks.H" @@ -280,6 +281,52 @@ uint32_t sbeContinueMpipl(uint8_t *i_pArg) #undef SBE_FUNC } +/////////////////////////////////////////////////////////////////////// +// @brief sbeCollectDumpMpipl: Sbe Collect Dump in MPIPL function +// +// @return RC from the underlying FIFO utility +/////////////////////////////////////////////////////////////////////// +uint32_t sbeCollectDumpMpipl(uint8_t *i_pArg) +{ + #define SBE_FUNC " sbeCollectDumpMpipl " + SBE_ENTER(SBE_FUNC); + uint32_t rc = SBE_SEC_OPERATION_SUCCESSFUL; + ReturnCode fapiRc = FAPI2_RC_SUCCESS; + uint32_t len = 0; + + sbeResponseFfdc_t ffdc; + sbeRespGenHdr_t respHdr; + respHdr.init(); + do + { + // Dequeue the EOT entry as no more data is expected. + rc = sbeUpFifoDeq_mult (len, NULL); + CHECK_SBE_RC_AND_BREAK_IF_NOT_SUCCESS(rc); + + // Collect Architected Register Dump + fapiRc = sbeDumpArchRegs(); + if( fapiRc != FAPI2_RC_SUCCESS ) + { + SBE_ERROR(SBE_FUNC "Failed sbeDumpArchRegs while sbeCollectDumpMpipl in progress"); + respHdr.setStatus( SBE_PRI_GENERIC_EXECUTION_FAILURE, + SBE_SEC_GENERIC_FAILURE_IN_EXECUTION); + ffdc.setRc(fapiRc); + break; + } + }while(0); + // Create the Response to caller + // If there was a FIFO error, will skip sending the response, + // instead give the control back to the command processor thread + if(SBE_SEC_OPERATION_SUCCESSFUL == rc) + { + rc = sbeDsSendRespHdr( respHdr, &ffdc); + } + + SBE_EXIT(SBE_FUNC); + return rc; + #undef SBE_FUNC +} + #ifdef _S0_ /////////////////////////////////////////////////////////////////////// // @brief stopClockS0 Sbe StopClock S0 interface function diff --git a/src/sbefw/app/power/sbecmdmpipl.H b/src/sbefw/app/power/sbecmdmpipl.H index adda51eb..cfb3b076 100644 --- a/src/sbefw/app/power/sbecmdmpipl.H +++ b/src/sbefw/app/power/sbecmdmpipl.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -54,6 +54,16 @@ uint32_t sbeEnterMpipl(uint8_t *i_pArg); uint32_t sbeContinueMpipl(uint8_t *i_pArg); /** + * @brief Handles Sbe Collect Dump chip-op in the MPIPL flow for OPAL + * based systems (0xA904) + * + * @param[in] i_pArg Buffer to be passed to the function (not used as of now) + * + * @return Rc from the FIFO access utility + */ +uint32_t sbeCollectDumpMpipl(uint8_t *i_pArg); + +/** * @brief Handles Sbe Stop Clocks chip-op (0xA903) * * @param[in] i_pArg Buffer to be passed to the function (not used as of now) diff --git a/src/sbefw/core/sbe_sp_intf.H b/src/sbefw/core/sbe_sp_intf.H index 3542823c..e2d21718 100644 --- a/src/sbefw/core/sbe_sp_intf.H +++ b/src/sbefw/core/sbe_sp_intf.H @@ -168,6 +168,7 @@ enum sbeMpIplCommands SBE_CMD_MPIPL_ENTER = 0x01, /* Enter MPIPL */ SBE_CMD_MPIPL_CONTINUE = 0x02, /* Continue MPIPL */ SBE_CMD_MPIPL_STOPCLOCKS = 0x03, /* Stop Clocks */ + SBE_CMD_MPIPL_COLLECT_DUMP = 0x04, /* Collect Dump */ }; /** @@ -323,6 +324,7 @@ enum ENTER_MPIPL_SUPPORTED = 0xA9000001, CONTINUE_MPIPL_SUPPORTED = 0xA9000002, STOP_CLOCKS_MPIPL_SUPPORTED = 0xA9000004, + MPIPL_COLLECT_DUMP_SUPPORTED = 0xA9000008, RESERVED_A9_CAPABILITIES = 0xA9800000, }; |