mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
能进入用户态程序,但无法正确进行系统调用
This commit is contained in:
@ -106,7 +106,7 @@ Err_Code:
|
||||
ENTRY(system_call)
|
||||
// 由于sysenter指令会禁用中断,因此要在这里手动开启中断
|
||||
sti;
|
||||
|
||||
hlt
|
||||
subq $0x38, %rsp
|
||||
|
||||
cld;
|
||||
|
@ -168,7 +168,7 @@ void do_stack_segment_fault(struct pt_regs *regs, unsigned long error_code)
|
||||
// 13 #GP 通用保护性异常
|
||||
void do_general_protection(struct pt_regs *regs, unsigned long error_code)
|
||||
{
|
||||
|
||||
hlt();
|
||||
kerror("do_general_protection(13),\tError Code:%#18lx,\tRSP:%#18lx,\tRIP:%#18lx\n", error_code, regs->rsp, regs->rip);
|
||||
if (error_code & 0x01)
|
||||
printk_color(RED, BLACK, "The exception occurred during delivery of an event external to the program,such as an interrupt or an earlier exception.\n");
|
||||
|
Reference in New Issue
Block a user