| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: machdep.c,v 1.96 2014/01/11 08:07:16 tsutsui Exp $ */ | | 1 | /* $NetBSD: machdep.c,v 1.97 2014/01/11 16:34:05 tsutsui Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2000 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2000 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Tohru Nishimura. | | 8 | * by Tohru Nishimura. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -21,27 +21,27 @@ | | | @@ -21,27 +21,27 @@ |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | * POSSIBILITY OF SUCH DAMAGE. | | 29 | * POSSIBILITY OF SUCH DAMAGE. |
30 | */ | | 30 | */ |
31 | | | 31 | |
32 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | | 32 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ |
33 | | | 33 | |
34 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.96 2014/01/11 08:07:16 tsutsui Exp $"); | | 34 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.97 2014/01/11 16:34:05 tsutsui Exp $"); |
35 | | | 35 | |
36 | #include "opt_ddb.h" | | 36 | #include "opt_ddb.h" |
37 | #include "opt_kgdb.h" | | 37 | #include "opt_kgdb.h" |
38 | #include "opt_compat_sunos.h" | | 38 | #include "opt_compat_sunos.h" |
39 | #include "opt_modular.h" | | 39 | #include "opt_modular.h" |
40 | #include "opt_panicbutton.h" | | 40 | #include "opt_panicbutton.h" |
41 | #include "opt_m68k_arch.h" | | 41 | #include "opt_m68k_arch.h" |
42 | | | 42 | |
43 | #include <sys/param.h> | | 43 | #include <sys/param.h> |
44 | #include <sys/systm.h> | | 44 | #include <sys/systm.h> |
45 | #include <sys/kernel.h> | | 45 | #include <sys/kernel.h> |
46 | #include <sys/proc.h> | | 46 | #include <sys/proc.h> |
47 | #include <sys/buf.h> | | 47 | #include <sys/buf.h> |
| @@ -192,27 +192,27 @@ luna68k_init(void) | | | @@ -192,27 +192,27 @@ luna68k_init(void) |
192 | pio0[2] = 1 << 6; /* enable parity check */ | | 192 | pio0[2] = 1 << 6; /* enable parity check */ |
193 | pio0[3] = 0xb6; | | 193 | pio0[3] = 0xb6; |
194 | sw1 = pio0[0]; /* dip sw1 value */ | | 194 | sw1 = pio0[0]; /* dip sw1 value */ |
195 | sw1 ^= 0xff; | | 195 | sw1 ^= 0xff; |
196 | sysconsole = !(sw1 & 0x2); /* console selection */ | | 196 | sysconsole = !(sw1 & 0x2); /* console selection */ |
197 | | | 197 | |
198 | /* | | 198 | /* |
199 | * Check if boothowto and bootdev values are passed by our bootloader. | | 199 | * Check if boothowto and bootdev values are passed by our bootloader. |
200 | */ | | 200 | */ |
201 | if ((bootdev & B_MAGICMASK) == B_DEVMAGIC) { | | 201 | if ((bootdev & B_MAGICMASK) == B_DEVMAGIC) { |
202 | /* Valid value is set; no need to parse bootarg. */ | | 202 | /* Valid value is set; no need to parse bootarg. */ |
203 | return; | | 203 | return; |
204 | } | | 204 | } |
205 | | | 205 | |
206 | /* | | 206 | /* |
207 | * No valid bootdev value is set. | | 207 | * No valid bootdev value is set. |
208 | * Assume we are booted by ROM monitor directly using a.out kernel | | 208 | * Assume we are booted by ROM monitor directly using a.out kernel |
209 | * and we have to parse bootarg passed from the monitor to set | | 209 | * and we have to parse bootarg passed from the monitor to set |
210 | * proper boothowto and check netboot. | | 210 | * proper boothowto and check netboot. |
211 | */ | | 211 | */ |
212 | | | 212 | |
213 | /* set default to "sd0a" with no howto flags */ | | 213 | /* set default to "sd0a" with no howto flags */ |
214 | bootdev = MAKEBOOTDEV(0, LUNA68K_BOOTADPT_SPC, 0, 0, 0); | | 214 | bootdev = MAKEBOOTDEV(0, LUNA68K_BOOTADPT_SPC, 0, 0, 0); |
215 | boothowto = 0; | | 215 | boothowto = 0; |
216 | | | 216 | |
217 | /* | | 217 | /* |
218 | * 'bootarg' on LUNA has: | | 218 | * 'bootarg' on LUNA has: |