Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386 Do proc0's TSS and LDT initialization at the e...



details:   https://anonhg.NetBSD.org/src/rev/0c0296ba4e8d
branches:  trunk
changeset: 467970:0c0296ba4e8d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Apr 01 00:37:50 1999 +0000

description:
Do proc0's TSS and LDT initialization at the end of configure() (i.e.
once the FPU has been attached).

diffstat:

 sys/arch/i386/i386/autoconf.c |   5 ++++-
 sys/arch/i386/i386/machdep.c  |  22 +++++++++++++---------
 sys/arch/i386/include/cpu.h   |   3 ++-
 3 files changed, 19 insertions(+), 11 deletions(-)

diffs (88 lines):

diff -r 8fa9695e2c2c -r 0c0296ba4e8d sys/arch/i386/i386/autoconf.c
--- a/sys/arch/i386/i386/autoconf.c     Thu Apr 01 00:30:39 1999 +0000
+++ b/sys/arch/i386/i386/autoconf.c     Thu Apr 01 00:37:50 1999 +0000
@@ -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 @@
        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();
 }
diff -r 8fa9695e2c2c -r 0c0296ba4e8d sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Thu Apr 01 00:30:39 1999 +0000
+++ b/sys/arch/i386/i386/machdep.c      Thu Apr 01 00:37:50 1999 +0000
@@ -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 @@
 {
        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 @@
 
        /* Safe for i/o port allocation to use malloc now. */
        ioport_malloc_safe = 1;
-
-       /*
-        * Set up proc0's TSS and LDT.
-        */
+}
+
+/*
+ * Set up proc0's TSS and LDT.
+ */
+void
+i386_proc0_tss_ldt_init()
+{
+       struct pcb *pcb;
+       int x;
+
        gdt_init();
        curpcb = pcb = &proc0.p_addr->u_pcb;
        pcb->pcb_flags = 0;
@@ -555,7 +560,6 @@
        lldt(pcb->pcb_ldt_sel);
 
        proc0.p_md.md_regs = (struct trapframe *)pcb->pcb_tss.tss_esp0 - 1;
-
 }
 
 /*
diff -r 8fa9695e2c2c -r 0c0296ba4e8d sys/arch/i386/include/cpu.h
--- a/sys/arch/i386/include/cpu.h       Thu Apr 01 00:30:39 1999 +0000
+++ b/sys/arch/i386/include/cpu.h       Thu Apr 01 00:37:50 1999 +0000
@@ -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 @@
 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 */



Home | Main Index | Thread Index | Old Index