diff options
| author | Brian Horton <brianh@linux.ibm.com> | 2012-04-25 15:48:55 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-06-07 12:40:36 -0500 |
| commit | e959276ad0504352a59fbe92013bde06517bc5da (patch) | |
| tree | 9ccbe299ef830194ee97d4d5285cf0b38f88db90 /src/include/usr/errl/errludtarget.H | |
| parent | 39ce3d8ecf06c4c04d245a6107daa73611767c5f (diff) | |
| download | blackbird-hostboot-e959276ad0504352a59fbe92013bde06517bc5da.tar.gz blackbird-hostboot-e959276ad0504352a59fbe92013bde06517bc5da.zip | |
Coalesce ERRL user detail data error log sections
Add optional 'merge' flag to addFFDC() method which certain UserDetail
error log objects will use to cause additional log entries to get
merged together. They will ONLY get merged if they match with the
last section added, to preserve error log order.
In addition, add support for an addData() method on the Attributes
User Detail class. And re-organize code so that constructor methods
are smaller, making final library smaller.
NOTE - the parse() functions are NOT complete, since building and
executing the hb errlparser tool is currently broken. Story 41707
is open to do that work once the tool builds.
Change-Id: I04d85620efe964ac243dd76df78ad4161e5a2f13
RTC: 41534
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1050
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/errl/errludtarget.H')
| -rw-r--r-- | src/include/usr/errl/errludtarget.H | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/include/usr/errl/errludtarget.H b/src/include/usr/errl/errludtarget.H index 83c9b8991..c399c1bd3 100644 --- a/src/include/usr/errl/errludtarget.H +++ b/src/include/usr/errl/errludtarget.H @@ -118,12 +118,13 @@ public: uint32_t i = 0; // errlog data - uint8_t *l_ptr = static_cast<char *>(i_pBuffer); + uint8_t *l_ptr = static_cast<uint8_t *>(i_pBuffer); + + // TODO: needs to be updated to handle merged records if (*l_ptr == 1) // special - master { - //const char *pTargetString = "MASTER_PROCESSOR_CHIP_TARGET_SENTINEL"; - i_parser.PrintString(NULL, "MASTER_PROCESSOR_CHIP_TARGET_SENTINEL"); + i_parser.PrintString(NULL, "MASTER_PROCESSOR_CHIP_TARGET_SENTINEL"); } else { @@ -212,7 +213,6 @@ public: for (; i < i_buflen; ) { - if ((*l_ptr == 0x15) || // ATTR_PHYS_PATH (*l_ptr == 0x16)) // ATTR_AFFINITY_PATH { @@ -237,8 +237,8 @@ public: const uint8_t pathSize = (pathTypeLength & 0x0F); uint8_t *lElementInstance = ((uint8_t *)l_ptr); l_ptr += pathSize * sizeof(uint8_t); - for (uint32_t i=0;i<pathSize;i += 2) { - switch (lElementInstance[i]) { + for (uint32_t j=0;j<pathSize;j += 2) { + switch (lElementInstance[j]) { case 0x01: pathString = "/Sys"; break; case 0x02: pathString = "/Node"; break; case 0x03: pathString = "/DIMM"; break; @@ -273,7 +273,7 @@ public: default: pathString = "/Unknown"; break; } // switch // copy next part in, overwritting previous terminator - dataSize += sprintf(outString + dataSize, "%s%d",pathString,lElementInstance[i+1]); + dataSize += sprintf(outString + dataSize, "%s%d",pathString,lElementInstance[j+1]); } // for if (*l_ptr == 0x15) // ATTR_PHYS_PATH { @@ -283,7 +283,7 @@ public: { i_parser.PrintString("ATTR_AFFINITY_PATH", outString); } - } + } } // for } } // parse() |

