xref: /openbmc/libcper/cper-parse.h (revision 0cb33793)
11b0b00e3SLawrence Tang #ifndef CPER_PARSE_H
21b0b00e3SLawrence Tang #define CPER_PARSE_H
31b0b00e3SLawrence Tang #include "json.h"
41b0b00e3SLawrence Tang 
53c878352SLawrence Tang #define CPER_HEADER_VALID_BITFIELD_NAMES (const char*[]) {"platformIDValid", "timestampValid", "partitionIDValid"}
6*0cb33793SLawrence Tang #define CPER_SECTION_DESCRIPTOR_VALID_BITFIELD_NAMES (const char*[]) {"fruIDValid", "fruStringValid"}
72800cd8eSLawrence Tang #define CPER_SECTION_DESCRIPTOR_FLAGS_BITFIELD_NAMES (const char*[]) \
82800cd8eSLawrence Tang     {"primary", "containmentWarning", "reset", "errorThresholdExceeded", "resourceNotAccessible", "latentError", \
92800cd8eSLawrence Tang     "propagated", "overflow"}
103c43f743SLawrence Tang #define CPER_HEADER_FLAG_TYPES_KEYS (int []){1, 2, 3}
113c43f743SLawrence Tang #define CPER_HEADER_FLAG_TYPES_VALUES (const char*[]){"HW_ERROR_FLAGS_RECOVERED", "HW_ERROR_FLAGS_PREVERR", "HW_ERROR_FLAGS_SIMULATED"}
123c43f743SLawrence Tang 
13f0f95574SLawrence Tang json_object* cper_to_ir(FILE* cper_file);
14f0f95574SLawrence Tang void ir_to_cper(json_object* ir, FILE* out);
151b0b00e3SLawrence Tang 
161b0b00e3SLawrence Tang #endif