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", "targetAddressIDValid", "requestorIDValid", "responderIDValid", \ 9 "instructionPointerValid"} 10 #define IA32X64_CHECK_INFO_VALID_BITFIELD_NAMES (const char*[]) \ 11 {"transactionTypeValid", "operationValid", "levelValid", "processorContextCorruptValid", "uncorrectedValid" \ 12 "preciseIPValid", "restartableIPValid", "overflowValid", "participationTypeValid", "timedOutValid" \ 13 "addressSpaceValid"} 14 #define IA32X64_CHECK_INFO_MS_CHECK_VALID_BITFIELD_NAMES (const char*[]) \ 15 {"errorTypeValid", "processorContextCorruptValid", "uncorrectedValid", "preciseIPValid", "restartableIPValid", \ 16 "overflowValid"} 17 #define IA32X64_CHECK_INFO_TRANSACTION_TYPES_KEYS (int []){0, 1, 2} 18 #define IA32X64_CHECK_INFO_TRANSACTION_TYPES_VALUES (const char*[]){"Instruction", "Data Access", "Generic"} 19 #define IA32X64_CHECK_INFO_OPERATION_TYPES_KEYS (int []){0, 1, 2, 3, 4, 5, 6, 7, 8} 20 #define IA32X64_CHECK_INFO_OPERATION_TYPES_VALUES (const char*[]){"Generic Error", "Generic Read", "Generic Write" \ 21 "Data Read", "Data Write", "Instruction Fetch", "Prefetch", "Eviction", "Snoop"} 22 #define IA32X64_BUS_CHECK_INFO_PARTICIPATION_TYPES_KEYS (int []){0, 1, 2, 3} 23 #define IA32X64_BUS_CHECK_INFO_PARTICIPATION_TYPES_VALUES (const char*[]){"Local processor originated request", \ 24 "Local processor responded to request", "Local processor observed", "Generic"} 25 #define IA32X64_BUS_CHECK_INFO_ADDRESS_SPACE_TYPES_KEYS (int []){0, 1, 2, 3} 26 #define IA32X64_BUS_CHECK_INFO_ADDRESS_SPACE_TYPES_VALUES (const char*[]){"Memory Access", "Reserved", "I/O", \ 27 "Other Transaction"} 28 #define IA32X64_MS_CHECK_INFO_ERROR_TYPES_KEYS (int []){0, 1, 2, 3, 4, 5} 29 #define IA32X64_MS_CHECK_INFO_ERROR_TYPES_VALUES (const char*[]){"No Error", "Unclassified", "Microcode ROM Parity Error", \ 30 "External Error", "FRC Error", "Internal Unclassified"} 31 #define IA32X64_REGISTER_CONTEXT_TYPES_KEYS (int []){0, 1, 2, 3, 4, 5, 6, 7} 32 #define IA32X64_REGISTER_CONTEXT_TYPES_VALUES (const char*[]){"Unclassified Data", "MSR Registers", \ 33 "32-bit Mode Execution Context", "64-bit Mode Execution Context", "FXSave Context", \ 34 "32-bit Mode Debug Registers", "64-bit Mode Debug Registers", "Memory Mapper Registers"} 35 36 typedef struct { 37 UINT64 Eax; 38 UINT64 Ebx; 39 UINT64 Ecx; 40 UINT64 Edx; 41 UINT64 Reserved[2]; 42 } EFI_IA32_X64_CPU_ID; 43 44 json_object* cper_section_ia32x64_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor); 45 void ir_section_ia32x64_to_cper(json_object* section, FILE* out); 46 47 #endif