How openbmc/libcper works
CPER is a C library and pair of command-line tools for converting UEFI Common Platform Error Records between binary and structured JSON, plus generating pseudo-random records. The main user workflow is selecting a conversion direction with cper-convert, transforming the record through the library, and receiving the converted representation; cper-generate provides a separate record-generation workflow. The README documents the conversion API and generator capabilities. Some subsystem links are omitted because the sampled excerpts do not show their internal dispatch or call relationships.
Main entry points: sections Section generators · cper-convert.c Conversion CLI · cper-parse.c Record parser · ir-parse.c IR conversion
Components 11
Conversion
- Conversion CLI
cli-app/cper-convert.c - Record parser
cper-parse.c - IR conversion
ir-parse.c
Section codecs
- Section codecs
sections
Generation
- Generator CLI
generator/cper-generate-cli.c - Record generator
generator/cper-generate.c - Section generators
generator/sections - Generator registry
generator/sections/gen-section.c
CPER formats
- Section layouts
include/libcper/sections - CPER definitions
include/libcper/Cper.h
Other components
- User
Connections 11
- User → Conversion CLI: chooses conversion
- Conversion CLI → Record parser: converts records
- Record parser → IR conversion: uses IR
- IR conversion → Section codecs: converts sections
- Section codecs → Section layouts: uses layouts
- Section layouts → CPER definitions: uses definitions
- User → Generator CLI: requests records
- Generator CLI → Record generator: generates records
generator/cper-generate-cli.c - Record generator → Section generators: generates sections
generator/cper-generate.c - Section generators → Generator registry: registers generators
- Section generators → CPER definitions: uses definitions