diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2025-04-01 13:35:49 +0000 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2025-04-01 13:35:49 +0000 |
| commit | 6878ffae67a6940ab8dca9831abf9537322ed2cf (patch) | |
| tree | f58633b966f31af1dd02f81deb1b7b8980af0094 | |
| parent | 40cfa485cc2c9e344a0386419ed55c123312ec32 (diff) | |
| download | teachos-6878ffae67a6940ab8dca9831abf9537322ed2cf.tar.xz teachos-6878ffae67a6940ab8dca9831abf9537322ed2cf.zip | |
Fix invalid type field of gate descriptor
| -rw-r--r-- | arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/idt_flags.hpp | 4 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/ist_offset.hpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/idt_flags.hpp b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/idt_flags.hpp index 2f8e61d..4e8b32c 100644 --- a/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/idt_flags.hpp +++ b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/idt_flags.hpp @@ -18,8 +18,8 @@ namespace teachos::arch::context_switching::interrupt_descriptor_table */ enum bitset : uint8_t { - INTERRUPT_GATE = 16U, ///< The actual type of gate segment is a interrupt gate. - TRAP_GATE = 17U, ///< The actual type of gate segment is a trap gate. + INTERRUPT_GATE = 0b1110, ///< The actual type of gate segment is a interrupt gate. + TRAP_GATE = 0b1111, ///< The actual type of gate segment is a trap gate. DESCRIPTOR_LEVEL_KERNEL = 0U << 5U, ///< Highest privileged level used by the kernel to allow for full access of resources. DESCRIPTOR_LEVEL_ADMIN = diff --git a/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/ist_offset.hpp b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/ist_offset.hpp index f31a898..cefe1b2 100644 --- a/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/ist_offset.hpp +++ b/arch/x86_64/include/arch/context_switching/interrupt_descriptor_table/ist_offset.hpp @@ -34,7 +34,9 @@ namespace teachos::arch::context_switching::interrupt_descriptor_table auto operator==(ist_offset const & other) const -> bool = default; private: - uint8_t _ist : 3 = {}; ///< Offset into the interrupt stack table. + uint8_t _ist : 3 = {}; ///< Offset into the interrupt stack table. A value of of 0 menas we do not switch stacks, + ///< whereas 1 - 7 mean we switch to the n-th stack in the Interrupt Stack Table, contained + ///< in the TSS if the gate descriptor that contains this field is called. }; } // namespace teachos::arch::context_switching::interrupt_descriptor_table |
