diff options
author | Brian Bakke <bbakke@us.ibm.com> | 2017-11-17 10:51:24 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-11-30 09:33:28 -0500 |
commit | 3a88f18bc7386abaaceedca9b327806d85734f67 (patch) | |
tree | c4351bac24ee26d90c977a0bd1d766217f8817e2 /src/usr/isteps/istep21 | |
parent | c5c12e6e0ae9160e15f7ff07d123cb9033103947 (diff) | |
download | blackbird-hostboot-3a88f18bc7386abaaceedca9b327806d85734f67.tar.gz blackbird-hostboot-3a88f18bc7386abaaceedca9b327806d85734f67.zip |
Enable ATTN prior to OPAL handoff
Change-Id: Iadfded90c09b149948348ee462ab34f9c2431982
RTC: 182134
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49865
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/isteps/istep21')
-rw-r--r-- | src/usr/isteps/istep21/call_host_start_payload.C | 51 | ||||
-rw-r--r-- | src/usr/isteps/istep21/makefile | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/src/usr/isteps/istep21/call_host_start_payload.C b/src/usr/isteps/istep21/call_host_start_payload.C index 251983324..772011864 100644 --- a/src/usr/isteps/istep21/call_host_start_payload.C +++ b/src/usr/isteps/istep21/call_host_start_payload.C @@ -50,6 +50,7 @@ #include <fapi2/target.H> #include <fapi2/plat_hwp_invoker.H> #include <p9_cpu_special_wakeup.H> +#include <p9n2_quad_scom_addresses_fld.H> #include <ipmi/ipmiwatchdog.H> #include <config.h> #include <errno.h> @@ -466,6 +467,56 @@ errlHndl_t callShutdown ( uint64_t i_masterInstance, } } + if ( is_sapphire_load() ) + { + // opal load, Set the ATTN enable bit in the HID register + uint64_t l_enblAttnMask = + 0x8000000000000000ull >> P9N2_C_HID_EN_ATTN; + + uint64_t l_curHidVal = cpu_spr_value( CPU_SPR_HID ); + uint64_t l_newHidVal = l_curHidVal | l_enblAttnMask; + + uint64_t rc = cpu_spr_set( CPU_SPR_HID, l_newHidVal); + + if ( rc == false ) + { + // Error writing the SPR or + // SPR is unsupported/restricted from being written + // We will create an error to be passed back. + // This will cause the istep to fail. + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + ERR_MRK"call_host_start_payload()::" + "callShutdown() -" + " Write of HID SPR failed" ); + + /*@ + * @errortype + * @reasoncode RC_FAILED_WRITE_SPR + * @severity ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM + * @moduleid MOD_START_PAYLOAD_CALL_SHUTDOWN + * @userdata1 current value of HID + * @userdata2 write value attempted to HID + * @devdesc Write of HID SPR failed + * @custdesc A problem occurred during the IPL + * of the system. + */ + err = + new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_CRITICAL_SYS_TERM, + MOD_START_PAYLOAD_CALL_SHUTDOWN, + RC_FAILED_WRITE_SPR, + l_curHidVal, + l_newHidVal ); + + err->collectTrace(ISTEP_COMP_NAME); + + break; + } + } // end opal load + else + { + // PHYP load, do not enable ATTN + } + // do the shutdown. TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "callShutdown finished, shutdown = 0x%x.", diff --git a/src/usr/isteps/istep21/makefile b/src/usr/isteps/istep21/makefile index 25ff7be19..c905b60ae 100644 --- a/src/usr/isteps/istep21/makefile +++ b/src/usr/isteps/istep21/makefile @@ -25,6 +25,7 @@ ROOTPATH = ../../../.. MODULE = istep21 +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/initfiles/ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc/ |