summaryrefslogtreecommitdiffstats
path: root/src/usr/htmgt
diff options
context:
space:
mode:
authorSheldon Bailey <baileysh@us.ibm.com>2017-03-15 12:49:16 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-03-30 18:12:27 -0400
commita36424c41b711c1361db33a9f2e2db2788fd91a9 (patch)
tree817460f02e04337ec4422bea172569a789169a83 /src/usr/htmgt
parent1fa7778144abe8e64ad6ae4109be9689422442ad (diff)
downloadtalos-hostboot-a36424c41b711c1361db33a9f2e2db2788fd91a9.tar.gz
talos-hostboot-a36424c41b711c1361db33a9f2e2db2788fd91a9.zip
HTMGT: Push2 BringUp changes needed to get HTMGT to work.
Thermal Control CMD data enhancments. AVS Bus Data enhancments. OCC checkpoint fix. Change-Id: Iaefe4a2a7cfd8408aefeafe818245524be84c253 RTC:170737 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38370 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> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt')
-rw-r--r--src/usr/htmgt/htmgt.C4
-rw-r--r--src/usr/htmgt/htmgt_cfgdata.C68
-rw-r--r--src/usr/htmgt/htmgt_cfgdata.H8
-rw-r--r--src/usr/htmgt/htmgt_occ.C33
-rw-r--r--src/usr/htmgt/htmgt_occ.H2
-rw-r--r--src/usr/htmgt/htmgt_poll.C2
-rw-r--r--src/usr/htmgt/htmgt_poll.H4
7 files changed, 80 insertions, 41 deletions
diff --git a/src/usr/htmgt/htmgt.C b/src/usr/htmgt/htmgt.C
index 628581a38..9f2405245 100644
--- a/src/usr/htmgt/htmgt.C
+++ b/src/usr/htmgt/htmgt.C
@@ -65,6 +65,7 @@ namespace HTMGT
}
TMGT_INF("processOccStartStatus(Start Success=%c, failedOcc=0x%08X)",
i_startCompleted?'y':'n', l_huid);
+
if (false == int_flags_set(FLAG_HOLD_OCCS_IN_RESET))
{
if (i_startCompleted)
@@ -207,6 +208,9 @@ namespace HTMGT
else
{
// retry worked - commit original error as informational
+ TMGT_INF("processOccStartStatus: OCC failed to go active "
+ "with 0x%04X, but recovery was successful",
+ l_err->reasonCode());
l_err->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL);
ERRORLOG::errlCommit(l_err, HTMGT_COMP_ID);
}
diff --git a/src/usr/htmgt/htmgt_cfgdata.C b/src/usr/htmgt/htmgt_cfgdata.C
index c83555872..58605c342 100644
--- a/src/usr/htmgt/htmgt_cfgdata.C
+++ b/src/usr/htmgt/htmgt_cfgdata.C
@@ -794,7 +794,11 @@ void getThermalControlMessageData(uint8_t* o_data,
if ( ! l_sys->tryGetAttr //if attr does not exists.
<ATTR_OPEN_POWER_PROC_WEIGHT>(l_proc_weight))
{
- l_proc_weight = 10; //Default 1.0 weight.
+ l_proc_weight = OCC_PROC_QUAD_DEFAULT_WEIGHT;
+ }
+ if(l_proc_weight == 0x0)
+ {
+ l_proc_weight = OCC_PROC_QUAD_DEFAULT_WEIGHT;
}
o_data[index++] = l_proc_weight;
@@ -804,7 +808,11 @@ void getThermalControlMessageData(uint8_t* o_data,
if ( ! l_sys->tryGetAttr //if attr does not exists.
<ATTR_OPEN_POWER_QUAD_WEIGHT>(l_quad_weight))
{
- l_quad_weight = 10; //Default 1.0 weight.
+ l_quad_weight = OCC_PROC_QUAD_DEFAULT_WEIGHT;
+ }
+ if(l_quad_weight == 0x0)
+ {
+ l_quad_weight = OCC_PROC_QUAD_DEFAULT_WEIGHT;
}
o_data[index++] = l_quad_weight;
@@ -819,11 +827,20 @@ void getThermalControlMessageData(uint8_t* o_data,
// Processor
o_data[index++] = CFGDATA_FRU_TYPE_PROC;
- o_data[index++] = l_sys->getAttr<ATTR_OPEN_POWER_PROC_DVFS_TEMP_DEG_C>();
- o_data[index++] = l_sys->getAttr<ATTR_OPEN_POWER_PROC_ERROR_TEMP_DEG_C>();
- o_data[index++] = 0xFF; //PM_DVFS not defined.
- o_data[index++] = 0xFF; //PM_ERROR not defined.
- o_data[index++] = l_sys->getAttr<ATTR_OPEN_POWER_PROC_READ_TIMEOUT_SEC>();
+ uint8_t l_DVFS_temp =l_sys->getAttr<ATTR_OPEN_POWER_PROC_DVFS_TEMP_DEG_C>();
+ uint8_t l_ERR_temp =l_sys->getAttr<ATTR_OPEN_POWER_PROC_ERROR_TEMP_DEG_C>();
+ uint8_t l_timeout = l_sys->getAttr<ATTR_OPEN_POWER_PROC_READ_TIMEOUT_SEC>();
+ if(l_DVFS_temp == 0x0)
+ {
+ l_DVFS_temp = OCC_PROC_DEFAULT_DVFS_TEMP;
+ l_ERR_temp = OCC_PROC_DEFAULT_ERR_TEMP;
+ l_timeout = OCC_PROC_DEFAULT_TIMEOUT;
+ }
+ o_data[index++] = l_DVFS_temp;
+ o_data[index++] = l_ERR_temp;
+ o_data[index++] = OCC_NOT_DEFINED; //PM_DVFS
+ o_data[index++] = OCC_NOT_DEFINED; //PM_ERROR
+ o_data[index++] = l_timeout;
l_numSets++;
// If Nimbus, skip non-existent Centaurs
@@ -835,8 +852,8 @@ void getThermalControlMessageData(uint8_t* o_data,
l_sys->getAttr<ATTR_OPEN_POWER_MEMCTRL_THROTTLE_TEMP_DEG_C>();
o_data[index++] =
l_sys->getAttr<ATTR_OPEN_POWER_MEMCTRL_ERROR_TEMP_DEG_C>();
- o_data[index++] = 0xFF; //PM_DVFS not defined.
- o_data[index++] = 0xFF; //PM_ERROR not defined.
+ o_data[index++] = OCC_NOT_DEFINED; //PM_DVFS
+ o_data[index++] = OCC_NOT_DEFINED; //PM_ERROR
o_data[index++] =
l_sys->getAttr<ATTR_OPEN_POWER_MEMCTRL_READ_TIMEOUT_SEC>();
l_numSets++;
@@ -844,12 +861,20 @@ void getThermalControlMessageData(uint8_t* o_data,
// Dimm
o_data[index++] = CFGDATA_FRU_TYPE_DIMM;
- o_data[index++] =
- l_sys->getAttr<ATTR_OPEN_POWER_DIMM_THROTTLE_TEMP_DEG_C>();
- o_data[index++] = l_sys->getAttr<ATTR_OPEN_POWER_DIMM_ERROR_TEMP_DEG_C>();
- o_data[index++] = 0xFF; //PM_DVFS not defined.
- o_data[index++] = 0xFF; //PM_ERROR not defined.
- o_data[index++] = l_sys->getAttr<ATTR_OPEN_POWER_DIMM_READ_TIMEOUT_SEC>();
+ l_DVFS_temp =l_sys->getAttr<ATTR_OPEN_POWER_DIMM_THROTTLE_TEMP_DEG_C>();
+ l_ERR_temp =l_sys->getAttr<ATTR_OPEN_POWER_DIMM_ERROR_TEMP_DEG_C>();
+ l_timeout = l_sys->getAttr<ATTR_OPEN_POWER_DIMM_READ_TIMEOUT_SEC>();
+ if(l_DVFS_temp == 0x0)
+ {
+ l_DVFS_temp = OCC_DIMM_DEFAULT_DVFS_TEMP;
+ l_ERR_temp = OCC_DIMM_DEFAULT_ERR_TEMP;
+ l_timeout = OCC_DIMM_DEFAULT_TIMEOUT;
+ }
+ o_data[index++] = l_DVFS_temp;
+ o_data[index++] = l_ERR_temp;
+ o_data[index++] = OCC_NOT_DEFINED; //PM_DVFS
+ o_data[index++] = OCC_NOT_DEFINED; //PM_ERROR
+ o_data[index++] = l_timeout;
l_numSets++;
o_data[l_numSetsOffset] = l_numSets;
@@ -874,11 +899,14 @@ void getAVSBusConfigMessageData( const TargetHandle_t i_occ,
// Populate the data
o_data[index++] = OCC_CFGDATA_AVSBUS_CONFIG;
o_data[index++] = OCC_CFGDATA_AVSBUS_CONFIG_VERSION;
- o_data[index++] = l_proc->getAttr<ATTR_VDD_AVSBUS_BUSNUM>();
- o_data[index++] = l_proc->getAttr<ATTR_VDD_AVSBUS_RAIL>();
- o_data[index++] = l_proc->getAttr<ATTR_VDN_AVSBUS_BUSNUM>();
- o_data[index++] = l_proc->getAttr<ATTR_VDN_AVSBUS_RAIL>();
-
+ o_data[index++] = l_proc->getAttr<ATTR_VDD_AVSBUS_BUSNUM>();//Vdd Bus
+ o_data[index++] = l_proc->getAttr<ATTR_VDD_AVSBUS_RAIL>(); //Vdd Rail Sel
+ o_data[index++] = 0xFF; //reserved
+ o_data[index++] = 0xFF; //reserved
+ o_data[index++] = l_proc->getAttr<ATTR_VDN_AVSBUS_BUSNUM>();//Vdn Bus
+ o_data[index++] = l_proc->getAttr<ATTR_VDN_AVSBUS_RAIL>(); //Vdn Rail sel
+ o_data[index++] = 0xFF; //reserved
+ o_data[index++] = 0xFF; //reserved
o_size = index;
}
diff --git a/src/usr/htmgt/htmgt_cfgdata.H b/src/usr/htmgt/htmgt_cfgdata.H
index e28356511..72725c49c 100644
--- a/src/usr/htmgt/htmgt_cfgdata.H
+++ b/src/usr/htmgt/htmgt_cfgdata.H
@@ -31,6 +31,14 @@
namespace HTMGT
{
+ const uint8_t OCC_PROC_QUAD_DEFAULT_WEIGHT = 10; //Default 1.0 weight.
+ const uint8_t OCC_PROC_DEFAULT_DVFS_TEMP = 0x55;//default from DEF file PM
+ const uint8_t OCC_PROC_DEFAULT_ERR_TEMP = 0x5F;
+ const uint8_t OCC_PROC_DEFAULT_TIMEOUT = 0x05;
+ const uint8_t OCC_DIMM_DEFAULT_DVFS_TEMP = 0x45;//default from DEF file PM
+ const uint8_t OCC_DIMM_DEFAULT_ERR_TEMP = 0x56;
+ const uint8_t OCC_DIMM_DEFAULT_TIMEOUT = 0x1E;
+ const uint8_t OCC_NOT_DEFINED = 0xFF;
/** OCC configuration data message formats */
enum occCfgDataFormat
diff --git a/src/usr/htmgt/htmgt_occ.C b/src/usr/htmgt/htmgt_occ.C
index 6949eec49..f53b6fccb 100644
--- a/src/usr/htmgt/htmgt_occ.C
+++ b/src/usr/htmgt/htmgt_occ.C
@@ -41,7 +41,7 @@
#include <occ/occ.H>
#include <occ/occ_common.H>
#include <errl/errludlogregister.H>
-#include <buffer.H>
+#include <fapi2.H>
#include <isteps/pm/pm_common_ext.H>
@@ -1016,24 +1016,25 @@ namespace HTMGT
{
nanosleep(0, NS_BETWEEN_READ);
+ TARGETING::ConstTargetHandle_t procTarget =
+ TARGETING::getParentChip(occ->getTarget() );
+
// Read SRAM response buffer to check for OCC checkpoint
errlHndl_t l_err = nullptr;
- const uint16_t l_length = 8;
-
- fapi2::buffer<uint64_t> l_buffer;
- l_err = HBOCC::readSRAM(occ->getTarget(),
+ const uint16_t l_length = 8; //Note: number of bytes
+ uint8_t l_sram_data[l_length] = { 0x0 };
+ l_err = HBOCC::readSRAM(procTarget,
OCC_RSP_SRAM_ADDR,
- l_buffer.pointer(),
+ (uint64_t*)(&(l_sram_data)),
l_length);
if (nullptr == l_err)
{
// Pull status from response (byte 2)
- uint8_t status = 0;
- l_buffer.extractToRight<16, 8>(status);
+ uint8_t status = l_sram_data[2];
+
// Pull checkpoint from response (byte 6-7)
- uint16_t checkpoint = 0;
- l_buffer.extractToRight<48,16>(checkpoint);
+ uint16_t checkpoint= l_sram_data[6]<<8 | l_sram_data[7];
if (checkpoint != lastCheckpoint)
{
@@ -1051,14 +1052,12 @@ namespace HTMGT
occReady = true;
break;
}
- if( ( ( checkpoint & OCC_INIT_FAILURE ) ==
- OCC_INIT_FAILURE ) ||
- ( status != OCC_RC_OCC_INIT_CHECKPOINT ) )
+ if( ((checkpoint & OCC_INIT_FAILURE ) ==
+ OCC_INIT_FAILURE ) ||
+ ( status == OCC_RC_INIT_FAILURE ) )
{
-
- TMGT_ERR("_waitForOccCheckpoint: Final checkpoint "
- "not reached byt OCC%d stopped "
- "(0x%02X, 0x%04X)",
+ TMGT_ERR("_waitForOccCheckpoint: OCC%d failed "
+ "during initialization (0x%02X, 0x%04X)",
occ->getInstance(),
status,
checkpoint );
diff --git a/src/usr/htmgt/htmgt_occ.H b/src/usr/htmgt/htmgt_occ.H
index afd8b01e1..a4be47d54 100644
--- a/src/usr/htmgt/htmgt_occ.H
+++ b/src/usr/htmgt/htmgt_occ.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
diff --git a/src/usr/htmgt/htmgt_poll.C b/src/usr/htmgt/htmgt_poll.C
index 4456d89f7..8b3dc2585 100644
--- a/src/usr/htmgt/htmgt_poll.C
+++ b/src/usr/htmgt/htmgt_poll.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
diff --git a/src/usr/htmgt/htmgt_poll.H b/src/usr/htmgt/htmgt_poll.H
index 01cdf17bd..db18393a3 100644
--- a/src/usr/htmgt/htmgt_poll.H
+++ b/src/usr/htmgt/htmgt_poll.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -59,7 +59,7 @@ namespace HTMGT
uint8_t errorId;
uint32_t errorAddress;
uint16_t errorLength;
- uint16_t reserved2;
+ uint16_t reserved[2];
uint8_t codeLevel[16];
uint8_t sensor[6];
uint8_t numBlocks;
OpenPOWER on IntegriCloud