| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: x86_machdep.c,v 1.23.8.3 2009/02/02 21:45:18 snj Exp $ */ | | 1 | /* $NetBSD: x86_machdep.c,v 1.23.8.4 2009/02/02 23:47:35 snj Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi, | | 4 | * Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi, |
5 | * Copyright (c) 2005, 2008 The NetBSD Foundation, Inc. | | 5 | * Copyright (c) 2005, 2008 The NetBSD Foundation, Inc. |
6 | * All rights reserved. | | 6 | * All rights reserved. |
7 | * | | 7 | * |
8 | * This code is derived from software contributed to The NetBSD Foundation | | 8 | * This code is derived from software contributed to The NetBSD Foundation |
9 | * by Julio M. Merino Vidal. | | 9 | * by Julio M. Merino Vidal. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -23,47 +23,48 @@ | | | @@ -23,47 +23,48 @@ |
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
30 | * POSSIBILITY OF SUCH DAMAGE. | | 30 | * POSSIBILITY OF SUCH DAMAGE. |
31 | */ | | 31 | */ |
32 | | | 32 | |
33 | #include "opt_modular.h" | | 33 | #include "opt_modular.h" |
34 | | | 34 | |
35 | #include <sys/cdefs.h> | | 35 | #include <sys/cdefs.h> |
36 | __KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.23.8.3 2009/02/02 21:45:18 snj Exp $"); | | 36 | __KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.23.8.4 2009/02/02 23:47:35 snj Exp $"); |
37 | | | 37 | |
38 | #include <sys/types.h> | | 38 | #include <sys/types.h> |
39 | #include <sys/param.h> | | 39 | #include <sys/param.h> |
40 | #include <sys/systm.h> | | 40 | #include <sys/systm.h> |
41 | #include <sys/kcore.h> | | 41 | #include <sys/kcore.h> |
42 | #include <sys/errno.h> | | 42 | #include <sys/errno.h> |
43 | #include <sys/kauth.h> | | 43 | #include <sys/kauth.h> |
44 | #include <sys/mutex.h> | | 44 | #include <sys/mutex.h> |
45 | #include <sys/cpu.h> | | 45 | #include <sys/cpu.h> |
46 | #include <sys/intr.h> | | 46 | #include <sys/intr.h> |
47 | #include <sys/atomic.h> | | 47 | #include <sys/atomic.h> |
48 | #include <sys/module.h> | | 48 | #include <sys/module.h> |
49 | #include <sys/sysctl.h> | | 49 | #include <sys/sysctl.h> |
50 | | | 50 | |
51 | #include <x86/cpu_msr.h> | | 51 | #include <x86/cpu_msr.h> |
52 | #include <x86/cpuvar.h> | | 52 | #include <x86/cpuvar.h> |
53 | #include <x86/cputypes.h> | | 53 | #include <x86/cputypes.h> |
54 | #include <x86/pio.h> | | 54 | #include <x86/pio.h> |
55 | | | 55 | |
56 | #include <dev/ic/i8042reg.h> | | 56 | #include <dev/ic/i8042reg.h> |
| | | 57 | #include <dev/isa/isareg.h> |
57 | | | 58 | |
58 | #include <machine/bootinfo.h> | | 59 | #include <machine/bootinfo.h> |
59 | #include <machine/vmparam.h> | | 60 | #include <machine/vmparam.h> |
60 | | | 61 | |
61 | #include <uvm/uvm_extern.h> | | 62 | #include <uvm/uvm_extern.h> |
62 | | | 63 | |
63 | int check_pa_acc(paddr_t, vm_prot_t); | | 64 | int check_pa_acc(paddr_t, vm_prot_t); |
64 | | | 65 | |
65 | /* --------------------------------------------------------------------- */ | | 66 | /* --------------------------------------------------------------------- */ |
66 | | | 67 | |
67 | /* | | 68 | /* |
68 | * Main bootinfo structure. This is filled in by the bootstrap process | | 69 | * Main bootinfo structure. This is filled in by the bootstrap process |
69 | * done in locore.S based on the information passed by the boot loader. | | 70 | * done in locore.S based on the information passed by the boot loader. |