1 #ifndef CPER_SECTION_DMAR_GENERIC_H 2 #define CPER_SECTION_DMAR_GENERIC_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #include <json.h> 9 #include <libcper/Cper.h> 10 11 #define DMAR_GENERIC_ERROR_FAULT_REASON_TYPES_KEYS \ 12 (int[]) \ 13 { \ 14 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA, 0xB \ 15 } 16 #define DMAR_GENERIC_ERROR_FAULT_REASON_TYPES_VALUES \ 17 (const char *[]) \ 18 { \ 19 "DMT Entry Missing", "DMT Entry Invalid", "DMT Access Error", \ 20 "DMT Reserved Bit Invalid", \ 21 "DMA Address Out of Bounds", "Invalid Read/Write", \ 22 "Invalid Device Request", "ATT Access Error", \ 23 "ATT Reserved Bit Invalid", "Illegal Command", \ 24 "Command Buffer Access Error" \ 25 } 26 #define DMAR_GENERIC_ERROR_FAULT_REASON_TYPES_DESCRIPTIONS \ 27 (const char *[]) \ 28 { \ 29 "Domain mapping table entry is not present.", \ 30 "Invalid domain mapping table entry.", \ 31 "DMAr unit's attempt to access the domain mapping table resulted in an error.", \ 32 "Reserved bit set to non-zero value in the domain mapping table.", \ 33 "DMA request to access an address beyond the device address width.", \ 34 "Invalid read or write access.", \ 35 "Invalid device request.", \ 36 "DMAr unit's attempt to access the address translation table resulted in an error.", \ 37 "Reserved bit set to non-zero value in the address translation table.", \ 38 "Illegal command error.", \ 39 "DMAr unit's attempt to access the command buffer resulted in an error." \ 40 } 41 #define DMAR_GENERIC_ERROR_ACCESS_TYPES_KEYS \ 42 (int[]) \ 43 { \ 44 0x0, 0x1 \ 45 } 46 #define DMAR_GENERIC_ERROR_ACCESS_TYPES_VALUES \ 47 (const char *[]) \ 48 { \ 49 "DMA Write", "DMA Read" \ 50 } 51 #define DMAR_GENERIC_ERROR_ADDRESS_TYPES_KEYS \ 52 (int[]) \ 53 { \ 54 0x0, 0x1 \ 55 } 56 #define DMAR_GENERIC_ERROR_ADDRESS_TYPES_VALUES \ 57 (const char *[]) \ 58 { \ 59 "Untranslated Request", "Translation Request" \ 60 } 61 #define DMAR_GENERIC_ERROR_ARCH_TYPES_KEYS \ 62 (int[]) \ 63 { \ 64 0x0, 0x1 \ 65 } 66 #define DMAR_GENERIC_ERROR_ARCH_TYPES_VALUES \ 67 (const char *[]) \ 68 { \ 69 "VT-d", "IOMMU" \ 70 } 71 72 json_object *cper_section_dmar_generic_to_ir(void *section); 73 void ir_section_dmar_generic_to_cper(json_object *section, FILE *out); 74 75 #ifdef __cplusplus 76 } 77 #endif 78 79 #endif 80