Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/i386 Xen now needs cpu_init_tss() too. Makes X...



details:   https://anonhg.NetBSD.org/src/rev/b6592b9b5d7d
branches:  trunk
changeset: 828982:b6592b9b5d7d
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Jan 13 14:12:57 2018 +0000

description:
Xen now needs cpu_init_tss() too. Makes XEN3PAE_DOMU boot again.

diffstat:

 sys/arch/i386/i386/machdep.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (55 lines):

diff -r 999bdc07707b -r b6592b9b5d7d sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Sat Jan 13 14:11:40 2018 +0000
+++ b/sys/arch/i386/i386/machdep.c      Sat Jan 13 14:12:57 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.802 2018/01/04 13:36:30 maxv Exp $       */
+/*     $NetBSD: machdep.c,v 1.803 2018/01/13 14:12:57 bouyer Exp $     */
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009, 2017
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.802 2018/01/04 13:36:30 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.803 2018/01/13 14:12:57 bouyer Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_freebsd.h"
@@ -453,8 +453,8 @@
        gdt_init();
        i386_proc0_pcb_ldt_init();
 
+       cpu_init_tss(&cpu_info_primary);
 #ifndef XEN
-       cpu_init_tss(&cpu_info_primary);
        ltr(cpu_info_primary.ci_tss_sel);
 #endif
 
@@ -613,6 +613,7 @@
            GSEL(GIPITSS_SEL, SEL_KPL));
 #endif
 }
+#endif /* XEN */
 
 /*
  * Set up TSS and I/O bitmap.
@@ -626,14 +627,17 @@
            sizeof(struct cpu_tss), 0, UVM_KMF_WIRED|UVM_KMF_ZERO);
 
        cputss->tss.tss_iobase = IOMAP_INVALOFF << 16;
+#ifndef XEN
        cputss->tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
        cputss->tss.tss_ldt = GSEL(GLDT_SEL, SEL_KPL);
        cputss->tss.tss_cr3 = rcr3();
+#endif
 
        ci->ci_tss = cputss;
+#ifndef XEN
        ci->ci_tss_sel = tss_alloc(&cputss->tss);
+#endif
 }
-#endif /* XEN */
 
 void *
 getframe(struct lwp *l, int sig, int *onstack)



Home | Main Index | Thread Index | Old Index