From 3b9fc2f4d0d1a289942d7dcb08c8107173cd9295 Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Sun, 7 Nov 2021 17:48:41 +0800 Subject: [PATCH] interrupt: remove global IDTR/GDTR LIDT/LGDT is now called with addresses in stack --- interrupt/init.c | 3 +-- interrupt/interrupt.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/interrupt/init.c b/interrupt/init.c index 903c3e9..48a1945 100644 --- a/interrupt/init.c +++ b/interrupt/init.c @@ -6,8 +6,7 @@ #include "../runtime/panic_assert.h" #include "testcode.h" -interrupt_DescriptorTableReference *interrupt_IDTR, *interrupt_GDTR; -bool interrupt_Enabled; +bool interrupt_Enabled; /* diff --git a/interrupt/interrupt.h b/interrupt/interrupt.h index 7f2e5d3..2fa2d36 100644 --- a/interrupt/interrupt.h +++ b/interrupt/interrupt.h @@ -33,8 +33,7 @@ typedef struct { uint16_t length; void * base; } PACKED interrupt_DescriptorTableReference; -// address of IDTR and GDTR, allocated by kMalloc() and is never freed -extern interrupt_DescriptorTableReference *interrupt_IDTR, *interrupt_GDTR; + // true if Init() has been called and interrupt handling is on extern bool interrupt_Enabled;