for booke and ibm4xx evbppc systems, set module_machine to to either "powerpc-ibm4xx" or "powerpc-booke".diff -r1.9 -r1.10 src/sys/arch/evbppc/evbppc/evbppc_machdep.c
(mrg)
--- src/sys/arch/evbppc/evbppc/evbppc_machdep.c 2009/11/07 07:27:43 1.9
+++ src/sys/arch/evbppc/evbppc/evbppc_machdep.c 2011/06/12 03:42:41 1.10
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: evbppc_machdep.c,v 1.9 2009/11/07 07:27:43 cegger Exp $ */ | 1 | /* $NetBSD: evbppc_machdep.c,v 1.10 2011/06/12 03:42:41 mrg Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 2001, 2002 Wasabi Systems, Inc. | 4 | * Copyright 2001, 2002 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. | 7 | * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -57,39 +57,45 @@ | @@ -57,39 +57,45 @@ | |||
57 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | 57 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | |
58 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 58 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
59 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 59 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
60 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 60 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
61 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 61 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
62 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | 62 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | |
63 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 63 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
64 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 64 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
65 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 65 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |
66 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
67 | */ | 67 | */ | |
68 | 68 | |||
69 | #include <sys/cdefs.h> | 69 | #include <sys/cdefs.h> | |
70 | __KERNEL_RCSID(0, "$NetBSD: evbppc_machdep.c,v 1.9 2009/11/07 07:27:43 cegger Exp $"); | 70 | __KERNEL_RCSID(0, "$NetBSD: evbppc_machdep.c,v 1.10 2011/06/12 03:42:41 mrg Exp $"); | |
71 | 71 | |||
72 | #include <sys/param.h> | 72 | #include <sys/param.h> | |
73 | #include <sys/systm.h> | 73 | #include <sys/systm.h> | |
74 | #include <sys/mount.h> | 74 | #include <sys/mount.h> | |
75 | #include <sys/vnode.h> | 75 | #include <sys/vnode.h> | |
76 | 76 | |||
77 | #include <uvm/uvm_extern.h> | 77 | #include <uvm/uvm_extern.h> | |
78 | 78 | |||
79 | #include <machine/cpu.h> | 79 | #include <machine/cpu.h> | |
80 | #include <machine/bus.h> | 80 | #include <machine/bus.h> | |
81 | #include <machine/pmap.h> | 81 | #include <machine/pmap.h> | |
82 | 82 | |||
83 | /* | |||
84 | * ibm4xx/booke kernels need to set module_machine to this for modules to work. | |||
85 | */ | |||
86 | char module_machine_ibm4xx[] = "powerpc-ibm4xx"; | |||
87 | char module_machine_booke[] = "powerpc-booke"; | |||
88 | ||||
83 | int fake_mapiodev = 1; | 89 | int fake_mapiodev = 1; | |
84 | 90 | |||
85 | /* | 91 | /* | |
86 | * mapiodev: | 92 | * mapiodev: | |
87 | * | 93 | * | |
88 | * Allocate vm space and mapin the I/O address. Use reserved TLB | 94 | * Allocate vm space and mapin the I/O address. Use reserved TLB | |
89 | * mapping if one is found. | 95 | * mapping if one is found. | |
90 | */ | 96 | */ | |
91 | void * | 97 | void * | |
92 | mapiodev(paddr_t pa, psize_t len) | 98 | mapiodev(paddr_t pa, psize_t len) | |
93 | { | 99 | { | |
94 | void *p; | 100 | void *p; | |
95 | paddr_t faddr; | 101 | paddr_t faddr; |
--- src/sys/arch/evbppc/explora/machdep.c 2011/01/14 02:06:25 1.32
+++ src/sys/arch/evbppc/explora/machdep.c 2011/06/12 03:42:41 1.33
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.32 2011/01/14 02:06:25 rmind Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.33 2011/06/12 03:42:41 mrg Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2003 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2003 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 Juergen Hannken-Illjes. | 8 | * by Juergen Hannken-Illjes. | |
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. | |
@@ -20,42 +20,43 @@ | @@ -20,42 +20,43 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
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> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.32 2011/01/14 02:06:25 rmind Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.33 2011/06/12 03:42:41 mrg Exp $"); | |
34 | 34 | |||
35 | #include "opt_explora.h" | 35 | #include "opt_explora.h" | |
36 | #include "opt_modular.h" | 36 | #include "opt_modular.h" | |
37 | #include "ksyms.h" | 37 | #include "ksyms.h" | |
38 | 38 | |||
39 | #include <sys/param.h> | 39 | #include <sys/param.h> | |
40 | #include <sys/systm.h> | 40 | #include <sys/systm.h> | |
41 | #include <sys/buf.h> | 41 | #include <sys/buf.h> | |
42 | #include <sys/msgbuf.h> | 42 | #include <sys/msgbuf.h> | |
43 | #include <sys/kernel.h> | 43 | #include <sys/kernel.h> | |
44 | #include <sys/mount.h> | 44 | #include <sys/mount.h> | |
45 | #include <sys/proc.h> | 45 | #include <sys/proc.h> | |
46 | #include <sys/reboot.h> | 46 | #include <sys/reboot.h> | |
47 | #include <sys/ksyms.h> | 47 | #include <sys/ksyms.h> | |
48 | #include <sys/device.h> | 48 | #include <sys/device.h> | |
49 | #include <sys/module.h> | |||
49 | 50 | |||
50 | #include <uvm/uvm_extern.h> | 51 | #include <uvm/uvm_extern.h> | |
51 | 52 | |||
52 | #include <prop/proplib.h> | 53 | #include <prop/proplib.h> | |
53 | 54 | |||
54 | #include <machine/explora.h> | 55 | #include <machine/explora.h> | |
55 | #include <machine/bus.h> | 56 | #include <machine/bus.h> | |
56 | #include <machine/powerpc.h> | 57 | #include <machine/powerpc.h> | |
57 | #include <machine/tlb.h> | 58 | #include <machine/tlb.h> | |
58 | #include <machine/pcb.h> | 59 | #include <machine/pcb.h> | |
59 | #include <machine/trap.h> | 60 | #include <machine/trap.h> | |
60 | 61 | |||
61 | #include <powerpc/spr.h> | 62 | #include <powerpc/spr.h> | |
@@ -334,26 +335,31 @@ cpu_startup(void) | @@ -334,26 +335,31 @@ cpu_startup(void) | |||
334 | KASSERT(pn != NULL); | 335 | KASSERT(pn != NULL); | |
335 | if (prop_dictionary_set(board_properties, "mem-size", pn) == false) | 336 | if (prop_dictionary_set(board_properties, "mem-size", pn) == false) | |
336 | panic("setting mem-size"); | 337 | panic("setting mem-size"); | |
337 | prop_object_release(pn); | 338 | prop_object_release(pn); | |
338 | 339 | |||
339 | pn = prop_number_create_integer(cpuspeed); | 340 | pn = prop_number_create_integer(cpuspeed); | |
340 | KASSERT(pn != NULL); | 341 | KASSERT(pn != NULL); | |
341 | if (prop_dictionary_set(board_properties, "processor-frequency", | 342 | if (prop_dictionary_set(board_properties, "processor-frequency", | |
342 | pn) == false) | 343 | pn) == false) | |
343 | panic("setting processor-frequency"); | 344 | panic("setting processor-frequency"); | |
344 | prop_object_release(pn); | 345 | prop_object_release(pn); | |
345 | 346 | |||
346 | intr_init(); | 347 | intr_init(); | |
348 | ||||
349 | /* | |||
350 | * Look for the ibm4xx modules in the right place. | |||
351 | */ | |||
352 | module_machine = module_machine_ibm4xx; | |||
347 | } | 353 | } | |
348 | 354 | |||
349 | int | 355 | int | |
350 | lcsplx(int ipl) | 356 | lcsplx(int ipl) | |
351 | { | 357 | { | |
352 | return spllower(ipl); /*XXX*/ | 358 | return spllower(ipl); /*XXX*/ | |
353 | } | 359 | } | |
354 | 360 | |||
355 | void | 361 | void | |
356 | cpu_reboot(int howto, char *what) | 362 | cpu_reboot(int howto, char *what) | |
357 | { | 363 | { | |
358 | static int syncing = 0; | 364 | static int syncing = 0; | |
359 | 365 |
--- src/sys/arch/evbppc/include/cpu.h 2005/12/11 12:17:12 1.4
+++ src/sys/arch/evbppc/include/cpu.h 2011/06/12 03:42:41 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cpu.h,v 1.4 2005/12/11 12:17:12 christos Exp $ */ | 1 | /* $NetBSD: cpu.h,v 1.5 2011/06/12 03:42:41 mrg Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 2002 Wasabi Systems, Inc. | 4 | * Copyright 2002 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Eduardo Horvath for Wasabi Systems, Inc. | 7 | * Written by Eduardo Horvath for Wasabi Systems, Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -47,14 +47,17 @@ | @@ -47,14 +47,17 @@ | |||
47 | #include <powerpc/ibm4xx/cpu.h> | 47 | #include <powerpc/ibm4xx/cpu.h> | |
48 | #ifdef _KERNEL | 48 | #ifdef _KERNEL | |
49 | extern int fake_mapiodev; | 49 | extern int fake_mapiodev; | |
50 | #endif | 50 | #endif | |
51 | #else | 51 | #else | |
52 | #ifdef MULTIPROCESSOR | 52 | #ifdef MULTIPROCESSOR | |
53 | #define CPU_MAXNUM 2 | 53 | #define CPU_MAXNUM 2 | |
54 | #else | 54 | #else | |
55 | #define CPU_MAXNUM 1 | 55 | #define CPU_MAXNUM 1 | |
56 | #endif | 56 | #endif | |
57 | #include <powerpc/cpu.h> | 57 | #include <powerpc/cpu.h> | |
58 | #endif | 58 | #endif | |
59 | 59 | |||
60 | extern char module_machine_booke[]; | |||
61 | extern char module_machine_ibm4xx[]; | |||
62 | ||||
60 | #endif /* _MACHINE_CPU_H_ */ | 63 | #endif /* _MACHINE_CPU_H_ */ |
--- src/sys/arch/evbppc/mpc85xx/machdep.c 2011/06/05 16:52:23 1.7
+++ src/sys/arch/evbppc/mpc85xx/machdep.c 2011/06/12 03:42:41 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.7 2011/06/05 16:52:23 matt Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.8 2011/06/12 03:42:41 mrg Exp $ */ | |
2 | /*- | 2 | /*- | |
3 | * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. | 3 | * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. | |
4 | * All rights reserved. | 4 | * All rights reserved. | |
5 | * | 5 | * | |
6 | * This code is derived from software contributed to The NetBSD Foundation | 6 | * This code is derived from software contributed to The NetBSD Foundation | |
7 | * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects | 7 | * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects | |
8 | * Agency and which was developed by Matt Thomas of 3am Software Foundry. | 8 | * Agency and which was developed by Matt Thomas of 3am Software Foundry. | |
9 | * | 9 | * | |
10 | * This material is based upon work supported by the Defense Advanced Research | 10 | * This material is based upon work supported by the Defense Advanced Research | |
11 | * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under | 11 | * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under | |
12 | * Contract No. N66001-09-C-2073. | 12 | * Contract No. N66001-09-C-2073. | |
13 | * Approved for Public Release, Distribution Unlimited | 13 | * Approved for Public Release, Distribution Unlimited | |
14 | * | 14 | * | |
@@ -50,26 +50,27 @@ __KERNEL_RCSID(0, "$NetSBD$"); | @@ -50,26 +50,27 @@ __KERNEL_RCSID(0, "$NetSBD$"); | |||
50 | #define L2CACHE_PRIVATE | 50 | #define L2CACHE_PRIVATE | |
51 | #define _POWERPC_BUS_DMA_PRIVATE | 51 | #define _POWERPC_BUS_DMA_PRIVATE | |
52 | 52 | |||
53 | #include <sys/param.h> | 53 | #include <sys/param.h> | |
54 | #include <sys/cpu.h> | 54 | #include <sys/cpu.h> | |
55 | #include <sys/intr.h> | 55 | #include <sys/intr.h> | |
56 | #include <sys/msgbuf.h> | 56 | #include <sys/msgbuf.h> | |
57 | #include <sys/tty.h> | 57 | #include <sys/tty.h> | |
58 | #include <sys/kcore.h> | 58 | #include <sys/kcore.h> | |
59 | #include <sys/bitops.h> | 59 | #include <sys/bitops.h> | |
60 | #include <sys/bus.h> | 60 | #include <sys/bus.h> | |
61 | #include <sys/extent.h> | 61 | #include <sys/extent.h> | |
62 | #include <sys/malloc.h> | 62 | #include <sys/malloc.h> | |
63 | #include <sys/module.h> | |||
63 | 64 | |||
64 | #include <uvm/uvm_extern.h> | 65 | #include <uvm/uvm_extern.h> | |
65 | 66 | |||
66 | #include <prop/proplib.h> | 67 | #include <prop/proplib.h> | |
67 | 68 | |||
68 | #include <machine/stdarg.h> | 69 | #include <machine/stdarg.h> | |
69 | 70 | |||
70 | #include <dev/cons.h> | 71 | #include <dev/cons.h> | |
71 | 72 | |||
72 | #include <dev/ic/comreg.h> | 73 | #include <dev/ic/comreg.h> | |
73 | #include <dev/ic/comvar.h> | 74 | #include <dev/ic/comvar.h> | |
74 | 75 | |||
75 | #include <net/if.h> | 76 | #include <net/if.h> | |
@@ -917,26 +918,31 @@ initppc(vaddr_t startkernel, vaddr_t end | @@ -917,26 +918,31 @@ initppc(vaddr_t startkernel, vaddr_t end | |||
917 | 918 | |||
918 | /* | 919 | /* | |
919 | * Set some more MD helpers | 920 | * Set some more MD helpers | |
920 | */ | 921 | */ | |
921 | cpu_md_ops.md_cpunode_locs = mpc8548_cpunode_locs; | 922 | cpu_md_ops.md_cpunode_locs = mpc8548_cpunode_locs; | |
922 | cpu_md_ops.md_device_register = e500_device_register; | 923 | cpu_md_ops.md_device_register = e500_device_register; | |
923 | cpu_md_ops.md_cpu_attach = e500_cpu_attach; | 924 | cpu_md_ops.md_cpu_attach = e500_cpu_attach; | |
924 | cpu_md_ops.md_cpu_reset = e500_cpu_reset; | 925 | cpu_md_ops.md_cpu_reset = e500_cpu_reset; | |
925 | #if NGPIO > 0 | 926 | #if NGPIO > 0 | |
926 | cpu_md_ops.md_cpunode_attach = pq3gpio_attach; | 927 | cpu_md_ops.md_cpunode_attach = pq3gpio_attach; | |
927 | #endif | 928 | #endif | |
928 | 929 | |||
929 | printf(" initppc done!\n"); | 930 | printf(" initppc done!\n"); | |
931 | ||||
932 | /* | |||
933 | * Look for the Book-E modules in the right place. | |||
934 | */ | |||
935 | module_machine = module_machine_booke; | |||
930 | } | 936 | } | |
931 | 937 | |||
932 | #ifdef MPC8548 | 938 | #ifdef MPC8548 | |
933 | static const char * const mpc8548cds_extirq_names[] = { | 939 | static const char * const mpc8548cds_extirq_names[] = { | |
934 | [0] = "pci inta", | 940 | [0] = "pci inta", | |
935 | [1] = "pci intb", | 941 | [1] = "pci intb", | |
936 | [2] = "pci intc", | 942 | [2] = "pci intc", | |
937 | [3] = "pci intd", | 943 | [3] = "pci intd", | |
938 | [4] = "irq4", | 944 | [4] = "irq4", | |
939 | [5] = "gige phy", | 945 | [5] = "gige phy", | |
940 | [6] = "atm phy", | 946 | [6] = "atm phy", | |
941 | [7] = "cpld", | 947 | [7] = "cpld", | |
942 | [8] = "irq8", | 948 | [8] = "irq8", |
--- src/sys/arch/evbppc/obs405/obs200_machdep.c 2011/04/04 20:37:50 1.14
+++ src/sys/arch/evbppc/obs405/obs200_machdep.c 2011/06/12 03:42:41 1.15
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: obs200_machdep.c,v 1.14 2011/04/04 20:37:50 dyoung Exp $ */ | 1 | /* $NetBSD: obs200_machdep.c,v 1.15 2011/06/12 03:42:41 mrg Exp $ */ | |
2 | /* Original: machdep.c,v 1.3 2005/01/17 17:24:09 shige Exp */ | 2 | /* Original: machdep.c,v 1.3 2005/01/17 17:24:09 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,40 +58,41 @@ | @@ -58,40 +58,41 @@ | |||
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: obs200_machdep.c,v 1.14 2011/04/04 20:37:50 dyoung Exp $"); | 71 | __KERNEL_RCSID(0, "$NetBSD: obs200_machdep.c,v 1.15 2011/06/12 03:42:41 mrg Exp $"); | |
72 | 72 | |||
73 | #include "opt_compat_netbsd.h" | 73 | #include "opt_compat_netbsd.h" | |
74 | #include "opt_ddb.h" | 74 | #include "opt_ddb.h" | |
75 | #include "opt_ipkdb.h" | 75 | #include "opt_ipkdb.h" | |
76 | #include "opt_modular.h" | 76 | #include "opt_modular.h" | |
77 | 77 | |||
78 | #include <sys/param.h> | 78 | #include <sys/param.h> | |
79 | #include <sys/kernel.h> | 79 | #include <sys/kernel.h> | |
80 | #include <sys/ksyms.h> | 80 | #include <sys/ksyms.h> | |
81 | #include <sys/mount.h> | 81 | #include <sys/mount.h> | |
82 | #include <sys/reboot.h> | 82 | #include <sys/reboot.h> | |
83 | #include <sys/systm.h> | 83 | #include <sys/systm.h> | |
84 | #include <sys/device.h> | 84 | #include <sys/device.h> | |
85 | #include <sys/module.h> | |||
85 | 86 | |||
86 | #include <uvm/uvm_extern.h> | 87 | #include <uvm/uvm_extern.h> | |
87 | 88 | |||
88 | #include <machine/bus.h> | 89 | #include <machine/bus.h> | |
89 | #include <machine/cpu.h> | 90 | #include <machine/cpu.h> | |
90 | #include <machine/obs200.h> | 91 | #include <machine/obs200.h> | |
91 | #include <machine/century_bios.h> | 92 | #include <machine/century_bios.h> | |
92 | #include <powerpc/spr.h> | 93 | #include <powerpc/spr.h> | |
93 | #include <powerpc/ibm4xx/spr.h> | 94 | #include <powerpc/ibm4xx/spr.h> | |
94 | #include <powerpc/ibm4xx/dcr4xx.h> | 95 | #include <powerpc/ibm4xx/dcr4xx.h> | |
95 | #include <powerpc/ibm4xx/ibm405gp.h> | 96 | #include <powerpc/ibm4xx/ibm405gp.h> | |
96 | #include <powerpc/ibm4xx/dev/comopbvar.h> | 97 | #include <powerpc/ibm4xx/dev/comopbvar.h> | |
97 | 98 | |||
@@ -184,26 +185,31 @@ initppc(u_int startkernel, u_int endkern | @@ -184,26 +185,31 @@ initppc(u_int startkernel, u_int endkern | |||
184 | #endif | 185 | #endif | |
185 | #ifdef DDB | 186 | #ifdef DDB | |
186 | if (boothowto & RB_KDB) | 187 | if (boothowto & RB_KDB) | |
187 | Debugger(); | 188 | Debugger(); | |
188 | #endif | 189 | #endif | |
189 | #ifdef IPKDB | 190 | #ifdef IPKDB | |
190 | /* | 191 | /* | |
191 | * Now trap to IPKDB | 192 | * Now trap to IPKDB | |
192 | */ | 193 | */ | |
193 | ipkdb_init(); | 194 | ipkdb_init(); | |
194 | if (boothowto & RB_KDB) | 195 | if (boothowto & RB_KDB) | |
195 | ipkdb_connect(0); | 196 | ipkdb_connect(0); | |
196 | #endif | 197 | #endif | |
198 | ||||
199 | /* | |||
200 | * Look for the ibm4xx modules in the right place. | |||
201 | */ | |||
202 | module_machine = module_machine_ibm4xx; | |||
197 | } | 203 | } | |
198 | 204 | |||
199 | void | 205 | void | |
200 | consinit(void) | 206 | consinit(void) | |
201 | { | 207 | { | |
202 | 208 | |||
203 | #if (NCOM > 0) | 209 | #if (NCOM > 0) | |
204 | com_opb_cnattach(OBS200_COM_FREQ, CONADDR, CONSPEED, CONMODE); | 210 | com_opb_cnattach(OBS200_COM_FREQ, CONADDR, CONSPEED, CONMODE); | |
205 | #endif | 211 | #endif | |
206 | } | 212 | } | |
207 | 213 | |||
208 | int | 214 | int | |
209 | lcsplx(int ipl) | 215 | lcsplx(int ipl) |
--- src/sys/arch/evbppc/obs405/obs266_machdep.c 2011/04/04 20:37:50 1.15
+++ src/sys/arch/evbppc/obs405/obs266_machdep.c 2011/06/12 03:42:41 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: obs266_machdep.c,v 1.15 2011/04/04 20:37:50 dyoung Exp $ */ | 1 | /* $NetBSD: obs266_machdep.c,v 1.16 2011/06/12 03:42:41 mrg 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,40 +58,41 @@ | @@ -58,40 +58,41 @@ | |||
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.15 2011/04/04 20:37:50 dyoung Exp $"); | 71 | __KERNEL_RCSID(0, "$NetBSD: obs266_machdep.c,v 1.16 2011/06/12 03:42:41 mrg Exp $"); | |
72 | 72 | |||
73 | #include "opt_compat_netbsd.h" | 73 | #include "opt_compat_netbsd.h" | |
74 | #include "opt_ddb.h" | 74 | #include "opt_ddb.h" | |
75 | #include "opt_ipkdb.h" | 75 | #include "opt_ipkdb.h" | |
76 | #include "opt_modular.h" | 76 | #include "opt_modular.h" | |
77 | 77 | |||
78 | #include <sys/param.h> | 78 | #include <sys/param.h> | |
79 | #include <sys/kernel.h> | 79 | #include <sys/kernel.h> | |
80 | #include <sys/ksyms.h> | 80 | #include <sys/ksyms.h> | |
81 | #include <sys/mount.h> | 81 | #include <sys/mount.h> | |
82 | #include <sys/reboot.h> | 82 | #include <sys/reboot.h> | |
83 | #include <sys/systm.h> | 83 | #include <sys/systm.h> | |
84 | #include <sys/device.h> | 84 | #include <sys/device.h> | |
85 | #include <sys/module.h> | |||
85 | 86 | |||
86 | #include <uvm/uvm_extern.h> | 87 | #include <uvm/uvm_extern.h> | |
87 | 88 | |||
88 | #include <machine/bus.h> | 89 | #include <machine/bus.h> | |
89 | #include <machine/cpu.h> | 90 | #include <machine/cpu.h> | |
90 | #include <machine/obs266.h> | 91 | #include <machine/obs266.h> | |
91 | #include <powerpc/spr.h> | 92 | #include <powerpc/spr.h> | |
92 | #include <powerpc/ibm4xx/dcr4xx.h> | 93 | #include <powerpc/ibm4xx/dcr4xx.h> | |
93 | #include <powerpc/ibm4xx/dev/comopbvar.h> | 94 | #include <powerpc/ibm4xx/dev/comopbvar.h> | |
94 | #include <powerpc/ibm4xx/ibm405gp.h> | 95 | #include <powerpc/ibm4xx/ibm405gp.h> | |
95 | #include <powerpc/ibm4xx/openbios.h> | 96 | #include <powerpc/ibm4xx/openbios.h> | |
96 | #include <powerpc/ibm4xx/spr.h> | 97 | #include <powerpc/ibm4xx/spr.h> | |
97 | 98 | |||
@@ -175,26 +176,31 @@ initppc(u_int startkernel, u_int endkern | @@ -175,26 +176,31 @@ initppc(u_int startkernel, u_int endkern | |||
175 | #endif | 176 | #endif | |
176 | #ifdef DDB | 177 | #ifdef DDB | |
177 | if (boothowto & RB_KDB) | 178 | if (boothowto & RB_KDB) | |
178 | Debugger(); | 179 | Debugger(); | |
179 | #endif | 180 | #endif | |
180 | #ifdef IPKDB | 181 | #ifdef IPKDB | |
181 | /* | 182 | /* | |
182 | * Now trap to IPKDB | 183 | * Now trap to IPKDB | |
183 | */ | 184 | */ | |
184 | ipkdb_init(); | 185 | ipkdb_init(); | |
185 | if (boothowto & RB_KDB) | 186 | if (boothowto & RB_KDB) | |
186 | ipkdb_connect(0); | 187 | ipkdb_connect(0); | |
187 | #endif | 188 | #endif | |
189 | ||||
190 | /* | |||
191 | * Look for the ibm4xx modules in the right place. | |||
192 | */ | |||
193 | module_machine = module_machine_ibm4xx; | |||
188 | } | 194 | } | |
189 | 195 | |||
190 | void | 196 | void | |
191 | consinit(void) | 197 | consinit(void) | |
192 | { | 198 | { | |
193 | 199 | |||
194 | #if (NCOM > 0) | 200 | #if (NCOM > 0) | |
195 | com_opb_cnattach(OBS266_COM_FREQ, CONADDR, CONSPEED, CONMODE); | 201 | com_opb_cnattach(OBS266_COM_FREQ, CONADDR, CONSPEED, CONMODE); | |
196 | #endif | 202 | #endif | |
197 | } | 203 | } | |
198 | 204 | |||
199 | int | 205 | int | |
200 | lcsplx(int ipl) | 206 | lcsplx(int ipl) |
--- src/sys/arch/evbppc/obs405/obs600_machdep.c 2011/02/25 10:18:09 1.3
+++ src/sys/arch/evbppc/obs405/obs600_machdep.c 2011/06/12 03:42:41 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: obs600_machdep.c,v 1.3 2011/02/25 10:18:09 kiyohara Exp $ */ | 1 | /* $NetBSD: obs600_machdep.c,v 1.4 2011/06/12 03:42:41 mrg 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,42 +58,43 @@ | @@ -58,42 +58,43 @@ | |||
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: obs600_machdep.c,v 1.3 2011/02/25 10:18:09 kiyohara Exp $"); | 71 | __KERNEL_RCSID(0, "$NetBSD: obs600_machdep.c,v 1.4 2011/06/12 03:42:41 mrg Exp $"); | |
72 | 72 | |||
73 | #include "opt_compat_netbsd.h" | 73 | #include "opt_compat_netbsd.h" | |
74 | #include "opt_ddb.h" | 74 | #include "opt_ddb.h" | |
75 | #include "opt_ipkdb.h" | 75 | #include "opt_ipkdb.h" | |
76 | #include "opt_modular.h" | 76 | #include "opt_modular.h" | |
77 | 77 | |||
78 | #include <sys/param.h> | 78 | #include <sys/param.h> | |
79 | #include <sys/bus.h> | 79 | #include <sys/bus.h> | |
80 | #include <sys/errno.h> | 80 | #include <sys/errno.h> | |
81 | #include <sys/kernel.h> | 81 | #include <sys/kernel.h> | |
82 | #include <sys/ksyms.h> | 82 | #include <sys/ksyms.h> | |
83 | #include <sys/mount.h> | 83 | #include <sys/mount.h> | |
84 | #include <sys/reboot.h> | 84 | #include <sys/reboot.h> | |
85 | #include <sys/systm.h> | 85 | #include <sys/systm.h> | |
86 | #include <sys/device.h> | 86 | #include <sys/device.h> | |
87 | #include <sys/module.h> | |||
87 | 88 | |||
88 | #include <uvm/uvm_extern.h> | 89 | #include <uvm/uvm_extern.h> | |
89 | 90 | |||
90 | #include <machine/bus.h> | 91 | #include <machine/bus.h> | |
91 | #include <machine/cpu.h> | 92 | #include <machine/cpu.h> | |
92 | #include <machine/obs600.h> | 93 | #include <machine/obs600.h> | |
93 | 94 | |||
94 | #include <powerpc/ibm4xx/amcc405ex.h> | 95 | #include <powerpc/ibm4xx/amcc405ex.h> | |
95 | #include <powerpc/ibm4xx/dcr4xx.h> | 96 | #include <powerpc/ibm4xx/dcr4xx.h> | |
96 | #include <powerpc/ibm4xx/dev/comopbvar.h> | 97 | #include <powerpc/ibm4xx/dev/comopbvar.h> | |
97 | #include <powerpc/ibm4xx/dev/gpiicreg.h> | 98 | #include <powerpc/ibm4xx/dev/gpiicreg.h> | |
98 | #include <powerpc/ibm4xx/dev/opbvar.h> | 99 | #include <powerpc/ibm4xx/dev/opbvar.h> | |
99 | #include <powerpc/ibm4xx/spr.h> | 100 | #include <powerpc/ibm4xx/spr.h> | |
@@ -187,26 +188,31 @@ initppc(u_int startkernel, u_int endkern | @@ -187,26 +188,31 @@ initppc(u_int startkernel, u_int endkern | |||
187 | #endif | 188 | #endif | |
188 | #ifdef DDB | 189 | #ifdef DDB | |
189 | if (boothowto & RB_KDB) | 190 | if (boothowto & RB_KDB) | |
190 | Debugger(); | 191 | Debugger(); | |
191 | #endif | 192 | #endif | |
192 | #ifdef IPKDB | 193 | #ifdef IPKDB | |
193 | /* | 194 | /* | |
194 | * Now trap to IPKDB | 195 | * Now trap to IPKDB | |
195 | */ | 196 | */ | |
196 | ipkdb_init(); | 197 | ipkdb_init(); | |
197 | if (boothowto & RB_KDB) | 198 | if (boothowto & RB_KDB) | |
198 | ipkdb_connect(0); | 199 | ipkdb_connect(0); | |
199 | #endif | 200 | #endif | |
201 | ||||
202 | /* | |||
203 | * Look for the ibm4xx modules in the right place. | |||
204 | */ | |||
205 | module_machine = module_machine_ibm4xx; | |||
200 | } | 206 | } | |
201 | 207 | |||
202 | void | 208 | void | |
203 | consinit(void) | 209 | consinit(void) | |
204 | { | 210 | { | |
205 | 211 | |||
206 | #if (NCOM > 0) | 212 | #if (NCOM > 0) | |
207 | com_opb_cnattach(OBS600_COM_FREQ, CONADDR, CONSPEED, CONMODE); | 213 | com_opb_cnattach(OBS600_COM_FREQ, CONADDR, CONSPEED, CONMODE); | |
208 | #endif /* NCOM */ | 214 | #endif /* NCOM */ | |
209 | } | 215 | } | |
210 | 216 | |||
211 | int | 217 | int | |
212 | lcsplx(int ipl) | 218 | lcsplx(int ipl) |
--- src/sys/arch/evbppc/virtex/machdep.c 2011/01/17 07:32:54 1.15
+++ src/sys/arch/evbppc/virtex/machdep.c 2011/06/12 03:42:41 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.15 2011/01/17 07:32:54 matt Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.16 2011/06/12 03:42:41 mrg Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2006 Jachym Holecek | 4 | * Copyright (c) 2006 Jachym Holecek | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written for DFC Design, s.r.o. | 7 | * Written for DFC Design, s.r.o. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * | 12 | * | |
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. | |
@@ -24,51 +24,52 @@ | @@ -24,51 +24,52 @@ | |||
24 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 24 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
25 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
29 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | /* | 32 | /* | |
33 | * Based on Walnut and Explora. | 33 | * Based on Walnut and Explora. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <sys/cdefs.h> | 36 | #include <sys/cdefs.h> | |
37 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2011/01/17 07:32:54 matt Exp $"); | 37 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2011/06/12 03:42:41 mrg Exp $"); | |
38 | 38 | |||
39 | #include "opt_compat_netbsd.h" | 39 | #include "opt_compat_netbsd.h" | |
40 | #include "opt_ddb.h" | 40 | #include "opt_ddb.h" | |
41 | #include "opt_ipkdb.h" | 41 | #include "opt_ipkdb.h" | |
42 | #include "opt_modular.h" | 42 | #include "opt_modular.h" | |
43 | #include "opt_virtex.h" | 43 | #include "opt_virtex.h" | |
44 | #include "opt_kgdb.h" | 44 | #include "opt_kgdb.h" | |
45 | 45 | |||
46 | #include <sys/param.h> | 46 | #include <sys/param.h> | |
47 | #include <sys/buf.h> | 47 | #include <sys/buf.h> | |
48 | #include <sys/exec.h> | 48 | #include <sys/exec.h> | |
49 | #include <sys/malloc.h> | 49 | #include <sys/malloc.h> | |
50 | #include <sys/mbuf.h> | 50 | #include <sys/mbuf.h> | |
51 | #include <sys/mount.h> | 51 | #include <sys/mount.h> | |
52 | #include <sys/msgbuf.h> | 52 | #include <sys/msgbuf.h> | |
53 | #include <sys/proc.h> | 53 | #include <sys/proc.h> | |
54 | #include <sys/reboot.h> | 54 | #include <sys/reboot.h> | |
55 | #include <sys/syscallargs.h> | 55 | #include <sys/syscallargs.h> | |
56 | #include <sys/syslog.h> | 56 | #include <sys/syslog.h> | |
57 | #include <sys/systm.h> | 57 | #include <sys/systm.h> | |
58 | #include <sys/kernel.h> | 58 | #include <sys/kernel.h> | |
59 | #include <sys/boot_flag.h> | 59 | #include <sys/boot_flag.h> | |
60 | #include <sys/ksyms.h> | 60 | #include <sys/ksyms.h> | |
61 | #include <sys/device.h> | 61 | #include <sys/device.h> | |
62 | #include <sys/module.h> | |||
62 | 63 | |||
63 | #include <uvm/uvm_extern.h> | 64 | #include <uvm/uvm_extern.h> | |
64 | 65 | |||
65 | #include <net/netisr.h> | 66 | #include <net/netisr.h> | |
66 | 67 | |||
67 | #include <dev/cons.h> | 68 | #include <dev/cons.h> | |
68 | 69 | |||
69 | #include <machine/bus.h> | 70 | #include <machine/bus.h> | |
70 | #include <machine/powerpc.h> | 71 | #include <machine/powerpc.h> | |
71 | #include <machine/trap.h> | 72 | #include <machine/trap.h> | |
72 | #include <machine/pcb.h> | 73 | #include <machine/pcb.h> | |
73 | 74 | |||
74 | #include <powerpc/spr.h> | 75 | #include <powerpc/spr.h> | |
@@ -255,26 +256,31 @@ initppc(u_int startkernel, u_int endkern | @@ -255,26 +256,31 @@ initppc(u_int startkernel, u_int endkern | |||
255 | /* | 256 | /* | |
256 | * Now trap to IPKDB | 257 | * Now trap to IPKDB | |
257 | */ | 258 | */ | |
258 | ipkdb_init(); | 259 | ipkdb_init(); | |
259 | if (boothowto & RB_KDB) | 260 | if (boothowto & RB_KDB) | |
260 | ipkdb_connect(0); | 261 | ipkdb_connect(0); | |
261 | #endif | 262 | #endif | |
262 | #ifdef KGDB | 263 | #ifdef KGDB | |
263 | /* | 264 | /* | |
264 | * Now trap to KGDB | 265 | * Now trap to KGDB | |
265 | */ | 266 | */ | |
266 | kgdb_connect(1); | 267 | kgdb_connect(1); | |
267 | #endif /* KGDB */ | 268 | #endif /* KGDB */ | |
269 | ||||
270 | /* | |||
271 | * Look for the ibm4xx modules in the right place. | |||
272 | */ | |||
273 | module_machine = module_machine_ibm4xx; | |||
268 | } | 274 | } | |
269 | 275 | |||
270 | /* | 276 | /* | |
271 | * trapcpy: | 277 | * trapcpy: | |
272 | * | 278 | * | |
273 | * Install a trap vector. We cannot use memcpy because the | 279 | * Install a trap vector. We cannot use memcpy because the | |
274 | * destination may be zero. Borrowed from Explora. | 280 | * destination may be zero. Borrowed from Explora. | |
275 | */ | 281 | */ | |
276 | static void | 282 | static void | |
277 | trapcpy(int dest, void *src, size_t len) | 283 | trapcpy(int dest, void *src, size_t len) | |
278 | { | 284 | { | |
279 | uint32_t *dest_p = (void *)dest; | 285 | uint32_t *dest_p = (void *)dest; | |
280 | uint32_t *src_p = src; | 286 | uint32_t *src_p = src; |
--- src/sys/arch/evbppc/walnut/machdep.c 2011/04/04 20:37:50 1.48
+++ src/sys/arch/evbppc/walnut/machdep.c 2011/06/12 03:42:42 1.49
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.48 2011/04/04 20:37:50 dyoung Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.49 2011/06/12 03:42:42 mrg Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 2001, 2002 Wasabi Systems, Inc. | 4 | * Copyright 2001, 2002 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. | 7 | * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -57,49 +57,50 @@ | @@ -57,49 +57,50 @@ | |||
57 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | 57 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | |
58 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 58 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
59 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 59 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
60 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 60 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
61 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 61 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
62 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | 62 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | |
63 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 63 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
64 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 64 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
65 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 65 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |
66 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
67 | */ | 67 | */ | |
68 | 68 | |||
69 | #include <sys/cdefs.h> | 69 | #include <sys/cdefs.h> | |
70 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.48 2011/04/04 20:37:50 dyoung Exp $"); | 70 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.49 2011/06/12 03:42:42 mrg Exp $"); | |
71 | 71 | |||
72 | #include "opt_compat_netbsd.h" | 72 | #include "opt_compat_netbsd.h" | |
73 | #include "opt_ddb.h" | 73 | #include "opt_ddb.h" | |
74 | #include "opt_ipkdb.h" | 74 | #include "opt_ipkdb.h" | |
75 | #include "opt_modular.h" | 75 | #include "opt_modular.h" | |
76 | 76 | |||
77 | #include <sys/param.h> | 77 | #include <sys/param.h> | |
78 | #include <sys/buf.h> | 78 | #include <sys/buf.h> | |
79 | #include <sys/exec.h> | 79 | #include <sys/exec.h> | |
80 | #include <sys/malloc.h> | 80 | #include <sys/malloc.h> | |
81 | #include <sys/mbuf.h> | 81 | #include <sys/mbuf.h> | |
82 | #include <sys/mount.h> | 82 | #include <sys/mount.h> | |
83 | #include <sys/msgbuf.h> | 83 | #include <sys/msgbuf.h> | |
84 | #include <sys/proc.h> | 84 | #include <sys/proc.h> | |
85 | #include <sys/reboot.h> | 85 | #include <sys/reboot.h> | |
86 | #include <sys/syscallargs.h> | 86 | #include <sys/syscallargs.h> | |
87 | #include <sys/syslog.h> | 87 | #include <sys/syslog.h> | |
88 | #include <sys/systm.h> | 88 | #include <sys/systm.h> | |
89 | #include <sys/kernel.h> | 89 | #include <sys/kernel.h> | |
90 | #include <sys/boot_flag.h> | 90 | #include <sys/boot_flag.h> | |
91 | #include <sys/ksyms.h> | 91 | #include <sys/ksyms.h> | |
92 | #include <sys/device.h> | 92 | #include <sys/device.h> | |
93 | #include <sys/module.h> | |||
93 | 94 | |||
94 | #include <uvm/uvm_extern.h> | 95 | #include <uvm/uvm_extern.h> | |
95 | 96 | |||
96 | #include <net/netisr.h> | 97 | #include <net/netisr.h> | |
97 | 98 | |||
98 | #include <prop/proplib.h> | 99 | #include <prop/proplib.h> | |
99 | 100 | |||
100 | #include <machine/bus.h> | 101 | #include <machine/bus.h> | |
101 | #include <machine/powerpc.h> | 102 | #include <machine/powerpc.h> | |
102 | #include <machine/trap.h> | 103 | #include <machine/trap.h> | |
103 | #include <machine/walnut.h> | 104 | #include <machine/walnut.h> | |
104 | #include <machine/pcb.h> | 105 | #include <machine/pcb.h> | |
105 | 106 | |||
@@ -326,26 +327,31 @@ initppc(u_int startkernel, u_int endkern | @@ -326,26 +327,31 @@ initppc(u_int startkernel, u_int endkern | |||
326 | #endif | 327 | #endif | |
327 | #ifdef DDB | 328 | #ifdef DDB | |
328 | if (boothowto & RB_KDB) | 329 | if (boothowto & RB_KDB) | |
329 | Debugger(); | 330 | Debugger(); | |
330 | #endif | 331 | #endif | |
331 | #ifdef IPKDB | 332 | #ifdef IPKDB | |
332 | /* | 333 | /* | |
333 | * Now trap to IPKDB | 334 | * Now trap to IPKDB | |
334 | */ | 335 | */ | |
335 | ipkdb_init(); | 336 | ipkdb_init(); | |
336 | if (boothowto & RB_KDB) | 337 | if (boothowto & RB_KDB) | |
337 | ipkdb_connect(0); | 338 | ipkdb_connect(0); | |
338 | #endif | 339 | #endif | |
340 | ||||
341 | /* | |||
342 | * Look for the ibm4xx modules in the right place. | |||
343 | */ | |||
344 | module_machine = module_machine_ibm4xx; | |||
339 | } | 345 | } | |
340 | 346 | |||
341 | static void | 347 | static void | |
342 | install_extint(void (*handler)(void)) | 348 | install_extint(void (*handler)(void)) | |
343 | { | 349 | { | |
344 | extern int extint, extsize; | 350 | extern int extint, extsize; | |
345 | extern u_long extint_call; | 351 | extern u_long extint_call; | |
346 | u_long offset = (u_long)handler - (u_long)&extint_call; | 352 | u_long offset = (u_long)handler - (u_long)&extint_call; | |
347 | int msr; | 353 | int msr; | |
348 | 354 | |||
349 | #ifdef DIAGNOSTIC | 355 | #ifdef DIAGNOSTIC | |
350 | if (offset > 0x1ffffff) | 356 | if (offset > 0x1ffffff) | |
351 | panic("install_extint: too far away"); | 357 | panic("install_extint: too far away"); |