改用int250作为系统调用

This commit is contained in:
fslongjin
2022-04-12 11:54:44 +08:00
parent 011246281a
commit 2d7b2b7048
15 changed files with 236 additions and 104 deletions

View File

@ -52,6 +52,7 @@ Restore_all:
popq %rax
addq $0x10, %rsp // FUNCerrcode
iretq
ret_from_exception:
@ -106,9 +107,6 @@ Err_Code:
ENTRY(system_call)
// sysenter
sti;
subq $0x38, %rsp
cld;
@ -146,6 +144,7 @@ ENTRY(system_call)
//
ENTRY(ret_from_system_call)
movq %rax, 0x80(%rsp) // raxrax
@ -168,9 +167,10 @@ ENTRY(ret_from_system_call)
popq %rax
movq %rax, %es
popq %rax
addq $0x38, %rsp
.byte 0x48
addq $0x38, %rsp
.byte 0x48
sysexit
// 0 #DE
@ -337,6 +337,15 @@ ENTRY(virtualization_exception)
xchgq %rax, (%rsp) // FUNC
jmp Err_Code
/*
// 0x80
ENTRY(syscall_int)
pushq $0
pushq %rax
leaq do_syscall_int(%rip), %rax //
xchgq %rax, (%rsp) // FUNC
jmp Err_Code
*/
ENTRY(_stack_start)
.quad initial_proc_union + 32768