mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 05:38:21 +00:00
context: irq
This commit is contained in:
@@ -27,6 +27,7 @@ arch_context_switch:
|
||||
pop r15
|
||||
pop rdi
|
||||
pop rsi
|
||||
add rsp,8 ; remove irq
|
||||
pop rbp
|
||||
add rsp,8 ; remove error code
|
||||
|
||||
@@ -60,6 +61,7 @@ arch_context_saveandcall:
|
||||
push r11 ; return address
|
||||
sub rsp, 8 ; error code
|
||||
push rbp
|
||||
sub rsp, 8 ; irq
|
||||
push rsi
|
||||
push rdi
|
||||
push r15
|
||||
|
||||
@@ -10,6 +10,7 @@ isr_%+ i:
|
||||
|
||||
push rbp ; this push is here to free a register
|
||||
mov rbp, i
|
||||
|
||||
jmp isr_common
|
||||
%assign i i + 1
|
||||
%endrep
|
||||
@@ -21,6 +22,7 @@ isr_common:
|
||||
swapgs
|
||||
.notneeded1:
|
||||
; push context
|
||||
push rbp ; push irq num
|
||||
push rsi
|
||||
push rdi
|
||||
push r15
|
||||
@@ -80,6 +82,7 @@ isr_common:
|
||||
pop r15
|
||||
pop rdi
|
||||
pop rsi
|
||||
add rsp,8 ; remove irq
|
||||
pop rbp
|
||||
add rsp,8 ; remove error code
|
||||
|
||||
|
||||
@@ -221,6 +221,7 @@ arch_syscall_entry:
|
||||
push qword rcx ; save return RIP
|
||||
push qword 0 ; error
|
||||
push rbp
|
||||
push qword 0 ; irq
|
||||
push rsi
|
||||
push rdi
|
||||
push r15
|
||||
@@ -315,6 +316,7 @@ arch_syscall_entry:
|
||||
pop r15
|
||||
pop rdi
|
||||
pop rsi
|
||||
add rsp, 8 ; remove irq
|
||||
pop rbp
|
||||
add rsp, 8 ; remove error code
|
||||
pop rcx
|
||||
|
||||
Reference in New Issue
Block a user