diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2013-08-15 14:48:29 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-08-21 15:39:45 -0500 |
commit | a0a28214eff925dae2a5e1081c6d600560fafdb5 (patch) | |
tree | ac65e7477e1080fa4b288754731d5800b0668c83 /src/usr | |
parent | b814311a6dc122e761336881130eace63d3533e7 (diff) | |
download | talos-hostboot-a0a28214eff925dae2a5e1081c6d600560fafdb5.tar.gz talos-hostboot-a0a28214eff925dae2a5e1081c6d600560fafdb5.zip |
Update PAYLOAD_KIND to non volatile for Sapphire
Change-Id: Icc7a5782ed32cbe3fc814951613d6d2b543c7e59
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5804
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/hwpf/hwp/start_payload/start_payload.C | 24 | ||||
-rw-r--r-- | src/usr/targeting/common/util.C | 58 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types.xml | 10 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml | 2 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml | 2 |
5 files changed, 55 insertions, 41 deletions
diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C index f7b132295..b55ea4cbe 100644 --- a/src/usr/hwpf/hwp/start_payload/start_payload.C +++ b/src/usr/hwpf/hwp/start_payload/start_payload.C @@ -210,7 +210,6 @@ void* call_host_runtime_setup( void *io_pArgs ) } // Map the Host Data into the VMM if applicable - // Note: call will set ATTR_PAYLOAD_KIND appropriately l_err = RUNTIME::load_host_data(); if( l_err ) { @@ -224,18 +223,9 @@ void* call_host_runtime_setup( void *io_pArgs ) TARGETING::ATTR_PAYLOAD_KIND_type payload_kind = sys->getAttr<TARGETING::ATTR_PAYLOAD_KIND>(); - //If PHYP then clean the PORE BARs - if( TARGETING::PAYLOAD_KIND_PHYP == payload_kind ) - { - l_err = clearPoreBars(); - if( l_err ) - { - break; - } - } //Only run OCC in AVP mode. Run the rest in !AVP mode - if( TARGETING::PAYLOAD_KIND_AVP == payload_kind ) + if( is_avp_load() ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Skipping host_runtime_setup in AVP mode. Starting OCC" ); //Load modules needed by OCC @@ -298,8 +288,18 @@ void* call_host_runtime_setup( void *io_pArgs ) break; } } - else + else //PHYP or SAPPHIRE with FSP { + //If PHYP then clean the PORE BARs + if( TARGETING::PAYLOAD_KIND_PHYP == payload_kind ) + { + l_err = clearPoreBars(); + if( l_err ) + { + break; + } + } + //Update the MDRT value l_err = RUNTIME::write_MDRT_Count(); if(l_err != NULL) diff --git a/src/usr/targeting/common/util.C b/src/usr/targeting/common/util.C index c622e4b5d..a53f2c88a 100644 --- a/src/usr/targeting/common/util.C +++ b/src/usr/targeting/common/util.C @@ -133,29 +133,18 @@ bool is_phyp_load( ATTR_PAYLOAD_KIND_type* o_type ) // get the current payload kind ATTR_PAYLOAD_KIND_type payload_kind = sys->getAttr<ATTR_PAYLOAD_KIND>(); - // read the mfg flags if we haven't already - if( payload_kind != PAYLOAD_KIND_AVP ) - { - ATTR_MNFG_FLAGS_type mnfg_flags = sys->getAttr<ATTR_MNFG_FLAGS>(); - - // if any AVP flags are set, override the payload kind - if( (mnfg_flags & MNFG_FLAG_BIT_MNFG_AVP_ENABLE) - || (mnfg_flags & MNFG_FLAG_BIT_MNFG_HDAT_AVP_ENABLE) ) - { - if( payload_kind != PAYLOAD_KIND_AVP ) - { - payload_kind = PAYLOAD_KIND_AVP; - sys->setAttr<ATTR_PAYLOAD_KIND>(payload_kind); - } - } - } - if( o_type ) { *o_type = payload_kind; } - return( PAYLOAD_KIND_PHYP == payload_kind ); + //If in AVP mode default to false + bool is_phyp = false; + if(!is_avp_load()) + { + is_phyp = (PAYLOAD_KIND_PHYP == payload_kind); + } + return is_phyp; } /** @@ -171,9 +160,38 @@ bool is_sapphire_load(void) TARGETING::Target * sys = NULL; TARGETING::targetService().getTopLevelTarget( sys ); assert(sys != NULL); + bool is_sapphire = false; + + //If in AVP mode default to false + if(!is_avp_load()) + { + is_sapphire = (PAYLOAD_KIND_SAPPHIRE == + sys->getAttr<TARGETING::ATTR_PAYLOAD_KIND>()); + } + return is_sapphire; +} + +/** + * @brief Utility function to determine if an AVP is the payload + * Note the actual payload could be something else -- this + * is based solely on MFG flags + * + * @description If MFG AVP mode flags are set then returns true + * Does not matter what the actual payload is + * + * @return bool True when in AVP mode + */ +bool is_avp_load(void) +{ + TARGETING::Target * sys = NULL; + TARGETING::targetService().getTopLevelTarget( sys ); + assert(sys != NULL); + + TARGETING::ATTR_MNFG_FLAGS_type mnfg_flags = + sys->getAttr<TARGETING::ATTR_MNFG_FLAGS>(); - return (TARGETING::PAYLOAD_KIND_SAPPHIRE == - sys->getAttr<TARGETING::ATTR_PAYLOAD_KIND>()); + return ((mnfg_flags & TARGETING::MNFG_FLAG_BIT_MNFG_AVP_ENABLE) + || (mnfg_flags & TARGETING::MNFG_FLAG_BIT_MNFG_HDAT_AVP_ENABLE)); } diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index 48970572c..9c6a7eb75 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -2027,16 +2027,12 @@ <value>1</value> </enumerator> <enumerator> - <name>AVP</name> - <value>2</value> - </enumerator> - <enumerator> <name>SAPPHIRE</name> - <value>3</value> + <value>2</value> </enumerator> <enumerator> <name>NONE</name> - <value>4</value> + <value>3</value> </enumerator> <default>UNKNOWN</default> </enumerationType> @@ -2051,7 +2047,7 @@ <id>PAYLOAD_KIND</id> </enumeration> </simpleType> - <persistency>volatile</persistency> + <persistency>non-volatile</persistency> <readable/> <writeable/> <hasStringConversion/> diff --git a/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml b/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml index 757972edb..3ff3edeba 100644 --- a/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml +++ b/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml @@ -140,7 +140,7 @@ </attribute> <attribute> <id>PAYLOAD_KIND</id> - <default>AVP</default> + <default>NONE</default> </attribute> <attribute> <id>MSS_MBA_ADDR_INTERLEAVE_BIT</id> diff --git a/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml b/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml index 757c25e90..7b2fb0040 100644 --- a/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml +++ b/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml @@ -137,7 +137,7 @@ </attribute> <attribute> <id>PAYLOAD_KIND</id> - <default>AVP</default> + <default>NONE</default> </attribute> <attribute> <id>MSS_MBA_ADDR_INTERLEAVE_BIT</id> |