summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2018-01-29 14:49:19 -0600
committerChristian R. Geddes <crgeddes@us.ibm.com>2018-02-17 16:26:17 -0500
commitb542fd6392999e7d521c5dff5a2a2add056db984 (patch)
tree9e3c9ff1d9c7e902afd65a3cfde7676da795db5f
parente7c2ef327998d6ab868776cdc2c2bb7592b8c17e (diff)
downloadtalos-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>
-rw-r--r--src/include/usr/isteps/istep15list.H3
-rw-r--r--src/include/usr/scom/scomreasoncodes.H4
-rwxr-xr-xsrc/usr/fapi2/fapi2.mk1
-rw-r--r--src/usr/fapi2/plat_utils.C6
-rwxr-xr-xsrc/usr/fapi2/runtime/makefile4
-rw-r--r--src/usr/isteps/istep15/host_build_stop_image.C2
-rw-r--r--src/usr/isteps/pm/runtime/makefile4
-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/makefile9
-rw-r--r--src/usr/scom/scom.mk12
11 files changed, 64 insertions, 44 deletions
diff --git a/src/include/usr/isteps/istep15list.H b/src/include/usr/isteps/istep15list.H
index 0a7583aeb..adcde3384 100644
--- a/src/include/usr/isteps/istep15list.H
+++ b/src/include/usr/isteps/istep15list.H
@@ -118,7 +118,7 @@ namespace INITSERVICE
ISTEPNAME(15,02,"proc_set_pba_homer_bar"),
ISTEP_15::proc_set_pba_homer_bar,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, true }
- },
+ },
{
ISTEPNAME(15,03,"host_establish_ex_chiplet"),
ISTEP_15::host_establish_ex_chiplet,
@@ -137,6 +137,7 @@ const DepModInfo g_istep15Dependancies = {
DEP_LIB(libistep15.so),
DEP_LIB(libp9_stop_util.so),
DEP_LIB(libnestmemutils.so),
+ DEP_LIB(libp9_cpuWkup.so),
DEP_LIB(libpm.so),
DEP_LIB(libsbe.so),
NULL
diff --git a/src/include/usr/scom/scomreasoncodes.H b/src/include/usr/scom/scomreasoncodes.H
index 9d4115c78..5f52f2a9e 100644
--- a/src/include/usr/scom/scomreasoncodes.H
+++ b/src/include/usr/scom/scomreasoncodes.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2017 */
+/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -62,7 +62,7 @@ namespace SCOM
SCOM_FORM_1_READ_REQUEST = SCOM_COMP_ID | 0x10,
SCOM_RUNTIME_WAKEUP_ERR = SCOM_COMP_ID | 0x11,
SCOM_RUNTIME_INTERFACE_ERR = SCOM_COMP_ID | 0x12,
- SCOM_RUNTIME_SPCWKUP_COUNT_ERR = SCOM_COMP_ID | 0x13,
+ SCOM_SPCWKUP_COUNT_ERR = SCOM_COMP_ID | 0x13,
SCOM_CEN_TRANS_INVALID_TYPE = SCOM_COMP_ID | 0x14,
};
diff --git a/src/usr/fapi2/fapi2.mk b/src/usr/fapi2/fapi2.mk
index ee1295ffd..b990be7de 100755
--- a/src/usr/fapi2/fapi2.mk
+++ b/src/usr/fapi2/fapi2.mk
@@ -55,6 +55,7 @@ EXTRAINCDIR += ${HWP_PATH_2}/hwp/memory/lib/
EXTRAINCDIR += ${HWP_PATH_2}/hwp/memory/lib/shared/
EXTRAINCDIR += ${HWP_PATH_2}/hwp/memory/lib/utils/
EXTRAINCDIR += ${HWP_PATH_2}/vpd_accessors/
+EXTRAINCDIR += ${ROOTPATH}/src/usr/scom/
include ${ROOTPATH}/src/build/mkrules/verbose.rules.mk
define __CLEAN_TARGET
diff --git a/src/usr/fapi2/plat_utils.C b/src/usr/fapi2/plat_utils.C
index d134582ea..a12423442 100644
--- a/src/usr/fapi2/plat_utils.C
+++ b/src/usr/fapi2/plat_utils.C
@@ -47,9 +47,7 @@
// remove when get_ring is using the hw image
#include <ring_data.H>
-#if __HOSTBOOT_RUNTIME
- #include "handleSpecialWakeup.H"
-#endif
+#include "handleSpecialWakeup.H"
//******************************************************************************
// Trace descriptors
@@ -1135,7 +1133,6 @@ fapi2::ReturnCode platSpecialWakeup(const Target<TARGET_TYPE_ALL>& i_target,
fapi2::ReturnCode fapi_rc = fapi2::FAPI2_RC_SUCCESS;
FAPI_INF("platSpecialWakeup");
-#ifdef __HOSTBOOT_RUNTIME
TARGETING::Target* l_target =
reinterpret_cast<TARGETING::Target*>(i_target.get());
@@ -1144,7 +1141,6 @@ fapi2::ReturnCode platSpecialWakeup(const Target<TARGET_TYPE_ALL>& i_target,
{
fapi_rc.setPlatDataPtr(reinterpret_cast<void *>(err_SW));
}
-#endif
// On Hostboot, processor cores cannot sleep so return success to the
// fapiSpecialWakeup enable/disable calls
diff --git a/src/usr/fapi2/runtime/makefile b/src/usr/fapi2/runtime/makefile
index 520f216d9..b27316cbe 100755
--- a/src/usr/fapi2/runtime/makefile
+++ b/src/usr/fapi2/runtime/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2016
+# Contributors Listed Below - COPYRIGHT 2015,2018
# [+] International Business Machines Corp.
#
#
@@ -33,8 +33,6 @@ ROOTPATH = ../../../..
MODULE = fapi2_rt
-EXTRAINCDIR += ${ROOTPATH}/src/usr/scom/runtime
-
SUBDIRS += test.d
include ../fapi2.mk
diff --git a/src/usr/isteps/istep15/host_build_stop_image.C b/src/usr/isteps/istep15/host_build_stop_image.C
index 630517611..86cbfef4f 100644
--- a/src/usr/isteps/istep15/host_build_stop_image.C
+++ b/src/usr/isteps/istep15/host_build_stop_image.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
diff --git a/src/usr/isteps/pm/runtime/makefile b/src/usr/isteps/pm/runtime/makefile
index 8590c85fb..2a98e0064 100644
--- a/src/usr/isteps/pm/runtime/makefile
+++ b/src/usr/isteps/pm/runtime/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2016,2017
+# Contributors Listed Below - COPYRIGHT 2016,2018
# [+] International Business Machines Corp.
#
#
@@ -31,7 +31,7 @@ VPATH += ../
MODULE = pm_rt
-EXTRAINCDIR += ${ROOTPATH}/src/usr/scom/runtime
+EXTRAINCDIR += ${ROOTPATH}/src/usr/scom/
## Objects unique to HBRT
OBJS += rt_pm.o
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
OpenPOWER on IntegriCloud