diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-09-03 08:25:02 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-09-03 08:28:04 -0400 |
commit | 945b4ac44e5700acd3d974c176c8ace34b4d2e8e (patch) | |
tree | 328159670312d8e78e4ac7c980c2a9d9e274211d /arch/x86/kernel/amd_iommu.c | |
parent | e3e59876e82a5e1a07f365d5474e7b6943524725 (diff) |
x86/amd-iommu: Dump illegal command on ILLEGAL_COMMAND_ERROR
This patch adds code to dump the command which caused an
ILLEGAL_COMMAND_ERROR raised by the IOMMU hardware.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 364c6de26374..e62b35f5df1b 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -147,6 +147,15 @@ static void dump_dte_entry(u16 devid) | |||
147 | amd_iommu_dev_table[devid].data[i]); | 147 | amd_iommu_dev_table[devid].data[i]); |
148 | } | 148 | } |
149 | 149 | ||
150 | static void dump_command(unsigned long phys_addr) | ||
151 | { | ||
152 | struct iommu_cmd *cmd = phys_to_virt(phys_addr); | ||
153 | int i; | ||
154 | |||
155 | for (i = 0; i < 4; ++i) | ||
156 | pr_err("AMD-Vi: CMD[%d]: %08x\n", i, cmd->data[i]); | ||
157 | } | ||
158 | |||
150 | static void iommu_print_event(void *__evt) | 159 | static void iommu_print_event(void *__evt) |
151 | { | 160 | { |
152 | u32 *event = __evt; | 161 | u32 *event = __evt; |
@@ -186,6 +195,7 @@ static void iommu_print_event(void *__evt) | |||
186 | break; | 195 | break; |
187 | case EVENT_TYPE_ILL_CMD: | 196 | case EVENT_TYPE_ILL_CMD: |
188 | printk("ILLEGAL_COMMAND_ERROR address=0x%016llx]\n", address); | 197 | printk("ILLEGAL_COMMAND_ERROR address=0x%016llx]\n", address); |
198 | dump_command(address); | ||
189 | break; | 199 | break; |
190 | case EVENT_TYPE_CMD_HARD_ERR: | 200 | case EVENT_TYPE_CMD_HARD_ERR: |
191 | printk("COMMAND_HARDWARE_ERROR address=0x%016llx " | 201 | printk("COMMAND_HARDWARE_ERROR address=0x%016llx " |