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>
This commit is contained in:
Simon Glass
2020-11-04 09:57:28 -07:00
committed by Bin Meng
parent 8bcfb7917a
commit a0ed800376
3 changed files with 27 additions and 7 deletions

View File

@@ -38,6 +38,16 @@ enum x86_exception {
EXC_VE
};
/**
* struct idt_ptr - Holds the IDT (Interrupt Descriptor Table)
*
* @size: Size of IDT in bytes
*/
struct idt_ptr {
unsigned short size;
unsigned long address;
} __packed;
/* arch/x86/cpu/interrupts.c */
void set_vector(u8 intnum, void *routine);
@@ -61,4 +71,11 @@ void configure_irq_trigger(int int_num, bool is_level_triggered);
void *x86_get_idt(void);
/**
* interrupt_read_idt() - Read the IDT
*
* @ptr: Place to put IDT contents
*/
void interrupt_read_idt(struct idt_ptr *ptr);
#endif