| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: machdep.c,v 1.19 2009/11/27 03:23:09 rmind Exp $ */ | | 1 | /* $NetBSD: machdep.c,v 1.20 2009/12/01 23:14:02 skrll Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2001, 2004, 2005 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2001, 2004, 2005 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -17,27 +17,27 @@ | | | @@ -17,27 +17,27 @@ |
17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
19 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 19 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
26 | * POSSIBILITY OF SUCH DAMAGE. | | 26 | * POSSIBILITY OF SUCH DAMAGE. |
27 | */ | | 27 | */ |
28 | | | 28 | |
29 | #include <sys/cdefs.h> | | 29 | #include <sys/cdefs.h> |
30 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.19 2009/11/27 03:23:09 rmind Exp $"); | | 30 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.20 2009/12/01 23:14:02 skrll Exp $"); |
31 | | | 31 | |
32 | #include "opt_ddb.h" | | 32 | #include "opt_ddb.h" |
33 | | | 33 | |
34 | #include <sys/param.h> | | 34 | #include <sys/param.h> |
35 | #include <sys/systm.h> | | 35 | #include <sys/systm.h> |
36 | #include <sys/kernel.h> | | 36 | #include <sys/kernel.h> |
37 | #include <sys/proc.h> | | 37 | #include <sys/proc.h> |
38 | #include <sys/buf.h> | | 38 | #include <sys/buf.h> |
39 | #include <sys/reboot.h> | | 39 | #include <sys/reboot.h> |
40 | #include <sys/mount.h> | | 40 | #include <sys/mount.h> |
41 | #include <sys/kcore.h> | | 41 | #include <sys/kcore.h> |
42 | #include <sys/boot_flag.h> | | 42 | #include <sys/boot_flag.h> |
43 | #include <sys/device.h> | | 43 | #include <sys/device.h> |
| @@ -107,27 +107,27 @@ mach_init(int argc, char *argv[], struct | | | @@ -107,27 +107,27 @@ mach_init(int argc, char *argv[], struct |
107 | * so restore them again. | | 107 | * so restore them again. |
108 | */ | | 108 | */ |
109 | lwp0.l_cpu = &cpu_info_store; | | 109 | lwp0.l_cpu = &cpu_info_store; |
110 | cpu_info_store.ci_curlwp = &lwp0; | | 110 | cpu_info_store.ci_curlwp = &lwp0; |
111 | } | | 111 | } |
112 | | | 112 | |
113 | /* Setup early-console with BIOS ROM routines */ | | 113 | /* Setup early-console with BIOS ROM routines */ |
114 | rom_cons_init(); | | 114 | rom_cons_init(); |
115 | | | 115 | |
116 | /* Initialize machine dependent System-Board ops. */ | | 116 | /* Initialize machine dependent System-Board ops. */ |
117 | sbd_init(); | | 117 | sbd_init(); |
118 | | | 118 | |
119 | __asm volatile("move %0, $29" : "=r"(v)); | | 119 | __asm volatile("move %0, $29" : "=r"(v)); |
120 | printf("kernel_text=%p edata=%p end=%p sp=%p\n", kernel_text, edata, | | 120 | printf("kernel_text=%p edata=%p end=%p sp=%lx\n", kernel_text, edata, |
121 | end, v); | | 121 | end, v); |
122 | | | 122 | |
123 | option(argc, argv, bi); | | 123 | option(argc, argv, bi); |
124 | | | 124 | |
125 | uvm_setpagesize(); | | 125 | uvm_setpagesize(); |
126 | | | 126 | |
127 | /* Fill mem_clusters and mem_cluster_cnt */ | | 127 | /* Fill mem_clusters and mem_cluster_cnt */ |
128 | (*platform.mem_init)(kernel_text, | | 128 | (*platform.mem_init)(kernel_text, |
129 | (bi && bi->bi_nsym) ? (void *)bi->bi_esym : end); | | 129 | (bi && bi->bi_nsym) ? (void *)bi->bi_esym : end); |
130 | | | 130 | |
131 | /* | | 131 | /* |
132 | * make sure that we don't call BIOS console from now | | 132 | * make sure that we don't call BIOS console from now |
133 | * because wired mappings set up by BIOS will be discarded | | 133 | * because wired mappings set up by BIOS will be discarded |