aboutsummaryrefslogtreecommitdiff
path: root/src/idt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/idt.h')
-rw-r--r--src/idt.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/idt.h b/src/idt.h
index 3aa5a1e..628eb23 100644
--- a/src/idt.h
+++ b/src/idt.h
@@ -18,11 +18,14 @@ public:
class Entry {
public:
- Entry(uint32_t offset = 0, uint16_t select = 0, InterruptType t = Null) {
+ constexpr Entry(uint32_t offset = 0, uint16_t select = 0, InterruptType t = Null) {
offset_0_15 = offset & 0xffff;
offset_16_31 = (offset & 0xffff0000) >> 16;
selector = select;
type = t;
+ if (offset != 0) {
+ e = true;
+ }
}
private:
@@ -32,8 +35,8 @@ public:
InterruptType type : 3; // 40-42 type
[[maybe_unused]] bool d : 1 = true; // 43 true: 32-bit, false: 16-bit segment
[[maybe_unused]] uint8_t u : 1 = 0; // 44 unused
- uint8_t dpl : 2 = 0; // 45-46 descriptor privilege level
- [[maybe_unused]] bool e : 1 = true; // 47 enable
+ [[maybe_unused]] uint8_t dpl : 2 = 0; // 45-46 descriptor privilege level
+ [[maybe_unused]] bool e : 1 = false; // 47 enable
uint16_t offset_16_31; // 48-63 offset high
} __attribute__((packed));