| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: netwinder_machdep.c,v 1.76 2011/07/01 20:50:34 dyoung Exp $ */ | | 1 | /* $NetBSD: netwinder_machdep.c,v 1.77 2012/08/03 15:56:06 matt Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1997,1998 Mark Brinicombe. | | 4 | * Copyright (c) 1997,1998 Mark Brinicombe. |
5 | * Copyright (c) 1997,1998 Causality Limited. | | 5 | * Copyright (c) 1997,1998 Causality Limited. |
6 | * All rights reserved. | | 6 | * All rights reserved. |
7 | * | | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | | 8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | | 9 | * modification, are permitted provided that the following conditions |
10 | * are met: | | 10 | * are met: |
11 | * 1. Redistributions of source code must retain the above copyright | | 11 | * 1. Redistributions of source code must retain the above copyright |
12 | * notice, this list of conditions and the following disclaimer. | | 12 | * notice, this list of conditions and the following disclaimer. |
13 | * 2. Redistributions in binary form must reproduce the above copyright | | 13 | * 2. Redistributions in binary form must reproduce the above copyright |
14 | * notice, this list of conditions and the following disclaimer in the | | 14 | * notice, this list of conditions and the following disclaimer in the |
| @@ -30,27 +30,27 @@ | | | @@ -30,27 +30,27 @@ |
30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | * SUCH DAMAGE. | | 34 | * SUCH DAMAGE. |
35 | * | | 35 | * |
36 | * Machine dependent functions for kernel setup for EBSA285 core architecture | | 36 | * Machine dependent functions for kernel setup for EBSA285 core architecture |
37 | * using Netwinder firmware | | 37 | * using Netwinder firmware |
38 | * | | 38 | * |
39 | * Created : 24/11/97 | | 39 | * Created : 24/11/97 |
40 | */ | | 40 | */ |
41 | | | 41 | |
42 | #include <sys/cdefs.h> | | 42 | #include <sys/cdefs.h> |
43 | __KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.76 2011/07/01 20:50:34 dyoung Exp $"); | | 43 | __KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.77 2012/08/03 15:56:06 matt Exp $"); |
44 | | | 44 | |
45 | #include "opt_ddb.h" | | 45 | #include "opt_ddb.h" |
46 | #include "opt_pmap_debug.h" | | 46 | #include "opt_pmap_debug.h" |
47 | | | 47 | |
48 | #include <sys/param.h> | | 48 | #include <sys/param.h> |
49 | #include <sys/device.h> | | 49 | #include <sys/device.h> |
50 | #include <sys/systm.h> | | 50 | #include <sys/systm.h> |
51 | #include <sys/kernel.h> | | 51 | #include <sys/kernel.h> |
52 | #include <sys/exec.h> | | 52 | #include <sys/exec.h> |
53 | #include <sys/proc.h> | | 53 | #include <sys/proc.h> |
54 | #include <sys/msgbuf.h> | | 54 | #include <sys/msgbuf.h> |
55 | #include <sys/reboot.h> | | 55 | #include <sys/reboot.h> |
56 | #include <sys/termios.h> | | 56 | #include <sys/termios.h> |
| @@ -133,38 +133,28 @@ char *boot_file = NULL; | | | @@ -133,38 +133,28 @@ char *boot_file = NULL; |
133 | | | 133 | |
134 | vm_offset_t physical_start; | | 134 | vm_offset_t physical_start; |
135 | vm_offset_t physical_freestart; | | 135 | vm_offset_t physical_freestart; |
136 | vm_offset_t physical_freeend; | | 136 | vm_offset_t physical_freeend; |
137 | vm_offset_t physical_end; | | 137 | vm_offset_t physical_end; |
138 | u_int free_pages; | | 138 | u_int free_pages; |
139 | vm_offset_t pagetables_start; | | 139 | vm_offset_t pagetables_start; |
140 | | | 140 | |
141 | /*int debug_flags;*/ | | 141 | /*int debug_flags;*/ |
142 | #ifndef PMAP_STATIC_L1S | | 142 | #ifndef PMAP_STATIC_L1S |
143 | int max_processes = 64; /* Default number */ | | 143 | int max_processes = 64; /* Default number */ |
144 | #endif /* !PMAP_STATIC_L1S */ | | 144 | #endif /* !PMAP_STATIC_L1S */ |
145 | | | 145 | |
146 | /* Physical and virtual addresses for some global pages */ | | | |
147 | pv_addr_t irqstack; | | | |
148 | pv_addr_t undstack; | | | |
149 | pv_addr_t abtstack; | | | |
150 | extern pv_addr_t kernelstack; /* in arm32_machdep.c */ | | | |
151 | | | | |
152 | vm_offset_t msgbufphys; | | 146 | vm_offset_t msgbufphys; |
153 | | | 147 | |
154 | extern u_int data_abort_handler_address; | | | |
155 | extern u_int prefetch_abort_handler_address; | | | |
156 | extern u_int undefined_handler_address; | | | |
157 | | | | |
158 | #ifdef PMAP_DEBUG | | 148 | #ifdef PMAP_DEBUG |
159 | extern int pmap_debug_level; | | 149 | extern int pmap_debug_level; |
160 | #endif | | 150 | #endif |
161 | | | 151 | |
162 | #define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ | | 152 | #define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ |
163 | #define KERNEL_PT_KERNEL 1 /* Page table for mapping kernel */ | | 153 | #define KERNEL_PT_KERNEL 1 /* Page table for mapping kernel */ |
164 | #define KERNEL_PT_VMDATA 2 /* Page tables for mapping kernel VM */ | | 154 | #define KERNEL_PT_VMDATA 2 /* Page tables for mapping kernel VM */ |
165 | #define KERNEL_PT_VMDATA_NUM 4 /* start with 16MB of KVM */ | | 155 | #define KERNEL_PT_VMDATA_NUM 4 /* start with 16MB of KVM */ |
166 | #define NUM_KERNEL_PTS (KERNEL_PT_VMDATA + KERNEL_PT_VMDATA_NUM) | | 156 | #define NUM_KERNEL_PTS (KERNEL_PT_VMDATA + KERNEL_PT_VMDATA_NUM) |
167 | | | 157 | |
168 | pv_addr_t kernel_pt_table[NUM_KERNEL_PTS]; | | 158 | pv_addr_t kernel_pt_table[NUM_KERNEL_PTS]; |
169 | | | 159 | |
170 | #define KERNEL_VM_BASE (KERNEL_BASE + 0x01000000) | | 160 | #define KERNEL_VM_BASE (KERNEL_BASE + 0x01000000) |