| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: machdep.c,v 1.98 2009/11/27 03:23:05 rmind Exp $ */ | | 1 | /* $NetBSD: machdep.c,v 1.99 2010/10/30 06:11:18 kiyohara Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (C) 1995, 1996 Wolfgang Solfrank. | | 4 | * Copyright (C) 1995, 1996 Wolfgang Solfrank. |
5 | * Copyright (C) 1995, 1996 TooLs GmbH. | | 5 | * Copyright (C) 1995, 1996 TooLs GmbH. |
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 |
| @@ -22,27 +22,27 @@ | | | @@ -22,27 +22,27 @@ |
22 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | | 22 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR |
23 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | | 23 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 24 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
25 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | | 25 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | | 26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
27 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | | 27 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
28 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | | 28 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | | 29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
30 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | | 30 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
31 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 31 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
32 | */ | | 32 | */ |
33 | | | 33 | |
34 | #include <sys/cdefs.h> | | 34 | #include <sys/cdefs.h> |
35 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.98 2009/11/27 03:23:05 rmind Exp $"); | | 35 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.99 2010/10/30 06:11:18 kiyohara Exp $"); |
36 | | | 36 | |
37 | #include "opt_compat_netbsd.h" | | 37 | #include "opt_compat_netbsd.h" |
38 | #include "opt_ddb.h" | | 38 | #include "opt_ddb.h" |
39 | #include "opt_ipkdb.h" | | 39 | #include "opt_ipkdb.h" |
40 | | | 40 | |
41 | #include <sys/param.h> | | 41 | #include <sys/param.h> |
42 | #include <sys/buf.h> | | 42 | #include <sys/buf.h> |
43 | #include <sys/conf.h> | | 43 | #include <sys/conf.h> |
44 | #include <sys/device.h> | | 44 | #include <sys/device.h> |
45 | #include <sys/exec.h> | | 45 | #include <sys/exec.h> |
46 | #include <sys/extent.h> | | 46 | #include <sys/extent.h> |
47 | #include <sys/kernel.h> | | 47 | #include <sys/kernel.h> |
48 | #include <sys/malloc.h> | | 48 | #include <sys/malloc.h> |
| @@ -147,31 +147,26 @@ initppc(u_long startkernel, u_long endke | | | @@ -147,31 +147,26 @@ initppc(u_long startkernel, u_long endke |
147 | */ | | 147 | */ |
148 | { | | 148 | { |
149 | struct btinfo_clock *clockinfo; | | 149 | struct btinfo_clock *clockinfo; |
150 | extern u_long ticks_per_sec, ns_per_tick; | | 150 | extern u_long ticks_per_sec, ns_per_tick; |
151 | | | 151 | |
152 | clockinfo = | | 152 | clockinfo = |
153 | (struct btinfo_clock *)lookup_bootinfo(BTINFO_CLOCK); | | 153 | (struct btinfo_clock *)lookup_bootinfo(BTINFO_CLOCK); |
154 | if (!clockinfo) | | 154 | if (!clockinfo) |
155 | panic("not found clock information in bootinfo"); | | 155 | panic("not found clock information in bootinfo"); |
156 | ticks_per_sec = clockinfo->ticks_per_sec; | | 156 | ticks_per_sec = clockinfo->ticks_per_sec; |
157 | ns_per_tick = 1000000000 / ticks_per_sec; | | 157 | ns_per_tick = 1000000000 / ticks_per_sec; |
158 | } | | 158 | } |
159 | | | 159 | |
160 | | | | |
161 | /* | | | |
162 | * boothowto | | | |
163 | */ | | | |
164 | /* boothowto = args; */ | | | |
165 | prep_initppc(startkernel, endkernel, args); | | 160 | prep_initppc(startkernel, endkernel, args); |
166 | } | | 161 | } |
167 | | | 162 | |
168 | /* | | 163 | /* |
169 | * Machine dependent startup code. | | 164 | * Machine dependent startup code. |
170 | */ | | 165 | */ |
171 | void | | 166 | void |
172 | cpu_startup(void) | | 167 | cpu_startup(void) |
173 | { | | 168 | { |
174 | /* | | 169 | /* |
175 | * BeBox Mother Board's Register Mapping | | 170 | * BeBox Mother Board's Register Mapping |
176 | */ | | 171 | */ |
177 | bebox_mb_reg = (vaddr_t) mapiodev(BEBOX_INTR_REG, PAGE_SIZE); | | 172 | bebox_mb_reg = (vaddr_t) mapiodev(BEBOX_INTR_REG, PAGE_SIZE); |