1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Set PCPU_GET(curpcb) for the BSP to thread0's pcb. Otherwise, the boot CPU

doesn't have a pcb until after it's first context switch.  This can cause
secondary panics if a page fault happens during bootup.
This commit is contained in:
John Baldwin 2004-02-02 23:22:24 +00:00
parent b74d89bbbb
commit b71aa5f5e9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125361

View File

@ -2010,6 +2010,7 @@ init386(first)
pcpu_init(pc, 0, sizeof(struct pcpu));
PCPU_SET(prvspace, pc);
PCPU_SET(curthread, &thread0);
PCPU_SET(curpcb, thread0.td_pcb);
/*
* Initialize mutexes.