diff options
| author | spashabk-in <shakeebbk@in.ibm.com> | 2018-01-10 04:31:50 -0600 |
|---|---|---|
| committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2018-02-14 00:12:43 -0500 |
| commit | fb9f9e8bc9402a3e03e6731dd824d3887d196ebd (patch) | |
| tree | 8cbd9f13f1e68ee58d36886aa706919fab14e279 /src/sbefw/core | |
| parent | d770b5600d9177a06108ddf3ca2827d55c89b153 (diff) | |
| download | talos-sbe-fb9f9e8bc9402a3e03e6731dd824d3887d196ebd.tar.gz talos-sbe-fb9f9e8bc9402a3e03e6731dd824d3887d196ebd.zip | |
Checkstop detection during IPL SBE steps
Check for system checkstop on failure of IPL SBE steps
Change-Id: I8b10e2d21a2cf3ea0c53974cd4cc98fa88bb4912
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51708
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/sbefw/core')
| -rw-r--r-- | src/sbefw/core/ipl.C | 31 | ||||
| -rw-r--r-- | src/sbefw/core/ipl.H | 9 | ||||
| -rw-r--r-- | src/sbefw/core/sbe_sp_intf.H | 1 |
3 files changed, 36 insertions, 5 deletions
diff --git a/src/sbefw/core/ipl.C b/src/sbefw/core/ipl.C index 02e2b2f3..d817be60 100644 --- a/src/sbefw/core/ipl.C +++ b/src/sbefw/core/ipl.C @@ -28,6 +28,9 @@ #include "sbeFFDC.H" #include "ipl.H" +#include "sbeglobals.H" + +#include "p9n2_perv_scom_addresses.H" using namespace fapi2; @@ -40,12 +43,26 @@ uint64_t G_ring_save[8] = {0, 0, 0, 0, 0, 0, 0, 0}; // SBE FFDC. fapi2::ReturnCode g_iplFailRc = FAPI2_RC_SUCCESS; +bool isSystemCheckstop() +{ + bool checkstop = false; + fapi2::buffer<uint64_t> attnReg = 0; + ReturnCode fapiRc = FAPI2_RC_SUCCESS; + plat_target_handle_t hndl; + fapiRc = getscom_abs_wrap(&hndl, + P9N2_PERV_ATTN_INTERRUPT_REG, + attnReg.pointer()); + if( fapiRc == FAPI2_RC_SUCCESS ) + { + checkstop = attnReg.getBit<2>(); + } + return checkstop; +} + //---------------------------------------------------------------------------- // @note This is the responsibilty of caller to verify major/minor // number before calling this function -// @TODO via RTC 129077. -// This function should check for system checkstop as well. ReturnCode sbeExecuteIstep (const uint8_t i_major, const uint8_t i_minor) { #define SBE_FUNC "sbeExecuteIstep " @@ -78,7 +95,7 @@ ReturnCode sbeExecuteIstep (const uint8_t i_major, const uint8_t i_minor) else { (void)SbeRegAccess::theSbeRegAccess().updateSbeStep(i_major, i_minor); - } + } return rc; #undef SBE_FUNC @@ -106,14 +123,18 @@ void sbeDoContinuousIpl() { rc = istepMap->istepWrapper(istepMap->istepHwp); } - if(rc != FAPI2_RC_SUCCESS) + bool checkstop = isSystemCheckstop(); + if((rc != FAPI2_RC_SUCCESS) || checkstop ) { SBE_ERROR(SBE_FUNC"Failed istep execution in plck mode: " "Major: %d, Minor: %d", istepTableEntry->istepMajorNum, step); + uint32_t secRc = checkstop ? SBE_SEC_SYSTEM_CHECKSTOP: + SBE_SEC_GENERIC_FAILURE_IN_EXECUTION; + captureAsyncFFDC(SBE_PRI_GENERIC_EXECUTION_FAILURE, - SBE_SEC_GENERIC_FAILURE_IN_EXECUTION); + secRc); // exit outer loop as well entry = istepTable.len; break; diff --git a/src/sbefw/core/ipl.H b/src/sbefw/core/ipl.H index 3a2b1395..f56c3dc9 100644 --- a/src/sbefw/core/ipl.H +++ b/src/sbefw/core/ipl.H @@ -6,6 +6,7 @@ /* OpenPOWER sbe Project */ /* */ /* Contributors Listed Below - COPYRIGHT 2017,2018 */ +/* [+] International Business Machines Corp. */ /* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ @@ -48,6 +49,14 @@ fapi2::ReturnCode sbeExecuteIstep (uint8_t i_major, uint8_t i_minor); */ void sbeDoContinuousIpl(); +/* + * @brief Check for the system checkstop based on + * P9N2_PERV_ATTN_INTERRUPT_REG bit 3 + * + * @return if the system is checkstop or not + */ +bool isSystemCheckstop(); + using voidfuncptr_t = void (*)(void); using iStep_t = fapi2::ReturnCode (*)( voidfuncptr_t ); diff --git a/src/sbefw/core/sbe_sp_intf.H b/src/sbefw/core/sbe_sp_intf.H index 45c293d7..4b6c7704 100644 --- a/src/sbefw/core/sbe_sp_intf.H +++ b/src/sbefw/core/sbe_sp_intf.H @@ -220,6 +220,7 @@ enum sbeSecondaryResponse SBE_SEC_INVALID_PARAMS = 0x19, SBE_SEC_BLACKLISTED_CHIPOP_ACCESS = 0x20, SBE_SEC_DMT_TIMEOUT = 0x21, + SBE_SEC_SYSTEM_CHECKSTOP = 0x22, }; /** |

