diff options
author | nyan <nyan@FreeBSD.org> | 2001-12-12 12:27:59 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2001-12-12 12:27:59 +0000 |
commit | be7a644187a8305be244a1356574fcc90f8b1e1b (patch) | |
tree | 435b3aa7a4cf6440e7e583ac3e413a365d04f7c3 /sys/pc98/i386 | |
parent | 004324029585ee7ed1e015a2fcc98a9dde5b99af (diff) | |
download | FreeBSD-src-be7a644187a8305be244a1356574fcc90f8b1e1b.zip FreeBSD-src-be7a644187a8305be244a1356574fcc90f8b1e1b.tar.gz |
MFi386: revision 1.485 (the previous commit is not completely)
Diffstat (limited to 'sys/pc98/i386')
-rw-r--r-- | sys/pc98/i386/machdep.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index f1775ad..1823cc8 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -274,7 +274,6 @@ cpu_startup(dummy) bufinit(); vm_pager_bufferinit(); - pcpu_init(GLOBALDATA, 0, sizeof(struct pcpu)); #ifndef SMP /* For SMP, we delay the cpu_setregs() until after SMP startup. */ cpu_setregs(); @@ -1726,6 +1725,7 @@ init386(first) /* table descriptors - used to load tables by microp */ struct region_descriptor r_gdt, r_idt; #endif + struct pcpu *pc; proc_linkup(&proc0); proc0.p_uarea = proc0uarea; @@ -1769,20 +1769,16 @@ init386(first) gdt_segs[GCODE_SEL].ssd_limit = atop(0 - 1); gdt_segs[GDATA_SEL].ssd_limit = atop(0 - 1); #ifdef SMP + pc = &SMP_prvspace[0]; gdt_segs[GPRIV_SEL].ssd_limit = atop(sizeof(struct privatespace) - 1); - gdt_segs[GPRIV_SEL].ssd_base = (int) &SMP_prvspace[0]; - gdt_segs[GPROC0_SEL].ssd_base = - (int) &SMP_prvspace[0].pcpu.pc_common_tss; - SMP_prvspace[0].pcpu.pc_prvspace = &SMP_prvspace[0].pcpu; #else + pc = &__pcpu; gdt_segs[GPRIV_SEL].ssd_limit = atop(sizeof(struct pcpu) - 1); - gdt_segs[GPRIV_SEL].ssd_base = (int) &__pcpu; - gdt_segs[GPROC0_SEL].ssd_base = - (int) &__pcpu.pc_common_tss; - __pcpu.pc_prvspace = &__pcpu; #endif + gdt_segs[GPRIV_SEL].ssd_base = (int) pc; + gdt_segs[GPROC0_SEL].ssd_base = (int) &pc->pc_common_tss; for (x = 0; x < NGDT; x++) { #ifdef BDE_DEBUGGER @@ -1797,10 +1793,11 @@ init386(first) r_gdt.rd_base = (int) gdt; lgdt(&r_gdt); - /* setup curproc so that mutexes work */ + pcpu_init(pc, 0, sizeof(struct pcpu)); + PCPU_SET(prvspace, pc); + /* setup curproc so that mutexes work */ PCPU_SET(curthread, thread0); - PCPU_SET(spinlocks, NULL); LIST_INIT(&thread0->td_contested); @@ -1970,6 +1967,11 @@ init386(first) thread0->td_frame = &proc0_tf; } +void +cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) +{ +} + #if defined(I586_CPU) && !defined(NO_F00F_HACK) static void f00f_hack(void *unused); SYSINIT(f00f_hack, SI_SUB_INTRINSIC, SI_ORDER_FIRST, f00f_hack, NULL); |