diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2013-10-01 08:36:09 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-10-10 15:56:42 -0500 |
commit | 75c505e0c95e8412d007801bfe8a0dd192039df3 (patch) | |
tree | e01fc27254357b93469445ff2689d7124100647c | |
parent | 4e69f6de00bbc2de7c73ff572963e07fb498329f (diff) | |
download | talos-hostboot-75c505e0c95e8412d007801bfe8a0dd192039df3.tar.gz talos-hostboot-75c505e0c95e8412d007801bfe8a0dd192039df3.zip |
Split "SPless" from mailbox for Cronus control of HB
Change-Id: Ifc44ca2f54bc61163f797b8020ffdd7bf9cc3240
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6424
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r-- | src/include/usr/initservice/initserviceif.H | 2 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/dram_training/dram_training.C | 9 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/tod_init/tod_init.C | 21 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.C | 15 | ||||
-rw-r--r-- | src/usr/mbox/mailboxsp.C | 16 | ||||
-rw-r--r-- | src/usr/targeting/attrsync.C | 7 | ||||
-rwxr-xr-x | src/usr/targeting/common/genHwsvMrwXml.pl | 1 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/attribute_types.xml | 26 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/simics_MURANO.system.xml | 1 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/simics_VENICE.system.xml | 1 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml | 1 | ||||
-rw-r--r-- | src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml | 1 | ||||
-rw-r--r-- | src/usr/targeting/test/testattrsync.H | 9 | ||||
-rw-r--r-- | src/usr/trace/daemon/daemon.C | 4 | ||||
-rw-r--r-- | src/usr/vpd/vpd.C | 7 |
15 files changed, 61 insertions, 60 deletions
diff --git a/src/include/usr/initservice/initserviceif.H b/src/include/usr/initservice/initserviceif.H index 9bfd7b0b0..6ecfa4b47 100644 --- a/src/include/usr/initservice/initserviceif.H +++ b/src/include/usr/initservice/initserviceif.H @@ -126,7 +126,7 @@ inline bool spLess ( void ) TARGETING::SpFunctions spfuncs; if( sys && sys->tryGetAttr<TARGETING::ATTR_SP_FUNCTIONS>(spfuncs) && - !spfuncs.mailboxEnabled ) + !spfuncs.baseServices ) { spless = true; } diff --git a/src/usr/hwpf/hwp/dram_training/dram_training.C b/src/usr/hwpf/hwp/dram_training/dram_training.C index 161d0a2c0..728322596 100644 --- a/src/usr/hwpf/hwp/dram_training/dram_training.C +++ b/src/usr/hwpf/hwp/dram_training/dram_training.C @@ -55,6 +55,7 @@ //hb vddr support #include <hbVddrMsg.H> +#include <initservice/initserviceif.H> // Run on all Centaurs/MBAs, but needs to keep this one handy in case we // want to limit them in VPO @@ -94,7 +95,7 @@ void* call_host_disable_vddr( void *io_pArgs ) TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_disable_vddr entry" ); - if( MBOX::mailbox_enabled() ) + if( !INITSERVICE::spLess() ) { IStepError l_StepError; @@ -139,7 +140,7 @@ void* call_host_disable_vddr( void *io_pArgs ) } else { - //no mailbox running so this is a fsp less system. Right now the istep + //This is a fsp less system. Right now the istep //only works when a FSP is present. May add code in the future for //Stradale which is a FSP-less system TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,"call_host_disable_vddr" @@ -394,7 +395,7 @@ void* call_host_enable_vddr( void *io_pArgs ) errlHndl_t l_err = NULL; - if( MBOX::mailbox_enabled() ) + if( !INITSERVICE::spLess() ) { IStepError l_StepError; @@ -438,7 +439,7 @@ void* call_host_enable_vddr( void *io_pArgs ) } else { - //no mailbox running so this is a fsp less system. Right now the istep + //This is a fsp less system. Right now the istep //only works when a FSP is present. May add code in the future for //Stradale which is a FSP-less system TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,"call_host_enable_vddr" diff --git a/src/usr/hwpf/hwp/tod_init/tod_init.C b/src/usr/hwpf/hwp/tod_init/tod_init.C index c67435be6..0140d17ff 100644 --- a/src/usr/hwpf/hwp/tod_init/tod_init.C +++ b/src/usr/hwpf/hwp/tod_init/tod_init.C @@ -36,6 +36,7 @@ #include <errl/errlentry.H> #include <errl/errlmanager.H> #include <targeting/common/targetservice.H> +#include <initservice/initserviceif.H> #include "TodTrace.H" #include "tod_init.H" #include "TodSvc.H" @@ -47,27 +48,11 @@ const char TOD_TRACE_NAME[] = "TOD"; trace_desc_t* g_trac_tod = NULL; TRAC_INIT(&g_trac_tod, TOD_TRACE_NAME, KILOBYTE, TRACE::BUFFER_SLOW); -static bool is_spless() -{ - bool spless = true; - TARGETING::Target * sys = NULL; - TARGETING::targetService().getTopLevelTarget( sys ); - TARGETING::SpFunctions spfuncs; - if( sys && - sys->tryGetAttr<TARGETING::ATTR_SP_FUNCTIONS>(spfuncs) && - spfuncs.mailboxEnabled ) - { - spless = false; - } - - return spless; -} - void * call_tod_setup(void *dummy) { errlHndl_t l_errl; - if (is_spless()) + if (INITSERVICE::spLess()) { l_errl = TodSvc::getTheInstance().todSetup(); @@ -85,7 +70,7 @@ void * call_tod_init(void *dummy) { errlHndl_t l_errl; - if (is_spless()) + if (INITSERVICE::spLess()) { l_errl = TodSvc::getTheInstance().todInit(); diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index eaac5b902..7197dc8d2 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -177,9 +177,10 @@ void IStepDispatcher::init ( errlHndl_t &io_rtaskRetErrl ) do { - if( !spLess() ) + if( MBOX::mailbox_enabled() ) { - // register message Q with FSP Mailbox - only if Fsp attached. + // register message Q with FSP Mailbox - only if mailbox + // enabled err = MBOX::msgq_register( MBOX::HB_ISTEP_MSGQ, iv_msgQ ); @@ -188,6 +189,12 @@ void IStepDispatcher::init ( errlHndl_t &io_rtaskRetErrl ) break; } } + else + { + assert(spLess()); // If the mailbox is disabled, we better be in + // spLess mode. Otherwise, attributes are set + // incorrectly. + } // Spawn off the Worker thread tid_t l_workerTid = task_create( startIStepWorkerThread, @@ -233,7 +240,7 @@ void IStepDispatcher::init ( errlHndl_t &io_rtaskRetErrl ) TRACFCOMP( g_trac_initsvc, "IStep run all" ); - if(!spLess()) + if(MBOX::mailbox_enabled()) { // Read the attribute indicating if the FSP has overrides // and get the overrides if it does @@ -915,7 +922,7 @@ void IStepDispatcher::handleBreakpoint ( uint32_t i_info ) myMsg->data[1] = 0x0; myMsg->extra_data = NULL; - if( !spLess() ) + if( MBOX::mailbox_enabled() ) { // FSP Attached // Wait for Fsp to respond. diff --git a/src/usr/mbox/mailboxsp.C b/src/usr/mbox/mailboxsp.C index 5a354f764..41fe57873 100644 --- a/src/usr/mbox/mailboxsp.C +++ b/src/usr/mbox/mailboxsp.C @@ -136,24 +136,14 @@ errlHndl_t MailboxSp::_init() return err; } - bool spless = true; - - TARGETING::Target * sys = NULL; - TARGETING::targetService().getTopLevelTarget( sys ); - TARGETING::SpFunctions spfuncs; - if( sys && - sys->tryGetAttr<TARGETING::ATTR_SP_FUNCTIONS>(spfuncs) && - spfuncs.mailboxEnabled) - { - spless = false; - } + bool mbxComm = mailbox_enabled(); // create task before registering the msgQ so any waiting interrupts get // handled as soon as the msgQ is registered with the interrupt service // provider task_create(MailboxSp::msg_handler, NULL); - if(!spless) + if(mbxComm) { // Initialize the mailbox hardware err = mboxInit(iv_trgt); @@ -178,7 +168,7 @@ errlHndl_t MailboxSp::_init() INTR::ISN_INTERPROC); - if(!spless) + if(mbxComm) { // Send message to FSP on base DMA buffer zone msg_t * msg = msg_allocate(); diff --git a/src/usr/targeting/attrsync.C b/src/usr/targeting/attrsync.C index 70494a691..a5ff2e057 100644 --- a/src/usr/targeting/attrsync.C +++ b/src/usr/targeting/attrsync.C @@ -23,6 +23,7 @@ #include <targeting/attrsync.H> #include <targeting/common/targreasoncodes.H> #include <targeting/common/trace.H> +#include <initservice/initserviceif.H> using namespace ERRORLOG; @@ -486,9 +487,9 @@ namespace TARGETING errlHndl_t l_errl = NULL; do{ - // if the mailbox is not enabled then skip attribute sync + // if no FSP then skip attribute sync // let the test case force message creation/sending - if( !(MBOX::mailbox_enabled()) ) + if( INITSERVICE::spLess() ) { break; } @@ -532,7 +533,7 @@ namespace TARGETING do{ // if the mailbox is not enabled then skip attribute sync - if( !(MBOX::mailbox_enabled()) ) + if( INITSERVICE::spLess() ) { TARG_INF( "Mailbox is not enabled, skipping attribute sync" ); break; diff --git a/src/usr/targeting/common/genHwsvMrwXml.pl b/src/usr/targeting/common/genHwsvMrwXml.pl index 9d167f23e..7bff313b6 100755 --- a/src/usr/targeting/common/genHwsvMrwXml.pl +++ b/src/usr/targeting/common/genHwsvMrwXml.pl @@ -1564,6 +1564,7 @@ sub generate_sys <attribute> <id>SP_FUNCTIONS</id> <default> + <field><id>baseServices</id><value>1</value></field> <field><id>fsiSlaveInit</id><value>1</value></field> <field><id>mailboxEnabled</id><value>1</value></field> <field><id>fsiMasterInit</id><value>1</value></field> diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index 797945ed4..faf2b9672 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -1880,12 +1880,24 @@ Applicable for System target only. Structure is read-only. </description> <field> + <name>baseServices</name> + <description> + If this flag is set then mailboxEnabled MUST also be set + + 0b0: SP does not support for VPD, payload, ATTR sync, VDDR, TOD; + 0b1: SP supports VPD, payload, ATTR sync, VDDR, TOD + </description> + <type>uint32_t</type> + <bits>1</bits> + <default>1</default> + </field> + <field> <name>fsiSlaveInit</name> <description> 0b0: SP does not initialize FSI slave logic, Hostboot must; 0b1: SP does initialize FSI slave logic so Hostboot should not </description> - <type>uint8_t</type> + <type>uint32_t</type> <bits>1</bits> <default>1</default> </field> @@ -1895,7 +1907,7 @@ 0b0: There is no SP mailbox support; 0b1: There is SP mailbox support </description> - <type>uint8_t</type> + <type>uint32_t</type> <bits>1</bits> <default>0</default> </field> @@ -1905,7 +1917,7 @@ 0b0: SP does not initialize FSI master logic, Hostboot must; 0b1: SP does initialize FSI master logic so Hostboot should not </description> - <type>uint8_t</type> + <type>uint32_t</type> <bits>1</bits> <default>1</default> </field> @@ -1915,7 +1927,7 @@ 0b0: SP does not perform hardware change detection, Hostboot must; 0b1: SP does perform hardware change detection (HCDB) so Hostboot should not </description> - <type>uint8_t</type> + <type>uint32_t</type> <bits>1</bits> <default>1</default> </field> @@ -1925,15 +1937,15 @@ 0b0: SP does not perform Power Line Disturbance (PLD) detection, Hostboot must; 0b1: SP does perform Power Line Disturbance (PLD) detection so Hostboot should not </description> - <type>uint8_t</type> + <type>uint32_t</type> <bits>1</bits> <default>1</default> </field> <field> <name>reserved</name> <description>Reserved for future use</description> - <type>uint8_t</type> - <bits>3</bits> + <type>uint32_t</type> + <bits>26</bits> <default>0</default> </field> </complexType> diff --git a/src/usr/targeting/common/xmltohb/simics_MURANO.system.xml b/src/usr/targeting/common/xmltohb/simics_MURANO.system.xml index 9c21b2440..84ca82f95 100644 --- a/src/usr/targeting/common/xmltohb/simics_MURANO.system.xml +++ b/src/usr/targeting/common/xmltohb/simics_MURANO.system.xml @@ -125,6 +125,7 @@ <field><id>fsiMasterInit</id><value>0</value></field> <field><id>hardwareChangeDetection</id><value>0</value></field> <field><id>powerLineDisturbance</id><value>0</value></field> + <field><id>baseServices</id><value>0</value></field> <field><id>reserved</id><value>0</value></field> </default> </attribute> diff --git a/src/usr/targeting/common/xmltohb/simics_VENICE.system.xml b/src/usr/targeting/common/xmltohb/simics_VENICE.system.xml index 13c8c3b3d..fc5fe3090 100644 --- a/src/usr/targeting/common/xmltohb/simics_VENICE.system.xml +++ b/src/usr/targeting/common/xmltohb/simics_VENICE.system.xml @@ -101,6 +101,7 @@ <field><id>fsiMasterInit</id><value>0</value></field> <field><id>hardwareChangeDetection</id><value>0</value></field> <field><id>powerLineDisturbance</id><value>0</value></field> + <field><id>baseServices</id><value>0</value></field> <field><id>reserved</id><value>0</value></field> </default> </attribute> diff --git a/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml b/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml index 125574a86..175a0284c 100644 --- a/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml +++ b/src/usr/targeting/common/xmltohb/vbu_MURANO.system.xml @@ -118,6 +118,7 @@ <field><id>fsiMasterInit</id><value>0</value></field> <field><id>hardwareChangeDetection</id><value>0</value></field> <field><id>powerLineDisturbance</id><value>0</value></field> + <field><id>baseServices</id><value>0</value></field> <field><id>reserved</id><value>0</value></field> </default> </attribute> diff --git a/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml b/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml index 697eb90db..ccd9643cc 100644 --- a/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml +++ b/src/usr/targeting/common/xmltohb/vbu_VENICE.system.xml @@ -116,6 +116,7 @@ <field><id>fsiMasterInit</id><value>0</value></field> <field><id>hardwareChangeDetection</id><value>0</value></field> <field><id>powerLineDisturbance</id><value>0</value></field> + <field><id>baseServices</id><value>0</value></field> <field><id>reserved</id><value>0</value></field> </default> </attribute> diff --git a/src/usr/targeting/test/testattrsync.H b/src/usr/targeting/test/testattrsync.H index dc82566e9..70b2c85b5 100644 --- a/src/usr/targeting/test/testattrsync.H +++ b/src/usr/targeting/test/testattrsync.H @@ -53,6 +53,7 @@ #include <errl/errludtarget.H> #include <targeting/common/trace.H> #include <kernel/console.H> +#include <initservice/initserviceif.H> class AttrSyncTestSuite : public CxxTest::TestSuite { @@ -76,7 +77,7 @@ class AttrSyncTestSuite : public CxxTest::TestSuite if( err ) { - if( MBOX::mailbox_enabled() ) + if( !INITSERVICE::spLess() ) { TS_FAIL(" Error returned when syncing SECTION_TYPE_PNOR_RW"); } @@ -91,7 +92,7 @@ class AttrSyncTestSuite : public CxxTest::TestSuite if( err ) { - if( MBOX::mailbox_enabled() ) + if( !INITSERVICE::spLess() ) { TS_FAIL(" Error returned when syncing SECTION_TYPE_HEAP_PNOR_INIT"); } @@ -106,7 +107,7 @@ class AttrSyncTestSuite : public CxxTest::TestSuite if( err ) { - if( MBOX::mailbox_enabled() ) + if( !INITSERVICE::spLess() ) { TS_FAIL(" Error returned when syncing SECTION_TYPE_HEAP_ZERO_INIT"); } @@ -164,7 +165,7 @@ class AttrSyncTestSuite : public CxxTest::TestSuite if (l_errl) { - if( MBOX::mailbox_enabled() ) + if( !INITSERVICE::spLess() ) { TS_FAIL( "Error returned when syncing section type %d " "from FSP", section_type[i]); diff --git a/src/usr/trace/daemon/daemon.C b/src/usr/trace/daemon/daemon.C index e9062f867..6351381c0 100644 --- a/src/usr/trace/daemon/daemon.C +++ b/src/usr/trace/daemon/daemon.C @@ -426,8 +426,6 @@ namespace TRACEDAEMON TARGETING::Target* sys = NULL; TARGETING::targetService().getTopLevelTarget(sys); - TARGETING::SpFunctions spFunctions = - sys->getAttr<TARGETING::ATTR_SP_FUNCTIONS>(); TARGETING::HbSettings hbSettings = sys->getAttr<TARGETING::ATTR_HB_SETTINGS>(); @@ -447,7 +445,7 @@ namespace TRACEDAEMON } else { - if (spFunctions.mailboxEnabled) + if (MBOX::mailbox_enabled()) { msg_t* msg = msg_allocate(); msg->type = DaemonIf::TRACE_CONT_TRACE_BUFFER; diff --git a/src/usr/vpd/vpd.C b/src/usr/vpd/vpd.C index d610d4c1a..3ddb7f515 100644 --- a/src/usr/vpd/vpd.C +++ b/src/usr/vpd/vpd.C @@ -25,6 +25,7 @@ #include <errl/errlmanager.H> #include <errl/errludtarget.H> #include <vpd/vpdreasoncodes.H> +#include <initservice/initserviceif.H> #include "vpd.H" // ---------------------------------------------- @@ -279,13 +280,13 @@ errlHndl_t sendMboxWriteMsg ( size_t i_numBytes, i_record.rec_num, i_record.offset ); - //Create a mbox message with the error log and send it to FSP - //We only send error log to FSP when mailbox is enabled - if( !MBOX::mailbox_enabled() ) + //We only send VPD update when we have an FSP + if( INITSERVICE::spLess() ) { TRACFCOMP(g_trac_vpd, INFO_MRK "Mailbox is disabled, skipping VPD write"); TRACFBIN( g_trac_vpd, "msg=", msg, sizeof(msg_t) ); TRACFBIN( g_trac_vpd, "extra=", msg->extra_data, i_numBytes ); + break; } l_err = MBOX::send( MBOX::FSP_VPD_MSGQ, msg ); |