aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2008-09-09 10:41:05 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-19 06:59:16 -0400
commit90008ee4b811c944455752dcb72b291a5ba81b53 (patch)
tree2c54f65efbabd7d9decbff49e12199eed00082b7 /include
parenta80dc3e0e0dc8393158de317d66ae0f345dc58f9 (diff)
AMD IOMMU: add event handling code
This patch adds code for polling and printing out events generated by the AMD IOMMU. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/amd_iommu_types.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asm-x86/amd_iommu_types.h b/include/asm-x86/amd_iommu_types.h
index 8533f09b34b7..d8c5a6c69955 100644
--- a/include/asm-x86/amd_iommu_types.h
+++ b/include/asm-x86/amd_iommu_types.h
@@ -71,6 +71,25 @@
71/* MMIO status bits */ 71/* MMIO status bits */
72#define MMIO_STATUS_COM_WAIT_INT_MASK 0x04 72#define MMIO_STATUS_COM_WAIT_INT_MASK 0x04
73 73
74/* event logging constants */
75#define EVENT_ENTRY_SIZE 0x10
76#define EVENT_TYPE_SHIFT 28
77#define EVENT_TYPE_MASK 0xf
78#define EVENT_TYPE_ILL_DEV 0x1
79#define EVENT_TYPE_IO_FAULT 0x2
80#define EVENT_TYPE_DEV_TAB_ERR 0x3
81#define EVENT_TYPE_PAGE_TAB_ERR 0x4
82#define EVENT_TYPE_ILL_CMD 0x5
83#define EVENT_TYPE_CMD_HARD_ERR 0x6
84#define EVENT_TYPE_IOTLB_INV_TO 0x7
85#define EVENT_TYPE_INV_DEV_REQ 0x8
86#define EVENT_DEVID_MASK 0xffff
87#define EVENT_DEVID_SHIFT 0
88#define EVENT_DOMID_MASK 0xffff
89#define EVENT_DOMID_SHIFT 0
90#define EVENT_FLAGS_MASK 0xfff
91#define EVENT_FLAGS_SHIFT 0x10
92
74/* feature control bits */ 93/* feature control bits */
75#define CONTROL_IOMMU_EN 0x00ULL 94#define CONTROL_IOMMU_EN 0x00ULL
76#define CONTROL_HT_TUN_EN 0x01ULL 95#define CONTROL_HT_TUN_EN 0x01ULL
@@ -165,6 +184,9 @@
165 184
166#define MAX_DOMAIN_ID 65536 185#define MAX_DOMAIN_ID 65536
167 186
187/* FIXME: move this macro to <linux/pci.h> */
188#define PCI_BUS(x) (((x) >> 8) & 0xff)
189
168/* 190/*
169 * This structure contains generic data for IOMMU protection domains 191 * This structure contains generic data for IOMMU protection domains
170 * independent of their use. 192 * independent of their use.