summaryrefslogtreecommitdiffstats
path: root/src/usr/hdat
diff options
context:
space:
mode:
authorDean Sanner <dsanner@us.ibm.com>2017-04-11 21:25:45 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-09-14 09:25:09 -0400
commit8a4cc1d6b3770dade628f77bcb01ed397181730d (patch)
tree1255ae9a44396c754ae11403a6bf5b40cce03fd0 /src/usr/hdat
parent3d6c5417a82f5dec8e708c0f311f1634a2aad651 (diff)
downloadtalos-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/hdat')
-rw-r--r--src/usr/hdat/hdatpcia.C31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/usr/hdat/hdatpcia.C b/src/usr/hdat/hdatpcia.C
index 9f32cdba5..0f89604b9 100644
--- a/src/usr/hdat/hdatpcia.C
+++ b/src/usr/hdat/hdatpcia.C
@@ -162,24 +162,43 @@ errlHndl_t HdatPcia::hdatLoadPcia(uint32_t &o_size, uint32_t &o_count)
}
l_coreThreadCount = l_pTopLevel->getAttr<ATTR_THREAD_COUNT>();
+ uint64_t en_thread_mask =
+ l_pTopLevel->getAttr<TARGETING::ATTR_ENABLED_THREADS>();
+ //Check the enabled threads to see if user overrode to SMT1 or SMT2
+ //Note this only handles specific SMT1/2 -- no other permutations
+ size_t l_enabledThreads = l_coreThreadCount;
+ if (en_thread_mask == 0x8000000000000000)
+ {
+ l_enabledThreads = 1;
+ }
+ else if (en_thread_mask == 0xC000000000000000)
+ {
+ l_enabledThreads = 2;
+ }
uint32_t l_procStatus;
- HDAT_DBG("Core Thread Count[%d]", l_coreThreadCount);
+ HDAT_DBG("Core Thread Count[%d], Enabled[%d]",
+ l_coreThreadCount, l_enabledThreads);
- if ( l_coreThreadCount == HDAT_MAX_EIGHT_THREADS_SUPPORTED )
+ if ( l_enabledThreads == HDAT_MAX_EIGHT_THREADS_SUPPORTED )
{
l_procStatus =
HDAT_PROC_NOT_INSTALLED | HDAT_PRIM_THREAD | HDAT_EIGHT_THREAD;
}
- else if ( l_coreThreadCount == HDAT_MAX_FOUR_THREADS_SUPPORTED )
+ else if ( l_enabledThreads == HDAT_MAX_FOUR_THREADS_SUPPORTED )
{
l_procStatus =
HDAT_PROC_NOT_INSTALLED | HDAT_PRIM_THREAD | HDAT_FOUR_THREAD;
}
- else
+ else if ( l_enabledThreads == HDAT_MAX_TWO_THREADS_SUPPORTED )
{
l_procStatus =
HDAT_PROC_NOT_INSTALLED | HDAT_PRIM_THREAD | HDAT_TWO_THREAD;
}
+ else // Single threaded
+ {
+ l_procStatus =
+ HDAT_PROC_NOT_INSTALLED | HDAT_PRIM_THREAD;
+ }
//for each procs in the system
TARGETING::PredicateCTM l_procFilter(CLASS_CHIP, TYPE_PROC);
TARGETING::PredicateHwas l_pred;
@@ -232,7 +251,7 @@ errlHndl_t HdatPcia::hdatLoadPcia(uint32_t &o_size, uint32_t &o_count)
l_pTarget->getAttr<TARGETING::ATTR_CHIP_UNIT>();
for ( uint32_t l_threadIndex=0;
- l_threadIndex < l_coreThreadCount; ++l_threadIndex)
+ l_threadIndex < l_enabledThreads; ++l_threadIndex)
{
l_errl = hdatSetCoreInfo(index,
l_pTarget,l_pProcTarget);
@@ -325,7 +344,7 @@ errlHndl_t HdatPcia::hdatLoadPcia(uint32_t &o_size, uint32_t &o_count)
this->iv_spPcia[index].hdatThreadData.pciaThreadOffsetToData
= offsetof(hdatPciaThreadUniqueData_t, pciaThreadData);
this->iv_spPcia[index].hdatThreadData.pciaThreadNumEntries
- = l_coreThreadCount;
+ = l_enabledThreads;
this->iv_spPcia[index].hdatThreadData.
pciaThreadSizeAllocated = sizeof(hdatPciaThreadArray_t);
this->iv_spPcia[index].hdatThreadData.pciaThreadSizeActual =
OpenPOWER on IntegriCloud