mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 13:48:21 +00:00
x86_64: properly set kernel data segments on syscall/interrupt entry
This commit is contained in:
@@ -41,6 +41,11 @@ isr_%+ i:
|
||||
mov rdi,cr2
|
||||
push rdi
|
||||
|
||||
; set up kernel segments
|
||||
mov rdi, 0x10
|
||||
mov ds, rdi
|
||||
mov es, rdi
|
||||
|
||||
; save ctx pointer and interrupt vector number
|
||||
mov rdi, i
|
||||
mov rsi, rsp
|
||||
|
||||
@@ -211,6 +211,10 @@ arch_syscall_entry:
|
||||
mov rbx, cr2
|
||||
push rbx
|
||||
|
||||
mov rbx, 0x10
|
||||
mov es, rbx
|
||||
mov ds, rbx
|
||||
|
||||
; prepare arguments for the functions
|
||||
push r9
|
||||
mov r9, r8
|
||||
|
||||
Reference in New Issue
Block a user