| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: ibm4xx_machdep.c,v 1.36 2021/03/30 01:33:50 rin Exp $ */ | | 1 | /* $NetBSD: ibm4xx_machdep.c,v 1.37 2021/03/30 14:33:10 rin Exp $ */ |
2 | /* Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */ | | 2 | /* Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */ |
3 | | | 3 | |
4 | /* | | 4 | /* |
5 | * Copyright 2001, 2002 Wasabi Systems, Inc. | | 5 | * Copyright 2001, 2002 Wasabi Systems, Inc. |
6 | * All rights reserved. | | 6 | * All rights reserved. |
7 | * | | 7 | * |
8 | * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. | | 8 | * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. |
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. |
| @@ -58,27 +58,27 @@ | | | @@ -58,27 +58,27 @@ |
58 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | | 58 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR |
59 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | | 59 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
60 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 60 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
61 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | | 61 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
62 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | | 62 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
63 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | | 63 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; |
64 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | | 64 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
65 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | | 65 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
66 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | | 66 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
67 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 67 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
68 | */ | | 68 | */ |
69 | | | 69 | |
70 | #include <sys/cdefs.h> | | 70 | #include <sys/cdefs.h> |
71 | __KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.36 2021/03/30 01:33:50 rin Exp $"); | | 71 | __KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.37 2021/03/30 14:33:10 rin Exp $"); |
72 | | | 72 | |
73 | #include "ksyms.h" | | 73 | #include "ksyms.h" |
74 | | | 74 | |
75 | #ifdef _KERNEL_OPT | | 75 | #ifdef _KERNEL_OPT |
76 | #include "opt_ddb.h" | | 76 | #include "opt_ddb.h" |
77 | #include "opt_kgdb.h" | | 77 | #include "opt_kgdb.h" |
78 | #include "opt_modular.h" | | 78 | #include "opt_modular.h" |
79 | #endif | | 79 | #endif |
80 | | | 80 | |
81 | #include <sys/param.h> | | 81 | #include <sys/param.h> |
82 | #include <sys/cpu.h> | | 82 | #include <sys/cpu.h> |
83 | #include <sys/ksyms.h> | | 83 | #include <sys/ksyms.h> |
84 | #include <sys/mount.h> | | 84 | #include <sys/mount.h> |
| @@ -211,27 +211,27 @@ cpu_reboot(int howto, char *what) | | | @@ -211,27 +211,27 @@ cpu_reboot(int howto, char *what) |
211 | if (howto & RB_KDB) | | 211 | if (howto & RB_KDB) |
212 | *ap++ = 'd'; | | 212 | *ap++ = 'd'; |
213 | *ap++ = '\0'; | | 213 | *ap++ = '\0'; |
214 | if (ap[-2] == '-') | | 214 | if (ap[-2] == '-') |
215 | *ap1 = '\0'; | | 215 | *ap1 = '\0'; |
216 | | | 216 | |
217 | /* flush cache for msgbuf */ | | 217 | /* flush cache for msgbuf */ |
218 | __syncicache((void *)msgbuf_paddr, round_page(MSGBUFSIZE)); | | 218 | __syncicache((void *)msgbuf_paddr, round_page(MSGBUFSIZE)); |
219 | | | 219 | |
220 | ppc4xx_reset(); | | 220 | ppc4xx_reset(); |
221 | | | 221 | |
222 | printf("ppc4xx_reset() failed!\n"); | | 222 | printf("ppc4xx_reset() failed!\n"); |
223 | | | 223 | |
224 | while (1 /* CONSTCOND */) { | | 224 | for (;;) { |
225 | #if defined(DDB) | | 225 | #if defined(DDB) |
226 | Debugger(); | | 226 | Debugger(); |
227 | #elif defined(KGDB) | | 227 | #elif defined(KGDB) |
228 | kgdb_connect(1); | | 228 | kgdb_connect(1); |
229 | #else | | 229 | #else |
230 | continue; | | 230 | continue; |
231 | #endif | | 231 | #endif |
232 | } | | 232 | } |
233 | } | | 233 | } |
234 | | | 234 | |
235 | /* | | 235 | /* |
236 | * Install a trap vector. We cannot use memcpy because the | | 236 | * Install a trap vector. We cannot use memcpy because the |
237 | * destination may be zero. | | 237 | * destination may be zero. |