summaryrefslogtreecommitdiff
path: root/kc/core/cpu
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2022-02-03 19:45:00 +0000
committerAda Christine <adachristine18@gmail.com>2022-02-03 19:45:00 +0000
commit073e21313eb1d11027985e0367159de6ecad0f9e (patch)
tree20865bd11b59aa34797d2b83ac2056c56f33e071 /kc/core/cpu
parent65430cd09f3b6162187d66d66f860e8883f8ff9b (diff)
bad conditional
Diffstat (limited to 'kc/core/cpu')
-rw-r--r--kc/core/cpu/cpu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kc/core/cpu/cpu.c b/kc/core/cpu/cpu.c
index 27ee827..6e8e8b6 100644
--- a/kc/core/cpu/cpu.c
+++ b/kc/core/cpu/cpu.c
@@ -261,7 +261,7 @@ void exceptions_init(void)
isr_install(PAGE_FAULT_VECTOR, &page_fault_isr, 0, 0);
}
-void isr_install(int vec, void (*isr)(void), int trap, int ist)
+void isr_install(int vec, void (*isr)(void), int trap, unsigned ist)
{
enum gate_descriptor_type type = INT64_GATE;
@@ -272,11 +272,11 @@ void isr_install(int vec, void (*isr)(void), int trap, int ist)
set_idt(vec, CODE_SUPER_SEG_INDEX << 3, (uintptr_t)isr, type);
// an IST greater than 7 is invalid
- if (ist && ist < 7)
+ if (ist && ist <= 7)
{
set_ist(vec, ist);
}
- else
+ else if (ist && ist > 7)
{
panic(GENERAL_PANIC);
}