diff options
author | Matt Derksen <mderkse1@us.ibm.com> | 2018-12-04 11:40:32 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-01-03 12:51:15 -0600 |
commit | b014251663729bd8a6beaf4245f08ec3a04fbdd1 (patch) | |
tree | bfcb3452761075f458b01634e05af27287d26098 /src/usr/errl/plugins | |
parent | 3a992958a6d431a58a0cc72f6c5554ef0ed2f617 (diff) | |
download | talos-hostboot-b014251663729bd8a6beaf4245f08ec3a04fbdd1.tar.gz talos-hostboot-b014251663729bd8a6beaf4245f08ec3a04fbdd1.zip |
Update WOF errl parser to allow for padding
Noticed padding to 4-byte boundaries which
throws off this error log parsing.
Parsing updated to just output the expected entries
and ignore the additional padding.
Change-Id: I238a1466919005069a36cc9c61b3d3f5f7b02278
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69405
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@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: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/errl/plugins')
-rw-r--r-- | src/usr/errl/plugins/errludwofdata.H | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/usr/errl/plugins/errludwofdata.H b/src/usr/errl/plugins/errludwofdata.H index f757c91d2..f792c5485 100644 --- a/src/usr/errl/plugins/errludwofdata.H +++ b/src/usr/errl/plugins/errludwofdata.H @@ -118,10 +118,9 @@ public: tableEntries = actualTableCount; // don't go over buffer length } - // Check that the remaining data breaks down into parsable - // wofTableCompareData_t entries - if ( (i_buflen - sizeof(tableEntries)) - % sizeof(wofTableCompareData_t) == 0 ) + // Verify the buffer contains at least the specified number of entries + if ( (i_buflen - sizeof(tableEntries) - + tableEntries * sizeof(wofTableCompareData_t)) >= 0 ) { i_parser.PrintString("---------------------------------------", "---------------------------------------"); @@ -185,7 +184,9 @@ public: } else { + i_parser.PrintString("Unable to parse too small buffer",""); i_parser.PrintNumber("WOF Buffer length", "0x%X", i_buflen); + i_parser.PrintNumber("Total entry count", "0x%X", tableEntries); i_parser.PrintString("Expected buffer format:", "uint16_t count, match this entry, unmatched entries"); i_parser.PrintNumber("Each entry size", "%d", |