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