1 #ifndef CPER_SECTION_DMAR_VTD_H 2 #define CPER_SECTION_DMAR_VTD_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #include <json.h> 9 #include "../edk/Cper.h" 10 11 #define VTD_FAULT_RECORD_TYPES_KEYS \ 12 (int[]) \ 13 { \ 14 0, 1 \ 15 } 16 #define VTD_FAULT_RECORD_TYPES_VALUES \ 17 (const char *[]) \ 18 { \ 19 "Write Request", "Read/AtomicOp Request" \ 20 } 21 22 typedef struct { 23 UINT64 Resv1 : 12; 24 UINT64 FaultInformation : 52; 25 UINT64 SourceIdentifier : 16; 26 UINT64 Resv2 : 13; 27 UINT64 PrivelegeModeRequested : 1; 28 UINT64 ExecutePermissionRequested : 1; 29 UINT64 PasidPresent : 1; 30 UINT64 FaultReason : 8; 31 UINT64 PasidValue : 20; 32 UINT64 AddressType : 2; 33 UINT64 Type : 1; 34 UINT64 Resv3 : 1; 35 } EFI_VTD_FAULT_RECORD; 36 37 json_object *cper_section_dmar_vtd_to_ir(void *section); 38 void ir_section_dmar_vtd_to_cper(json_object *section, FILE *out); 39 40 #ifdef __cplusplus 41 } 42 #endif 43 44 #endif 45