diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2017-04-11 21:25:45 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-09-14 09:25:09 -0400 |
commit | 8a4cc1d6b3770dade628f77bcb01ed397181730d (patch) | |
tree | 1255ae9a44396c754ae11403a6bf5b40cce03fd0 /src/usr/intr | |
parent | 3d6c5417a82f5dec8e708c0f311f1634a2aad651 (diff) | |
download | talos-hostboot-8a4cc1d6b3770dade628f77bcb01ed397181730d.tar.gz talos-hostboot-8a4cc1d6b3770dade628f77bcb01ed397181730d.zip |
Ability to boot in SMT1 or SMT2 in Hostboot
Change-Id: Ie377f47a5087e6a53ff57c4c4415be014f92c461
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40584
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-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>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/intr')
-rw-r--r-- | src/usr/intr/intrrp.C | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/usr/intr/intrrp.C b/src/usr/intr/intrrp.C index 87e2b1374..155418fde 100644 --- a/src/usr/intr/intrrp.C +++ b/src/usr/intr/intrrp.C @@ -54,6 +54,7 @@ #include <arch/pvrformat.H> #include <config.h> #include <p9_misc_scom_addresses.H> +#include <util/utilmbox_scratch.H> #define INTR_TRACE_NAME INTR_COMP_NAME @@ -3579,10 +3580,27 @@ uint64_t INTR::get_enabled_threads( void ) uint64_t en_threads = sys->getAttr<TARGETING::ATTR_ENABLED_THREADS>(); if( en_threads == 0 ) { - //TODO RTC 151022 - //Read <SBE memory area> for enabled threads value - // and set attribute appropriately - en_threads = 0xF000000000000000; //Enable all the threads + //Read mbox scratch regs for enabled threads value + //and set attribute appropriately + INITSERVICE::SPLESS::MboxScratch3_t l_scratch3; + TARGETING::ATTR_MASTER_MBOX_SCRATCH_type l_scratchRegs; + assert(sys->tryGetAttr + <TARGETING::ATTR_MASTER_MBOX_SCRATCH>(l_scratchRegs), + "INTR::get_enabled_threads() failed to get MASTER_MBOX_SCRATCH"); + l_scratch3.data32 = l_scratchRegs[INITSERVICE::SPLESS::SCRATCH_3]; + + if(l_scratch3.smtMode == 0x1) + { + en_threads = 0x8000000000000000; //SMT1 == thread 0 + } + else if (l_scratch3.smtMode == 0x2) + { + en_threads = 0xC000000000000000; //SMT2 == thread 0,1 + } + else + { + en_threads = 0xF000000000000000; //SMT4 == thread 0..3 + } sys->setAttr<TARGETING::ATTR_ENABLED_THREADS>(en_threads); } return en_threads; |