commit | 2168ee146144e101f20273011c42b9f9bc4bb8de | [log] [tgz] |
---|---|---|
author | Aryk Ledet <arykledet@google.com> | Wed Nov 06 22:49:57 2024 +0000 |
committer | Aryk Ledet <arykledet@google.com> | Thu Nov 07 23:49:32 2024 +0000 |
tree | 93aab40afc25e67d37b81c948efd55a33d4eed50 | |
parent | e0e1fc0711cbdb4a6da1b65d8e0a5c217cdd89d7 [diff] |
Use BCD format timestamps Tested: Unit tests, ran on GLP machine and checked decoded base64 encoded cper log https://paste.googleplex.com/5503804505325568#l=18 Google-Bug-Id: b/377739641 Change-Id: Idfeba55cf6f21ca8066fcbc555d6e30323f63289 Signed-off-by: Aryk Ledet <arykledet@google.com>
This is a header-only library which provides a generic interface for users to write application specific UEFI CPER log encoders.
The UEFI specification for CPER logs allows for many combinations of Record Header and Section Descriptor properties based on the application. However, the underlying data structure does not change from application to application. To make it easier for gBMC applications to log faults in the CPER format the user only needs to specify the type of Record and Section type(s) that the encoder will need to create.
When developing and testing your application specific encoders, you will need to install this library into your development container.
Below is some pseudo code of how a user would setup their application specific CPER encoder which takes in char array types.
class MyCperEncoder : public CperEncoder<char> { RecordHeader createRecordHeader(...) override {...} SectionDescriptor createSectionDescriptor(...) override { if (sectionType == kPlatformMemory) { return createPlatformMemoryDescriptor(); } else if (sectionType == kOemSection) { return createOemDescriptor(); } ... } SectionDescriptor createPlatformMemoryDescriptor() {...} SectionDescriptor createOemDescriptor() {...} }
meson setup -C builddir meson install -C builddir
meson test -C builddir