diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2017-04-27 09:32:02 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-05-25 09:45:36 -0400 |
commit | e0a1b4a4f6d9bd7927fddcc508d24f9218dfbb13 (patch) | |
tree | 2a88a7b68a8ed3b3dc7f3a54a8bf3bec9b411b45 /src/usr/isteps | |
parent | c578a6cdfbbc2b77c988548b81df6e1d9f202582 (diff) | |
download | talos-hostboot-e0a1b4a4f6d9bd7927fddcc508d24f9218dfbb13.tar.gz talos-hostboot-e0a1b4a4f6d9bd7927fddcc508d24f9218dfbb13.zip |
Add support for remembering deconfigs without GUARD
Currently on reconfig reboots only parts that are GUARDed
are remembered and reapplied.
- Add suport for a semi persisent PNOR partition,
HB_VOLATILE which Hostboot uses to keep track of the reconfig
reboots vs power off
- Add a new GUARD type specifically for reconfig loops
- Add RECALL_DECONFIG_ON_RECONFIG config flag to control
what gets added to GUARD partition
- During boot will add/clear guard records on deconfig based
on config flags and semi persisent state.
Change-Id: Iec636058cde8095c0c4216d1f95ae4fda554395e
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39780
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/isteps')
-rw-r--r-- | src/usr/isteps/istep06/host_set_ipl_parms.C | 44 | ||||
-rw-r--r-- | src/usr/isteps/istep16/call_host_ipl_complete.C | 23 |
2 files changed, 64 insertions, 3 deletions
diff --git a/src/usr/isteps/istep06/host_set_ipl_parms.C b/src/usr/isteps/istep06/host_set_ipl_parms.C index b7c5aec3b..8fe9f12cc 100644 --- a/src/usr/isteps/istep06/host_set_ipl_parms.C +++ b/src/usr/isteps/istep06/host_set_ipl_parms.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -29,6 +29,9 @@ #include <errl/errlmanager.H> #include <isteps/hwpisteperror.H> #include <initservice/isteps_trace.H> +#include <util/utilsemipersist.H> +#include <hwas/common/deconfigGard.H> + namespace ISTEP_06 { @@ -36,10 +39,45 @@ namespace ISTEP_06 void* host_set_ipl_parms( void *io_pArgs ) { ISTEP_ERROR::IStepError l_stepError; + errlHndl_t l_err; + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "host_set_ipl_parms entry" ); + + //Read out the semi persistent area. + Util::semiPersistData_t l_semiData; + Util::readSemiPersistData(l_semiData); + + // If magic number set, then this is warm reboot: + // 1) increment boot count + if(l_semiData.magic == Util::PERSIST_MAGIC) + { + l_semiData.reboot_cnt++; + } + // else magic number is not set, then this is first, cold boot: + // 1) set magic num, boot count + // 2) clear all gard records of type GARD_Reconfig + else + { + memset(&l_semiData, 0x0, sizeof(Util::semiPersistData_t)); + l_semiData.magic = Util::PERSIST_MAGIC; + + l_err = HWAS::clearGardByType(HWAS::GARD_Reconfig); + if (l_err) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X: clearGardByType( )", + l_err->reasonCode() ); + // Create IStep error log and cross ref error that occurred + l_stepError.addErrorDetails( l_err ); + errlCommit( l_err, ISTEP_COMP_ID ); + } + } + + //Write update data back out + Util::writeSemiPersistData(l_semiData); - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "host_set_ipl_parms entry" ); - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "host_set_ipl_parms exit" ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "host_set_ipl_parms exit" ); return l_stepError.getErrorHandle(); } diff --git a/src/usr/isteps/istep16/call_host_ipl_complete.C b/src/usr/isteps/istep16/call_host_ipl_complete.C index 1242367ef..87eca889b 100644 --- a/src/usr/isteps/istep16/call_host_ipl_complete.C +++ b/src/usr/isteps/istep16/call_host_ipl_complete.C @@ -46,6 +46,9 @@ #include <runtime/runtime.H> #include <util/utiltce.H> +#include <util/utilsemipersist.H> +#include <hwas/common/deconfigGard.H> + using namespace ERRORLOG; using namespace TARGETING; using namespace ISTEP; @@ -64,6 +67,26 @@ void* call_host_ipl_complete (void *io_pArgs) "call_host_ipl_complete entry" ); do { + //No more reconfig loops are supported from this point + //forward. Clean up the semi persistent area + // 1) clear magic number (so next boot thinks it is cold) + // 2) clear any reconfig specific gard records + Util::semiPersistData_t l_semiData; //inits to 0s + Util::writeSemiPersistData(l_semiData); + + l_err = HWAS::clearGardByType(HWAS::GARD_Reconfig); + if (l_err) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X: clearGardByType( )", + l_err->reasonCode() ); + // Create IStep error log and cross ref error that occurred + l_stepError.addErrorDetails( l_err ); + errlCommit( l_err, ISTEP_COMP_ID ); + } + + + // Setup the TCEs needed for the FSP to DMA the PAYLOAD /* @TODO RTC 168745 - make this call when FSP is ready for TCE Support * and add check that we're on a FSP system |