x86: Provide access to the IDT

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>
This commit is contained in:
Simon Glass 2015-04-28 20:25:16 -06:00
parent 52845296be
commit 6f41e0e7bc
2 changed files with 7 additions and 0 deletions

View 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);

View 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