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                                            \
8 	(int[])                                                                \
9 	{                                                                      \
10 		0, 1                                                           \
11 	}
12 #define VTD_FAULT_RECORD_TYPES_VALUES                                          \
13 	(const char *[])                                                       \
14 	{                                                                      \
15 		"Write Request", "Read/AtomicOp Request"                       \
16 	}
17 
18 typedef struct {
19 	UINT64 Resv1 : 12;
20 	UINT64 FaultInformation : 52;
21 	UINT64 SourceIdentifier : 16;
22 	UINT64 Resv2 : 13;
23 	UINT64 PrivelegeModeRequested : 1;
24 	UINT64 ExecutePermissionRequested : 1;
25 	UINT64 PasidPresent : 1;
26 	UINT64 FaultReason : 8;
27 	UINT64 PasidValue : 20;
28 	UINT64 AddressType : 2;
29 	UINT64 Type : 1;
30 	UINT64 Resv3 : 1;
31 } EFI_VTD_FAULT_RECORD;
32 
33 json_object *cper_section_dmar_vtd_to_ir(void *section);
34 void ir_section_dmar_vtd_to_cper(json_object *section, FILE *out);
35 
36 #endif
37