blob: f78b2d17cb8e3c16b20594b405877470234c4e21 [file] [log] [blame]
Lawrence Tangdb1b7ce2022-07-06 15:40:26 +01001#ifndef CPER_SECTION_DMAR_VTD_H
2#define CPER_SECTION_DMAR_VTD_H
3
Lawrence Tang5202bbb2022-08-12 14:54:36 +01004#include <json.h>
Lawrence Tangdb1b7ce2022-07-06 15:40:26 +01005#include "../edk/Cper.h"
6
John Chungf8fc7052024-05-03 20:05:29 +08007#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 }
Lawrence Tangce0f82b2022-07-07 16:14:28 +010017
18typedef struct {
John Chungf8fc7052024-05-03 20:05:29 +080019 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;
Lawrence Tangce0f82b2022-07-07 16:14:28 +010031} EFI_VTD_FAULT_RECORD;
32
John Chungf8fc7052024-05-03 20:05:29 +080033json_object *cper_section_dmar_vtd_to_ir(void *section);
34void ir_section_dmar_vtd_to_cper(json_object *section, FILE *out);
Lawrence Tangdb1b7ce2022-07-06 15:40:26 +010035
John Chungf8fc7052024-05-03 20:05:29 +080036#endif