summaryrefslogtreecommitdiffstats
path: root/src/usr/sbeio/sbe_ffdc_parser.C
diff options
context:
space:
mode:
authorDzuy Nguyen <dzuy@us.ibm.com>2017-04-19 09:43:12 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-05-07 22:26:57 -0400
commit05404541b9c109750d1d9d43da72360a2741ef7a (patch)
treef81fabdafe6fa8362c48f268e20086dc71d9b54c /src/usr/sbeio/sbe_ffdc_parser.C
parent7cc792339c253a71c7eeadc0b56fcc4eeb88f41c (diff)
downloadblackbird-hostboot-05404541b9c109750d1d9d43da72360a2741ef7a.tar.gz
blackbird-hostboot-05404541b9c109750d1d9d43da72360a2741ef7a.zip
SBE FIFO FFDC parser plugin
RTC: 168620 Change-Id: If1e099411f5b5b12be1a3832ad818c2019f4dadb Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39432 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> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/sbeio/sbe_ffdc_parser.C')
-rw-r--r--src/usr/sbeio/sbe_ffdc_parser.C18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/usr/sbeio/sbe_ffdc_parser.C b/src/usr/sbeio/sbe_ffdc_parser.C
index 57a174e72..08cbc5feb 100644
--- a/src/usr/sbeio/sbe_ffdc_parser.C
+++ b/src/usr/sbeio/sbe_ffdc_parser.C
@@ -118,12 +118,11 @@ void SbeFFDCParser::parseFFDCData(void * i_ffdcPackageBuffer)
* Get the size of the ffdc package = the entire package length
* minus the header (2 words), and the rc (1 word)
*/
- uint8_t l_bufLenInBytes = iv_ffdcWordLen * l_packageLengthInWords -
- iv_headerWordInBytes - sizeof(l_rc);
+ uint32_t l_bufLenInBytes = iv_ffdcWordLen * l_packageLengthInWords -
+ iv_headerWordInBytes;
// Check to see if what we're copying is beyond the buffer size
- uint8_t l_bufferMarker = i + iv_headerWordInBytes +
- sizeof(l_rc) + l_bufLenInBytes;
+ uint32_t l_bufferMarker = i + iv_headerWordInBytes + l_bufLenInBytes;
if(l_bufferMarker > PAGESIZE * iv_ffdcPackageSize)
{
SBE_TRACF(ERR_MRK"parseFFDCData: FFDC Package buffer overflow detected.");
@@ -161,7 +160,7 @@ void SbeFFDCParser::parseFFDCData(void * i_ffdcPackageBuffer)
// starting at 12 byte from current pointer
memcpy(l_wordBuffer,
static_cast<char *>(i_ffdcPackageBuffer) +
- i + iv_headerWordInBytes + sizeof(l_rc),
+ i + iv_headerWordInBytes,
l_bufLenInBytes);
addFFDCPackage(l_wordBuffer, l_rc, l_bufLenInBytes);
@@ -195,9 +194,9 @@ uint8_t SbeFFDCParser::getTotalPackages()
/*
* @brief returns the size (bytes) of the FFDC package
*/
-uint8_t SbeFFDCParser::getPackageLength(uint8_t i_index)
+uint32_t SbeFFDCParser::getPackageLength(uint8_t i_index)
{
- uint8_t l_retLen = 0;
+ uint32_t l_retLen = 0;
uint8_t l_size = getTotalPackages();
if((i_index >= 0) && (i_index <= l_size))
{
@@ -216,7 +215,8 @@ void * SbeFFDCParser::getFFDCPackage(uint8_t i_index)
uint8_t l_size = getTotalPackages();
if((i_index >= 0) && (i_index <= l_size))
{
- l_retPtr = iv_ffdcPackages.at(i_index);
+ ffdc_package *l_ffdcPkg = iv_ffdcPackages.at(i_index);
+ l_retPtr = l_ffdcPkg->ffdcPtr;
}
return l_retPtr;
}
@@ -241,7 +241,7 @@ uint32_t SbeFFDCParser::getPackageRC(uint8_t i_index)
* and push it to the list
*/
void SbeFFDCParser::addFFDCPackage(void * i_ffdcPackage,
- uint32_t i_rc, uint8_t i_packageLen)
+ uint32_t i_rc, uint32_t i_packageLen)
{
ffdc_package * l_ffdcPkg = new ffdc_package();
l_ffdcPkg->rc = i_rc;
OpenPOWER on IntegriCloud