Rework x86_64 paging and vmm

This commit is contained in:
2025-08-30 00:31:20 +02:00
parent 8cf1bde879
commit 7a52f2f051
28 changed files with 262 additions and 291 deletions

View File

@ -49,14 +49,12 @@
.global intr_vec46
.global intr_vec47
.macro _PUSHAQ
.macro _push_regs
push %rax
push %rbx
push %rcx
push %rdx
push %rbp
push %rdi
push %rsi
push %rdi
push %r8
push %r9
push %r10
@ -67,7 +65,7 @@
push %r15
.endm
.macro _POPAQ
.macro _pop_regs
pop %r15
pop %r14
pop %r13
@ -76,58 +74,30 @@
pop %r10
pop %r9
pop %r8
pop %rsi
pop %rdi
pop %rbp
pop %rsi
pop %rdx
pop %rcx
pop %rbx
pop %rax
.endm
.macro _PUSHACR
mov %cr0, %rax
push %rax
mov %cr2, %rax
push %rax
mov %cr3, %rax
push %rax
mov %cr4, %rax
push %rax
mov %cr8, %rax
push %rax
.endm
.macro _POPACR
add $0x28, %rsp
.endm
.macro _vecintr_errorcode_present_save num
pushq $\num
_PUSHAQ
_PUSHACR
.endm
.macro _vecintr_plain_save num
pushq $0x0
pushq $\num
_PUSHAQ
_PUSHACR
.endm
siema:
jmp siema
.macro _vecintr_bodygen
_push_regs
cld
mov %rsp, %rdi
call intr_handleintr
_POPACR
_POPAQ
_pop_regs
add $0x10, %rsp
iretq
.endm
@ -227,7 +197,6 @@ intr_vec30:
intr_vec31:
_vecintr_plain_save 31
_vecintr_bodygen
intr_vec32:
_vecintr_plain_save 32
_vecintr_bodygen