summaryrefslogtreecommitdiffstats
path: root/extensions/openpower-pels/section_factory.cpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-10-09 13:37:38 -0500
committerMatt Spinler <spinler@us.ibm.com>2019-10-22 14:09:56 +0000
commitf9bae18539eca100632d462083698b57d9687c82 (patch)
tree1fa8904d5e82750314bcbc1bbf0b0b6ee957b26c /extensions/openpower-pels/section_factory.cpp
parent32f13c915fa4b27520ca0aea476804c37f5516b9 (diff)
downloadphosphor-logging-f9bae18539eca100632d462083698b57d9687c82.tar.gz
phosphor-logging-f9bae18539eca100632d462083698b57d9687c82.zip
PEL: Add SRC PEL section class
This section consists of: - An 8B header - 8 4B words of hex data - Some data is predefined based on the SRC format, some is free format. - A 32B ASCII character string (The AsciiString class) - An optional section for FRU callouts (The Callouts class) Usually, the term SRC (System Reference Code) refers to the contents of the ASCII string and the hex data words, which can then be looked up in service documentation to find the meaning of the event log. This PEL section wraps this pure SRC with additional data like callouts. This commit only adds support for unflattening the section from an existing PEL, and flattening it again. Future commits will add support for creating an SRC from message registry data. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I3dd97c6aca59cc6d6d6fadef84465164090d5658
Diffstat (limited to 'extensions/openpower-pels/section_factory.cpp')
-rw-r--r--extensions/openpower-pels/section_factory.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/extensions/openpower-pels/section_factory.cpp b/extensions/openpower-pels/section_factory.cpp
index 11d8386..a95da12 100644
--- a/extensions/openpower-pels/section_factory.cpp
+++ b/extensions/openpower-pels/section_factory.cpp
@@ -4,6 +4,7 @@
#include "generic.hpp"
#include "pel_types.hpp"
#include "private_header.hpp"
+#include "src.hpp"
#include "user_data.hpp"
#include "user_header.hpp"
@@ -42,6 +43,10 @@ std::unique_ptr<Section> create(Stream& pelData)
case static_cast<uint16_t>(SectionID::failingMTMS):
section = std::make_unique<FailingMTMS>(pelData);
break;
+ case static_cast<uint16_t>(SectionID::primarySRC):
+ case static_cast<uint16_t>(SectionID::secondarySRC):
+ section = std::make_unique<SRC>(pelData);
+ break;
default:
// A generic object, but at least an object.
section = std::make_unique<Generic>(pelData);
OpenPOWER on IntegriCloud