x86: Provide access to the IDT
authorSimon Glass <sjg@chromium.org>
Wed, 29 Apr 2015 02:25:16 +0000 (20:25 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 30 Apr 2015 03:02:34 +0000 (21:02 -0600)
Add a function to return the address of the Interrupt Descriptor Table.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/interrupts.c
arch/x86/include/asm/interrupt.h

index a21d2a6..c777d36 100644 (file)
@@ -147,6 +147,11 @@ int cpu_init_interrupts(void)
        return 0;
 }
 
+void *x86_get_idt(void)
+{
+       return &idt_ptr;
+}
+
 void __do_irq(int irq)
 {
        printf("Unhandled IRQ : %d\n", irq);
index 25abde7..0a75f89 100644 (file)
@@ -38,4 +38,6 @@ extern char exception_stack[];
  */
 void configure_irq_trigger(int int_num, bool is_level_triggered);
 
+void *x86_get_idt(void);
+
 #endif