summaryrefslogtreecommitdiffstats
path: root/src/usr/htmgt
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2015-04-17 13:21:25 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-04-22 13:04:35 -0500
commite88b1050d6409695b949d037e4f2c6bfdae897e0 (patch)
tree4860b6ebffbea96a707f00c54deb03fdf8224591 /src/usr/htmgt
parent3a2c9c5d20ebd3253ae84dd299dbac391cd3e169 (diff)
downloadtalos-hostboot-e88b1050d6409695b949d037e4f2c6bfdae897e0.tar.gz
talos-hostboot-e88b1050d6409695b949d037e4f2c6bfdae897e0.zip
Enable OCC on Firestone
Change-Id: I1f99088e258ec197041c862e5d1ea506299c2cf5 RTC: 127111 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17316 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt')
-rw-r--r--src/usr/htmgt/htmgt_cfgdata.C4
-rw-r--r--src/usr/htmgt/htmgt_occ.C10
-rw-r--r--src/usr/htmgt/htmgt_occcmd.C13
-rw-r--r--src/usr/htmgt/htmgt_poll.C13
4 files changed, 27 insertions, 13 deletions
diff --git a/src/usr/htmgt/htmgt_cfgdata.C b/src/usr/htmgt/htmgt_cfgdata.C
index d9882ca01..dcf1f9d17 100644
--- a/src/usr/htmgt/htmgt_cfgdata.C
+++ b/src/usr/htmgt/htmgt_cfgdata.C
@@ -751,8 +751,9 @@ void getApssMessageData(uint8_t* o_data,
//The APSS function below hardcodes 16 channels,
//so everything better agree.
CPPASSERT(sizeof(function) == 16);
-
const uint16_t (*sensors)[16] = NULL;
+
+#ifdef CONFIG_BMC_IPMI
errlHndl_t err = SENSOR::getAPSSChannelSensorNumbers(sensors);
if (err)
{
@@ -761,6 +762,7 @@ void getApssMessageData(uint8_t* o_data,
ERRORLOG::errlCommit(err, HTMGT_COMP_ID);
sensors = NULL;
}
+#endif
o_data[0] = OCC_CFGDATA_APSS_CONFIG;
o_data[1] = OCC_CFGDATA_APSS_VERSION;
diff --git a/src/usr/htmgt/htmgt_occ.C b/src/usr/htmgt/htmgt_occ.C
index 6bbc0ae57..496c7864b 100644
--- a/src/usr/htmgt/htmgt_occ.C
+++ b/src/usr/htmgt/htmgt_occ.C
@@ -164,7 +164,8 @@ namespace HTMGT
if (iv_occsPresent & i_slavePresent)
{
// Flag error because multiple OCCs have same chip ID
- TMGT_ERR("updateOccPreset: slave 0x%02X already exists (0x%02X)",
+ TMGT_ERR("updateOccPresentBits: slave 0x%02X already "
+ "exists (0x%02X)",
i_slavePresent, iv_occsPresent);
iv_needsReset = true;
}
@@ -284,15 +285,14 @@ namespace HTMGT
{
TMGT_INF("buildOccs called");
-#if defined(__HOSTBOOT_RUNTIME)
- // At runtime need to keep occ state, only build OCC objects once.
- if(iv_occArray.size() > 0 && iv_occMaster != NULL)
+ // Only build OCC objects once.
+ if((iv_occArray.size() > 0) && (iv_occMaster != NULL))
{
TMGT_INF("buildOccs: Existing OCC Targets kept = %d",
iv_occArray.size());
return iv_occArray.size();
}
-#endif
+
// Remove existing OCC objects
_removeAllOccs();
diff --git a/src/usr/htmgt/htmgt_occcmd.C b/src/usr/htmgt/htmgt_occcmd.C
index a6ccf0c23..f5b9726a0 100644
--- a/src/usr/htmgt/htmgt_occcmd.C
+++ b/src/usr/htmgt/htmgt_occcmd.C
@@ -999,16 +999,16 @@ namespace HTMGT
if (G_debug_trace & DEBUG_TRACE_OCCCMD)
{
// Trace the command
- // TODO: RTC 124618 - Trace is having issues handling 256
- TMGT_BIN("buildOccCmdBuffer: OCC command (up to 64 bytes)",
- cmdBuffer, std::min(l_send_length, (uint16_t)64));
+ TMGT_BIN("buildOccCmdBuffer: OCC command (up to 300 bytes)",
+ cmdBuffer, std::min(l_send_length, (uint16_t)300));
}
#ifdef CONFIG_CONSOLE_OUTPUT_OCC_COMM
// Trace full OCC command
char header[64];
- sprintf(header, "OCC Command: %s (%d bytes)",
- command_string(iv_OccCmd.cmdType), l_send_length);
+ sprintf(header, "OCC%d Command: %s (0x%04X bytes)",
+ iv_Occ->iv_instance, command_string(iv_OccCmd.cmdType),
+ l_send_length);
dumpToConsole(header, cmdBuffer,
std::min(l_send_length,(uint16_t)256));
#endif
@@ -1046,7 +1046,8 @@ namespace HTMGT
#ifdef CONFIG_CONSOLE_OUTPUT_OCC_COMM
// Trace raw OCC response
char header[64];
- sprintf(header, "OCC Response: (%d bytes)", rspLen);
+ sprintf(header, "OCC%d Response: (0x%04X bytes)",
+ iv_Occ->iv_instance, rspLen);
dumpToConsole(header, rspBuffer, std::min(rspLen,(uint16_t)256));
#endif
iv_OccRsp.sequenceNumber = rspBuffer[l_index++];
diff --git a/src/usr/htmgt/htmgt_poll.C b/src/usr/htmgt/htmgt_poll.C
index e8a81a976..1b1cc7f1d 100644
--- a/src/usr/htmgt/htmgt_poll.C
+++ b/src/usr/htmgt/htmgt_poll.C
@@ -31,6 +31,7 @@
#include "htmgt_occcmd.H"
#include "htmgt_cfgdata.H"
#include "occError.H"
+#include <console/consoleif.H>
// Targeting support
#include <targeting/common/commontargeting.H>
@@ -195,6 +196,16 @@ namespace HTMGT
pollRsp->requestedCfg, pollRsp->state,
(pollRsp->errorId<<16) | pollRsp->errorLength,
pollRsp->errorAddress);
+#ifdef CONFIG_CONSOLE_OUTPUT_OCC_COMM
+ TMGT_CONSOLE("OCC%d Poll change: Status:%04X Occs:%02X Cfg:%02X "
+ "State:%02X Error:%06X/%08X",
+ iv_instance,
+ (pollRsp->status << 8) | pollRsp->extStatus,
+ pollRsp->occsPresent,
+ pollRsp->requestedCfg, pollRsp->state,
+ (pollRsp->errorId<<16) | pollRsp->errorLength,
+ pollRsp->errorAddress);
+#endif
}
do
@@ -295,7 +306,7 @@ namespace HTMGT
* @reasoncode HTMGT_RC_INVALID_DATA
* @moduleid HTMGT_MOD_OCC_POLL
* @userdata1[0-15] OCC instance
- * @userdata[16-31] response OCC present
+ * @userdata1[16-31] response OCC present
* @userdata2[0-15] expected OCC present
* @userdata2[16-31] response status byte
* @devdesc Invalid OCC present data in POLL response
OpenPOWER on IntegriCloud