x86: Show the interrupt pointer with 'irqinfo'
It is useful for this command to show the address of the interrupt table.
Add support for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c
index a81e429..ff52959 100644
--- a/arch/x86/lib/interrupts.c
+++ b/arch/x86/lib/interrupts.c
@@ -131,8 +131,11 @@
int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
#if !CONFIG_IS_ENABLED(X86_64)
+ struct idt_ptr ptr;
int irq;
+ interrupt_read_idt(&ptr);
+ printf("IDT at %lx, size %x\n", ptr.address, ptr.size);
printf("Spurious IRQ: %u, last unknown IRQ: %d\n",
spurious_irq_cnt, spurious_irq);