diff options
| author | Carlos Maiolino <[email protected]> | 2025-09-14 15:11:20 +0200 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2025-09-14 15:11:20 +0200 |
| commit | 9c7a059f64c86e5026cbbc5c6ae2f48be0f56c0c (patch) | |
| tree | 752a262b102bb7a40e0296e06e7aa51ec14b1e16 /src/idt | |
| parent | 364b023b2c50a7e810bf4f975150fc50c179e135 (diff) | |
Enable interrupts only after IDT is set
So far we've been playing a dangerous game... We enabled interrupts
before we actually had the interrupt descriptor table setup.
Fix this so we prevent IRQs to fire before the table is initialized
and attempt to run garbage instead of code
Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'src/idt')
| -rw-r--r-- | src/idt/idt.asm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/idt/idt.asm b/src/idt/idt.asm index 235f46b..d15e565 100644 --- a/src/idt/idt.asm +++ b/src/idt/idt.asm @@ -6,7 +6,16 @@ extern default_int_handler global int21h global default_handler global idt_load +global enable_interrupts +global disable_interrupts +enable_interrupts: + sti + ret + +disable_interrupts: + cli + ret idt_load: push ebp |
