PEL: fix sbe ffdc packet offset calculation
Existing SBE ffdc packet offset calculation logic is wrong
and causing parser function failure for multiple packet
use-cases. Correct logic to calculate offset based on packet
sizen in bytes.
Tested: manually verified PEL log with two ffdc packet case.
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Change-Id: Ibc82fead1f49fdbf6510e2c704bc3561654aafed
diff --git a/extensions/openpower-pels/sbe_ffdc_handler.cpp b/extensions/openpower-pels/sbe_ffdc_handler.cpp
index 2fe5261..e90814f 100644
--- a/extensions/openpower-pels/sbe_ffdc_handler.cpp
+++ b/extensions/openpower-pels/sbe_ffdc_handler.cpp
@@ -143,7 +143,13 @@
{
process(ffdcPkt);
}
- ffdcBufOffset += ffdc->lengthinWords;
+ else
+ {
+ log<level::INFO>("SBE FFDC: Internal FFDC packet");
+ }
+
+ // Update Buffer offset in Bytes
+ ffdcBufOffset += lenWords * sizeof(uint32_t);
++pktCount;
}
if (pktCount == sbeMaxFfdcPackets)