1 #ifndef CPER_SECTION_DMAR_VTD_H 2 #define CPER_SECTION_DMAR_VTD_H 3 4 #include <json.h> 5 #include "../edk/Cper.h" 6 7 #define VTD_FAULT_RECORD_TYPES_KEYS (int []){0, 1} 8 #define VTD_FAULT_RECORD_TYPES_VALUES (const char*[]){"Write Request", "Read/AtomicOp Request"} 9 10 typedef struct { 11 UINT64 Resv1 : 12; 12 UINT64 FaultInformation : 52; 13 UINT64 SourceIdentifier : 16; 14 UINT64 Resv2 : 13; 15 UINT64 PrivelegeModeRequested : 1; 16 UINT64 ExecutePermissionRequested : 1; 17 UINT64 PasidPresent : 1; 18 UINT64 FaultReason : 8; 19 UINT64 PasidValue : 20; 20 UINT64 AddressType : 2; 21 UINT64 Type : 1; 22 UINT64 Resv3 : 1; 23 } EFI_VTD_FAULT_RECORD; 24 25 json_object* cper_section_dmar_vtd_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor); 26 void ir_section_dmar_vtd_to_cper(json_object* section, FILE* out); 27 28 #endif