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