summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2017-11-07 10:35:37 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-11-09 17:48:08 -0500
commit3378748dbc2e153ed005e832b8398adfb2729a74 (patch)
treedf5a7752591e007b8de9ea0c48ee91edde80bf9a /src
parent2b4e2315094efa8eb3e5b45480418bd86806a25f (diff)
downloadtalos-hostboot-3378748dbc2e153ed005e832b8398adfb2729a74.tar.gz
talos-hostboot-3378748dbc2e153ed005e832b8398adfb2729a74.zip
Fix some review comments for sending down OCC info logs to BMC
Change-Id: I9ed25562af671a6df34746d5900e781ff1dcc517 RTC:180324 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49366 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Brian E. Bakke <bbakke@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Elizabeth K. Liner <eliner@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/usr/ipmi/ipmisel.C4
-rw-r--r--src/usr/util/runtime/rt_cmds.C21
2 files changed, 15 insertions, 10 deletions
diff --git a/src/usr/ipmi/ipmisel.C b/src/usr/ipmi/ipmisel.C
index 9bfb802ab..cbd9522c4 100644
--- a/src/usr/ipmi/ipmisel.C
+++ b/src/usr/ipmi/ipmisel.C
@@ -306,7 +306,8 @@ void send_esel(eselInitData * i_data,
// copy in the SEL event record data
memcpy(&data[PARTIAL_ADD_ESEL_REQ], i_data->eSel,
sizeof(selRecord));
- // update to make this what AMI eSEL wants
+
+ // add record type for this eSEL
if (i_infoCallHome)
{
data[PARTIAL_ADD_ESEL_REQ + offsetof(selRecord,record_type)] =
@@ -317,6 +318,7 @@ void send_esel(eselInitData * i_data,
data[PARTIAL_ADD_ESEL_REQ + offsetof(selRecord,record_type)] =
record_type_ami_esel;
}
+
data[PARTIAL_ADD_ESEL_REQ + offsetof(selRecord,event_data1)] =
event_data1_ami;
diff --git a/src/usr/util/runtime/rt_cmds.C b/src/usr/util/runtime/rt_cmds.C
index ed7f5a8b8..90aec9be5 100644
--- a/src/usr/util/runtime/rt_cmds.C
+++ b/src/usr/util/runtime/rt_cmds.C
@@ -630,6 +630,7 @@ void cmd_putscom( char*& o_output,
* @param[in] i_word1 Userdata 1 & 2
* @param[in] i_word2 Userdata 3 & 4
* @param[in] i_callout HUID of target to callout (zero if none)
+ * @param[in] i_ffdcLength Additional ffdc data bytes to add to the error log
*/
void cmd_errorlog( char*& o_output,
uint64_t i_word1,
@@ -659,34 +660,36 @@ void cmd_errorlog( char*& o_output,
if (i_ffdcLength > 0)
{
- uint8_t data[256];
-
uint8_t l_count = 0;
- uint16_t l_ffdc_length = 256; // break into 256 byte additions
+ uint16_t l_packet_size = 256; // break i_ffdcLength into packets
+ uint8_t data[l_packet_size];
+
do {
- if (i_ffdcLength > l_ffdc_length)
+ if (i_ffdcLength > l_packet_size)
{
- i_ffdcLength -= l_ffdc_length;
+ i_ffdcLength -= l_packet_size;
}
else
{
- l_ffdc_length = i_ffdcLength;
+ l_packet_size = i_ffdcLength;
i_ffdcLength = 0;
}
- memset(data, l_count, l_ffdc_length);
+ memset(data, l_count, l_packet_size);
l_err->addFFDC(UTIL_COMP_ID,
&data,
- l_ffdc_length,
+ l_packet_size,
0, // Version
ERRORLOG::ERRL_UDT_NOFORMAT, // parser ignores data
false ); // merge
l_count++;
} while (i_ffdcLength > 0);
+ // Change the default eSEL type if i_word1 is equal to 1
if (i_word1 == 1)
{
- // mark error as dd type
+ // mark error as callhome information eSEL 'dd' type
+ // Mimics error passed down by the OCC
l_err->setSev(ERRORLOG::ERRL_SEV_INFORMATIONAL);
l_err->setEselCallhomeInfoEvent(true);
}
OpenPOWER on IntegriCloud