summaryrefslogtreecommitdiffstats
path: root/src/usr/htmgt/htmgt_occ.C
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2017-08-24 11:24:12 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-09-07 14:25:17 -0400
commit87ff275e941937c256b5a00ddec76638b652f857 (patch)
treedb2cec15f0ca5ccdaa11eadfebab4da5c7ab8c5b /src/usr/htmgt/htmgt_occ.C
parenta644d89cb2b6208789e72ac4bf7423ec0fea5d3b (diff)
downloadtalos-hostboot-87ff275e941937c256b5a00ddec76638b652f857.tar.gz
talos-hostboot-87ff275e941937c256b5a00ddec76638b652f857.zip
HTMGT: Config data changes for GPU support
Change-Id: I2b4a5a82791ee6c4531d102dad51389f9dedbe6c RTC: 133828 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45480 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: Sheldon R. Bailey <baileysh@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt/htmgt_occ.C')
-rw-r--r--src/usr/htmgt/htmgt_occ.C34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/usr/htmgt/htmgt_occ.C b/src/usr/htmgt/htmgt_occ.C
index c6d230fad..4559b65a0 100644
--- a/src/usr/htmgt/htmgt_occ.C
+++ b/src/usr/htmgt/htmgt_occ.C
@@ -63,6 +63,7 @@ namespace HTMGT
iv_target(i_target),
iv_lastPollValid(false),
iv_occsPresent(1 << i_instance),
+ iv_gpuCfg(0),
iv_resetReason(OCC_RESET_REASON_NONE),
iv_exceptionLogged(0),
iv_resetCount(0),
@@ -363,6 +364,31 @@ namespace HTMGT
OCC_TRACE_INF );
}
+ // Notify HostBoot which GPUs are present (after OCC goes active)
+ void Occ::updateGpuPresence()
+ {
+ TARGETING::ConstTargetHandle_t const_proc_target =
+ TARGETING::getParentChip(iv_target);
+ SENSOR::StatusSensor::statusEnum gpu_status[MAX_GPUS] =
+ {
+ SENSOR::StatusSensor::NOT_PRESENT,
+ SENSOR::StatusSensor::NOT_PRESENT,
+ SENSOR::StatusSensor::NOT_PRESENT
+ };
+ if (iv_gpuCfg & GPUCFG_GPU0_PRESENT)
+ gpu_status[0] = SENSOR::StatusSensor::PRESENT;
+ if (iv_gpuCfg & GPUCFG_GPU1_PRESENT)
+ gpu_status[1] = SENSOR::StatusSensor::PRESENT;
+ if (iv_gpuCfg & GPUCFG_GPU2_PRESENT)
+ gpu_status[2] = SENSOR::StatusSensor::PRESENT;
+
+ TMGT_INF("updateGpuPresence: OCC%d - GPU0:%d, GPU1:%d, GPU2:%d",
+ iv_instance, gpu_status[0], gpu_status[1], gpu_status[2]);
+ SENSOR::updateGpuSensorStatus(const_cast<TARGETING::TargetHandle_t>
+ (const_proc_target),
+ gpu_status);
+ }
+
/////////////////////////////////////////////////////////////////
@@ -752,7 +778,12 @@ namespace HTMGT
// Make sure all OCCs went to active state
for( const auto & occ : iv_occArray )
{
- if (requestedState != occ->getState())
+ if (requestedState == occ->getState())
+ {
+ // Update GPU present status
+ occ->updateGpuPresence();
+ }
+ else
{
TMGT_ERR("_setOccState: OCC%d is not in 0x%02X "
"state",
@@ -797,7 +828,6 @@ namespace HTMGT
"CHARACTERIZATION state");
}
}
-
}
}
}
OpenPOWER on IntegriCloud