| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: obs266_machdep.c,v 1.24 2021/03/30 01:47:44 rin Exp $ */ | | 1 | /* $NetBSD: obs266_machdep.c,v 1.25 2021/03/30 03:57:03 rin Exp $ */ |
2 | /* Original: md_machdep.c,v 1.3 2005/01/24 18:47:37 shige Exp $ */ | | 2 | /* Original: md_machdep.c,v 1.3 2005/01/24 18:47:37 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,62 +58,55 @@ | | | @@ -58,62 +58,55 @@ |
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: obs266_machdep.c,v 1.24 2021/03/30 01:47:44 rin Exp $"); | | 71 | __KERNEL_RCSID(0, "$NetBSD: obs266_machdep.c,v 1.25 2021/03/30 03:57:03 rin Exp $"); |
72 | | | 72 | |
73 | #include "opt_compat_netbsd.h" | | | |
74 | #include "opt_ddb.h" | | 73 | #include "opt_ddb.h" |
75 | | | 74 | |
76 | #include <sys/param.h> | | 75 | #include <sys/param.h> |
77 | #include <sys/kernel.h> | | 76 | #include <sys/kernel.h> |
78 | #include <sys/ksyms.h> | | | |
79 | #include <sys/mount.h> | | | |
80 | #include <sys/reboot.h> | | 77 | #include <sys/reboot.h> |
81 | #include <sys/systm.h> | | 78 | #include <sys/systm.h> |
82 | #include <sys/device.h> | | 79 | #include <sys/device.h> |
83 | #include <sys/module.h> | | 80 | #include <sys/module.h> |
84 | #include <sys/bus.h> | | 81 | #include <sys/bus.h> |
85 | #include <sys/cpu.h> | | | |
86 | | | | |
87 | #include <uvm/uvm_extern.h> | | | |
88 | | | 82 | |
89 | #include <machine/obs266.h> | | 83 | #include <machine/obs266.h> |
90 | | | 84 | |
91 | #include <powerpc/ibm4xx/dcr4xx.h> | | 85 | #include <powerpc/ibm4xx/dcr4xx.h> |
92 | #include <powerpc/ibm4xx/cpu.h> | | 86 | #include <powerpc/ibm4xx/cpu.h> |
93 | #include <powerpc/ibm4xx/ibm405gp.h> | | 87 | #include <powerpc/ibm4xx/ibm405gp.h> |
94 | #include <powerpc/ibm4xx/pci_machdep.h> | | 88 | #include <powerpc/ibm4xx/pci_machdep.h> |
95 | #include <powerpc/ibm4xx/openbios.h> | | 89 | #include <powerpc/ibm4xx/openbios.h> |
| | | 90 | #include <powerpc/ibm4xx/tlb.h> |
96 | #include <powerpc/ibm4xx/dev/comopbvar.h> | | 91 | #include <powerpc/ibm4xx/dev/comopbvar.h> |
97 | | | 92 | |
98 | #include <powerpc/spr.h> | | 93 | #include <powerpc/spr.h> |
99 | #include <powerpc/ibm4xx/spr.h> | | 94 | #include <powerpc/ibm4xx/spr.h> |
100 | | | 95 | |
101 | #include <dev/ic/comreg.h> | | 96 | #include <dev/ic/comreg.h> |
102 | #include <dev/pci/pcivar.h> | | 97 | #include <dev/pci/pcivar.h> |
103 | #include <dev/pci/pciconf.h> | | 98 | #include <dev/pci/pciconf.h> |
104 | | | 99 | |
105 | #include "ksyms.h" | | | |
106 | | | | |
107 | #include "com.h" | | 100 | #include "com.h" |
108 | #if (NCOM > 0) | | 101 | #if (NCOM > 0) |
109 | #include <sys/termios.h> | | 102 | #include <sys/termios.h> |
110 | | | 103 | |
111 | #ifndef CONADDR | | 104 | #ifndef CONADDR |
112 | #define CONADDR IBM405GP_UART0_BASE | | 105 | #define CONADDR IBM405GP_UART0_BASE |
113 | #endif | | 106 | #endif |
114 | #ifndef CONSPEED | | 107 | #ifndef CONSPEED |
115 | #define CONSPEED B9600 | | 108 | #define CONSPEED B9600 |
116 | #endif | | 109 | #endif |
117 | #ifndef CONMODE | | 110 | #ifndef CONMODE |
118 | /* 8N1 */ | | 111 | /* 8N1 */ |
119 | #define CONMODE ((TTYDEF_CFLAG & ~(CSIZE | CSTOPB | PARENB)) | CS8) | | 112 | #define CONMODE ((TTYDEF_CFLAG & ~(CSIZE | CSTOPB | PARENB)) | CS8) |