🆕 切换为grub2引导,能进入Start_Kernel函数(未能完成初始化)

This commit is contained in:
fslongjin
2022-02-21 14:39:48 +08:00
parent a2aea12510
commit 0b0cce9326
21 changed files with 1128 additions and 1377 deletions

View File

@ -264,6 +264,8 @@ unsigned long do_fork(struct pt_regs *regs, unsigned long clone_flags, unsigned
thd->rbp = (ul)tsk + STACK_SIZE;
thd->rip = regs->rip;
thd->rsp = (ul)tsk + STACK_SIZE - sizeof(struct pt_regs);
thd->fs = KERNEL_DS;
thd->gs = KERNEL_DS;
// 若进程不是内核层的进程则跳转到ret from system call
if (!(tsk->flags & PF_KTHREAD))