Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Remove idt_init.
details: https://anonhg.NetBSD.org/src/rev/18dac04d5725
branches: trunk
changeset: 347481:18dac04d5725
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Aug 27 14:19:47 2016 +0000
description:
Remove idt_init.
diffstat:
sys/arch/amd64/amd64/machdep.c | 25 ++++++++++++++-----------
sys/arch/amd64/include/segments.h | 3 +--
sys/arch/i386/i386/machdep.c | 7 ++-----
sys/arch/i386/include/segments.h | 3 +--
sys/arch/x86/x86/idt.c | 10 ++--------
5 files changed, 20 insertions(+), 28 deletions(-)
diffs (164 lines):
diff -r 5c533d2c0d37 -r 18dac04d5725 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c Sat Aug 27 14:12:58 2016 +0000
+++ b/sys/arch/amd64/amd64/machdep.c Sat Aug 27 14:19:47 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.227 2016/08/27 14:12:58 maxv Exp $ */
+/* $NetBSD: machdep.c,v 1.228 2016/08/27 14:19:47 maxv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.227 2016/08/27 14:12:58 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.228 2016/08/27 14:19:47 maxv Exp $");
/* #define XENDEBUG_LOW */
@@ -1640,7 +1640,6 @@
pmap_update(pmap_kernel());
#ifndef XEN
- idt_init();
idt = (struct gate_descriptor *)idt_vaddr;
gdtstore = (char *)(idt + NIDT);
ldtstore = gdtstore + DYNSEL_START;
@@ -1652,25 +1651,29 @@
gdtstore = (char *) (ldtstore + PAGE_SIZE);
#endif /* XEN */
- /* make gdt gates and memory segments */
+ /*
+ * Make GDT gates and memory segments.
+ */
set_mem_segment(GDT_ADDR_MEM(gdtstore, GCODE_SEL), 0,
0xfffff, SDT_MEMERA, SEL_KPL, 1, 0, 1);
set_mem_segment(GDT_ADDR_MEM(gdtstore, GDATA_SEL), 0,
0xfffff, SDT_MEMRWA, SEL_KPL, 1, 0, 1);
-#ifndef XEN
- set_sys_segment(GDT_ADDR_SYS(gdtstore, GLDT_SEL), ldtstore,
- LDT_SIZE - 1, SDT_SYSLDT, SEL_KPL, 0);
-#endif
-
set_mem_segment(GDT_ADDR_MEM(gdtstore, GUCODE_SEL), 0,
x86_btop(VM_MAXUSER_ADDRESS) - 1, SDT_MEMERA, SEL_UPL, 1, 0, 1);
set_mem_segment(GDT_ADDR_MEM(gdtstore, GUDATA_SEL), 0,
x86_btop(VM_MAXUSER_ADDRESS) - 1, SDT_MEMRWA, SEL_UPL, 1, 0, 1);
- /* make ldt gates and memory segments */
+#ifndef XEN
+ set_sys_segment(GDT_ADDR_SYS(gdtstore, GLDT_SEL), ldtstore,
+ LDT_SIZE - 1, SDT_SYSLDT, SEL_KPL, 0);
+#endif
+
+ /*
+ * Make LDT gates and memory segments.
+ */
setgate((struct gate_descriptor *)(ldtstore + LSYS5CALLS_SEL),
&IDTVEC(oosyscall), 0, SDT_SYS386CGT, SEL_UPL,
GSEL(GCODE_SEL, SEL_KPL));
@@ -1705,7 +1708,7 @@
SDT_MEMRWA, SEL_UPL, 1, 1, 0);
/*
- * Other entries.
+ * Other LDT entries.
*/
memcpy((struct gate_descriptor *)(ldtstore + LSOL26CALLS_SEL),
(struct gate_descriptor *)(ldtstore + LSYS5CALLS_SEL),
diff -r 5c533d2c0d37 -r 18dac04d5725 sys/arch/amd64/include/segments.h
--- a/sys/arch/amd64/include/segments.h Sat Aug 27 14:12:58 2016 +0000
+++ b/sys/arch/amd64/include/segments.h Sat Aug 27 14:19:47 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: segments.h,v 1.26 2016/08/27 14:12:58 maxv Exp $ */
+/* $NetBSD: segments.h,v 1.27 2016/08/27 14:19:47 maxv Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -248,7 +248,6 @@
void update_descriptor(void *, void *);
#if !defined(XEN)
-void idt_init(void);
void idt_vec_reserve(int);
int idt_vec_alloc(int, int);
void idt_vec_set(int, void (*)(void));
diff -r 5c533d2c0d37 -r 18dac04d5725 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c Sat Aug 27 14:12:58 2016 +0000
+++ b/sys/arch/i386/i386/machdep.c Sat Aug 27 14:19:47 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.759 2016/07/16 17:02:34 maxv Exp $ */
+/* $NetBSD: machdep.c,v 1.760 2016/08/27 14:19:47 maxv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.759 2016/07/16 17:02:34 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.760 2016/08/27 14:19:47 maxv Exp $");
#include "opt_beep.h"
#include "opt_compat_ibcs2.h"
@@ -1303,10 +1303,7 @@
pmap_update(pmap_kernel());
memset((void *)idt_vaddr, 0, PAGE_SIZE);
-
#ifndef XEN
- idt_init();
-
idt = (struct gate_descriptor *)idt_vaddr;
pmap_kenter_pa(pentium_idt_vaddr, idt_paddr, VM_PROT_READ, 0);
pmap_update(pmap_kernel());
diff -r 5c533d2c0d37 -r 18dac04d5725 sys/arch/i386/include/segments.h
--- a/sys/arch/i386/include/segments.h Sat Aug 27 14:12:58 2016 +0000
+++ b/sys/arch/i386/include/segments.h Sat Aug 27 14:19:47 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: segments.h,v 1.55 2016/01/24 18:21:50 christos Exp $ */
+/* $NetBSD: segments.h,v 1.56 2016/08/27 14:19:47 maxv Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -200,7 +200,6 @@
void update_descriptor(union descriptor *, union descriptor *);
#if !defined(XEN)
-void idt_init(void);
void idt_vec_reserve(int);
int idt_vec_alloc(int, int);
void idt_vec_set(int, void (*)(void));
diff -r 5c533d2c0d37 -r 18dac04d5725 sys/arch/x86/x86/idt.c
--- a/sys/arch/x86/x86/idt.c Sat Aug 27 14:12:58 2016 +0000
+++ b/sys/arch/x86/x86/idt.c Sat Aug 27 14:19:47 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: idt.c,v 1.3 2009/04/19 14:11:37 ad Exp $ */
+/* $NetBSD: idt.c,v 1.4 2016/08/27 14:19:47 maxv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2009 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: idt.c,v 1.3 2009/04/19 14:11:37 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: idt.c,v 1.4 2016/08/27 14:19:47 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -136,10 +136,4 @@
idt_allocmap[vec] = 0;
}
-void
-idt_init(void)
-{
-
-}
-
#endif /* !defined(XEN) */
Home |
Main Index |
Thread Index |
Old Index