1 #ifndef CPER_SECTION_GENERIC_H 2 #define CPER_SECTION_GENERIC_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #include <stdio.h> 9 #include <json.h> 10 #include <libcper/Cper.h> 11 12 #define GENERIC_PROC_TYPES_KEYS (int[]){ 0, 1, 2 } 13 #define GENERIC_PROC_TYPES_VALUES (const char *[]){ "IA32/X64", "IA64", "ARM" } 14 #define GENERIC_ISA_TYPES_KEYS (int[]){ 0, 1, 2, 3, 4 } 15 #define GENERIC_ISA_TYPES_VALUES \ 16 (const char *[]){ "IA32", "IA64", "X64", "ARM A32/T32", "ARM A64" } 17 #define GENERIC_ERROR_TYPES_KEYS (int[]){ 0, 1, 2, 4, 8 } 18 #define GENERIC_ERROR_TYPES_VALUES \ 19 (const char *[]){ "Unknown", "Cache Error", "TLB Error", "Bus Error", \ 20 "Micro-Architectural Error" } 21 #define GENERIC_OPERATION_TYPES_KEYS (int[]){ 0, 1, 2, 3 } 22 #define GENERIC_OPERATION_TYPES_VALUES \ 23 (const char *[]){ "Unknown or Generic", "Data Read", "Data Write", \ 24 "Instruction Execution" } 25 #define GENERIC_VALIDATION_BITFIELD_NAMES \ 26 (const char *[]){ "processorTypeValid", \ 27 "processorISAValid", \ 28 "processorErrorTypeValid", \ 29 "operationValid", \ 30 "flagsValid", \ 31 "levelValid", \ 32 "cpuVersionValid", \ 33 "cpuBrandInfoValid", \ 34 "cpuIDValid", \ 35 "targetAddressValid", \ 36 "requestorIDValid", \ 37 "responderIDValid", \ 38 "instructionIPValid" } 39 #define GENERIC_FLAGS_BITFIELD_NAMES \ 40 (const char *[]){ "restartable", "preciseIP", "overflow", "corrected" } 41 42 json_object *cper_section_generic_to_ir(void *section); 43 void ir_section_generic_to_cper(json_object *section, FILE *out); 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif 50