diff options
| author | Julian Elischer <julian@FreeBSD.org> | 2002-02-07 20:58:47 +0000 |
|---|---|---|
| committer | Julian Elischer <julian@FreeBSD.org> | 2002-02-07 20:58:47 +0000 |
| commit | 079b7badea4419a07a141547b7323f4c168f40fd (patch) | |
| tree | b267ad497d8d81c2c79c107443dabe850da2126b /sys/pc98 | |
| parent | 3daf63fc50f59552e7ba4ce58391ff0a5480a4f5 (diff) | |
Notes
Diffstat (limited to 'sys/pc98')
| -rw-r--r-- | sys/pc98/i386/machdep.c | 23 | ||||
| -rw-r--r-- | sys/pc98/pc98/machdep.c | 23 |
2 files changed, 22 insertions, 24 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 71d2098c927f..5b9bcd8650a6 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 diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 71d2098c927f..5b9bcd8650a6 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/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 |
