diff options
author | Dan Crowell <dcrowell@us.ibm.com> | 2012-07-20 10:35:44 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-07-28 13:08:52 -0500 |
commit | 78ad51e8cacc19fa2f50991347adbb0a1a5e78d9 (patch) | |
tree | 0e066a0736d0dc46eb02809e425efc4c2231a5aa /src/usr/fsi | |
parent | 1997c5a89c4936d6c51e04f661271fb7ec207edc (diff) | |
download | talos-hostboot-78ad51e8cacc19fa2f50991347adbb0a1a5e78d9.tar.gz talos-hostboot-78ad51e8cacc19fa2f50991347adbb0a1a5e78d9.zip |
Handle FSP initializing FSI slaves better
Two minor changes:
1) Noticed a bug in the last update that will throw off our
presence detection
2) Started checking the Port Enable register to see what ports
FSP actually enabled
Change-Id: I84b49f5d57007376eee7a96149a5dd0975de7658
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1416
Tested-by: Jenkins Server
Reviewed-by: Van H. Lee <vanlee@us.ibm.com>
Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/fsi')
-rw-r--r-- | src/usr/fsi/fsidd.C | 20 | ||||
-rw-r--r-- | src/usr/fsi/fsidd.H | 1 |
2 files changed, 16 insertions, 5 deletions
diff --git a/src/usr/fsi/fsidd.C b/src/usr/fsi/fsidd.C index 1b386869d..9c037c5a9 100644 --- a/src/usr/fsi/fsidd.C +++ b/src/usr/fsi/fsidd.C @@ -1341,7 +1341,7 @@ errlHndl_t FsiDD::initMasterControl(const TARGETING::Target* i_master, do { // Do not initialize slaves because they are already done // before we run - bool skipit = false; + bool fsp_slave_init = false; TARGETING::Target * sys = NULL; TARGETING::targetService().getTopLevelTarget( sys ); TARGETING::SpFunctions spfuncs; @@ -1350,8 +1350,7 @@ errlHndl_t FsiDD::initMasterControl(const TARGETING::Target* i_master, && spfuncs.fsiSlaveInit ) { TRACFCOMP( g_trac_fsi, "FsiDD::initMasterControl> Skipping Master Init" ); - skipit = true; - break; + fsp_slave_init = true; } uint32_t databuf = 0; @@ -1366,7 +1365,7 @@ errlHndl_t FsiDD::initMasterControl(const TARGETING::Target* i_master, ctl_reg += getPortOffset(TARGETING::FSI_MASTER_TYPE_MFSI,m_info.port); } - if( !skipit ) + if( !fsp_slave_init ) { //Clear fsi port errors and general reset on all ports for( uint32_t port = 0; port < MAX_SLAVE_PORTS; ++port ) @@ -1401,12 +1400,23 @@ errlHndl_t FsiDD::initMasterControl(const TARGETING::Target* i_master, l_err = read( ctl_reg|FSI_MLEVP0_018, &databuf ); if( l_err ) { break; } + //Read what FSP actually enabled as well if they initialized it + if( fsp_slave_init ) + { + uint32_t databuf2 = 0; + l_err = read( ctl_reg|FSI_MENP0_010, &databuf2 ); + if( l_err ) { break; } + + //Only use slaves that we sense and FSP has enabled + databuf = databuf & databuf2; + } + // Only looking at the top bits uint64_t slave_index = getSlaveEnableIndex(i_master,i_type); iv_slaves[slave_index] = (uint8_t)(databuf >> (32-MAX_SLAVE_PORTS)); TRACFCOMP( g_trac_fsi, "FsiDD::initMasterControl> %.8X:%d : Slave Detect = %.8X", TARGETING::get_huid(i_master), i_type, databuf ); - if( skipit ) + if( fsp_slave_init ) { break; //all done } diff --git a/src/usr/fsi/fsidd.H b/src/usr/fsi/fsidd.H index b1f00e4d0..ab552ec9e 100644 --- a/src/usr/fsi/fsidd.H +++ b/src/usr/fsi/fsidd.H @@ -379,6 +379,7 @@ class FsiDD FSI_MMODE_000 = 0x000, FSI_MDLYR_004 = 0x004, FSI_MCRSP0_008 = 0x008, + FSI_MENP0_010 = 0x010, FSI_MLEVP0_018 = 0x018, FSI_MSIEP0_030 = 0x030, FSI_MAEB_070 = 0x070, |