Lawrence Tang | 1b0b00e | 2022-07-05 10:33:10 +0100 | [diff] [blame] | 1 | #ifndef CPER_SECTION_GENERIC_H |
| 2 | #define CPER_SECTION_GENERIC_H |
| 3 | |
Lawrence Tang | 794312c | 2022-07-05 14:46:10 +0100 | [diff] [blame^] | 4 | #include "json.h" |
| 5 | #include "../edk/Cper.h" |
| 6 | |
Lawrence Tang | 3c43f74 | 2022-07-05 11:37:17 +0100 | [diff] [blame] | 7 | #define GENERIC_PROC_TYPES_KEYS (int []){0, 1, 2} |
| 8 | #define GENERIC_PROC_TYPES_VALUES (const char*[]){"IA32/X64", "IA64", "ARM"} |
| 9 | #define GENERIC_ISA_TYPES_KEYS (int []){0, 1, 2, 3, 4} |
| 10 | #define GENERIC_ISA_TYPES_VALUES (const char*[]){"IA32", "IA64", "X64", "ARM A32/T32", "ARM A64"} |
| 11 | #define GENERIC_ERROR_TYPES_KEYS (int []){0, 1, 2, 4, 8} |
| 12 | #define GENERIC_ERROR_TYPES_VALUES (const char*[]){"Unknown", "Cache Error", "TLB Error", "Bus Error", "Micro-Architectural Error"} |
| 13 | #define GENERIC_OPERATION_TYPES_KEYS (int []){0, 1, 2, 3} |
| 14 | #define GENERIC_OPERATION_TYPES_VALUES (const char*[]){"Unknown or generic", "Data Read", "Data Write", "Instruction Execution"} |
Lawrence Tang | 794312c | 2022-07-05 14:46:10 +0100 | [diff] [blame^] | 15 | #define GENERIC_VALIDATION_BITFIELD_NAMES (const char*[]) \ |
| 16 | {"processorTypeValid", "processorISAValid", "processorErrorTypeValid", "operationValid", "flagsValid" \ |
| 17 | "levelValid", "cpuVersionValid", "cpuBrandInfoValid", "cpuIDValid", "targetAddressValid", "requesterIDValid" \ |
| 18 | "responderIDValid", "instructionIPValid"} |
| 19 | #define GENERIC_FLAGS_BITFIELD_NAMES (const char*[]) \ |
| 20 | {"restartable", "preciseIP", "overflow", "corrected"} |
Lawrence Tang | 3c43f74 | 2022-07-05 11:37:17 +0100 | [diff] [blame] | 21 | |
Lawrence Tang | 1b0b00e | 2022-07-05 10:33:10 +0100 | [diff] [blame] | 22 | json_object* cper_section_generic_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor); |
| 23 | |
| 24 | #endif |