blob: a49c4559eeea45dd512b7151ffbd048092184408 [file] [log] [blame]
Lawrence Tang1b0b00e2022-07-05 10:33:10 +01001#ifndef CPER_PARSE_H
2#define CPER_PARSE_H
3#include "json.h"
4
Lawrence Tang2800cd82022-07-05 16:08:20 +01005#define CPER_HEADER_VALID_BITFIELD_NAMES (const char*[]) {"platformID", "timestamp", "partitionID"}
6#define CPER_SECTION_DESCRIPTOR_FLAGS_BITFIELD_NAMES (const char*[]) \
7 {"primary", "containmentWarning", "reset", "errorThresholdExceeded", "resourceNotAccessible", "latentError", \
8 "propagated", "overflow"}
Lawrence Tang3c43f742022-07-05 11:37:17 +01009#define CPER_HEADER_FLAG_TYPES_KEYS (int []){1, 2, 3}
10#define CPER_HEADER_FLAG_TYPES_VALUES (const char*[]){"HW_ERROR_FLAGS_RECOVERED", "HW_ERROR_FLAGS_PREVERR", "HW_ERROR_FLAGS_SIMULATED"}
11
Lawrence Tang1b0b00e2022-07-05 10:33:10 +010012json_object* cper_to_ir(const char* filename);
13
14#endif