diff options
author | nyan <nyan@FreeBSD.org> | 2011-02-07 07:39:09 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2011-02-07 07:39:09 +0000 |
commit | 84b2ed0c76a8ae65d24d35a1d9d714ea409f584a (patch) | |
tree | 27d36bcafdee36708d124f4f9c47e685cfbf6356 /sys | |
parent | afb715ad585ad96def5d54a43aeb9f83a2cf6476 (diff) | |
download | FreeBSD-src-84b2ed0c76a8ae65d24d35a1d9d714ea409f584a.zip FreeBSD-src-84b2ed0c76a8ae65d24d35a1d9d714ea409f584a.tar.gz |
MFi386: revision 217886
Set td_kstack_pages for thread0.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pc98/pc98/machdep.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 826bcc8..4ccfa5d 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -2088,11 +2088,13 @@ init386(first) { struct gate_descriptor *gdp; int gsel_tss, metadata_missing, x, pa; + size_t kstack0_sz; struct pcpu *pc; thread0.td_kstack = proc0kstack; - thread0.td_pcb = (struct pcb *) - (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; + thread0.td_kstack_pages = KSTACK_PAGES; + kstack0_sz = thread0.td_kstack_pages * PAGE_SIZE; + thread0.td_pcb = (struct pcb *)(thread0.td_kstack + kstack0_sz) - 1; /* * This may be done better later if it gets more high level @@ -2262,7 +2264,7 @@ init386(first) /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ PCPU_SET(common_tss.tss_esp0, thread0.td_kstack + - KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb) - 16); + kstack0_sz - sizeof(struct pcb) - 16); PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL)); gsel_tss = GSEL(GPROC0_SEL, SEL_KPL); PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd); |