diff options
author | Marty Gloff <mgloff@us.ibm.com> | 2018-02-12 12:12:04 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-03-13 14:45:07 -0400 |
commit | 27755fae10595e6e37314065c24046ea35f2829e (patch) | |
tree | a8a7338fb774ae49378a229403cc260c3b12e380 /src/usr/targeting/runtime/attrPlatOverride_rt.C | |
parent | 75c7aea07bcb5d89c4e2f0b6b8dcae07991c96fc (diff) | |
download | talos-hostboot-27755fae10595e6e37314065c24046ea35f2829e.tar.gz talos-hostboot-27755fae10595e6e37314065c24046ea35f2829e.zip |
Support multiple nodes in HBRT - Attribute Overrides
Make changes needed for HBRT to override attributes on a multiple node system.
Change-Id: I2c2f5ec520b89ac900b7dbcc01ada6e7146707dc
RTC: 186582
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53880
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: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/runtime/attrPlatOverride_rt.C')
-rw-r--r-- | src/usr/targeting/runtime/attrPlatOverride_rt.C | 85 |
1 files changed, 46 insertions, 39 deletions
diff --git a/src/usr/targeting/runtime/attrPlatOverride_rt.C b/src/usr/targeting/runtime/attrPlatOverride_rt.C index b89c93bb4..a803b5323 100644 --- a/src/usr/targeting/runtime/attrPlatOverride_rt.C +++ b/src/usr/targeting/runtime/attrPlatOverride_rt.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2017 */ +/* Contributors Listed Below - COPYRIGHT 2014,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -36,6 +36,7 @@ #include <targeting/common/targreasoncodes.H> #include <devicefw/userif.H> #include <util/runtime/util_rt.H> +#include <sys/internode.h> using namespace TARGETING; @@ -63,7 +64,7 @@ int apply_attr_override(uint8_t* i_data, // expected to be empty. The passed overrides are added, not updated // in place. AttributeTank * l_pAttributeTank = - &fapi2::theAttrOverrideSync().iv_overrideTank; + &fapi2::theAttrOverrideSync().iv_overrideTank; if ((*l_pAttributeTank).attributesExist()) { TRACFCOMP(g_trac_targeting, "apply_attr_override:" @@ -74,7 +75,7 @@ int apply_attr_override(uint8_t* i_data, if ((*l_pAttributeTank).attributesExist()) { TRACFCOMP(g_trac_targeting, "apply_attr_override:" - " clear targeting attribute overrides"); + " clear targeting attribute overrides"); (*l_pAttributeTank).clearAllAttributes(); } @@ -130,48 +131,54 @@ void applyTempOverrides() errlHndl_t l_err = NULL; bool l_usingStash = false; - // Get a pointer to the reserved memory where HB - // saved the overrides during boot - uint64_t l_overAttrSize = 0; - uint64_t l_overAddr = hb_get_rt_rsvd_mem(Util::HBRT_MEM_LABEL_ATTROVER, - 0, l_overAttrSize); - - - // Having no overrides is a normal thing - if( (l_overAddr == 0) ) - { - TRACFCOMP(g_trac_targeting, "No Overrides found" ); - TRACFCOMP(g_trac_targeting, EXIT_MRK"applyTempOverrides"); - return; - } - else + for(NODE_ID l_nodeId = NODE0; + l_nodeId < Singleton<AttrRP>::instance().getNodeCount(); + l_nodeId++) { - TRACFCOMP(g_trac_targeting, "Overrides found at %.16llX", l_overAddr ); - } + // Get a pointer to the reserved memory where HB + // saved the overrides during boot + uint64_t l_overAttrSize = 0; + uint64_t l_overAddr = hb_get_rt_rsvd_mem(Util::HBRT_MEM_LABEL_ATTROVER, + l_nodeId, l_overAttrSize); - // Use a faux PNOR Section that is associated - // with the data in mainstore - PNOR::SectionInfo_t l_info; - l_info.vaddr = l_overAddr; - l_info.size = l_overAttrSize; - l_info.id = PNOR::ATTR_TMP; - l_info.name = "HBRT Overrides"; - - TRACFCOMP(g_trac_targeting," HBRT: processing overrides from boot"); - l_err = TARGETING::getAttrOverrides(l_info); - if (l_err) - { - TRACFCOMP(g_trac_targeting," HBRT: Failed applying overrides"); - if( l_usingStash ) + + // Having no overrides is a normal thing + if( (l_overAddr == 0) ) { - // if the new RHB is in use, this will always fail - // so just delete the error - delete l_err; - l_err = nullptr; + TRACFCOMP(g_trac_targeting, "No Overrides found" ); + TRACFCOMP(g_trac_targeting, EXIT_MRK"applyTempOverrides"); + continue; } else { - errlCommit( l_err, TARG_COMP_ID ); + TRACFCOMP(g_trac_targeting, "Overrides found at %.16llX", + l_overAddr ); + } + + // Use a faux PNOR Section that is associated + // with the data in mainstore + PNOR::SectionInfo_t l_info; + l_info.vaddr = l_overAddr; + l_info.size = l_overAttrSize; + l_info.id = PNOR::ATTR_TMP; + l_info.name = "HBRT Overrides"; + + TRACFCOMP(g_trac_targeting," HBRT: processing overrides from boot"); + l_err = TARGETING::getAttrOverrides(l_info); + if (l_err) + { + TRACFCOMP(g_trac_targeting," HBRT: Failed applying overrides"); + if( l_usingStash ) + { + // if the new RHB is in use, this will always fail + // so just delete the error + delete l_err; + l_err = nullptr; + } + else + { + errlCommit( l_err, TARG_COMP_ID ); + } } } |