summaryrefslogtreecommitdiffstats
path: root/sys/pc98/i386/machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pc98/i386/machdep.c')
-rw-r--r--sys/pc98/i386/machdep.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index 71d2098..5b9bcd8 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -1715,12 +1715,11 @@ init386(first)
#endif
struct pcpu *pc;
- proc_linkup(&proc0);
+ proc_linkup(&proc0, &proc0.p_ksegrp, &proc0.p_kse, &thread0);
proc0.p_uarea = proc0uarea;
- thread0 = &proc0.p_thread;
- thread0->td_kstack = proc0kstack;
- thread0->td_pcb = (struct pcb *)
- (thread0->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
+ thread0.td_kstack = proc0kstack;
+ thread0.td_pcb = (struct pcb *)
+ (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
atdevbase = ISA_HOLE_START + KERNBASE;
#ifdef PC98
@@ -1785,9 +1784,9 @@ init386(first)
PCPU_SET(prvspace, pc);
/* setup curproc so that mutexes work */
- PCPU_SET(curthread, thread0);
+ PCPU_SET(curthread, &thread0);
- LIST_INIT(&thread0->td_contested);
+ LIST_INIT(&thread0.td_contested);
/*
* Initialize mutexes.
@@ -1890,7 +1889,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 +
+ PCPU_SET(common_tss.tss_esp0, thread0.td_kstack +
KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb) - 16);
PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL));
gsel_tss = GSEL(GPROC0_SEL, SEL_KPL);
@@ -1947,10 +1946,10 @@ init386(first)
_udatasel = LSEL(LUDATA_SEL, SEL_UPL);
/* setup proc 0's pcb */
- thread0->td_pcb->pcb_flags = 0; /* XXXKSE */
- thread0->td_pcb->pcb_cr3 = (int)IdlePTD;
- thread0->td_pcb->pcb_ext = 0;
- thread0->td_frame = &proc0_tf;
+ thread0.td_pcb->pcb_flags = 0; /* XXXKSE */
+ thread0.td_pcb->pcb_cr3 = (int)IdlePTD;
+ thread0.td_pcb->pcb_ext = 0;
+ thread0.td_frame = &proc0_tf;
}
void
OpenPOWER on IntegriCloud