diff options
author | Benji Dial <benji@benjidial.net> | 2024-01-14 12:29:35 -0500 |
---|---|---|
committer | Benji Dial <benji@benjidial.net> | 2024-01-14 12:29:35 -0500 |
commit | 7c6a18d77a81f232ad2e1d3a311bb21ea8f1f5b4 (patch) | |
tree | cb7cce254e7ae2ec8691b93340ca125b8c6b4988 /kernel/interrupts.asm | |
parent | e9898e829b8df7c0b16faec1ce490369c53fd78e (diff) | |
download | hilbert-os-7c6a18d77a81f232ad2e1d3a311bb21ea8f1f5b4.tar.gz |
register interrupts 0x08 - 0x0f
Diffstat (limited to 'kernel/interrupts.asm')
-rw-r--r-- | kernel/interrupts.asm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/interrupts.asm b/kernel/interrupts.asm index c375ee4..4827cfd 100644 --- a/kernel/interrupts.asm +++ b/kernel/interrupts.asm @@ -64,6 +64,8 @@ exception_info: resq 1 .r15: resq 1 +.cr2: + resq 1 .cr3: resq 1 .rip: @@ -181,6 +183,8 @@ exception_common: pop rax mov qword [exception_info.rsp], rax + mov rax, cr2 + mov qword [exception_info.cr2], rax mov rax, cr3 mov qword [exception_info.cr3], rax @@ -200,7 +204,7 @@ set_isr: shr rdx, 16 mov dword [rdi + 8], edx - or sil, 0xef + or sil, 0x8e mov byte [rdi + 5], sil mov word [rdi + 2], 0x28 mov byte [rdi + 4], 1 @@ -225,13 +229,13 @@ section .text load_gdt_and_idt: - mov rcx, 8 + mov rcx, 16 .loop: mov rdi, rcx dec rdi - mov sil, 1 + mov sil, 0 mov rdx, qword [exception_isrs + rdi * 8] call set_isr |