diff options
author | Christian Geddes <crgeddes@us.ibm.com> | 2018-01-29 14:49:19 -0600 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2018-02-17 16:26:17 -0500 |
commit | b542fd6392999e7d521c5dff5a2a2add056db984 (patch) | |
tree | 9e3c9ff1d9c7e902afd65a3cfde7676da795db5f /src/usr/scom | |
parent | e7c2ef327998d6ab868776cdc2c2bb7592b8c17e (diff) | |
download | talos-hostboot-b542fd6392999e7d521c5dff5a2a2add056db984.tar.gz talos-hostboot-b542fd6392999e7d521c5dff5a2a2add056db984.zip |
Enable platSpecialWakeup during IPL time and add support
Previously we only supported platSpecialWakeup at runtime because
we were not worried about needed special wakeup as the cores would
not go into stop state during the IPL. However, now PM code is expecting
bits to be set by the p9 special wakeup hwp so we need to call it during
the IPL. This code makes the handleSpecialWakeup.C/H files compatible
with IPL time build environment and enables the call on the IPL time path
CQ: SW415949
Change-Id: I94cca8a84946bea464b21cb95cdbbb075f766c3d
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52858
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>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/usr/scom')
-rw-r--r-- | src/usr/scom/handleSpecialWakeup.C (renamed from src/usr/scom/runtime/handleSpecialWakeup.C) | 59 | ||||
-rw-r--r-- | src/usr/scom/handleSpecialWakeup.H (renamed from src/usr/scom/runtime/handleSpecialWakeup.H) | 4 | ||||
-rw-r--r-- | src/usr/scom/runtime/makefile | 9 | ||||
-rw-r--r-- | src/usr/scom/scom.mk | 12 |
4 files changed, 54 insertions, 30 deletions
diff --git a/src/usr/scom/runtime/handleSpecialWakeup.C b/src/usr/scom/handleSpecialWakeup.C index 0827c7054..9d4e9f233 100644 --- a/src/usr/scom/runtime/handleSpecialWakeup.C +++ b/src/usr/scom/handleSpecialWakeup.C @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/scom/runtime/handleSpecialWakeup.C $ */ +/* $Source: src/usr/scom/handleSpecialWakeup.C $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -35,8 +35,11 @@ #include <scom/scomreasoncodes.H> #include <initservice/initserviceif.H> + +#ifdef __HOSTBOOT_RUNTIME #include <runtime/rt_targeting.H> #include <runtime/interface.h> +#endif // __HOSTBOOT_RUNTIME #include <fapi2/plat_hwp_invoker.H> #include <p9_cpu_special_wakeup.H> @@ -60,9 +63,11 @@ using namespace SCOM; errlHndl_t handleSpecialWakeup(TARGETING::Target* i_target, bool i_enable) { errlHndl_t l_errl = NULL; + fapi2::ReturnCode l_rc; TARGETING::TYPE l_type = i_target->getAttr<TARGETING::ATTR_TYPE>(); +#ifdef __HOSTBOOT_RUNTIME // FSP if(INITSERVICE::spBaseServicesEnabled()) { @@ -171,6 +176,7 @@ errlHndl_t handleSpecialWakeup(TARGETING::Target* i_target, bool i_enable) // BMC else { +#endif // __HOSTBOOT_RUNTIME if(l_type == TARGETING::TYPE_PROC) { // Call wakeup on all core targets @@ -204,7 +210,7 @@ errlHndl_t handleSpecialWakeup(TARGETING::Target* i_target, bool i_enable) /*@ * @errortype * @moduleid SCOM_HANDLE_SPECIAL_WAKEUP - * @reasoncode SCOM_RUNTIME_SPCWKUP_COUNT_ERR + * @reasoncode SCOM_SPCWKUP_COUNT_ERR * @userdata1 Target HUID * @userdata2[0:31] Wakeup Enable * @userdata2[32:63] Wakeup Count @@ -212,7 +218,7 @@ errlHndl_t handleSpecialWakeup(TARGETING::Target* i_target, bool i_enable) */ l_errl = new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_INFORMATIONAL, SCOM_HANDLE_SPECIAL_WAKEUP, - SCOM_RUNTIME_SPCWKUP_COUNT_ERR, + SCOM_SPCWKUP_COUNT_ERR, get_huid(i_target), TWO_UINT32_TO_UINT64( i_enable, l_count)); @@ -233,6 +239,16 @@ errlHndl_t handleSpecialWakeup(TARGETING::Target* i_target, bool i_enable) // bit because HOST/OCC are already in use. p9specialWakeup::PROC_SPCWKUP_OPS l_spcwkupType; + p9specialWakeup::PROC_SPCWKUP_ENTITY l_spcwkupSrc; + if(! INITSERVICE::spBaseServicesEnabled()) + { + l_spcwkupSrc = p9specialWakeup::FSP; + } + else + { + l_spcwkupSrc = p9specialWakeup::HOST; + } + if(i_enable) { l_spcwkupType = p9specialWakeup::SPCWKUP_ENABLE; @@ -247,33 +263,36 @@ errlHndl_t handleSpecialWakeup(TARGETING::Target* i_target, bool i_enable) fapi2::Target<fapi2::TARGET_TYPE_EQ> l_fapi_target(const_cast<TARGETING::Target*>(i_target)); - FAPI_INVOKE_HWP( l_errl, - p9_cpu_special_wakeup_eq, - l_fapi_target, - l_spcwkupType, - p9specialWakeup::FSP ); + FAPI_EXEC_HWP(l_rc, + p9_cpu_special_wakeup_eq, + l_fapi_target, + l_spcwkupType, + l_spcwkupSrc ); + l_errl = rcToErrl(l_rc, ERRORLOG::ERRL_SEV_UNRECOVERABLE); } else if(l_type == TARGETING::TYPE_EX) { fapi2::Target<fapi2::TARGET_TYPE_EX_CHIPLET> l_fapi_target(const_cast<TARGETING::Target*>(i_target)); - FAPI_INVOKE_HWP( l_errl, - p9_cpu_special_wakeup_ex, - l_fapi_target, - l_spcwkupType, - p9specialWakeup::FSP ); + FAPI_EXEC_HWP(l_rc, + p9_cpu_special_wakeup_ex, + l_fapi_target, + l_spcwkupType, + l_spcwkupSrc ); + l_errl = rcToErrl(l_rc, ERRORLOG::ERRL_SEV_UNRECOVERABLE); } else if(l_type == TARGETING::TYPE_CORE) { fapi2::Target<fapi2::TARGET_TYPE_CORE> l_fapi_target(const_cast<TARGETING::Target*>(i_target)); - FAPI_INVOKE_HWP( l_errl, - p9_cpu_special_wakeup_core, - l_fapi_target, - l_spcwkupType, - p9specialWakeup::FSP ); + FAPI_EXEC_HWP(l_rc, + p9_cpu_special_wakeup_core, + l_fapi_target, + l_spcwkupType, + l_spcwkupSrc ); + l_errl = rcToErrl(l_rc, ERRORLOG::ERRL_SEV_UNRECOVERABLE); } if(l_errl) @@ -301,7 +320,9 @@ errlHndl_t handleSpecialWakeup(TARGETING::Target* i_target, bool i_enable) } i_target->setAttr<ATTR_SPCWKUP_COUNT>(l_count); } +#ifdef __HOSTBOOT_RUNTIME } +#endif return l_errl; } diff --git a/src/usr/scom/runtime/handleSpecialWakeup.H b/src/usr/scom/handleSpecialWakeup.H index 43d05f246..96b34dfb8 100644 --- a/src/usr/scom/runtime/handleSpecialWakeup.H +++ b/src/usr/scom/handleSpecialWakeup.H @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/scom/runtime/handleSpecialWakeup.H $ */ +/* $Source: src/usr/scom/handleSpecialWakeup.H $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ diff --git a/src/usr/scom/runtime/makefile b/src/usr/scom/runtime/makefile index b7ae2cfac..af572116b 100644 --- a/src/usr/scom/runtime/makefile +++ b/src/usr/scom/runtime/makefile @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2013,2017 +# Contributors Listed Below - COPYRIGHT 2013,2018 # [+] International Business Machines Corp. # # @@ -29,14 +29,7 @@ MODULE = scom_rt #include common ojects between hostboot and runtime hostboot include ../scom.mk -EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/ -EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/ -EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs/ -EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc/ -EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ - #include unique object modules - currently none -OBJS += handleSpecialWakeup.o SUBDIRS += test.d diff --git a/src/usr/scom/scom.mk b/src/usr/scom/scom.mk index dcd349855..890b106d7 100644 --- a/src/usr/scom/scom.mk +++ b/src/usr/scom/scom.mk @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2013,2017 +# Contributors Listed Below - COPYRIGHT 2013,2018 # [+] International Business Machines Corp. # # @@ -29,6 +29,15 @@ VPATH += ${ROOTPATH}/src/import/chips/centaur/common/scominfo/ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/scominfo/ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/centaur/common/scominfo/ EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/ + + +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc/ +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ + + # Local Objects OBJS += scom.o OBJS += scomtrans.o @@ -36,6 +45,7 @@ OBJS += errlud_pib.o OBJS += postopchecks.o OBJS += DmiScomWorkaround.o OBJS += ibscom_retry.o +OBJS += handleSpecialWakeup.o # Objects From Import Directory OBJS += p9_scominfo.o |