diff options
author | Matt Derksen <mderkse1@us.ibm.com> | 2018-02-02 10:35:42 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-02-08 21:02:32 -0500 |
commit | de8120523a0cf74b2c682b1f8723b99cb0388a4e (patch) | |
tree | bf7a0c5887d7d50c1de31cb2b0dc8ebdf1dec2ac /src/usr | |
parent | b1d0900ad706cd8e2a91a1acab016f5b681e23ef (diff) | |
download | talos-hostboot-de8120523a0cf74b2c682b1f8723b99cb0388a4e.tar.gz talos-hostboot-de8120523a0cf74b2c682b1f8723b99cb0388a4e.zip |
Only access HB_VOLATILE on non-FSP systems
This section of memory was added for semi-persistance
of variables in a non-FSP environment. Since this section
only pertains to non-FSP systems, it therefore should
not be accessed by FSP systems.
Change-Id: I0dc3181781f8ba55720facaeb2b1e5d67c2817c6
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53293
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
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: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/isteps/istep06/host_set_ipl_parms.C | 63 | ||||
-rw-r--r-- | src/usr/isteps/istep16/call_host_ipl_complete.C | 40 |
2 files changed, 56 insertions, 47 deletions
diff --git a/src/usr/isteps/istep06/host_set_ipl_parms.C b/src/usr/isteps/istep06/host_set_ipl_parms.C index ab581b850..79262f6d4 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,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -34,6 +34,7 @@ #include <arch/pvrformat.H> #include <sys/mmio.h> #include <console/consoleif.H> +#include <initservice/initserviceif.H> namespace ISTEP_06 { @@ -45,39 +46,43 @@ void* host_set_ipl_parms( void *io_pArgs ) 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 + // only run on non-FSP systems + if( !INITSERVICE::spBaseServicesEnabled() ) { - l_semiData.magic = Util::PERSIST_MAGIC; - l_semiData.reboot_cnt = 0; - //Intentionally don't change mfg_term_reboot + //Read out the semi persistent area. + Util::semiPersistData_t l_semiData; + Util::readSemiPersistData(l_semiData); - l_err = HWAS::clearGardByType(HWAS::GARD_Reconfig); - if (l_err) + // If magic number set, then this is warm reboot: + // 1) increment boot count + if(l_semiData.magic == Util::PERSIST_MAGIC) { - 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 ); + 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 + { + l_semiData.magic = Util::PERSIST_MAGIC; + l_semiData.reboot_cnt = 0; + //Intentionally don't change mfg_term_reboot + + 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); + //Write update data back out + Util::writeSemiPersistData(l_semiData); + } // Add a check to indicate that Nimbus DD1.0 is NOT supported diff --git a/src/usr/isteps/istep16/call_host_ipl_complete.C b/src/usr/isteps/istep16/call_host_ipl_complete.C index c96af304d..6a8585500 100644 --- a/src/usr/isteps/istep16/call_host_ipl_complete.C +++ b/src/usr/isteps/istep16/call_host_ipl_complete.C @@ -69,25 +69,29 @@ 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) - // a) DON'T clear mfg term setting (so read-modify) - // 2) clear any reconfig specific gard records - Util::semiPersistData_t l_semiData; //inits to 0s - Util::readSemiPersistData(l_semiData); - l_semiData.magic = 0x0; - Util::writeSemiPersistData(l_semiData); - - l_err = HWAS::clearGardByType(HWAS::GARD_Reconfig); - if (l_err) + // only run on non-FSP systems + if( !INITSERVICE::spBaseServicesEnabled() ) { - 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 ); + //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) + // a) DON'T clear mfg term setting (so read-modify) + // 2) clear any reconfig specific gard records + Util::semiPersistData_t l_semiData; //inits to 0s + Util::readSemiPersistData(l_semiData); + l_semiData.magic = 0x0; + 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 ); + } } #ifdef CONFIG_BMC_IPMI |