11b0b00e3SLawrence Tang #ifndef CPER_PARSE_H 21b0b00e3SLawrence Tang #define CPER_PARSE_H 31b0b00e3SLawrence Tang #include "json.h" 41b0b00e3SLawrence Tang 5*3c878352SLawrence Tang #define CPER_HEADER_VALID_BITFIELD_NAMES (const char*[]) {"platformIDValid", "timestampValid", "partitionIDValid"} 62800cd8eSLawrence Tang #define CPER_SECTION_DESCRIPTOR_FLAGS_BITFIELD_NAMES (const char*[]) \ 72800cd8eSLawrence Tang {"primary", "containmentWarning", "reset", "errorThresholdExceeded", "resourceNotAccessible", "latentError", \ 82800cd8eSLawrence 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 12f0f95574SLawrence Tang json_object* cper_to_ir(FILE* cper_file); 13f0f95574SLawrence Tang void ir_to_cper(json_object* ir, FILE* out); 141b0b00e3SLawrence Tang 151b0b00e3SLawrence Tang #endif