From 1bf6ed1ec9f826518f1dfad9fe0c073420ee0783 Mon Sep 17 00:00:00 2001 From: Sebastian Fricke Date: Wed, 1 Apr 2020 07:21:50 +0200 Subject: [PATCH] replace gate_struct64 with unified gate_struct As described in this: https://lore.kernel.org/lkml/20170828064957.861974317@linutronix.de/ mail from the lkml. And changed within this commit: https://github.com/torvalds/linux/commit/64b163fab684e3de47aa8db6cc08ae7d2e194373#diff-35bcd00365a749ba6cfa246a7dc86a68 The gate_struct was unified for 32 and 64bit machines. Replaced gate_struct64 definition with that of gate_struct. --- Interrupts/linux-interrupts-1.md | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/Interrupts/linux-interrupts-1.md b/Interrupts/linux-interrupts-1.md index 411e7ee..4fbdca5 100644 --- a/Interrupts/linux-interrupts-1.md +++ b/Interrupts/linux-interrupts-1.md @@ -232,33 +232,21 @@ The `IST` or `Interrupt Stack Table` is a new mechanism in the `x86_64`. It is u The `Interrupt Descriptor Table` represented by the array of the `gate_desc` structures: ```C -extern gate_desc idt_table[]; +gate_desc idt_table[IDT_ENTRIES] __page_aligned_bss; ``` -where `gate_desc` is: +where `gate_struct` is defined as: ```C +struct gate_struct { + u16 offset_low; + u16 segment; + struct idt_bits bits; + u16 offset_middle; #ifdef CONFIG_X86_64 -... -... -... -typedef struct gate_struct64 gate_desc; -... -... -... + u32 offset_high; + u32 reserved; #endif -``` - -and `gate_struct64` defined as: - -```C -struct gate_struct64 { - u16 offset_low; - u16 segment; - unsigned ist : 3, zero0 : 5, type : 5, dpl : 2, p : 1; - u16 offset_middle; - u32 offset_high; - u32 zero1; } __attribute__((packed)); ```