diff options
author | Lateef Quraishi <lateef@us.ibm.com> | 2016-08-04 08:47:49 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-09-02 10:05:51 -0400 |
commit | e4866856c7642d1ae8c6ec4b9cf9d2042ecef103 (patch) | |
tree | 42cbbfcb2ea6487154bed58b786b5bb4135d61e0 /src | |
parent | d2f585ae16f4ba4a9f62b110e91de956cb1cf774 (diff) | |
download | talos-hostboot-e4866856c7642d1ae8c6ec4b9cf9d2042ecef103.tar.gz talos-hostboot-e4866856c7642d1ae8c6ec4b9cf9d2042ecef103.zip |
Create a Separate module for cpu_special_wakeup
Change-Id: I4138b26825d76ebd068d3013a83fd9bfbc1f7b0f
RTC: 147383
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/27872
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/isteps/istep16list.H | 1 | ||||
-rw-r--r-- | src/makefile | 2 | ||||
-rw-r--r-- | src/usr/isteps/cpuWkup/makefile | 42 | ||||
-rw-r--r-- | src/usr/isteps/istep06/thread_activate/makefile | 2 | ||||
-rw-r--r-- | src/usr/isteps/istep06/thread_activate/thread_activate.C | 39 | ||||
-rw-r--r-- | src/usr/isteps/istep16/makefile | 2 | ||||
-rw-r--r-- | src/usr/isteps/makefile | 5 | ||||
-rw-r--r-- | src/usr/isteps/pm/pm.mk | 1 |
8 files changed, 85 insertions, 9 deletions
diff --git a/src/include/usr/isteps/istep16list.H b/src/include/usr/isteps/istep16list.H index ad1bba7d4..93a1dcac9 100644 --- a/src/include/usr/isteps/istep16list.H +++ b/src/include/usr/isteps/istep16list.H @@ -147,6 +147,7 @@ namespace INITSERVICE const DepModInfo g_istep16Dependancies = { { DEP_LIB(libistep16.so), + DEP_LIB(libp9_cpuWkup.so), #ifdef CONFIG_IPLTIME_CHECKSTOP_ANALYSIS DEP_LIB(libocc.so), #endif diff --git a/src/makefile b/src/makefile index bddc8240b..3a8c6b585 100644 --- a/src/makefile +++ b/src/makefile @@ -179,6 +179,7 @@ EXTENDED_MODULES += $(if $(CONFIG_BMC_IPMI),ipmi) EXTENDED_MODULES += xz EXTENDED_MODULES += p9_stop_util EXTENDED_MODULES += isteps_mss +EXTENDED_MODULES += p9_cpuWkup #*************************************** @@ -273,6 +274,7 @@ RUNTIME_MODULES += pm_rt RUNTIME_MODULES += pnor_rt RUNTIME_MODULES += fapi2_rt RUNTIME_MODULES += secureboot_rt +RUNTIME_MODULES += p9_cpuWkup RUNTIME_DATA_MODULES += RUNTIME_TESTCASE_MODULES += cxxtest_rt diff --git a/src/usr/isteps/cpuWkup/makefile b/src/usr/isteps/cpuWkup/makefile new file mode 100644 index 000000000..3d29bbf91 --- /dev/null +++ b/src/usr/isteps/cpuWkup/makefile @@ -0,0 +1,42 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/isteps/cpuWkup/makefile $ +# +# OpenPOWER HostBoot Project +# +# Contributors Listed Below - COPYRIGHT 2016 +# [+] 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 = p9_cpuWkup +PROCEDURES_PATH = ${ROOTPATH}/src/import/chips/p9/procedures + +EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/pm/ +EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/ +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/ +EXTRAINCDIR += ${ROOTPATH}/obj/genfiles/ + +include ${ROOTPATH}/procedure.rules.mk +include $(PROCEDURES_PATH)/hwp/pm/p9_cpu_special_wakeup.mk +include ${ROOTPATH}/config.mk + +VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/ diff --git a/src/usr/isteps/istep06/thread_activate/makefile b/src/usr/isteps/istep06/thread_activate/makefile index 3ed73fc97..b9e1042c6 100644 --- a/src/usr/isteps/istep06/thread_activate/makefile +++ b/src/usr/isteps/istep06/thread_activate/makefile @@ -53,7 +53,5 @@ VPATH += ${HWP_PATH} include ${ROOTPATH}/procedure.rules.mk # p9_thread_control.o brought in by p9_thread_control.mk include $(HWP_PATH_1)/p9_thread_control.mk -# p9_cpu_special_wakeup.o brought in by p9_cpu_special_wakeup.mk -include $(HWP_PATH_2)/p9_cpu_special_wakeup.mk include ${ROOTPATH}/config.mk diff --git a/src/usr/isteps/istep06/thread_activate/thread_activate.C b/src/usr/isteps/istep06/thread_activate/thread_activate.C index 84fdd8187..2fb8e1d10 100644 --- a/src/usr/isteps/istep06/thread_activate/thread_activate.C +++ b/src/usr/isteps/istep06/thread_activate/thread_activate.C @@ -60,6 +60,7 @@ #include <pnor/pnorif.H> #include <vpd/mvpdenums.H> +#include <vfs/vfs.H> namespace THREAD_ACTIVATE { @@ -204,7 +205,7 @@ bool getCacheDeconfig(uint64_t i_masterCoreId) //Not worth taking the system down, just assume //we only have half the cache available. - errlCommit(l_errl,HWPF_COMP_ID); + errlCommit(l_errl,ISTEP_COMP_ID); cacheDeconfig = true; } @@ -218,6 +219,7 @@ bool getCacheDeconfig(uint64_t i_masterCoreId) void activate_threads( errlHndl_t& io_rtaskRetErrl ) { errlHndl_t l_errl = NULL; + bool l_wakeup_lib_loaded = false; TRACFCOMP( g_fapiTd, "activate_threads entry" ); @@ -312,7 +314,21 @@ void activate_threads( errlHndl_t& io_rtaskRetErrl ) // -------------------------------------------------------------------- //Enable the special wake-up on master core - FAPI_INF("\tEnable special wake-up on master core"); + FAPI_INF("Enable special wake-up on master core"); + + //Need to explicitly load the library that has the wakeup HWP in it + if( !VFS::module_is_loaded( "libp9_cpuWkup.so" ) ) + { + l_errl = VFS::module_load( "libp9_cpuWkup.so" ); + if ( l_errl ) + { + // load module returned with errl set + TRACFCOMP( g_fapiTd,ERR_MRK"activate_threads: Could not load libp9_cpuWkup module" ); + // break from do loop if error occured + break; + } + l_wakeup_lib_loaded = true; + } FAPI_INVOKE_HWP(l_errl, p9_cpu_special_wakeup, l_fapiCore, @@ -461,6 +477,25 @@ void activate_threads( errlHndl_t& io_rtaskRetErrl ) } while(0); + //make sure we always unload the module if we loaded it + if( l_wakeup_lib_loaded ) + { + errlHndl_t l_tmpErrl = + VFS::module_unload( "libp9_cpuWkup.so" ); + if ( l_tmpErrl ) + { + TRACFCOMP( g_fapiTd,ERR_MRK"thread_activate: Error unloading libp9_cpuWkup module" ); + if(l_errl) + { + errlCommit( l_tmpErrl, ISTEP_COMP_ID ); + } + else + { + l_errl = l_tmpErrl; + } + } + } + TRACFCOMP( g_fapiTd, "activate_threads exit" ); diff --git a/src/usr/isteps/istep16/makefile b/src/usr/isteps/istep16/makefile index c421ee007..690ed925a 100644 --- a/src/usr/isteps/istep16/makefile +++ b/src/usr/isteps/istep16/makefile @@ -45,8 +45,6 @@ OBJS += call_host_ipl_complete.o include ${ROOTPATH}/procedure.rules.mk include ${PROCEDURES_PATH}/hwp/pm/p9_block_wakeup_intr.mk -#TODO RTC:147383 Need to create a seperate module for cpu_special_wakeup -include ${PROCEDURES_PATH}/hwp/pm/p9_cpu_special_wakeup.mk include ${PROCEDURES_PATH}/hwp/perv/p9_switch_cfsim.mk include ${PROCEDURES_PATH}/hwp/perv/p9_switch_rec_attn.mk include ${ROOTPATH}/config.mk diff --git a/src/usr/isteps/makefile b/src/usr/isteps/makefile index 2d7f4b548..ac376aab2 100644 --- a/src/usr/isteps/makefile +++ b/src/usr/isteps/makefile @@ -39,8 +39,9 @@ SUBDIRS+=istep16.d SUBDIRS+=istep20.d SUBDIRS+=istep21.d SUBDIRS+=pm.d -SUBDIRS += p9_stop_util.d -SUBDIRS += mss.d +SUBDIRS+=p9_stop_util.d +SUBDIRS+=mss.d +SUBDIRS+=cpuWkup.d OBJS += hwpisteperror.o OBJS += hwpistepud.o diff --git a/src/usr/isteps/pm/pm.mk b/src/usr/isteps/pm/pm.mk index af5e71eb5..976d44c12 100644 --- a/src/usr/isteps/pm/pm.mk +++ b/src/usr/isteps/pm/pm.mk @@ -70,7 +70,6 @@ include ${HWP_PATH}/p9_hcode_image_build.mk include ${HWP_PATH}/p9_pm_stop_gpe_init.mk include ${HWP_PATH}/p9_pm_pfet_init.mk include ${HWP_PATH}/p9_pm_reset.mk -include ${HWP_PATH}/p9_cpu_special_wakeup.mk include ${HWP_PATH}/p9_pm_occ_sram_init.mk include ${HWP_PATH}/p9_pm_occ_gpe_init.mk include ${HWP_PATH}/p9_pm_ppm_firinit.mk |