diff options
author | jhb <jhb@FreeBSD.org> | 2004-02-02 23:22:24 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2004-02-02 23:22:24 +0000 |
commit | 26a88b02fc1135ee880178dc9cfe4d6c411720f5 (patch) | |
tree | 59739b5279f5dc9c31d2c821d1e79e0b52b3592d /sys/i386 | |
parent | 92b93ba391ee959e0d2d00e79183a22f1a289ff0 (diff) | |
download | FreeBSD-src-26a88b02fc1135ee880178dc9cfe4d6c411720f5.zip FreeBSD-src-26a88b02fc1135ee880178dc9cfe4d6c411720f5.tar.gz |
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.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/machdep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 524e226..bd5d786 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -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. |