Lawrence Tang | 794312c | 2022-07-05 14:46:10 +0100 | [diff] [blame] | 1 | #ifndef CPER_SECTION_IA32X64_H |
| 2 | #define CPER_SECTION_IA32X64_H |
| 3 | |
| 4 | #include "json.h" |
| 5 | #include "../edk/Cper.h" |
| 6 | |
| 7 | #define IA32X64_PROCESSOR_ERROR_VALID_BITFIELD_NAMES (const char*[]) \ |
| 8 | {"checkInfoValid", "targetAddressIdentifierValid", "requestorIdentifierValid", "responderIdentifierValid", \ |
| 9 | "instructionPointerValid"} |
| 10 | #define IA32X64_CHECK_INFO_VALID_BITFIELD_NAMES (const char*[]) \ |
| 11 | {"transactionTypeValid", "operationValid", "levelValid", "processorContextCorruptValid", "uncorrectedValid" \ |
| 12 | "preciseIPValid", "restartableIPValid", "overflowValid", "participationTypeValid", "timeOutValid" \ |
| 13 | "addressSpaceValid"} |
| 14 | #define IA32X64_CHECK_INFO_TRANSACTION_TYPES_KEYS (int []){0, 1, 2} |
| 15 | #define IA32X64_CHECK_INFO_TRANSACTION_TYPES_VALUES (const char*[]){"Instruction", "Data Access", "Generic"} |
| 16 | #define IA32X64_CHECK_INFO_OPERATION_TYPES_KEYS (int []){0, 1, 2, 3, 4, 5, 6, 7, 8} |
| 17 | #define IA32X64_CHECK_INFO_OPERATION_TYPES_VALUES (const char*[]){"Generic Error", "Generic Read", "Generic Write" \ |
| 18 | "Data Read", "Data Write", "Instruction Fetch", "Prefetch", "Eviction", "Snoop"} |
| 19 | #define IA32X64_BUS_CHECK_INFO_PARTICIPATION_TYPES_KEYS (int []){0, 1, 2, 3} |
| 20 | #define IA32X64_BUS_CHECK_INFO_PARTICIPATION_TYPES_VALUES (const char*[]){"Local processor originated request", \ |
| 21 | "Local processor responded to request", "Local processor observed", "Generic"} |
| 22 | #define IA32X64_BUS_CHECK_INFO_ADDRESS_SPACE_TYPES_KEYS (int []){0, 1, 2, 3} |
| 23 | #define IA32X64_BUS_CHECK_INFO_ADDRESS_SPACE_TYPES_VALUES (const char*[]){"Memory Access", "Reserved", "I/O", \ |
| 24 | "Other Transaction"} |
| 25 | #define IA32X64_MS_CHECK_INFO_ERROR_TYPES_KEYS (int []){0, 1, 2, 3, 4, 5} |
| 26 | #define IA32X64_MS_CHECK_INFO_ERROR_TYPES_VALUES (const char*[]){"No Error", "Unclassified", "Microcode ROM Parity Error", \ |
| 27 | "External Error", "FRC Error", "Internal Unclassified"} |
| 28 | #define IA32X64_REGISTER_CONTEXT_TYPES_KEYS (int []){0, 1, 2, 3, 4, 5, 6, 7} |
| 29 | #define IA32X64_REGISTER_CONTEXT_TYPES_VALUES (const char*[]){"Unclassified Data", "MSR Registers", \ |
| 30 | "32-bit Mode Execution Context", "64-bit Mode Execution Context", "FXSave Context", \ |
| 31 | "32-bit Mode Debug Registers", "64-bit Mode Debug Registers", "Memory Mapper Registers"} |
| 32 | |
Lawrence Tang | 9a785c2 | 2022-07-07 15:47:17 +0100 | [diff] [blame^] | 33 | typedef struct { |
| 34 | UINT64 Eax; |
| 35 | UINT64 Ebx; |
| 36 | UINT64 Ecx; |
| 37 | UINT64 Edx; |
| 38 | UINT64 Reserved[2]; |
| 39 | } EFI_IA32_X64_CPU_ID; |
| 40 | |
Lawrence Tang | 794312c | 2022-07-05 14:46:10 +0100 | [diff] [blame] | 41 | json_object* cper_section_ia32x64_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor); |
| 42 | |
| 43 | #endif |