Do proc0's TSS and LDT initialization at the end of configure() (i.e.

once the FPU has been attached).
This commit is contained in:
thorpej 1999-04-01 00:37:50 +00:00
parent 6ce60662b5
commit 2f832df90c
3 changed files with 18 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.36 1999/03/28 19:55:51 fvdl Exp $ */
/* $NetBSD: autoconf.c,v 1.37 1999/04/01 00:37:50 thorpej Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -107,6 +107,9 @@ configure()
spl0();
cold = 0;
/* Set up proc0's TSS and LDT (after the FPU is configured). */
i386_proc0_tss_ldt_init();
/* XXX Finish deferred buffer cache allocation. */
i386_bufinit();
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.348 1999/04/01 00:17:47 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.349 1999/04/01 00:37:50 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@ -391,11 +391,9 @@ cpu_startup()
{
unsigned i;
caddr_t v;
int sz;
int sz, x;
vaddr_t minaddr, maxaddr;
vsize_t size;
struct pcb *pcb;
int x;
#if NBIOSCALL > 0
extern int biostramp_image_size;
extern u_char biostramp_image[];
@ -533,10 +531,17 @@ cpu_startup()
/* Safe for i/o port allocation to use malloc now. */
ioport_malloc_safe = 1;
}
/*
* Set up proc0's TSS and LDT.
*/
void
i386_proc0_tss_ldt_init()
{
struct pcb *pcb;
int x;
/*
* Set up proc0's TSS and LDT.
*/
gdt_init();
curpcb = pcb = &proc0.p_addr->u_pcb;
pcb->pcb_flags = 0;
@ -555,7 +560,6 @@ cpu_startup()
lldt(pcb->pcb_ldt_sel);
proc0.p_md.md_regs = (struct trapframe *)pcb->pcb_tss.tss_esp0 - 1;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.52 1999/03/12 01:01:42 fvdl Exp $ */
/* $NetBSD: cpu.h,v 1.53 1999/04/01 00:37:50 thorpej Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -132,6 +132,7 @@ extern struct cpu_cpuid_nameclass i386_cpuid_cpus[];
void delay __P((int));
void dumpconf __P((void));
void cpu_reset __P((void));
void i386_proc0_tss_ldt_init __P((void));
void i386_bufinit __P((void));
/* locore.s */