aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-04 09:57:28 -0700
committerBin Meng <bmeng.cn@gmail.com>2020-11-06 09:51:29 +0800
commita0ed800376b0db57428f9bf6401db36789ff1aa6 (patch)
tree293f5f54b352f72ec856d4bb328602a3c0fa9dd3 /arch/x86/include
parent8bcfb7917a61ef8230d85b6efc5a272fd20637ff (diff)
downloadu-boot-a0ed800376b0db57428f9bf6401db36789ff1aa6.zip
u-boot-a0ed800376b0db57428f9bf6401db36789ff1aa6.tar.gz
u-boot-a0ed800376b0db57428f9bf6401db36789ff1aa6.tar.bz2
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>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/interrupt.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/include/asm/interrupt.h b/arch/x86/include/asm/interrupt.h
index fdeb857..e23fb2c 100644
--- a/arch/x86/include/asm/interrupt.h
+++ b/arch/x86/include/asm/interrupt.h
@@ -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