| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: hdlg_machdep.c,v 1.32 2021/11/20 08:48:55 rin Exp $ */ | | 1 | /* $NetBSD: hdlg_machdep.c,v 1.33 2022/01/04 10:38:04 skrll Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | | 4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Written by Jason R. Thorpe and Steve C. Woodford for Wasabi Systems, Inc. | | 7 | * Written by Jason R. Thorpe and Steve C. Woodford for Wasabi Systems, Inc. |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -63,27 +63,27 @@ | | | @@ -63,27 +63,27 @@ |
63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | | 63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | | 64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
69 | * SUCH DAMAGE. | | 69 | * SUCH DAMAGE. |
70 | * | | 70 | * |
71 | * Machine dependent functions for kernel setup for GigaLANDISK | | 71 | * Machine dependent functions for kernel setup for GigaLANDISK |
72 | * using RedBoot firmware. | | 72 | * using RedBoot firmware. |
73 | */ | | 73 | */ |
74 | | | 74 | |
75 | #include <sys/cdefs.h> | | 75 | #include <sys/cdefs.h> |
76 | __KERNEL_RCSID(0, "$NetBSD: hdlg_machdep.c,v 1.32 2021/11/20 08:48:55 rin Exp $"); | | 76 | __KERNEL_RCSID(0, "$NetBSD: hdlg_machdep.c,v 1.33 2022/01/04 10:38:04 skrll Exp $"); |
77 | | | 77 | |
78 | #include "opt_arm_debug.h" | | 78 | #include "opt_arm_debug.h" |
79 | #include "opt_console.h" | | 79 | #include "opt_console.h" |
80 | #include "opt_ddb.h" | | 80 | #include "opt_ddb.h" |
81 | #include "opt_kgdb.h" | | 81 | #include "opt_kgdb.h" |
82 | | | 82 | |
83 | #include <sys/param.h> | | 83 | #include <sys/param.h> |
84 | #include <sys/device.h> | | 84 | #include <sys/device.h> |
85 | #include <sys/systm.h> | | 85 | #include <sys/systm.h> |
86 | #include <sys/kernel.h> | | 86 | #include <sys/kernel.h> |
87 | #include <sys/exec.h> | | 87 | #include <sys/exec.h> |
88 | #include <sys/proc.h> | | 88 | #include <sys/proc.h> |
89 | #include <sys/msgbuf.h> | | 89 | #include <sys/msgbuf.h> |
| @@ -218,29 +218,27 @@ hardclock_hook(void) | | | @@ -218,29 +218,27 @@ hardclock_hook(void) |
218 | * entered. | | 218 | * entered. |
219 | * It should be responsible for setting up everything that must be | | 219 | * It should be responsible for setting up everything that must be |
220 | * in place when main is called. | | 220 | * in place when main is called. |
221 | * This includes | | 221 | * This includes |
222 | * Taking a copy of the boot configuration structure. | | 222 | * Taking a copy of the boot configuration structure. |
223 | * Initialising the physical console so characters can be printed. | | 223 | * Initialising the physical console so characters can be printed. |
224 | * Setting up page tables for the kernel | | 224 | * Setting up page tables for the kernel |
225 | * Relocating the kernel to the bottom of physical memory | | 225 | * Relocating the kernel to the bottom of physical memory |
226 | */ | | 226 | */ |
227 | vaddr_t | | 227 | vaddr_t |
228 | initarm(void *arg) | | 228 | initarm(void *arg) |
229 | { | | 229 | { |
230 | extern vaddr_t xscale_cache_clean_addr; | | 230 | extern vaddr_t xscale_cache_clean_addr; |
231 | #ifdef DIAGNOSTIC | | | |
232 | extern vsize_t xscale_minidata_clean_size; | | 231 | extern vsize_t xscale_minidata_clean_size; |
233 | #endif | | | |
234 | int loop; | | 232 | int loop; |
235 | int loop1; | | 233 | int loop1; |
236 | u_int l1pagetable; | | 234 | u_int l1pagetable; |
237 | paddr_t memstart; | | 235 | paddr_t memstart; |
238 | psize_t memsize; | | 236 | psize_t memsize; |
239 | | | 237 | |
240 | /* Calibrate the delay loop. */ | | 238 | /* Calibrate the delay loop. */ |
241 | i80321_calibrate_delay(); | | 239 | i80321_calibrate_delay(); |
242 | i80321_hardclock_hook = hardclock_hook; | | 240 | i80321_hardclock_hook = hardclock_hook; |
243 | | | 241 | |
244 | /* | | 242 | /* |
245 | * Since we map the on-board devices VA==PA, and the kernel | | 243 | * Since we map the on-board devices VA==PA, and the kernel |
246 | * is running VA==PA, it's possible for us to initialize | | 244 | * is running VA==PA, it's possible for us to initialize |