summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/usr/isteps/istep09list.H2
-rw-r--r--src/include/usr/isteps/istep18list.H2
-rw-r--r--src/kernel/misc.C10
-rw-r--r--src/makefile2
-rw-r--r--src/usr/initservice/istepdispatcher/istepdispatcher.C37
-rw-r--r--src/usr/isteps/fab_iovalid/makefile45
-rw-r--r--src/usr/isteps/istep18/establish_system_smp.C124
-rw-r--r--src/usr/isteps/istep18/establish_system_smp.H6
-rw-r--r--src/usr/isteps/makefile2
9 files changed, 146 insertions, 84 deletions
diff --git a/src/include/usr/isteps/istep09list.H b/src/include/usr/isteps/istep09list.H
index 6cefef355..1abb2b471 100644
--- a/src/include/usr/isteps/istep09list.H
+++ b/src/include/usr/isteps/istep09list.H
@@ -229,8 +229,8 @@ const DepModInfo g_istep09Dependancies = {
{
DEP_LIB(libistep09.so),
DEP_LIB(libpm.so),
- DEP_LIB(libp9_fab_iovalid.so),
DEP_LIB(libnestmemutils.so),
+ DEP_LIB(libfab_iovalid.so),
NULL
}
};
diff --git a/src/include/usr/isteps/istep18list.H b/src/include/usr/isteps/istep18list.H
index e85ffed4e..0e07ce1bc 100644
--- a/src/include/usr/isteps/istep18list.H
+++ b/src/include/usr/isteps/istep18list.H
@@ -145,7 +145,7 @@ const DepModInfo g_istep18Dependancies = {
DEP_LIB(libtod.so),
DEP_LIB(libistep18.so),
DEP_LIB(libp9_cpuWkup.so),
- DEP_LIB(libp9_fab_iovalid.so),
+ DEP_LIB(libfab_iovalid.so),
#endif
NULL
}
diff --git a/src/kernel/misc.C b/src/kernel/misc.C
index 75f476187..d1ff0c45a 100644
--- a/src/kernel/misc.C
+++ b/src/kernel/misc.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -439,13 +439,11 @@ namespace KernelMisc
KERNEL_MAX_SUPPORTED_NODES; i++)
{
cpu_t* slave = CpuManager::getCpu(i);
-
if ((NULL != slave) && (slave != cpu))
{
- if (slave->winkled)
- {
- InterruptMsgHdlr::sendThreadWakeupMsg(i);
- }
+ uint64_t l_pir = slave->cpu;
+ printkd("Sending dbell to wakeup cpu:%d", (int)l_pir);
+ doorbell_send(l_pir);
}
}
};
diff --git a/src/makefile b/src/makefile
index 59d90374e..30822d18e 100644
--- a/src/makefile
+++ b/src/makefile
@@ -203,8 +203,8 @@ EXTENDED_MODULES += p9_phbPerst
EXTENDED_MODULES += $(if $(CONFIG_ENABLE_HDAT_IN_HOSTBOOT),hdat)
EXTENDED_MODULES += $(if $(CONFIG_SECUREBOOT),secureboot_ext)
EXTENDED_MODULES += tod
-EXTENDED_MODULES += p9_fab_iovalid
EXTENDED_MODULES += nestmemutils
+EXTENDED_MODULES += fab_iovalid
#***************************************
# Working test modules
diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C
index 6f74630a7..a59a70399 100644
--- a/src/usr/initservice/istepdispatcher/istepdispatcher.C
+++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C
@@ -2045,27 +2045,40 @@ void IStepDispatcher::handleProcFabIovalidMsg(msg_t * & io_pMsg)
}
// Ensure the libraries needed are loaded
- err = VFS::module_load("libestablish_system_smp.so");
+ err = VFS::module_load("libistep18.so");
if (err)
{
- TRACFCOMP(g_trac_initsvc, "handleProcFabIovalidMsg: Error loading libestablish_system_smp, PLID = 0x%x",
+ TRACFCOMP(g_trac_initsvc, "handleProcFabIovalidMsg: Error loading libistep18,"
+ " PLID = 0x%x",
err->plid());
io_pMsg->data[0] = err->plid();
errlCommit(err, INITSVC_COMP_ID);
break;
}
- err = VFS::module_load("libedi_ei_initialization.so");
+
+ err = VFS::module_load("libfab_iovalid.so");
if (err)
{
- TRACFCOMP(g_trac_initsvc, "handleProcFabIovalidMsg: Error loading libedi_ei_initialization, PLID = 0x%x",
+ TRACFCOMP(g_trac_initsvc, "handleProcFabIovalidMsg: Error loading libfab_iovalid.so,"
+ " PLID = 0x%x",
err->plid());
io_pMsg->data[0] = err->plid();
errlCommit(err, INITSVC_COMP_ID);
break;
}
+ err = VFS::module_load("libp9_cpuWkup.so");
+ if (err)
+ {
+ TRACFCOMP(g_trac_initsvc, "handleProcFabIovalidMsg: Error loading libp9_cpuWkup.so,"
+ " PLID = 0x%x",
+ err->plid());
+ io_pMsg->data[0] = err->plid();
+ errlCommit(err, INITSVC_COMP_ID);
+ break;
+ }
// Create child thread so that if there are problems, the istep
// dispatcher code continues
tid_t l_progTid = task_create(
@@ -2110,6 +2123,20 @@ void IStepDispatcher::handleProcFabIovalidMsg(msg_t * & io_pMsg)
//the interrupt queue
INTR::drainQueue();
+ //Before stopping all the cores, we need to disable interrupts
+ err = ESTABLISH_SYSTEM_SMP::blockInterrupts();
+ if (err)
+ {
+ TRACFCOMP( g_trac_initsvc,
+ "ERROR: ESTABLISH_SYSTEM_SMP::blockInterrupts");
+ errlCommit(err, INITSVC_COMP_ID);
+ }
+
+ //cpu_all_winkle is a system call.. After the system call,
+ //the cpu are all hung at that instruction. After the fsp
+ //wake us up, we will resume execution from the next instruction
+ //in this function as the PC will be pointing to the next
+ //instruction after the cpu_all_winkle function.
TRACFCOMP( g_trac_initsvc, "winkle all cores");
uint32_t l_rc = cpu_all_winkle();
if ( l_rc )
@@ -2536,7 +2563,7 @@ errlHndl_t IStepDispatcher::handleCoalesceHostMsg()
// Ensure the library is loaded
- errlHndl_t err = VFS::module_load("libestablish_system_smp.so");
+ errlHndl_t err = VFS::module_load("libistep18.so");
if (err)
{
diff --git a/src/usr/isteps/fab_iovalid/makefile b/src/usr/isteps/fab_iovalid/makefile
new file mode 100644
index 000000000..cd271b12d
--- /dev/null
+++ b/src/usr/isteps/fab_iovalid/makefile
@@ -0,0 +1,45 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/usr/isteps/fab_iovalid/makefile $
+#
+# OpenPOWER HostBoot Project
+#
+# Contributors Listed Below - COPYRIGHT 2018
+# [+] International Business Machines Corp.
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+
+ROOTPATH = ../../../..
+MODULE = fab_iovalid
+
+PROCEDURES_PATH = ${ROOTPATH}/src/import/chips/p9/procedures
+
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs/
+EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
+EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/lib/
+EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/nest
+
+
+#OBJS += p9_fab_iovalid.o
+
+include ${ROOTPATH}/procedure.rules.mk
+include $(PROCEDURES_PATH)/hwp/nest/p9_fab_iovalid.mk
+include ${ROOTPATH}/config.mk
+
+VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/nest/
diff --git a/src/usr/isteps/istep18/establish_system_smp.C b/src/usr/isteps/istep18/establish_system_smp.C
index 0a0ad4f76..1394322e2 100644
--- a/src/usr/isteps/istep18/establish_system_smp.C
+++ b/src/usr/isteps/istep18/establish_system_smp.C
@@ -200,8 +200,7 @@ errlHndl_t call_host_coalesce_host( )
uint8_t node_map[NUMBER_OF_POSSIBLE_DRAWERS];
uint64_t msg_count = 0;
- bool rc =
- sys->tryGetAttr<TARGETING::ATTR_FABRIC_TO_PHYSICAL_NODE_MAP>
+ bool rc = sys->tryGetAttr<TARGETING::ATTR_FABRIC_TO_PHYSICAL_NODE_MAP>
(node_map);
if (rc == false)
{
@@ -225,7 +224,7 @@ errlHndl_t call_host_coalesce_host( )
{
uint16_t drawer = node_map[drawerCount];
- if(drawerCount < NUMBER_OF_POSSIBLE_DRAWERS)
+ if(drawer < NUMBER_OF_POSSIBLE_DRAWERS)
{
// set mask to msb
@@ -261,30 +260,8 @@ errlHndl_t call_host_coalesce_host( )
}
} else{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "ATTR_FABRIC_TO_PHYSICAL_NODE_MAP is out of bounds");
-
- //generate an errorlog
- /*@
- * @errortype ERRL_SEV_PREDICTIVE
- * @moduleid fapi::MOD_HOST_COALESCE_HOST,
- * @reasoncode fapi::RC_INVALID_SIZE,
- * @userdata1 drawer number
- * @userdata2 NUMBER_OF_POSSIBLE_DRAWERS
- * @devdesc ATTR_FABRIC_TO_PHYSICAL_NODE_MAP is
- * out of bounds for the given drawer
- */
- l_errl = new ERRORLOG::ErrlEntry(
- ERRORLOG::ERRL_SEV_PREDICTIVE,
- fapi::MOD_HOST_COALESCE_HOST,
- fapi::RC_INVALID_SIZE ,
- drawer,
- NUMBER_OF_POSSIBLE_DRAWERS );
-
- l_errl->collectTrace("ISTEPS_TRACE");
- l_errl->collectTrace("IPC");
- l_errl->collectTrace("MBOXMSG");
-
- break;
+ "ATTR_FABRIC_TO_PHYSICAL_NODE_MAP is out of bounds, loop %d, drawer %x",
+ drawerCount, drawer);
}
}
@@ -519,12 +496,16 @@ void *host_sys_fab_iovalid_processing(void* io_ptr )
sys->setAttr<TARGETING::ATTR_HB_EXISTING_IMAGE>(hb_existing_image);
// after agreement, open a-busses as required
- l_errl = EDI_EI_INITIALIZATION::smp_unfencing_inter_enclosure_abus_links();
- if (l_errl)
- {
- io_pMsg->data[0] = l_errl->plid();
- errlCommit(l_errl, HWPF_COMP_ID);
- }
+ // @TODO RTC:187337 -- HB doesn't have the knowledge of attributes that
+ // p9_fab_iovalid requires at the moment. Currently, this is being called
+ // from the FSP. We need to figure out a way to gather that info from the
+ // FSP and re-enable this piece of code.
+// l_errl = EDI_EI_INITIALIZATION::smp_unfencing_inter_enclosure_abus_links();
+// if (l_errl)
+// {
+// io_pMsg->data[0] = l_errl->plid();
+// errlCommit(l_errl, HWPF_COMP_ID);
+// }
}
else
{
@@ -538,50 +519,14 @@ void *host_sys_fab_iovalid_processing(void* io_ptr )
// if there wasn't an error
if (io_pMsg->data[0] == INITSERVICE::HWSVR_MSG_SUCCESS)
{
- uint32_t l_plid = 0;
-
// Get all functional core units
TARGETING::TargetHandleList l_coreList;
getAllChiplets(l_coreList, TYPE_CORE);
for (auto l_core : l_coreList)
{
-
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "Running p9_block_wakeup_intr(SET) on EX target HUID %.8X",
- TARGETING::get_huid(l_core));
-
fapi2::Target<fapi2::TARGET_TYPE_CORE> l_fapi2_core_target(l_core);
- FAPI_INVOKE_HWP(l_errl,
- p9_block_wakeup_intr,
- l_fapi2_core_target,
- p9pmblockwkup::SET);
- if ( l_errl )
- {
- TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
- "ERROR : p9_block_wakeup_intr(SET)" );
- // capture the target data in the elog
- ErrlUserDetailsTarget(l_core).addToLog( l_errl );
- if (l_plid != 0)
- {
- // use the same plid as the previous
- l_errl->plid(l_plid);
- }
- else
- {
- // set this plid for the caller to see
- l_plid = l_errl->plid();
- io_pMsg->data[0] = l_errl->plid();
- }
- errlCommit( l_errl, HWPF_COMP_ID );
- }
- else
- {
- TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
- "SUCCESS : p9_block_wakeup_intr(SET)" );
- }
-
// disable special wakeup
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"Running p9_cpu_special_wakeup_core (DISABLE) on Core target"
@@ -625,6 +570,47 @@ void *host_sys_fab_iovalid_processing(void* io_ptr )
}
+errlHndl_t blockInterrupts()
+{
+ errlHndl_t l_errl = NULL;
+
+ // Get all functional core units
+ TARGETING::TargetHandleList l_coreList;
+ getAllChiplets(l_coreList, TYPE_CORE);
+
+ for (auto l_core : l_coreList)
+ {
+
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running p9_block_wakeup_intr(SET) on EX target HUID %.8X",
+ TARGETING::get_huid(l_core));
+
+ fapi2::Target<fapi2::TARGET_TYPE_CORE> l_fapi2_core_target(l_core);
+
+ FAPI_INVOKE_HWP(l_errl,
+ p9_block_wakeup_intr,
+ l_fapi2_core_target,
+ p9pmblockwkup::SET);
+ if ( l_errl )
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR : p9_block_wakeup_intr(SET)" );
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_core).addToLog( l_errl );
+ errlCommit( l_errl, HWPF_COMP_ID );
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : p9_block_wakeup_intr(SET)" );
+ }
+ }
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : p9_block_wakeup_intr(SET) on ALL cores" );
+
+ return l_errl;
+}
+
errlHndl_t enableSpecialWakeup()
{
errlHndl_t l_errl = NULL;
diff --git a/src/usr/isteps/istep18/establish_system_smp.H b/src/usr/isteps/istep18/establish_system_smp.H
index 42b142e61..410030ff6 100644
--- a/src/usr/isteps/istep18/establish_system_smp.H
+++ b/src/usr/isteps/istep18/establish_system_smp.H
@@ -118,6 +118,12 @@ namespace ESTABLISH_SYSTEM_SMP
*/
errlHndl_t enableSpecialWakeup();
+ /**
+ * @brief block interrupts on all functional cores
+ *
+ * @return error log handle
+ */
+ errlHndl_t blockInterrupts();
}; // end namespace
#endif
diff --git a/src/usr/isteps/makefile b/src/usr/isteps/makefile
index fb39e568a..4b92f00b7 100644
--- a/src/usr/isteps/makefile
+++ b/src/usr/isteps/makefile
@@ -46,7 +46,7 @@ SUBDIRS+=cen.d
SUBDIRS+=cpuWkup.d
SUBDIRS+=p9_phbPerst.d
SUBDIRS+=tod.d
-SUBDIRS+=p9_fab_iovalid.d
+SUBDIRS+=fab_iovalid.d
OBJS += hwpisteperror.o
OBJS += hwpistepud.o
OpenPOWER on IntegriCloud