11b0b00e3SLawrence Tang #ifndef CPER_PARSE_H 21b0b00e3SLawrence Tang #define CPER_PARSE_H 31b0b00e3SLawrence Tang #include "json.h" 41b0b00e3SLawrence Tang 5*2800cd8eSLawrence Tang #define CPER_HEADER_VALID_BITFIELD_NAMES (const char*[]) {"platformID", "timestamp", "partitionID"} 6*2800cd8eSLawrence Tang #define CPER_SECTION_DESCRIPTOR_FLAGS_BITFIELD_NAMES (const char*[]) \ 7*2800cd8eSLawrence Tang {"primary", "containmentWarning", "reset", "errorThresholdExceeded", "resourceNotAccessible", "latentError", \ 8*2800cd8eSLawrence Tang "propagated", "overflow"} 93c43f743SLawrence Tang #define CPER_HEADER_FLAG_TYPES_KEYS (int []){1, 2, 3} 103c43f743SLawrence Tang #define CPER_HEADER_FLAG_TYPES_VALUES (const char*[]){"HW_ERROR_FLAGS_RECOVERED", "HW_ERROR_FLAGS_PREVERR", "HW_ERROR_FLAGS_SIMULATED"} 113c43f743SLawrence Tang 121b0b00e3SLawrence Tang json_object* cper_to_ir(const char* filename); 131b0b00e3SLawrence Tang 141b0b00e3SLawrence Tang #endif