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