Lawrence Tang | db1b7ce | 2022-07-06 15:40:26 +0100 | [diff] [blame] | 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 | |
Lawrence Tang | ce0f82b | 2022-07-07 16:14:28 +0100 | [diff] [blame] | 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 | |
Lawrence Tang | db1b7ce | 2022-07-06 15:40:26 +0100 | [diff] [blame] | 25 | json_object* cper_section_dmar_vtd_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor); |
Lawrence Tang | 205dd1d | 2022-07-14 16:23:38 +0100 | [diff] [blame] | 26 | void ir_section_dmar_vtd_to_cper(json_object* section, FILE* out); |
Lawrence Tang | db1b7ce | 2022-07-06 15:40:26 +0100 | [diff] [blame] | 27 | |
| 28 | #endif |