Lawrence Tang | 4795d4a | 2022-07-06 15:19:31 +0100 | [diff] [blame] | 1 | #ifndef CPER_SECTION_DMAR_GENERIC_H |
| 2 | #define CPER_SECTION_DMAR_GENERIC_H |
| 3 | |
| 4 | #include "json.h" |
| 5 | #include "../edk/Cper.h" |
| 6 | |
| 7 | #define DMAR_GENERIC_ERROR_FAULT_REASON_TYPES_KEYS (int []){0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB} |
| 8 | #define DMAR_GENERIC_ERROR_FAULT_REASON_TYPES_VALUES (const char*[]){"DMT Entry Missing", "DMT Entry Invalid", \ |
| 9 | "DMT Access Error", "DMT Reserved Bit Invalid", "DMA Address Out of Bounds", "Invalid Read/Write", \ |
| 10 | "Invalid Device Request", "ATT Access Error", "ATT Reserved Bit Invalid", "Illegal Command", "Command Buffer Access Error"} |
| 11 | #define DMAR_GENERIC_ERROR_FAULT_REASON_TYPES_DESCRIPTIONS (const char*[]){ \ |
| 12 | "Domain mapping table entry is not present.", \ |
Lawrence Tang | 01e3a44 | 2022-07-20 15:14:50 +0100 | [diff] [blame] | 13 | "Invalid domain mapping table entry.", \ |
| 14 | "DMAr unit's attempt to access the domain mapping table resulted in an error.", \ |
Lawrence Tang | 4795d4a | 2022-07-06 15:19:31 +0100 | [diff] [blame] | 15 | "Reserved bit set to non-zero value in the domain mapping table.", \ |
| 16 | "DMA request to access an address beyond the device address width.", \ |
| 17 | "Invalid read or write access.", \ |
| 18 | "Invalid device request.", \ |
| 19 | "DMAr unit's attempt to access the address translation table resulted in an error.", \ |
| 20 | "Reserved bit set to non-zero value in the address translation table.", \ |
| 21 | "Illegal command error.", \ |
| 22 | "DMAr unit's attempt to access the command buffer resulted in an error."} |
| 23 | #define DMAR_GENERIC_ERROR_ACCESS_TYPES_KEYS (int []){0x0, 0x1} |
| 24 | #define DMAR_GENERIC_ERROR_ACCESS_TYPES_VALUES (const char*[]){"DMA Write", "DMA Read"} |
| 25 | #define DMAR_GENERIC_ERROR_ADDRESS_TYPES_KEYS (int []){0x0, 0x1} |
| 26 | #define DMAR_GENERIC_ERROR_ADDRESS_TYPES_VALUES (const char*[]){"Untranslated Request", "Translation Request"} |
| 27 | #define DMAR_GENERIC_ERROR_ARCH_TYPES_KEYS (int []){0x0, 0x1} |
| 28 | #define DMAR_GENERIC_ERROR_ARCH_TYPES_VALUES (const char*[]){"VT-d", "IOMMU"} |
| 29 | |
| 30 | json_object* cper_section_dmar_generic_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor); |
Lawrence Tang | 205dd1d | 2022-07-14 16:23:38 +0100 | [diff] [blame] | 31 | void ir_section_dmar_generic_to_cper(json_object* section, FILE* out); |
| 32 | |
Lawrence Tang | 4795d4a | 2022-07-06 15:19:31 +0100 | [diff] [blame] | 33 | |
| 34 | #endif |