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 \ 8 (const char *[]) \ 9 { \ 10 "checkInfoValid", "targetAddressIDValid", "requestorIDValid", \ 11 "responderIDValid", "instructionPointerValid" \ 12 } 13 #define IA32X64_CHECK_INFO_VALID_BITFIELD_NAMES \ 14 (const char *[]) \ 15 { \ 16 "transactionTypeValid", "operationValid", "levelValid", \ 17 "processorContextCorruptValid", "uncorrectedValid", \ 18 "preciseIPValid", "restartableIPValid", \ 19 "overflowValid", "participationTypeValid", \ 20 "timedOutValid", "addressSpaceValid" \ 21 } 22 #define IA32X64_CHECK_INFO_MS_CHECK_VALID_BITFIELD_NAMES \ 23 (const char *[]) \ 24 { \ 25 "errorTypeValid", "processorContextCorruptValid", \ 26 "uncorrectedValid", "preciseIPValid", \ 27 "restartableIPValid", "overflowValid" \ 28 } 29 #define IA32X64_CHECK_INFO_TRANSACTION_TYPES_KEYS \ 30 (int[]) \ 31 { \ 32 0, 1, 2 \ 33 } 34 #define IA32X64_CHECK_INFO_TRANSACTION_TYPES_VALUES \ 35 (const char *[]) \ 36 { \ 37 "Instruction", "Data Access", "Generic" \ 38 } 39 #define IA32X64_CHECK_INFO_OPERATION_TYPES_KEYS \ 40 (int[]) \ 41 { \ 42 0, 1, 2, 3, 4, 5, 6, 7, 8 \ 43 } 44 #define IA32X64_CHECK_INFO_OPERATION_TYPES_VALUES \ 45 (const char *[]) \ 46 { \ 47 "Generic Error", "Generic Read", "Generic Write", "Data Read", \ 48 "Data Write", "Instruction Fetch", "Prefetch", \ 49 "Eviction", "Snoop" \ 50 } 51 #define IA32X64_BUS_CHECK_INFO_PARTICIPATION_TYPES_KEYS \ 52 (int[]) \ 53 { \ 54 0, 1, 2, 3 \ 55 } 56 #define IA32X64_BUS_CHECK_INFO_PARTICIPATION_TYPES_VALUES \ 57 (const char *[]) \ 58 { \ 59 "Local processor originated request", \ 60 "Local processor responded to request", \ 61 "Local processor observed", "Generic" \ 62 } 63 #define IA32X64_BUS_CHECK_INFO_ADDRESS_SPACE_TYPES_KEYS \ 64 (int[]) \ 65 { \ 66 0, 1, 2, 3 \ 67 } 68 #define IA32X64_BUS_CHECK_INFO_ADDRESS_SPACE_TYPES_VALUES \ 69 (const char *[]) \ 70 { \ 71 "Memory Access", "Reserved", "I/O", "Other Transaction" \ 72 } 73 #define IA32X64_MS_CHECK_INFO_ERROR_TYPES_KEYS \ 74 (int[]) \ 75 { \ 76 0, 1, 2, 3, 4, 5 \ 77 } 78 #define IA32X64_MS_CHECK_INFO_ERROR_TYPES_VALUES \ 79 (const char *[]) \ 80 { \ 81 "No Error", "Unclassified", "Microcode ROM Parity Error", \ 82 "External Error", "FRC Error", "Internal Unclassified" \ 83 } 84 #define IA32X64_REGISTER_CONTEXT_TYPES_KEYS \ 85 (int[]) \ 86 { \ 87 0, 1, 2, 3, 4, 5, 6, 7 \ 88 } 89 #define IA32X64_REGISTER_CONTEXT_TYPES_VALUES \ 90 (const char *[]) \ 91 { \ 92 "Unclassified Data", "MSR Registers", \ 93 "32-bit Mode Execution Context", \ 94 "64-bit Mode Execution Context", "FXSave Context", \ 95 "32-bit Mode Debug Registers", \ 96 "64-bit Mode Debug Registers", \ 97 "Memory Mapper Registers" \ 98 } 99 100 typedef struct { 101 UINT64 Eax; 102 UINT64 Ebx; 103 UINT64 Ecx; 104 UINT64 Edx; 105 UINT64 Reserved[2]; 106 } EFI_IA32_X64_CPU_ID; 107 108 json_object *cper_section_ia32x64_to_ir(void *section); 109 void ir_section_ia32x64_to_cper(json_object *section, FILE *out); 110 111 #endif 112