As discussed on tech-kern: mutex_init is too heavyweight for early bootstrap phases, so move the initialization of the ksyms mutex back into main via a function called ksyms_init. Rename the existing (but quite different) ksyms_init* variations into ksyms_addsyms_elf() and ksyms_addsyms_explicit() and adapt machdep code accordingly.diff -r1.8 -r1.9 src/sys/arch/acorn26/acorn26/cons_machdep.c
(martin)
--- src/sys/arch/acorn26/acorn26/Attic/cons_machdep.c 2008/11/12 12:35:54 1.8
+++ src/sys/arch/acorn26/acorn26/Attic/cons_machdep.c 2008/11/30 18:21:31 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cons_machdep.c,v 1.8 2008/11/12 12:35:54 ad Exp $ */ | 1 | /* $NetBSD: cons_machdep.c,v 1.9 2008/11/30 18:21:31 martin Exp $ */ | |
2 | /*- | 2 | /*- | |
3 | * Copyright (c) 1998 Ben Harris | 3 | * Copyright (c) 1998 Ben Harris | |
4 | * All rights reserved. | 4 | * All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. The name of the author may not be used to endorse or promote products | 14 | * 3. The name of the author may not be used to endorse or promote products | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
27 | */ | 27 | */ | |
28 | /* | 28 | /* | |
29 | * cons_machdep.c -- machine dependent console routines | 29 | * cons_machdep.c -- machine dependent console routines | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: cons_machdep.c,v 1.8 2008/11/12 12:35:54 ad Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: cons_machdep.c,v 1.9 2008/11/30 18:21:31 martin Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/syslog.h> | 36 | #include <sys/syslog.h> | |
37 | #include <sys/systm.h> | 37 | #include <sys/systm.h> | |
38 | #include <sys/ksyms.h> | 38 | #include <sys/ksyms.h> | |
39 | 39 | |||
40 | #include <dev/cons.h> | 40 | #include <dev/cons.h> | |
41 | 41 | |||
42 | #include "arcvideo.h" | 42 | #include "arcvideo.h" | |
43 | #include "opt_ddb.h" | 43 | #include "opt_ddb.h" | |
44 | #include "ksyms.h" | 44 | #include "ksyms.h" | |
45 | 45 | |||
46 | #ifdef DDB | 46 | #ifdef DDB | |
@@ -57,18 +57,18 @@ extern void arccons_init __P((void)); | @@ -57,18 +57,18 @@ extern void arccons_init __P((void)); | |||
57 | void | 57 | void | |
58 | consinit() | 58 | consinit() | |
59 | { | 59 | { | |
60 | 60 | |||
61 | #if NARCVIDEO > 0 | 61 | #if NARCVIDEO > 0 | |
62 | arccons_init(); | 62 | arccons_init(); | |
63 | #endif | 63 | #endif | |
64 | /* cninit();*/ | 64 | /* cninit();*/ | |
65 | 65 | |||
66 | #ifdef DDB | 66 | #ifdef DDB | |
67 | db_machine_init(); | 67 | db_machine_init(); | |
68 | #endif /* DDB */ | 68 | #endif /* DDB */ | |
69 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 69 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
70 | ksyms_init(bootconfig.esym - bootconfig.ssym, | 70 | ksyms_addsyms_elf(bootconfig.esym - bootconfig.ssym, | |
71 | (char*)MEMC_PHYS_BASE + bootconfig.ssym, | 71 | (char*)MEMC_PHYS_BASE + bootconfig.ssym, | |
72 | (char*)MEMC_PHYS_BASE + bootconfig.esym); | 72 | (char*)MEMC_PHYS_BASE + bootconfig.esym); | |
73 | #endif | 73 | #endif | |
74 | } | 74 | } |
--- src/sys/arch/acorn32/acorn32/rpc_machdep.c 2008/11/12 12:35:55 1.73
+++ src/sys/arch/acorn32/acorn32/rpc_machdep.c 2008/11/30 18:21:31 1.74
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: rpc_machdep.c,v 1.73 2008/11/12 12:35:55 ad Exp $ */ | 1 | /* $NetBSD: rpc_machdep.c,v 1.74 2008/11/30 18:21:31 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2000-2002 Reinoud Zandijk. | 4 | * Copyright (c) 2000-2002 Reinoud Zandijk. | |
5 | * Copyright (c) 1994-1998 Mark Brinicombe. | 5 | * Copyright (c) 1994-1998 Mark Brinicombe. | |
6 | * Copyright (c) 1994 Brini. | 6 | * Copyright (c) 1994 Brini. | |
7 | * All rights reserved. | 7 | * All rights reserved. | |
8 | * | 8 | * | |
9 | * This code is derived from software written for Brini by Mark Brinicombe | 9 | * This code is derived from software written for Brini by Mark Brinicombe | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -44,27 +44,27 @@ | @@ -44,27 +44,27 @@ | |||
44 | * This file still needs a lot of work | 44 | * This file still needs a lot of work | |
45 | * | 45 | * | |
46 | * Created : 17/09/94 | 46 | * Created : 17/09/94 | |
47 | * Updated for yet another new bootloader 28/12/02 | 47 | * Updated for yet another new bootloader 28/12/02 | |
48 | */ | 48 | */ | |
49 | 49 | |||
50 | #include "opt_ddb.h" | 50 | #include "opt_ddb.h" | |
51 | #include "opt_pmap_debug.h" | 51 | #include "opt_pmap_debug.h" | |
52 | #include "vidcvideo.h" | 52 | #include "vidcvideo.h" | |
53 | #include "podulebus.h" | 53 | #include "podulebus.h" | |
54 | 54 | |||
55 | #include <sys/param.h> | 55 | #include <sys/param.h> | |
56 | 56 | |||
57 | __KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.73 2008/11/12 12:35:55 ad Exp $"); | 57 | __KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.74 2008/11/30 18:21:31 martin Exp $"); | |
58 | 58 | |||
59 | #include <sys/systm.h> | 59 | #include <sys/systm.h> | |
60 | #include <sys/kernel.h> | 60 | #include <sys/kernel.h> | |
61 | #include <sys/reboot.h> | 61 | #include <sys/reboot.h> | |
62 | #include <sys/proc.h> | 62 | #include <sys/proc.h> | |
63 | #include <sys/msgbuf.h> | 63 | #include <sys/msgbuf.h> | |
64 | #include <sys/exec.h> | 64 | #include <sys/exec.h> | |
65 | #include <sys/ksyms.h> | 65 | #include <sys/ksyms.h> | |
66 | 66 | |||
67 | #include <dev/cons.h> | 67 | #include <dev/cons.h> | |
68 | 68 | |||
69 | #include <machine/db_machdep.h> | 69 | #include <machine/db_machdep.h> | |
70 | #include <ddb/db_sym.h> | 70 | #include <ddb/db_sym.h> | |
@@ -1034,27 +1034,27 @@ initarm(void *cookie) | @@ -1034,27 +1034,27 @@ initarm(void *cookie) | |||
1034 | */ | 1034 | */ | |
1035 | acorn32_i2c_tag = iomdiic_bootstrap_cookie(); | 1035 | acorn32_i2c_tag = iomdiic_bootstrap_cookie(); | |
1036 | 1036 | |||
1037 | if (cmos_read(RTC_ADDR_REBOOTCNT) > 0) | 1037 | if (cmos_read(RTC_ADDR_REBOOTCNT) > 0) | |
1038 | printf("Warning: REBOOTCNT = %d\n", | 1038 | printf("Warning: REBOOTCNT = %d\n", | |
1039 | cmos_read(RTC_ADDR_REBOOTCNT)); | 1039 | cmos_read(RTC_ADDR_REBOOTCNT)); | |
1040 | 1040 | |||
1041 | #ifdef CPU_SA110 | 1041 | #ifdef CPU_SA110 | |
1042 | if (cputype == CPU_ID_SA110) | 1042 | if (cputype == CPU_ID_SA110) | |
1043 | rpc_sa110_cc_setup(); | 1043 | rpc_sa110_cc_setup(); | |
1044 | #endif /* CPU_SA110 */ | 1044 | #endif /* CPU_SA110 */ | |
1045 | 1045 | |||
1046 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 1046 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
1047 | ksyms_init(bootconfig.ksym_end - bootconfig.ksym_start, | 1047 | ksyms_addsyms_elf(bootconfig.ksym_end - bootconfig.ksym_start, | |
1048 | (void *) bootconfig.ksym_start, (void *) bootconfig.ksym_end); | 1048 | (void *) bootconfig.ksym_start, (void *) bootconfig.ksym_end); | |
1049 | #endif | 1049 | #endif | |
1050 | 1050 | |||
1051 | 1051 | |||
1052 | #ifdef DDB | 1052 | #ifdef DDB | |
1053 | db_machine_init(); | 1053 | db_machine_init(); | |
1054 | if (boothowto & RB_KDB) | 1054 | if (boothowto & RB_KDB) | |
1055 | Debugger(); | 1055 | Debugger(); | |
1056 | #endif /* DDB */ | 1056 | #endif /* DDB */ | |
1057 | 1057 | |||
1058 | /* We return the new stack pointer address */ | 1058 | /* We return the new stack pointer address */ | |
1059 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 1059 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
1060 | } | 1060 | } |
--- src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c 2008/11/23 11:55:27 1.12
+++ src/sys/arch/acorn32/eb7500atx/eb7500atx_machdep.c 2008/11/30 18:21:31 1.13
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: eb7500atx_machdep.c,v 1.12 2008/11/23 11:55:27 chris Exp $ */ | 1 | /* $NetBSD: eb7500atx_machdep.c,v 1.13 2008/11/30 18:21:31 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2000-2002 Reinoud Zandijk. | 4 | * Copyright (c) 2000-2002 Reinoud Zandijk. | |
5 | * Copyright (c) 1994-1998 Mark Brinicombe. | 5 | * Copyright (c) 1994-1998 Mark Brinicombe. | |
6 | * Copyright (c) 1994 Brini. | 6 | * Copyright (c) 1994 Brini. | |
7 | * All rights reserved. | 7 | * All rights reserved. | |
8 | * | 8 | * | |
9 | * This code is derived from software written for Brini by Mark Brinicombe | 9 | * This code is derived from software written for Brini by Mark Brinicombe | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -44,27 +44,27 @@ | @@ -44,27 +44,27 @@ | |||
44 | * This file still needs a lot of work | 44 | * This file still needs a lot of work | |
45 | * | 45 | * | |
46 | * Created : 17/09/94 | 46 | * Created : 17/09/94 | |
47 | * Updated for yet another new bootloader 28/12/02 | 47 | * Updated for yet another new bootloader 28/12/02 | |
48 | */ | 48 | */ | |
49 | 49 | |||
50 | #include "opt_ddb.h" | 50 | #include "opt_ddb.h" | |
51 | #include "opt_pmap_debug.h" | 51 | #include "opt_pmap_debug.h" | |
52 | #include "vidcvideo.h" | 52 | #include "vidcvideo.h" | |
53 | #include "pckbc.h" | 53 | #include "pckbc.h" | |
54 | 54 | |||
55 | #include <sys/param.h> | 55 | #include <sys/param.h> | |
56 | 56 | |||
57 | __KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.12 2008/11/23 11:55:27 chris Exp $"); | 57 | __KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.13 2008/11/30 18:21:31 martin Exp $"); | |
58 | 58 | |||
59 | #include <sys/systm.h> | 59 | #include <sys/systm.h> | |
60 | #include <sys/kernel.h> | 60 | #include <sys/kernel.h> | |
61 | #include <sys/reboot.h> | 61 | #include <sys/reboot.h> | |
62 | #include <sys/proc.h> | 62 | #include <sys/proc.h> | |
63 | #include <sys/msgbuf.h> | 63 | #include <sys/msgbuf.h> | |
64 | #include <sys/exec.h> | 64 | #include <sys/exec.h> | |
65 | #include <sys/ksyms.h> | 65 | #include <sys/ksyms.h> | |
66 | 66 | |||
67 | #include <dev/cons.h> | 67 | #include <dev/cons.h> | |
68 | 68 | |||
69 | #include <machine/db_machdep.h> | 69 | #include <machine/db_machdep.h> | |
70 | #include <ddb/db_sym.h> | 70 | #include <ddb/db_sym.h> | |
@@ -945,27 +945,27 @@ initarm(void *cookie) | @@ -945,27 +945,27 @@ initarm(void *cookie) | |||
945 | bootconfig.dram[1].address, | 945 | bootconfig.dram[1].address, | |
946 | bootconfig.dram[1].pages * bootconfig.pagesize); | 946 | bootconfig.dram[1].pages * bootconfig.pagesize); | |
947 | printf(" DRAM block 1a at %08x size %08x " | 947 | printf(" DRAM block 1a at %08x size %08x " | |
948 | "DRAM block 1b at %08x size %08x\n\r", | 948 | "DRAM block 1b at %08x size %08x\n\r", | |
949 | bootconfig.dram[2].address, | 949 | bootconfig.dram[2].address, | |
950 | bootconfig.dram[2].pages * bootconfig.pagesize, | 950 | bootconfig.dram[2].pages * bootconfig.pagesize, | |
951 | bootconfig.dram[3].address, | 951 | bootconfig.dram[3].address, | |
952 | bootconfig.dram[3].pages * bootconfig.pagesize); | 952 | bootconfig.dram[3].pages * bootconfig.pagesize); | |
953 | printf(" VRAM block 0 at %08x size %08x\n\r", | 953 | printf(" VRAM block 0 at %08x size %08x\n\r", | |
954 | bootconfig.vram[0].address, | 954 | bootconfig.vram[0].address, | |
955 | bootconfig.vram[0].pages * bootconfig.pagesize); | 955 | bootconfig.vram[0].pages * bootconfig.pagesize); | |
956 | 956 | |||
957 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 957 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
958 | ksyms_init(bootconfig.ksym_end - bootconfig.ksym_start, | 958 | ksyms_addsyms_elf(bootconfig.ksym_end - bootconfig.ksym_start, | |
959 | (void *) bootconfig.ksym_start, (void *) bootconfig.ksym_end); | 959 | (void *) bootconfig.ksym_start, (void *) bootconfig.ksym_end); | |
960 | #endif | 960 | #endif | |
961 | 961 | |||
962 | 962 | |||
963 | #ifdef DDB | 963 | #ifdef DDB | |
964 | db_machine_init(); | 964 | db_machine_init(); | |
965 | if (boothowto & RB_KDB) | 965 | if (boothowto & RB_KDB) | |
966 | Debugger(); | 966 | Debugger(); | |
967 | #endif /* DDB */ | 967 | #endif /* DDB */ | |
968 | 968 | |||
969 | /* We return the new stack pointer address */ | 969 | /* We return the new stack pointer address */ | |
970 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 970 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
971 | } | 971 | } |
--- src/sys/arch/algor/algor/machdep.c 2008/11/12 12:35:55 1.40
+++ src/sys/arch/algor/algor/machdep.c 2008/11/30 18:21:32 1.41
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.40 2008/11/12 12:35:55 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.41 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2001 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2001 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 Jason R. Thorpe. | 8 | * by Jason R. Thorpe. | |
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. | |
@@ -96,27 +96,27 @@ | @@ -96,27 +96,27 @@ | |||
96 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 96 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
97 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 97 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
98 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 98 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
99 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 99 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
100 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 100 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
101 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 101 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
102 | * SUCH DAMAGE. | 102 | * SUCH DAMAGE. | |
103 | * | 103 | * | |
104 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | 104 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | |
105 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | 105 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | |
106 | */ | 106 | */ | |
107 | 107 | |||
108 | #include <sys/cdefs.h> | 108 | #include <sys/cdefs.h> | |
109 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.40 2008/11/12 12:35:55 ad Exp $"); | 109 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.41 2008/11/30 18:21:32 martin Exp $"); | |
110 | 110 | |||
111 | #include "opt_algor_p4032.h" | 111 | #include "opt_algor_p4032.h" | |
112 | #include "opt_algor_p5064.h" | 112 | #include "opt_algor_p5064.h" | |
113 | #include "opt_algor_p6032.h" | 113 | #include "opt_algor_p6032.h" | |
114 | 114 | |||
115 | #include "opt_ddb.h" | 115 | #include "opt_ddb.h" | |
116 | #include "opt_kgdb.h" | 116 | #include "opt_kgdb.h" | |
117 | 117 | |||
118 | #include "opt_memsize.h" | 118 | #include "opt_memsize.h" | |
119 | #include "opt_ethaddr.h" | 119 | #include "opt_ethaddr.h" | |
120 | 120 | |||
121 | #include <sys/param.h> | 121 | #include <sys/param.h> | |
122 | #include <sys/systm.h> | 122 | #include <sys/systm.h> | |
@@ -564,34 +564,26 @@ mach_init(int argc, char *argv[], char * | @@ -564,34 +564,26 @@ mach_init(int argc, char *argv[], char * | |||
564 | /* | 564 | /* | |
565 | * Init mapping for u page(s) for lwp0. | 565 | * Init mapping for u page(s) for lwp0. | |
566 | */ | 566 | */ | |
567 | led_display('u', 's', 'p', 'c'); | 567 | led_display('u', 's', 'p', 'c'); | |
568 | v = (void *) uvm_pageboot_alloc(USPACE); | 568 | v = (void *) uvm_pageboot_alloc(USPACE); | |
569 | lwp0.l_addr = proc0paddr = (struct user *) v; | 569 | lwp0.l_addr = proc0paddr = (struct user *) v; | |
570 | lwp0.l_md.md_regs = (struct frame *)((char*)v + USPACE) - 1; | 570 | lwp0.l_md.md_regs = (struct frame *)((char*)v + USPACE) - 1; | |
571 | proc0paddr->u_pcb.pcb_context[11] = | 571 | proc0paddr->u_pcb.pcb_context[11] = | |
572 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | 572 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | |
573 | 573 | |||
574 | /* | 574 | /* | |
575 | * Initialize debuggers, and break into them, if appropriate. | 575 | * Initialize debuggers, and break into them, if appropriate. | |
576 | */ | 576 | */ | |
577 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
578 | /* | |||
579 | * XXX Loader doesn't give us symbols the way we like. Need | |||
580 | * XXX dbsym(1) support for ELF. | |||
581 | */ | |||
582 | ksyms_init(0, 0, 0); | |||
583 | #endif | |||
584 | ||||
585 | if (boothowto & RB_KDB) { | 577 | if (boothowto & RB_KDB) { | |
586 | #if defined(DDB) | 578 | #if defined(DDB) | |
587 | Debugger(); | 579 | Debugger(); | |
588 | #endif | 580 | #endif | |
589 | } | 581 | } | |
590 | } | 582 | } | |
591 | 583 | |||
592 | void | 584 | void | |
593 | consinit(void) | 585 | consinit(void) | |
594 | { | 586 | { | |
595 | 587 | |||
596 | /* | 588 | /* | |
597 | * Everything related to console initialization is done | 589 | * Everything related to console initialization is done |
--- src/sys/arch/alpha/alpha/machdep.c 2008/11/25 15:51:34 1.311
+++ src/sys/arch/alpha/alpha/machdep.c 2008/11/30 18:21:32 1.312
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.311 2008/11/25 15:51:34 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.312 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1998, 1999, 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 Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | |
9 | * NASA Ames Research Center and by Chris G. Demetriou. | 9 | * NASA Ames Research Center and by Chris G. Demetriou. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -57,27 +57,27 @@ | @@ -57,27 +57,27 @@ | |||
57 | * rights to redistribute these changes. | 57 | * rights to redistribute these changes. | |
58 | */ | 58 | */ | |
59 | 59 | |||
60 | #include "opt_ddb.h" | 60 | #include "opt_ddb.h" | |
61 | #include "opt_kgdb.h" | 61 | #include "opt_kgdb.h" | |
62 | #include "opt_multiprocessor.h" | 62 | #include "opt_multiprocessor.h" | |
63 | #include "opt_dec_3000_300.h" | 63 | #include "opt_dec_3000_300.h" | |
64 | #include "opt_dec_3000_500.h" | 64 | #include "opt_dec_3000_500.h" | |
65 | #include "opt_compat_osf1.h" | 65 | #include "opt_compat_osf1.h" | |
66 | #include "opt_execfmt.h" | 66 | #include "opt_execfmt.h" | |
67 | 67 | |||
68 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 68 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
69 | 69 | |||
70 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.311 2008/11/25 15:51:34 ad Exp $"); | 70 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.312 2008/11/30 18:21:32 martin 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/signalvar.h> | 74 | #include <sys/signalvar.h> | |
75 | #include <sys/kernel.h> | 75 | #include <sys/kernel.h> | |
76 | #include <sys/cpu.h> | 76 | #include <sys/cpu.h> | |
77 | #include <sys/proc.h> | 77 | #include <sys/proc.h> | |
78 | #include <sys/ras.h> | 78 | #include <sys/ras.h> | |
79 | #include <sys/sa.h> | 79 | #include <sys/sa.h> | |
80 | #include <sys/savar.h> | 80 | #include <sys/savar.h> | |
81 | #include <sys/sched.h> | 81 | #include <sys/sched.h> | |
82 | #include <sys/reboot.h> | 82 | #include <sys/reboot.h> | |
83 | #include <sys/device.h> | 83 | #include <sys/device.h> | |
@@ -757,27 +757,27 @@ nobootinfo: | @@ -757,27 +757,27 @@ nobootinfo: | |||
757 | */ | 757 | */ | |
758 | for (i = 0; i < hwrpb->rpb_pcs_cnt; i++) { | 758 | for (i = 0; i < hwrpb->rpb_pcs_cnt; i++) { | |
759 | struct pcs *pcsp; | 759 | struct pcs *pcsp; | |
760 | 760 | |||
761 | pcsp = LOCATE_PCS(hwrpb, i); | 761 | pcsp = LOCATE_PCS(hwrpb, i); | |
762 | if ((pcsp->pcs_flags & PCS_PP) != 0) | 762 | if ((pcsp->pcs_flags & PCS_PP) != 0) | |
763 | ncpus++; | 763 | ncpus++; | |
764 | } | 764 | } | |
765 | 765 | |||
766 | /* | 766 | /* | |
767 | * Initialize debuggers, and break into them if appropriate. | 767 | * Initialize debuggers, and break into them if appropriate. | |
768 | */ | 768 | */ | |
769 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 769 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
770 | ksyms_init((int)((u_int64_t)ksym_end - (u_int64_t)ksym_start), | 770 | ksyms_addsyms_elf((int)((u_int64_t)ksym_end - (u_int64_t)ksym_start), | |
771 | ksym_start, ksym_end); | 771 | ksym_start, ksym_end); | |
772 | #endif | 772 | #endif | |
773 | 773 | |||
774 | if (boothowto & RB_KDB) { | 774 | if (boothowto & RB_KDB) { | |
775 | #if defined(KGDB) | 775 | #if defined(KGDB) | |
776 | kgdb_debug_init = 1; | 776 | kgdb_debug_init = 1; | |
777 | kgdb_connect(1); | 777 | kgdb_connect(1); | |
778 | #elif defined(DDB) | 778 | #elif defined(DDB) | |
779 | Debugger(); | 779 | Debugger(); | |
780 | #endif | 780 | #endif | |
781 | } | 781 | } | |
782 | 782 | |||
783 | #ifdef DIAGNOSTIC | 783 | #ifdef DIAGNOSTIC |
--- src/sys/arch/amd64/amd64/machdep.c 2008/11/19 18:35:58 1.112
+++ src/sys/arch/amd64/amd64/machdep.c 2008/11/30 18:21:32 1.113
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.112 2008/11/19 18:35:58 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.113 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008 | 4 | * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008 | |
5 | * The NetBSD Foundation, Inc. | 5 | * The NetBSD Foundation, Inc. | |
6 | * All rights reserved. | 6 | * All rights reserved. | |
7 | * | 7 | * | |
8 | * This code is derived from software contributed to The NetBSD Foundation | 8 | * This code is derived from software contributed to The NetBSD Foundation | |
9 | * by Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace | 9 | * by Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace | |
10 | * Simulation Facility, NASA Ames Research Center. | 10 | * Simulation Facility, NASA Ames Research Center. | |
11 | * | 11 | * | |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without | |
13 | * modification, are permitted provided that the following conditions | 13 | * modification, are permitted provided that the following conditions | |
14 | * are met: | 14 | * are met: | |
@@ -102,27 +102,27 @@ | @@ -102,27 +102,27 @@ | |||
102 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 102 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
103 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 103 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
104 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 104 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
105 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 105 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
106 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 106 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
107 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 107 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
108 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 108 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
109 | * SUCH DAMAGE. | 109 | * SUCH DAMAGE. | |
110 | * | 110 | * | |
111 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | 111 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | |
112 | */ | 112 | */ | |
113 | 113 | |||
114 | #include <sys/cdefs.h> | 114 | #include <sys/cdefs.h> | |
115 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.112 2008/11/19 18:35:58 ad Exp $"); | 115 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.113 2008/11/30 18:21:32 martin Exp $"); | |
116 | 116 | |||
117 | /* #define XENDEBUG_LOW */ | 117 | /* #define XENDEBUG_LOW */ | |
118 | 118 | |||
119 | #include "opt_user_ldt.h" | 119 | #include "opt_user_ldt.h" | |
120 | #include "opt_ddb.h" | 120 | #include "opt_ddb.h" | |
121 | #include "opt_kgdb.h" | 121 | #include "opt_kgdb.h" | |
122 | #include "opt_cpureset_delay.h" | 122 | #include "opt_cpureset_delay.h" | |
123 | #include "opt_mtrr.h" | 123 | #include "opt_mtrr.h" | |
124 | #include "opt_realmem.h" | 124 | #include "opt_realmem.h" | |
125 | #include "opt_xen.h" | 125 | #include "opt_xen.h" | |
126 | #ifndef XEN | 126 | #ifndef XEN | |
127 | #include "opt_physmem.h" | 127 | #include "opt_physmem.h" | |
128 | #endif | 128 | #endif | |
@@ -1210,35 +1210,35 @@ init_x86_64_ksyms(void) | @@ -1210,35 +1210,35 @@ init_x86_64_ksyms(void) | |||
1210 | struct btinfo_symtab *symtab; | 1210 | struct btinfo_symtab *symtab; | |
1211 | vaddr_t tssym, tesym; | 1211 | vaddr_t tssym, tesym; | |
1212 | #endif | 1212 | #endif | |
1213 | 1213 | |||
1214 | #ifdef DDB | 1214 | #ifdef DDB | |
1215 | db_machine_init(); | 1215 | db_machine_init(); | |
1216 | #endif | 1216 | #endif | |
1217 | 1217 | |||
1218 | #ifndef XEN | 1218 | #ifndef XEN | |
1219 | symtab = lookup_bootinfo(BTINFO_SYMTAB); | 1219 | symtab = lookup_bootinfo(BTINFO_SYMTAB); | |
1220 | if (symtab) { | 1220 | if (symtab) { | |
1221 | tssym = (vaddr_t)symtab->ssym + KERNBASE; | 1221 | tssym = (vaddr_t)symtab->ssym + KERNBASE; | |
1222 | tesym = (vaddr_t)symtab->esym + KERNBASE; | 1222 | tesym = (vaddr_t)symtab->esym + KERNBASE; | |
1223 | ksyms_init(symtab->nsym, (void *)tssym, (void *)tesym); | 1223 | ksyms_addsyms_elf(symtab->nsym, (void *)tssym, (void *)tesym); | |
1224 | } else | 1224 | } else | |
1225 | ksyms_init(*(long *)(void *)&end, | 1225 | ksyms_addsyms_elf(*(long *)(void *)&end, | |
1226 | ((long *)(void *)&end) + 1, esym); | 1226 | ((long *)(void *)&end) + 1, esym); | |
1227 | #else /* XEN */ | 1227 | #else /* XEN */ | |
1228 | esym = xen_start_info.mod_start ? | 1228 | esym = xen_start_info.mod_start ? | |
1229 | (void *)xen_start_info.mod_start : | 1229 | (void *)xen_start_info.mod_start : | |
1230 | (void *)xen_start_info.mfn_list; | 1230 | (void *)xen_start_info.mfn_list; | |
1231 | ksyms_init(*(int *)(void *)&end, | 1231 | ksyms_addsyms_elf(*(int *)(void *)&end, | |
1232 | ((int *)(void *)&end) + 1, esym); | 1232 | ((int *)(void *)&end) + 1, esym); | |
1233 | #endif /* XEN */ | 1233 | #endif /* XEN */ | |
1234 | #endif | 1234 | #endif | |
1235 | } | 1235 | } | |
1236 | 1236 | |||
1237 | void | 1237 | void | |
1238 | init_x86_64(paddr_t first_avail) | 1238 | init_x86_64(paddr_t first_avail) | |
1239 | { | 1239 | { | |
1240 | extern void consinit(void); | 1240 | extern void consinit(void); | |
1241 | struct region_descriptor region; | 1241 | struct region_descriptor region; | |
1242 | struct mem_segment_descriptor *ldt_segp; | 1242 | struct mem_segment_descriptor *ldt_segp; | |
1243 | int x; | 1243 | int x; | |
1244 | #ifndef XEN | 1244 | #ifndef XEN |
--- src/sys/arch/amiga/amiga/machdep.c 2008/11/25 15:51:34 1.211
+++ src/sys/arch/amiga/amiga/machdep.c 2008/11/30 18:21:32 1.212
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.211 2008/11/25 15:51:34 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.212 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. | 4 | * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -75,27 +75,27 @@ | @@ -75,27 +75,27 @@ | |||
75 | * from: Utah $Hdr: machdep.c 1.63 91/04/24$ | 75 | * from: Utah $Hdr: machdep.c 1.63 91/04/24$ | |
76 | * | 76 | * | |
77 | * @(#)machdep.c 7.16 (Berkeley) 6/3/91 | 77 | * @(#)machdep.c 7.16 (Berkeley) 6/3/91 | |
78 | */ | 78 | */ | |
79 | 79 | |||
80 | #include "opt_ddb.h" | 80 | #include "opt_ddb.h" | |
81 | #include "opt_compat_netbsd.h" | 81 | #include "opt_compat_netbsd.h" | |
82 | #include "opt_fpu_emulate.h" | 82 | #include "opt_fpu_emulate.h" | |
83 | #include "opt_lev6_defer.h" | 83 | #include "opt_lev6_defer.h" | |
84 | #include "opt_m060sp.h" | 84 | #include "opt_m060sp.h" | |
85 | #include "opt_panicbutton.h" | 85 | #include "opt_panicbutton.h" | |
86 | 86 | |||
87 | #include <sys/cdefs.h> | 87 | #include <sys/cdefs.h> | |
88 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211 2008/11/25 15:51:34 ad Exp $"); | 88 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.212 2008/11/30 18:21:32 martin Exp $"); | |
89 | 89 | |||
90 | #include <sys/param.h> | 90 | #include <sys/param.h> | |
91 | #include <sys/systm.h> | 91 | #include <sys/systm.h> | |
92 | #include <sys/callout.h> | 92 | #include <sys/callout.h> | |
93 | #include <sys/signalvar.h> | 93 | #include <sys/signalvar.h> | |
94 | #include <sys/kernel.h> | 94 | #include <sys/kernel.h> | |
95 | #include <sys/proc.h> | 95 | #include <sys/proc.h> | |
96 | #include <sys/buf.h> | 96 | #include <sys/buf.h> | |
97 | #include <sys/reboot.h> | 97 | #include <sys/reboot.h> | |
98 | #include <sys/conf.h> | 98 | #include <sys/conf.h> | |
99 | #include <sys/file.h> | 99 | #include <sys/file.h> | |
100 | #include <sys/malloc.h> | 100 | #include <sys/malloc.h> | |
101 | #include <sys/mbuf.h> | 101 | #include <sys/mbuf.h> | |
@@ -224,27 +224,27 @@ consinit() | @@ -224,27 +224,27 @@ consinit() | |||
224 | } else | 224 | } else | |
225 | #endif | 225 | #endif | |
226 | custom_chips_init(); | 226 | custom_chips_init(); | |
227 | /* | 227 | /* | |
228 | * Initialize the console before we print anything out. | 228 | * Initialize the console before we print anything out. | |
229 | */ | 229 | */ | |
230 | cninit(); | 230 | cninit(); | |
231 | 231 | |||
232 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 232 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
233 | { | 233 | { | |
234 | extern int end[]; | 234 | extern int end[]; | |
235 | extern int *esym; | 235 | extern int *esym; | |
236 | 236 | |||
237 | ksyms_init((int)esym - (int)&end - sizeof(Elf32_Ehdr), | 237 | ksyms_addsyms_elf((int)esym - (int)&end - sizeof(Elf32_Ehdr), | |
238 | (void *)&end, esym); | 238 | (void *)&end, esym); | |
239 | } | 239 | } | |
240 | #endif | 240 | #endif | |
241 | #ifdef DDB | 241 | #ifdef DDB | |
242 | if (boothowto & RB_KDB) | 242 | if (boothowto & RB_KDB) | |
243 | Debugger(); | 243 | Debugger(); | |
244 | #endif | 244 | #endif | |
245 | } | 245 | } | |
246 | 246 | |||
247 | /* | 247 | /* | |
248 | * cpu_startup: allocate memory for variable-sized tables, | 248 | * cpu_startup: allocate memory for variable-sized tables, | |
249 | * initialize CPU, and do autoconfiguration. | 249 | * initialize CPU, and do autoconfiguration. | |
250 | */ | 250 | */ |
--- src/sys/arch/arc/arc/machdep.c 2008/11/12 12:35:56 1.114
+++ src/sys/arch/arc/arc/machdep.c 2008/11/30 18:21:32 1.115
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.114 2008/11/12 12:35:56 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.115 2008/11/30 18:21:32 martin Exp $ */ | |
2 | /* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */ | 2 | /* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */ | |
3 | 3 | |||
4 | /* | 4 | /* | |
5 | * Copyright (c) 1992, 1993 | 5 | * Copyright (c) 1992, 1993 | |
6 | * The Regents of the University of California. All rights reserved. | 6 | * The Regents of the University of California. All rights reserved. | |
7 | * | 7 | * | |
8 | * This code is derived from software contributed to Berkeley by | 8 | * This code is derived from software contributed to Berkeley by | |
9 | * the Systems Programming Group of the University of Utah Computer | 9 | * the Systems Programming Group of the University of Utah Computer | |
10 | * Science Department, The Mach Operating System project at | 10 | * Science Department, The Mach Operating System project at | |
11 | * Carnegie-Mellon University and Ralph Campbell. | 11 | * Carnegie-Mellon University and Ralph Campbell. | |
12 | * | 12 | * | |
13 | * Redistribution and use in source and binary forms, with or without | 13 | * Redistribution and use in source and binary forms, with or without | |
14 | * modification, are permitted provided that the following conditions | 14 | * modification, are permitted provided that the following conditions | |
@@ -68,27 +68,27 @@ | @@ -68,27 +68,27 @@ | |||
68 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 68 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
69 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 69 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
70 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 70 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
71 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 71 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
72 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 72 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
73 | * SUCH DAMAGE. | 73 | * SUCH DAMAGE. | |
74 | * | 74 | * | |
75 | * from: @(#)machdep.c 8.3 (Berkeley) 1/12/94 | 75 | * from: @(#)machdep.c 8.3 (Berkeley) 1/12/94 | |
76 | */ | 76 | */ | |
77 | 77 | |||
78 | /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ | 78 | /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ | |
79 | 79 | |||
80 | #include <sys/cdefs.h> | 80 | #include <sys/cdefs.h> | |
81 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.114 2008/11/12 12:35:56 ad Exp $"); | 81 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.115 2008/11/30 18:21:32 martin Exp $"); | |
82 | 82 | |||
83 | #include "fs_mfs.h" | 83 | #include "fs_mfs.h" | |
84 | #include "opt_ddb.h" | 84 | #include "opt_ddb.h" | |
85 | #include "opt_ddbparam.h" | 85 | #include "opt_ddbparam.h" | |
86 | #include "opt_md.h" | 86 | #include "opt_md.h" | |
87 | 87 | |||
88 | #include <sys/param.h> | 88 | #include <sys/param.h> | |
89 | #include <sys/systm.h> | 89 | #include <sys/systm.h> | |
90 | #include <sys/signalvar.h> | 90 | #include <sys/signalvar.h> | |
91 | #include <sys/kernel.h> | 91 | #include <sys/kernel.h> | |
92 | #include <sys/proc.h> | 92 | #include <sys/proc.h> | |
93 | #include <sys/buf.h> | 93 | #include <sys/buf.h> | |
94 | #include <sys/reboot.h> | 94 | #include <sys/reboot.h> | |
@@ -406,31 +406,27 @@ mach_init(int argc, char *argv[], u_int | @@ -406,31 +406,27 @@ mach_init(int argc, char *argv[], u_int | |||
406 | 406 | |||
407 | #ifdef MFS | 407 | #ifdef MFS | |
408 | /* | 408 | /* | |
409 | * Check to see if a mini-root was loaded into memory. It resides | 409 | * Check to see if a mini-root was loaded into memory. It resides | |
410 | * at the start of the next page just after the end of BSS. | 410 | * at the start of the next page just after the end of BSS. | |
411 | */ | 411 | */ | |
412 | if (boothowto & RB_MINIROOT) | 412 | if (boothowto & RB_MINIROOT) | |
413 | kernend += round_page(mfs_initminiroot(kernend)); | 413 | kernend += round_page(mfs_initminiroot(kernend)); | |
414 | #endif | 414 | #endif | |
415 | 415 | |||
416 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 416 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
417 | /* init symbols if present */ | 417 | /* init symbols if present */ | |
418 | if (esym) | 418 | if (esym) | |
419 | ksyms_init(esym - ssym, ssym, esym); | 419 | ksyms_addsyms_elf(esym - ssym, ssym, esym); | |
420 | #ifdef SYMTAB_SPACE | |||
421 | else | |||
422 | ksyms_init(0, NULL, NULL); | |||
423 | #endif | |||
424 | #endif | 420 | #endif | |
425 | 421 | |||
426 | maxmem = physmem; | 422 | maxmem = physmem; | |
427 | 423 | |||
428 | /* XXX: revisit here */ | 424 | /* XXX: revisit here */ | |
429 | 425 | |||
430 | /* | 426 | /* | |
431 | * Load the rest of the pages into the VM system. | 427 | * Load the rest of the pages into the VM system. | |
432 | */ | 428 | */ | |
433 | kernstartpfn = atop(trunc_page( | 429 | kernstartpfn = atop(trunc_page( | |
434 | MIPS_KSEG0_TO_PHYS((kernel_text) - UPAGES * PAGE_SIZE))); | 430 | MIPS_KSEG0_TO_PHYS((kernel_text) - UPAGES * PAGE_SIZE))); | |
435 | kernendpfn = atop(round_page(MIPS_KSEG0_TO_PHYS(kernend))); | 431 | kernendpfn = atop(round_page(MIPS_KSEG0_TO_PHYS(kernend))); | |
436 | #if 0 | 432 | #if 0 |
--- src/sys/arch/arm/at91/at91bus.c 2008/11/12 12:35:57 1.3
+++ src/sys/arch/arm/at91/at91bus.c 2008/11/30 18:21:32 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: at91bus.c,v 1.3 2008/11/12 12:35:57 ad Exp $ */ | 1 | /* $NetBSD: at91bus.c,v 1.4 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2007 Embedtronics Oy | 4 | * Copyright (c) 2007 Embedtronics Oy | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -24,27 +24,27 @@ | @@ -24,27 +24,27 @@ | |||
24 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 24 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
25 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 25 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
26 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 26 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
27 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 27 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
30 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 30 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
31 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 31 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
33 | * POSSIBILITY OF SUCH DAMAGE. | 33 | * POSSIBILITY OF SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <sys/cdefs.h> | 36 | #include <sys/cdefs.h> | |
37 | __KERNEL_RCSID(0, "$NetBSD: at91bus.c,v 1.3 2008/11/12 12:35:57 ad Exp $"); | 37 | __KERNEL_RCSID(0, "$NetBSD: at91bus.c,v 1.4 2008/11/30 18:21:32 martin Exp $"); | |
38 | 38 | |||
39 | #include "opt_ddb.h" | 39 | #include "opt_ddb.h" | |
40 | #include "opt_kgdb.h" | 40 | #include "opt_kgdb.h" | |
41 | #include "opt_pmap_debug.h" | 41 | #include "opt_pmap_debug.h" | |
42 | 42 | |||
43 | #include <sys/param.h> | 43 | #include <sys/param.h> | |
44 | #include <sys/device.h> | 44 | #include <sys/device.h> | |
45 | #include <sys/systm.h> | 45 | #include <sys/systm.h> | |
46 | #include <sys/kernel.h> | 46 | #include <sys/kernel.h> | |
47 | #include <sys/exec.h> | 47 | #include <sys/exec.h> | |
48 | #include <sys/proc.h> | 48 | #include <sys/proc.h> | |
49 | #include <sys/msgbuf.h> | 49 | #include <sys/msgbuf.h> | |
50 | #include <sys/reboot.h> | 50 | #include <sys/reboot.h> | |
@@ -554,31 +554,26 @@ at91bus_setup(BootConfig *mem) | @@ -554,31 +554,26 @@ at91bus_setup(BootConfig *mem) | |||
554 | 554 | |||
555 | #ifdef BOOTHOWTO | 555 | #ifdef BOOTHOWTO | |
556 | boothowto = BOOTHOWTO; | 556 | boothowto = BOOTHOWTO; | |
557 | #endif | 557 | #endif | |
558 | boothowto = AB_VERBOSE | AB_DEBUG; // @@@@ | 558 | boothowto = AB_VERBOSE | AB_DEBUG; // @@@@ | |
559 | 559 | |||
560 | #ifdef IPKDB | 560 | #ifdef IPKDB | |
561 | /* Initialise ipkdb */ | 561 | /* Initialise ipkdb */ | |
562 | ipkdb_init(); | 562 | ipkdb_init(); | |
563 | if (boothowto & RB_KDB) | 563 | if (boothowto & RB_KDB) | |
564 | ipkdb_connect(0); | 564 | ipkdb_connect(0); | |
565 | #endif | 565 | #endif | |
566 | 566 | |||
567 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
568 | /* Firmware doesn't load symbols. */ | |||
569 | ksyms_init(0, NULL, NULL); | |||
570 | #endif | |||
571 | ||||
572 | #ifdef DDB | 567 | #ifdef DDB | |
573 | db_machine_init(); | 568 | db_machine_init(); | |
574 | if (boothowto & RB_KDB) | 569 | if (boothowto & RB_KDB) | |
575 | Debugger(); | 570 | Debugger(); | |
576 | #endif | 571 | #endif | |
577 | #if 0 | 572 | #if 0 | |
578 | printf("test data abort...\n"); | 573 | printf("test data abort...\n"); | |
579 | *((volatile uint32_t*)(0x1234567F)) = 0xdeadbeef; | 574 | *((volatile uint32_t*)(0x1234567F)) = 0xdeadbeef; | |
580 | #endif | 575 | #endif | |
581 | 576 | |||
582 | #ifdef VERBOSE_INIT_ARM | 577 | #ifdef VERBOSE_INIT_ARM | |
583 | printf("%s: returning new stack pointer 0x%lX\n", __FUNCTION__, (kernelstack.pv_va + USPACE_SVC_STACK_TOP)); | 578 | printf("%s: returning new stack pointer 0x%lX\n", __FUNCTION__, (kernelstack.pv_va + USPACE_SVC_STACK_TOP)); | |
584 | #endif | 579 | #endif |
--- src/sys/arch/arm/ofw/ofwgencfg_machdep.c 2008/11/12 12:35:57 1.14
+++ src/sys/arch/arm/ofw/ofwgencfg_machdep.c 2008/11/30 18:21:32 1.15
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ofwgencfg_machdep.c,v 1.14 2008/11/12 12:35:57 ad Exp $ */ | 1 | /* $NetBSD: ofwgencfg_machdep.c,v 1.15 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997 | 4 | * Copyright 1997 | |
5 | * Digital Equipment Corporation. All rights reserved. | 5 | * Digital Equipment Corporation. All rights reserved. | |
6 | * | 6 | * | |
7 | * This software is furnished under license and may be used and | 7 | * This software is furnished under license and may be used and | |
8 | * copied only in accordance with the following terms and conditions. | 8 | * copied only in accordance with the following terms and conditions. | |
9 | * Subject to these conditions, you may download, copy, install, | 9 | * Subject to these conditions, you may download, copy, install, | |
10 | * use, modify and distribute this software in source and/or binary | 10 | * use, modify and distribute this software in source and/or binary | |
11 | * form. No title or ownership is transferred hereby. | 11 | * form. No title or ownership is transferred hereby. | |
12 | * | 12 | * | |
13 | * 1) Any source code used, modified or distributed must reproduce | 13 | * 1) Any source code used, modified or distributed must reproduce | |
14 | * and retain this copyright notice and list of conditions as | 14 | * and retain this copyright notice and list of conditions as | |
@@ -28,27 +28,27 @@ | @@ -28,27 +28,27 @@ | |||
28 | * liable for any damages whatsoever, and in particular, DIGITAL | 28 | * liable for any damages whatsoever, and in particular, DIGITAL | |
29 | * shall not be liable for special, indirect, consequential, or | 29 | * shall not be liable for special, indirect, consequential, or | |
30 | * incidental damages or damages for lost profits, loss of | 30 | * incidental damages or damages for lost profits, loss of | |
31 | * revenue or loss of use, whether such damages arise in contract, | 31 | * revenue or loss of use, whether such damages arise in contract, | |
32 | * negligence, tort, under statute, in equity, at law or otherwise, | 32 | * negligence, tort, under statute, in equity, at law or otherwise, | |
33 | * even if advised of the possibility of such damage. | 33 | * even if advised of the possibility of such damage. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | /* | 36 | /* | |
37 | * Kernel setup for the OFW Generic Configuration | 37 | * Kernel setup for the OFW Generic Configuration | |
38 | */ | 38 | */ | |
39 | 39 | |||
40 | #include <sys/cdefs.h> | 40 | #include <sys/cdefs.h> | |
41 | __KERNEL_RCSID(0, "$NetBSD: ofwgencfg_machdep.c,v 1.14 2008/11/12 12:35:57 ad Exp $"); | 41 | __KERNEL_RCSID(0, "$NetBSD: ofwgencfg_machdep.c,v 1.15 2008/11/30 18:21:32 martin Exp $"); | |
42 | 42 | |||
43 | #include "opt_ddb.h" | 43 | #include "opt_ddb.h" | |
44 | 44 | |||
45 | #include <sys/types.h> | 45 | #include <sys/types.h> | |
46 | #include <sys/param.h> | 46 | #include <sys/param.h> | |
47 | #include <sys/systm.h> | 47 | #include <sys/systm.h> | |
48 | #include <sys/reboot.h> | 48 | #include <sys/reboot.h> | |
49 | #include <sys/proc.h> | 49 | #include <sys/proc.h> | |
50 | #include <sys/kernel.h> | 50 | #include <sys/kernel.h> | |
51 | #include <sys/exec.h> | 51 | #include <sys/exec.h> | |
52 | #include <sys/ksyms.h> | 52 | #include <sys/ksyms.h> | |
53 | 53 | |||
54 | #include <uvm/uvm_extern.h> | 54 | #include <uvm/uvm_extern.h> | |
@@ -192,30 +192,26 @@ initarm(void *cookie) | @@ -192,30 +192,26 @@ initarm(void *cookie) | |||
192 | ARM_VEC_ALL & ~(ARM_VEC_RESET|ARM_VEC_IRQ|ARM_VEC_FIQ)); | 192 | ARM_VEC_ALL & ~(ARM_VEC_RESET|ARM_VEC_IRQ|ARM_VEC_FIQ)); | |
193 | 193 | |||
194 | data_abort_handler_address = (u_int)data_abort_handler; | 194 | data_abort_handler_address = (u_int)data_abort_handler; | |
195 | prefetch_abort_handler_address = (u_int)prefetch_abort_handler; | 195 | prefetch_abort_handler_address = (u_int)prefetch_abort_handler; | |
196 | undefined_handler_address = | 196 | undefined_handler_address = | |
197 | (u_int)undefinedinstruction_bounce; /* why is this needed? -JJK */ | 197 | (u_int)undefinedinstruction_bounce; /* why is this needed? -JJK */ | |
198 | 198 | |||
199 | /* Initialise the undefined instruction handlers. */ | 199 | /* Initialise the undefined instruction handlers. */ | |
200 | undefined_init(); | 200 | undefined_init(); | |
201 | 201 | |||
202 | /* Set-up the IRQ system. */ | 202 | /* Set-up the IRQ system. */ | |
203 | irq_init(); | 203 | irq_init(); | |
204 | 204 | |||
205 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
206 | ksyms_init(0, NULL, NULL); /* XXX */ | |||
207 | #endif | |||
208 | ||||
209 | #ifdef DDB | 205 | #ifdef DDB | |
210 | db_machine_init(); | 206 | db_machine_init(); | |
211 | if (boothowto & RB_KDB) | 207 | if (boothowto & RB_KDB) | |
212 | Debugger(); | 208 | Debugger(); | |
213 | #endif | 209 | #endif | |
214 | 210 | |||
215 | /* Return the new stackbase. */ | 211 | /* Return the new stackbase. */ | |
216 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 212 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
217 | } | 213 | } | |
218 | 214 | |||
219 | 215 | |||
220 | /* | 216 | /* | |
221 | * Set various globals based on contents of boot_args | 217 | * Set various globals based on contents of boot_args |
--- src/sys/arch/atari/atari/machdep.c 2008/11/25 15:51:34 1.153
+++ src/sys/arch/atari/atari/machdep.c 2008/11/30 18:21:32 1.154
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.153 2008/11/25 15:51:34 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.154 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. | 4 | * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -67,27 +67,27 @@ | @@ -67,27 +67,27 @@ | |||
67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
72 | * SUCH DAMAGE. | 72 | * SUCH DAMAGE. | |
73 | * | 73 | * | |
74 | * from: Utah $Hdr: machdep.c 1.63 91/04/24$ | 74 | * from: Utah $Hdr: machdep.c 1.63 91/04/24$ | |
75 | * | 75 | * | |
76 | * @(#)machdep.c 7.16 (Berkeley) 6/3/91 | 76 | * @(#)machdep.c 7.16 (Berkeley) 6/3/91 | |
77 | */ | 77 | */ | |
78 | 78 | |||
79 | #include <sys/cdefs.h> | 79 | #include <sys/cdefs.h> | |
80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.153 2008/11/25 15:51:34 ad Exp $"); | 80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.154 2008/11/30 18:21:32 martin Exp $"); | |
81 | 81 | |||
82 | #include "opt_ddb.h" | 82 | #include "opt_ddb.h" | |
83 | #include "opt_compat_netbsd.h" | 83 | #include "opt_compat_netbsd.h" | |
84 | #include "opt_mbtype.h" | 84 | #include "opt_mbtype.h" | |
85 | #include "opt_panicbutton.h" | 85 | #include "opt_panicbutton.h" | |
86 | 86 | |||
87 | #include <sys/param.h> | 87 | #include <sys/param.h> | |
88 | #include <sys/systm.h> | 88 | #include <sys/systm.h> | |
89 | #include <sys/signalvar.h> | 89 | #include <sys/signalvar.h> | |
90 | #include <sys/kernel.h> | 90 | #include <sys/kernel.h> | |
91 | #include <sys/proc.h> | 91 | #include <sys/proc.h> | |
92 | #include <sys/buf.h> | 92 | #include <sys/buf.h> | |
93 | #include <sys/reboot.h> | 93 | #include <sys/reboot.h> | |
@@ -194,29 +194,29 @@ consinit(void) | @@ -194,29 +194,29 @@ consinit(void) | |||
194 | config_console(); | 194 | config_console(); | |
195 | 195 | |||
196 | /* | 196 | /* | |
197 | * Now pick the best console candidate. | 197 | * Now pick the best console candidate. | |
198 | */ | 198 | */ | |
199 | cninit(); | 199 | cninit(); | |
200 | 200 | |||
201 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 201 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
202 | { | 202 | { | |
203 | extern int end; | 203 | extern int end; | |
204 | extern int *esym; | 204 | extern int *esym; | |
205 | 205 | |||
206 | #ifndef __ELF__ | 206 | #ifndef __ELF__ | |
207 | ksyms_init(*(int *)&end, ((int *)&end) + 1, esym); | 207 | ksyms_addsyms_elf(*(int *)&end, ((int *)&end) + 1, esym); | |
208 | #else | 208 | #else | |
209 | ksyms_init((int)esym - (int)&end - sizeof(Elf32_Ehdr), | 209 | ksyms_addsyms_elf((int)esym - (int)&end - sizeof(Elf32_Ehdr), | |
210 | (void *)&end, esym); | 210 | (void *)&end, esym); | |
211 | #endif | 211 | #endif | |
212 | } | 212 | } | |
213 | #endif | 213 | #endif | |
214 | #if defined (DDB) | 214 | #if defined (DDB) | |
215 | if(boothowto & RB_KDB) | 215 | if(boothowto & RB_KDB) | |
216 | Debugger(); | 216 | Debugger(); | |
217 | #endif | 217 | #endif | |
218 | } | 218 | } | |
219 | 219 | |||
220 | /* | 220 | /* | |
221 | * cpu_startup: allocate memory for variable-sized tables, | 221 | * cpu_startup: allocate memory for variable-sized tables, | |
222 | * initialize CPU, and do autoconfiguration. | 222 | * initialize CPU, and do autoconfiguration. |
--- src/sys/arch/cats/cats/cats_machdep.c 2008/11/12 12:35:57 1.62
+++ src/sys/arch/cats/cats/cats_machdep.c 2008/11/30 18:21:32 1.63
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cats_machdep.c,v 1.62 2008/11/12 12:35:57 ad Exp $ */ | 1 | /* $NetBSD: cats_machdep.c,v 1.63 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1997,1998 Mark Brinicombe. | 4 | * Copyright (c) 1997,1998 Mark Brinicombe. | |
5 | * Copyright (c) 1997,1998 Causality Limited. | 5 | * Copyright (c) 1997,1998 Causality Limited. | |
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 | |
@@ -30,27 +30,27 @@ | @@ -30,27 +30,27 @@ | |||
30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
34 | * SUCH DAMAGE. | 34 | * SUCH DAMAGE. | |
35 | * | 35 | * | |
36 | * Machine dependant functions for kernel setup for EBSA285 core architecture | 36 | * Machine dependant functions for kernel setup for EBSA285 core architecture | |
37 | * using cyclone firmware | 37 | * using cyclone firmware | |
38 | * | 38 | * | |
39 | * Created : 24/11/97 | 39 | * Created : 24/11/97 | |
40 | */ | 40 | */ | |
41 | 41 | |||
42 | #include <sys/cdefs.h> | 42 | #include <sys/cdefs.h> | |
43 | __KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.62 2008/11/12 12:35:57 ad Exp $"); | 43 | __KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.63 2008/11/30 18:21:32 martin Exp $"); | |
44 | 44 | |||
45 | #include "opt_ddb.h" | 45 | #include "opt_ddb.h" | |
46 | #include "opt_pmap_debug.h" | 46 | #include "opt_pmap_debug.h" | |
47 | 47 | |||
48 | #include "isadma.h" | 48 | #include "isadma.h" | |
49 | 49 | |||
50 | #include <sys/param.h> | 50 | #include <sys/param.h> | |
51 | #include <sys/device.h> | 51 | #include <sys/device.h> | |
52 | #include <sys/systm.h> | 52 | #include <sys/systm.h> | |
53 | #include <sys/kernel.h> | 53 | #include <sys/kernel.h> | |
54 | #include <sys/exec.h> | 54 | #include <sys/exec.h> | |
55 | #include <sys/proc.h> | 55 | #include <sys/proc.h> | |
56 | #include <sys/msgbuf.h> | 56 | #include <sys/msgbuf.h> | |
@@ -873,37 +873,32 @@ initarm(void *arm_bootargs) | @@ -873,37 +873,32 @@ initarm(void *arm_bootargs) | |||
873 | #endif /* NISADMA > 0 */ | 873 | #endif /* NISADMA > 0 */ | |
874 | } | 874 | } | |
875 | 875 | |||
876 | /* Boot strap pmap telling it where the kernel page table is */ | 876 | /* Boot strap pmap telling it where the kernel page table is */ | |
877 | printf("pmap "); | 877 | printf("pmap "); | |
878 | pmap_bootstrap(KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); | 878 | pmap_bootstrap(KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); | |
879 | 879 | |||
880 | /* Setup the IRQ system */ | 880 | /* Setup the IRQ system */ | |
881 | printf("irq "); | 881 | printf("irq "); | |
882 | footbridge_intr_init(); | 882 | footbridge_intr_init(); | |
883 | printf("done.\n"); | 883 | printf("done.\n"); | |
884 | 884 | |||
885 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 885 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
886 | #ifdef __ELF__ | 886 | #ifndef __ELF__ /* XXX */ | |
887 | /* ok this is really rather sick, in ELF what happens is that the | |||
888 | * ELF symbol table is added after the text section. | |||
889 | */ | |||
890 | ksyms_init(0, NULL, NULL); /* XXX */ | |||
891 | #else | |||
892 | { | 887 | { | |
893 | extern int end; | 888 | extern int end; | |
894 | extern int *esym; | 889 | extern int *esym; | |
895 | 890 | |||
896 | ksyms_init(*(int *)&end, ((int *)&end) + 1, esym); | 891 | ksyms_addsyms_elf(*(int *)&end, ((int *)&end) + 1, esym); | |
897 | } | 892 | } | |
898 | #endif /* __ELF__ */ | 893 | #endif /* __ELF__ */ | |
899 | #endif | 894 | #endif | |
900 | 895 | |||
901 | #ifdef DDB | 896 | #ifdef DDB | |
902 | db_machine_init(); | 897 | db_machine_init(); | |
903 | if (boothowto & RB_KDB) | 898 | if (boothowto & RB_KDB) | |
904 | Debugger(); | 899 | Debugger(); | |
905 | #endif | 900 | #endif | |
906 | 901 | |||
907 | /* We return the new stack pointer address */ | 902 | /* We return the new stack pointer address */ | |
908 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 903 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
909 | } | 904 | } |
--- src/sys/arch/cesfic/cesfic/machdep.c 2008/11/12 12:35:57 1.44
+++ src/sys/arch/cesfic/cesfic/machdep.c 2008/11/30 18:21:32 1.45
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.44 2008/11/12 12:35:57 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.45 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1990, 1993 | 4 | * Copyright (c) 1982, 1986, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -67,27 +67,27 @@ | @@ -67,27 +67,27 @@ | |||
67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
72 | * SUCH DAMAGE. | 72 | * SUCH DAMAGE. | |
73 | * | 73 | * | |
74 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | 74 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | |
75 | * | 75 | * | |
76 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | 76 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | |
77 | */ | 77 | */ | |
78 | 78 | |||
79 | #include <sys/cdefs.h> | 79 | #include <sys/cdefs.h> | |
80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2008/11/12 12:35:57 ad Exp $"); | 80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.45 2008/11/30 18:21:32 martin Exp $"); | |
81 | 81 | |||
82 | #include "opt_bufcache.h" | 82 | #include "opt_bufcache.h" | |
83 | #include "opt_ddb.h" | 83 | #include "opt_ddb.h" | |
84 | #include "opt_kgdb.h" | 84 | #include "opt_kgdb.h" | |
85 | #include "opt_compat_netbsd.h" | 85 | #include "opt_compat_netbsd.h" | |
86 | #include "opt_sysv.h" | 86 | #include "opt_sysv.h" | |
87 | #include "opt_panicbutton.h" | 87 | #include "opt_panicbutton.h" | |
88 | 88 | |||
89 | #include <sys/param.h> | 89 | #include <sys/param.h> | |
90 | #include <sys/systm.h> | 90 | #include <sys/systm.h> | |
91 | #include <sys/buf.h> | 91 | #include <sys/buf.h> | |
92 | #include <sys/callout.h> | 92 | #include <sys/callout.h> | |
93 | #include <sys/conf.h> | 93 | #include <sys/conf.h> | |
@@ -262,29 +262,26 @@ consinit() | @@ -262,29 +262,26 @@ consinit() | |||
262 | zs_cnattach((void*)virtual_avail); | 262 | zs_cnattach((void*)virtual_avail); | |
263 | virtual_avail += PAGE_SIZE; | 263 | virtual_avail += PAGE_SIZE; | |
264 | 264 | |||
265 | #ifdef KGDB | 265 | #ifdef KGDB | |
266 | kgdb_dev = 1; | 266 | kgdb_dev = 1; | |
267 | kgdb_attach((void*)zscngetc, (void*)zscnputc, (void *)0); | 267 | kgdb_attach((void*)zscngetc, (void*)zscnputc, (void *)0); | |
268 | 268 | |||
269 | if (boothowto & RB_KDB) { | 269 | if (boothowto & RB_KDB) { | |
270 | kgdb_connect(1); | 270 | kgdb_connect(1); | |
271 | zscons.cn_putc = zs_kgdb_cnputc; | 271 | zscons.cn_putc = zs_kgdb_cnputc; | |
272 | zscons.cn_getc = zs_kgdb_cngetc; | 272 | zscons.cn_getc = zs_kgdb_cngetc; | |
273 | } | 273 | } | |
274 | #endif | 274 | #endif | |
275 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
276 | ksyms_init(0, 0, 0); | |||
277 | #endif | |||
278 | #ifdef DDB | 275 | #ifdef DDB | |
279 | if (boothowto & RB_KDB) | 276 | if (boothowto & RB_KDB) | |
280 | Debugger(); | 277 | Debugger(); | |
281 | #endif | 278 | #endif | |
282 | sic_enable_int(39, 2, 1, 7, 0); /* NMI */ | 279 | sic_enable_int(39, 2, 1, 7, 0); /* NMI */ | |
283 | } | 280 | } | |
284 | 281 | |||
285 | /* | 282 | /* | |
286 | * cpu_startup: allocate memory for variable-sized tables, | 283 | * cpu_startup: allocate memory for variable-sized tables, | |
287 | * initialize CPU, and do autoconfiguration. | 284 | * initialize CPU, and do autoconfiguration. | |
288 | */ | 285 | */ | |
289 | void | 286 | void | |
290 | cpu_startup() | 287 | cpu_startup() |
--- src/sys/arch/cobalt/cobalt/machdep.c 2008/11/12 12:35:58 1.100
+++ src/sys/arch/cobalt/cobalt/machdep.c 2008/11/30 18:21:32 1.101
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.100 2008/11/12 12:35:58 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.101 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. | 4 | * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -40,27 +40,27 @@ | @@ -40,27 +40,27 @@ | |||
40 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 40 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
42 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 42 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
43 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 43 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
44 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 44 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
45 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 45 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
46 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 46 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
47 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 47 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
48 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 48 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
49 | * SUCH DAMAGE. | 49 | * SUCH DAMAGE. | |
50 | */ | 50 | */ | |
51 | 51 | |||
52 | #include <sys/cdefs.h> | 52 | #include <sys/cdefs.h> | |
53 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.100 2008/11/12 12:35:58 ad Exp $"); | 53 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.101 2008/11/30 18:21:32 martin Exp $"); | |
54 | 54 | |||
55 | #include "opt_ddb.h" | 55 | #include "opt_ddb.h" | |
56 | #include "opt_kgdb.h" | 56 | #include "opt_kgdb.h" | |
57 | #include "opt_execfmt.h" | 57 | #include "opt_execfmt.h" | |
58 | 58 | |||
59 | #include <sys/param.h> | 59 | #include <sys/param.h> | |
60 | #include <sys/systm.h> | 60 | #include <sys/systm.h> | |
61 | #include <sys/kernel.h> | 61 | #include <sys/kernel.h> | |
62 | #include <sys/proc.h> | 62 | #include <sys/proc.h> | |
63 | #include <sys/reboot.h> | 63 | #include <sys/reboot.h> | |
64 | #include <sys/user.h> | 64 | #include <sys/user.h> | |
65 | #include <sys/mount.h> | 65 | #include <sys/mount.h> | |
66 | #include <sys/kcore.h> | 66 | #include <sys/kcore.h> | |
@@ -277,29 +277,27 @@ mach_init(unsigned int memsize, u_int bi | @@ -277,29 +277,27 @@ mach_init(unsigned int memsize, u_int bi | |||
277 | mem_clusters[0].start = 0; | 277 | mem_clusters[0].start = 0; | |
278 | mem_clusters[0].size = ctob(physmem) - 512; | 278 | mem_clusters[0].size = ctob(physmem) - 512; | |
279 | mem_cluster_cnt = 1; | 279 | mem_cluster_cnt = 1; | |
280 | 280 | |||
281 | memcpy(bootstring, (char *)(memsize - 512), 512); | 281 | memcpy(bootstring, (char *)(memsize - 512), 512); | |
282 | memset((char *)(memsize - 512), 0, 512); | 282 | memset((char *)(memsize - 512), 0, 512); | |
283 | bootstring[511] = '\0'; | 283 | bootstring[511] = '\0'; | |
284 | 284 | |||
285 | decode_bootstring(); | 285 | decode_bootstring(); | |
286 | 286 | |||
287 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 287 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
288 | /* init symbols if present */ | 288 | /* init symbols if present */ | |
289 | if ((bi_syms != NULL) && (esym != NULL)) | 289 | if ((bi_syms != NULL) && (esym != NULL)) | |
290 | ksyms_init(esym - ssym, ssym, esym); | 290 | ksyms_addsyms_elf(esym - ssym, ssym, esym); | |
291 | else | |||
292 | ksyms_init(0, NULL, NULL); | |||
293 | #endif | 291 | #endif | |
294 | #ifdef DDB | 292 | #ifdef DDB | |
295 | if (boothowto & RB_KDB) | 293 | if (boothowto & RB_KDB) | |
296 | Debugger(); | 294 | Debugger(); | |
297 | #endif | 295 | #endif | |
298 | #ifdef KGDB | 296 | #ifdef KGDB | |
299 | if (boothowto & RB_KDB) | 297 | if (boothowto & RB_KDB) | |
300 | kgdb_connect(0); | 298 | kgdb_connect(0); | |
301 | #endif | 299 | #endif | |
302 | 300 | |||
303 | /* | 301 | /* | |
304 | * Load the rest of the available pages into the VM system. | 302 | * Load the rest of the available pages into the VM system. | |
305 | */ | 303 | */ |
--- src/sys/arch/dreamcast/dreamcast/machdep.c 2008/11/12 12:35:58 1.38
+++ src/sys/arch/dreamcast/dreamcast/machdep.c 2008/11/30 18:21:32 1.39
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.38 2008/11/12 12:35:58 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.39 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996, 1997, 1998, 2002 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996, 1997, 1998, 2002 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 Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace | 8 | * by Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace | |
9 | * Simulation Facility, NASA Ames Research Center. | 9 | * Simulation Facility, NASA Ames Research Center. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -55,27 +55,27 @@ | @@ -55,27 +55,27 @@ | |||
55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
62 | * SUCH DAMAGE. | 62 | * SUCH DAMAGE. | |
63 | * | 63 | * | |
64 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | 64 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | |
65 | */ | 65 | */ | |
66 | 66 | |||
67 | #include <sys/cdefs.h> | 67 | #include <sys/cdefs.h> | |
68 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.38 2008/11/12 12:35:58 ad Exp $"); | 68 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.39 2008/11/30 18:21:32 martin Exp $"); | |
69 | 69 | |||
70 | #include "opt_ddb.h" | 70 | #include "opt_ddb.h" | |
71 | #include "opt_kgdb.h" | 71 | #include "opt_kgdb.h" | |
72 | #include "opt_memsize.h" | 72 | #include "opt_memsize.h" | |
73 | #include "scif.h" | 73 | #include "scif.h" | |
74 | #include "opt_kloader.h" | 74 | #include "opt_kloader.h" | |
75 | 75 | |||
76 | #include <sys/param.h> | 76 | #include <sys/param.h> | |
77 | #include <sys/systm.h> | 77 | #include <sys/systm.h> | |
78 | #include <sys/kernel.h> | 78 | #include <sys/kernel.h> | |
79 | #include <sys/user.h> | 79 | #include <sys/user.h> | |
80 | #include <sys/mount.h> | 80 | #include <sys/mount.h> | |
81 | #include <sys/reboot.h> | 81 | #include <sys/reboot.h> | |
@@ -129,29 +129,26 @@ dreamcast_startup(void) | @@ -129,29 +129,26 @@ dreamcast_startup(void) | |||
129 | kernend = atop(round_page(SH3_P1SEG_TO_PHYS(end))); | 129 | kernend = atop(round_page(SH3_P1SEG_TO_PHYS(end))); | |
130 | uvm_page_physload( | 130 | uvm_page_physload( | |
131 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | 131 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | |
132 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | 132 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | |
133 | VM_FREELIST_DEFAULT); | 133 | VM_FREELIST_DEFAULT); | |
134 | 134 | |||
135 | /* Initialize proc0 u-area */ | 135 | /* Initialize proc0 u-area */ | |
136 | sh_proc0_init(); | 136 | sh_proc0_init(); | |
137 | 137 | |||
138 | /* Initialize pmap and start to address translation */ | 138 | /* Initialize pmap and start to address translation */ | |
139 | pmap_bootstrap(); | 139 | pmap_bootstrap(); | |
140 | 140 | |||
141 | /* Debugger. */ | 141 | /* Debugger. */ | |
142 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
143 | ksyms_init(0, NULL, NULL); | |||
144 | #endif | |||
145 | #if defined(KGDB) && (NSCIF > 0) | 142 | #if defined(KGDB) && (NSCIF > 0) | |
146 | if (scif_kgdb_init() == 0) { | 143 | if (scif_kgdb_init() == 0) { | |
147 | kgdb_debug_init = 1; | 144 | kgdb_debug_init = 1; | |
148 | kgdb_connect(1); | 145 | kgdb_connect(1); | |
149 | } | 146 | } | |
150 | #endif /* KGDB && NSCIF > 0 */ | 147 | #endif /* KGDB && NSCIF > 0 */ | |
151 | 148 | |||
152 | /* Jump to main */ | 149 | /* Jump to main */ | |
153 | __asm volatile( | 150 | __asm volatile( | |
154 | "jmp @%0;" | 151 | "jmp @%0;" | |
155 | "mov %1, sp" | 152 | "mov %1, sp" | |
156 | :: "r"(main),"r"(lwp0.l_md.md_pcb->pcb_sf.sf_r7_bank)); | 153 | :: "r"(main),"r"(lwp0.l_md.md_pcb->pcb_sf.sf_r7_bank)); | |
157 | /* NOTREACHED */ | 154 | /* NOTREACHED */ |
--- src/sys/arch/evbarm/adi_brh/brh_machdep.c 2008/11/12 12:35:58 1.30
+++ src/sys/arch/evbarm/adi_brh/brh_machdep.c 2008/11/30 18:21:32 1.31
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: brh_machdep.c,v 1.30 2008/11/12 12:35:58 ad Exp $ */ | 1 | /* $NetBSD: brh_machdep.c,v 1.31 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | 4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Jason R. Thorpe for Wasabi Systems, Inc. | 7 | * Written by Jason R. Thorpe 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 | |
@@ -63,27 +63,27 @@ | @@ -63,27 +63,27 @@ | |||
63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
69 | * SUCH DAMAGE. | 69 | * SUCH DAMAGE. | |
70 | * | 70 | * | |
71 | * Machine dependant functions for kernel setup for the ADI Engineering | 71 | * Machine dependant functions for kernel setup for the ADI Engineering | |
72 | * BRH i80200 evaluation platform. | 72 | * BRH i80200 evaluation platform. | |
73 | */ | 73 | */ | |
74 | 74 | |||
75 | #include <sys/cdefs.h> | 75 | #include <sys/cdefs.h> | |
76 | __KERNEL_RCSID(0, "$NetBSD: brh_machdep.c,v 1.30 2008/11/12 12:35:58 ad Exp $"); | 76 | __KERNEL_RCSID(0, "$NetBSD: brh_machdep.c,v 1.31 2008/11/30 18:21:32 martin Exp $"); | |
77 | 77 | |||
78 | #include "opt_ddb.h" | 78 | #include "opt_ddb.h" | |
79 | #include "opt_pmap_debug.h" | 79 | #include "opt_pmap_debug.h" | |
80 | 80 | |||
81 | #include <sys/param.h> | 81 | #include <sys/param.h> | |
82 | #include <sys/device.h> | 82 | #include <sys/device.h> | |
83 | #include <sys/systm.h> | 83 | #include <sys/systm.h> | |
84 | #include <sys/kernel.h> | 84 | #include <sys/kernel.h> | |
85 | #include <sys/exec.h> | 85 | #include <sys/exec.h> | |
86 | #include <sys/proc.h> | 86 | #include <sys/proc.h> | |
87 | #include <sys/msgbuf.h> | 87 | #include <sys/msgbuf.h> | |
88 | #include <sys/reboot.h> | 88 | #include <sys/reboot.h> | |
89 | #include <sys/termios.h> | 89 | #include <sys/termios.h> | |
@@ -793,31 +793,26 @@ initarm(void *arg) | @@ -793,31 +793,26 @@ initarm(void *arg) | |||
793 | printf("pmap "); | 793 | printf("pmap "); | |
794 | #endif | 794 | #endif | |
795 | pmap_bootstrap(KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); | 795 | pmap_bootstrap(KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); | |
796 | 796 | |||
797 | /* Setup the IRQ system */ | 797 | /* Setup the IRQ system */ | |
798 | #ifdef VERBOSE_INIT_ARM | 798 | #ifdef VERBOSE_INIT_ARM | |
799 | printf("irq "); | 799 | printf("irq "); | |
800 | #endif | 800 | #endif | |
801 | becc_intr_init(); | 801 | becc_intr_init(); | |
802 | #ifdef VERBOSE_INIT_ARM | 802 | #ifdef VERBOSE_INIT_ARM | |
803 | printf("done.\n"); | 803 | printf("done.\n"); | |
804 | #endif | 804 | #endif | |
805 | 805 | |||
806 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
807 | /* Firmware doesn't load symbols. */ | |||
808 | ksyms_init(0, NULL, NULL); | |||
809 | #endif | |||
810 | ||||
811 | #ifdef DDB | 806 | #ifdef DDB | |
812 | db_machine_init(); | 807 | db_machine_init(); | |
813 | if (boothowto & RB_KDB) | 808 | if (boothowto & RB_KDB) | |
814 | Debugger(); | 809 | Debugger(); | |
815 | #endif | 810 | #endif | |
816 | 811 | |||
817 | /* We return the new stack pointer address */ | 812 | /* We return the new stack pointer address */ | |
818 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 813 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
819 | } | 814 | } | |
820 | 815 | |||
821 | void | 816 | void | |
822 | consinit(void) | 817 | consinit(void) | |
823 | { | 818 | { |
--- src/sys/arch/evbarm/armadillo/armadillo9_machdep.c 2008/11/12 12:35:58 1.13
+++ src/sys/arch/evbarm/armadillo/armadillo9_machdep.c 2008/11/30 18:21:32 1.14
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: armadillo9_machdep.c,v 1.13 2008/11/12 12:35:58 ad Exp $ */ | 1 | /* $NetBSD: armadillo9_machdep.c,v 1.14 2008/11/30 18:21:32 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | 4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Based on code written by Jason R. Thorpe and Steve C. Woodford for | 7 | * Based on code written by Jason R. Thorpe and Steve C. Woodford for | |
8 | * Wasabi Systems, Inc. | 8 | * 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. | |
@@ -100,27 +100,27 @@ | @@ -100,27 +100,27 @@ | |||
100 | 800a 0000 - 800f ffff EP9315 Internal Register (AHB) | 100 | 800a 0000 - 800f ffff EP9315 Internal Register (AHB) | |
101 | 8010 0000 - 807f ffff reserved | 101 | 8010 0000 - 807f ffff reserved | |
102 | 8080 0000 - 8094 ffff EP9315 Internal Register (APB) | 102 | 8080 0000 - 8094 ffff EP9315 Internal Register (APB) | |
103 | 8095 0000 - 8fff ffff reserved | 103 | 8095 0000 - 8fff ffff reserved | |
104 | 9000 0000 - bfff ffff reserved | 104 | 9000 0000 - bfff ffff reserved | |
105 | c000 0000 - c1ff ffff SDRAM (32MByte) | 105 | c000 0000 - c1ff ffff SDRAM (32MByte) | |
106 | c200 0000 - c3ff ffff reserved | 106 | c200 0000 - c3ff ffff reserved | |
107 | c400 0000 - c5ff ffff SDRAM (32MByte) | 107 | c400 0000 - c5ff ffff SDRAM (32MByte) | |
108 | c600 0000 - cfff ffff reserved | 108 | c600 0000 - cfff ffff reserved | |
109 | d000 0000 - ffff ffff reserved | 109 | d000 0000 - ffff ffff reserved | |
110 | */ | 110 | */ | |
111 | 111 | |||
112 | #include <sys/cdefs.h> | 112 | #include <sys/cdefs.h> | |
113 | __KERNEL_RCSID(0, "$NetBSD: armadillo9_machdep.c,v 1.13 2008/11/12 12:35:58 ad Exp $"); | 113 | __KERNEL_RCSID(0, "$NetBSD: armadillo9_machdep.c,v 1.14 2008/11/30 18:21:32 martin Exp $"); | |
114 | 114 | |||
115 | #include "opt_ddb.h" | 115 | #include "opt_ddb.h" | |
116 | #include "opt_kgdb.h" | 116 | #include "opt_kgdb.h" | |
117 | #include "opt_pmap_debug.h" | 117 | #include "opt_pmap_debug.h" | |
118 | 118 | |||
119 | #include <sys/param.h> | 119 | #include <sys/param.h> | |
120 | #include <sys/device.h> | 120 | #include <sys/device.h> | |
121 | #include <sys/systm.h> | 121 | #include <sys/systm.h> | |
122 | #include <sys/kernel.h> | 122 | #include <sys/kernel.h> | |
123 | #include <sys/exec.h> | 123 | #include <sys/exec.h> | |
124 | #include <sys/proc.h> | 124 | #include <sys/proc.h> | |
125 | #include <sys/msgbuf.h> | 125 | #include <sys/msgbuf.h> | |
126 | #include <sys/reboot.h> | 126 | #include <sys/reboot.h> | |
@@ -871,31 +871,26 @@ initarm(void *arg) | @@ -871,31 +871,26 @@ initarm(void *arg) | |||
871 | #endif | 871 | #endif | |
872 | isa_armadillo9_init(ARMADILLO9_IO16_VBASE + ARMADILLO9_ISAIO, | 872 | isa_armadillo9_init(ARMADILLO9_IO16_VBASE + ARMADILLO9_ISAIO, | |
873 | ARMADILLO9_IO16_VBASE + ARMADILLO9_ISAMEM); | 873 | ARMADILLO9_IO16_VBASE + ARMADILLO9_ISAMEM); | |
874 | #endif | 874 | #endif | |
875 | 875 | |||
876 | #ifdef VERBOSE_INIT_ARM | 876 | #ifdef VERBOSE_INIT_ARM | |
877 | printf("done.\n"); | 877 | printf("done.\n"); | |
878 | #endif | 878 | #endif | |
879 | 879 | |||
880 | #ifdef BOOTHOWTO | 880 | #ifdef BOOTHOWTO | |
881 | boothowto = BOOTHOWTO; | 881 | boothowto = BOOTHOWTO; | |
882 | #endif | 882 | #endif | |
883 | 883 | |||
884 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
885 | /* Firmware doesn't load symbols. */ | |||
886 | ksyms_init(0, NULL, NULL); | |||
887 | #endif | |||
888 | ||||
889 | #ifdef DDB | 884 | #ifdef DDB | |
890 | db_machine_init(); | 885 | db_machine_init(); | |
891 | if (boothowto & RB_KDB) | 886 | if (boothowto & RB_KDB) | |
892 | Debugger(); | 887 | Debugger(); | |
893 | #endif | 888 | #endif | |
894 | 889 | |||
895 | /* We have our own device_register() */ | 890 | /* We have our own device_register() */ | |
896 | evbarm_device_register = armadillo9_device_register; | 891 | evbarm_device_register = armadillo9_device_register; | |
897 | 892 | |||
898 | /* We return the new stack pointer address */ | 893 | /* We return the new stack pointer address */ | |
899 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 894 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
900 | } | 895 | } | |
901 | 896 |
--- src/sys/arch/evbarm/hdl_g/hdlg_machdep.c 2008/11/12 12:35:59 1.8
+++ src/sys/arch/evbarm/hdl_g/hdlg_machdep.c 2008/11/30 18:21:33 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: hdlg_machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: hdlg_machdep.c,v 1.9 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | 4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Jason R. Thorpe and Steve C. Woodford for Wasabi Systems, Inc. | 7 | * Written by Jason R. Thorpe and Steve C. Woodford 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 | |
@@ -63,27 +63,27 @@ | @@ -63,27 +63,27 @@ | |||
63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
69 | * SUCH DAMAGE. | 69 | * SUCH DAMAGE. | |
70 | * | 70 | * | |
71 | * Machine dependant functions for kernel setup for GigaLANDISK | 71 | * Machine dependant functions for kernel setup for GigaLANDISK | |
72 | * using RedBoot firmware. | 72 | * using RedBoot firmware. | |
73 | */ | 73 | */ | |
74 | 74 | |||
75 | #include <sys/cdefs.h> | 75 | #include <sys/cdefs.h> | |
76 | __KERNEL_RCSID(0, "$NetBSD: hdlg_machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $"); | 76 | __KERNEL_RCSID(0, "$NetBSD: hdlg_machdep.c,v 1.9 2008/11/30 18:21:33 martin Exp $"); | |
77 | 77 | |||
78 | #include "opt_ddb.h" | 78 | #include "opt_ddb.h" | |
79 | #include "opt_kgdb.h" | 79 | #include "opt_kgdb.h" | |
80 | #include "opt_pmap_debug.h" | 80 | #include "opt_pmap_debug.h" | |
81 | 81 | |||
82 | #include <sys/param.h> | 82 | #include <sys/param.h> | |
83 | #include <sys/device.h> | 83 | #include <sys/device.h> | |
84 | #include <sys/systm.h> | 84 | #include <sys/systm.h> | |
85 | #include <sys/kernel.h> | 85 | #include <sys/kernel.h> | |
86 | #include <sys/exec.h> | 86 | #include <sys/exec.h> | |
87 | #include <sys/proc.h> | 87 | #include <sys/proc.h> | |
88 | #include <sys/msgbuf.h> | 88 | #include <sys/msgbuf.h> | |
89 | #include <sys/reboot.h> | 89 | #include <sys/reboot.h> | |
@@ -639,31 +639,26 @@ initarm(void *arg) | @@ -639,31 +639,26 @@ initarm(void *arg) | |||
639 | #ifdef VERBOSE_INIT_ARM | 639 | #ifdef VERBOSE_INIT_ARM | |
640 | printf("irq "); | 640 | printf("irq "); | |
641 | #endif | 641 | #endif | |
642 | i80321_intr_init(); | 642 | i80321_intr_init(); | |
643 | 643 | |||
644 | #ifdef VERBOSE_INIT_ARM | 644 | #ifdef VERBOSE_INIT_ARM | |
645 | printf("done.\n"); | 645 | printf("done.\n"); | |
646 | #endif | 646 | #endif | |
647 | 647 | |||
648 | #ifdef BOOTHOWTO | 648 | #ifdef BOOTHOWTO | |
649 | boothowto = BOOTHOWTO; | 649 | boothowto = BOOTHOWTO; | |
650 | #endif | 650 | #endif | |
651 | 651 | |||
652 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
653 | /* Firmware doesn't load symbols. */ | |||
654 | ksyms_init(0, NULL, NULL); | |||
655 | #endif | |||
656 | ||||
657 | #ifdef DDB | 652 | #ifdef DDB | |
658 | db_machine_init(); | 653 | db_machine_init(); | |
659 | if (boothowto & RB_KDB) | 654 | if (boothowto & RB_KDB) | |
660 | Debugger(); | 655 | Debugger(); | |
661 | #endif | 656 | #endif | |
662 | 657 | |||
663 | /* We return the new stack pointer address */ | 658 | /* We return the new stack pointer address */ | |
664 | return (kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 659 | return (kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
665 | } | 660 | } | |
666 | 661 | |||
667 | /* | 662 | /* | |
668 | * void cpu_reboot(int howto, char *bootstr) | 663 | * void cpu_reboot(int howto, char *bootstr) | |
669 | * | 664 | * |
--- src/sys/arch/evbarm/integrator/integrator_machdep.c 2008/11/12 12:35:59 1.60
+++ src/sys/arch/evbarm/integrator/integrator_machdep.c 2008/11/30 18:21:33 1.61
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: integrator_machdep.c,v 1.60 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: integrator_machdep.c,v 1.61 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001,2002 ARM Ltd | 4 | * Copyright (c) 2001,2002 ARM Ltd | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -58,27 +58,27 @@ | @@ -58,27 +58,27 @@ | |||
58 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 58 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
59 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 59 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
60 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 60 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
61 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 61 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
62 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 62 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
63 | * SUCH DAMAGE. | 63 | * SUCH DAMAGE. | |
64 | * | 64 | * | |
65 | * Machine dependant functions for kernel setup for integrator board | 65 | * Machine dependant functions for kernel setup for integrator board | |
66 | * | 66 | * | |
67 | * Created : 24/11/97 | 67 | * Created : 24/11/97 | |
68 | */ | 68 | */ | |
69 | 69 | |||
70 | #include <sys/cdefs.h> | 70 | #include <sys/cdefs.h> | |
71 | __KERNEL_RCSID(0, "$NetBSD: integrator_machdep.c,v 1.60 2008/11/12 12:35:59 ad Exp $"); | 71 | __KERNEL_RCSID(0, "$NetBSD: integrator_machdep.c,v 1.61 2008/11/30 18:21:33 martin Exp $"); | |
72 | 72 | |||
73 | #include "opt_ddb.h" | 73 | #include "opt_ddb.h" | |
74 | #include "opt_pmap_debug.h" | 74 | #include "opt_pmap_debug.h" | |
75 | 75 | |||
76 | #include <sys/param.h> | 76 | #include <sys/param.h> | |
77 | #include <sys/device.h> | 77 | #include <sys/device.h> | |
78 | #include <sys/systm.h> | 78 | #include <sys/systm.h> | |
79 | #include <sys/kernel.h> | 79 | #include <sys/kernel.h> | |
80 | #include <sys/exec.h> | 80 | #include <sys/exec.h> | |
81 | #include <sys/proc.h> | 81 | #include <sys/proc.h> | |
82 | #include <sys/msgbuf.h> | 82 | #include <sys/msgbuf.h> | |
83 | #include <sys/reboot.h> | 83 | #include <sys/reboot.h> | |
84 | #include <sys/termios.h> | 84 | #include <sys/termios.h> | |
@@ -769,31 +769,26 @@ initarm(void *arg) | @@ -769,31 +769,26 @@ initarm(void *arg) | |||
769 | #endif | 769 | #endif | |
770 | pmap_bootstrap(KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); | 770 | pmap_bootstrap(KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); | |
771 | 771 | |||
772 | /* Setup the IRQ system */ | 772 | /* Setup the IRQ system */ | |
773 | #ifdef VERBOSE_INIT_ARM | 773 | #ifdef VERBOSE_INIT_ARM | |
774 | printf("irq "); | 774 | printf("irq "); | |
775 | #endif | 775 | #endif | |
776 | ifpga_intr_init(); | 776 | ifpga_intr_init(); | |
777 | 777 | |||
778 | #ifdef VERBOSE_INIT_ARM | 778 | #ifdef VERBOSE_INIT_ARM | |
779 | printf("done.\n"); | 779 | printf("done.\n"); | |
780 | #endif | 780 | #endif | |
781 | 781 | |||
782 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
783 | /* Firmware doesn't load symbols. */ | |||
784 | ksyms_init(0, NULL, NULL); | |||
785 | #endif | |||
786 | ||||
787 | #ifdef DDB | 782 | #ifdef DDB | |
788 | db_machine_init(); | 783 | db_machine_init(); | |
789 | if (boothowto & RB_KDB) | 784 | if (boothowto & RB_KDB) | |
790 | Debugger(); | 785 | Debugger(); | |
791 | #endif | 786 | #endif | |
792 | 787 | |||
793 | /* We return the new stack pointer address */ | 788 | /* We return the new stack pointer address */ | |
794 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 789 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
795 | } | 790 | } | |
796 | 791 | |||
797 | void | 792 | void | |
798 | consinit(void) | 793 | consinit(void) | |
799 | { | 794 | { |
--- src/sys/arch/evbarm/iq80310/iq80310_machdep.c 2008/11/12 12:35:59 1.72
+++ src/sys/arch/evbarm/iq80310/iq80310_machdep.c 2008/11/30 18:21:33 1.73
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: iq80310_machdep.c,v 1.72 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: iq80310_machdep.c,v 1.73 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | 4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Jason R. Thorpe for Wasabi Systems, Inc. | 7 | * Written by Jason R. Thorpe 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 | |
@@ -63,27 +63,27 @@ | @@ -63,27 +63,27 @@ | |||
63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
69 | * SUCH DAMAGE. | 69 | * SUCH DAMAGE. | |
70 | * | 70 | * | |
71 | * Machine dependant functions for kernel setup for Intel IQ80310 evaluation | 71 | * Machine dependant functions for kernel setup for Intel IQ80310 evaluation | |
72 | * boards using RedBoot firmware. | 72 | * boards using RedBoot firmware. | |
73 | */ | 73 | */ | |
74 | 74 | |||
75 | #include <sys/cdefs.h> | 75 | #include <sys/cdefs.h> | |
76 | __KERNEL_RCSID(0, "$NetBSD: iq80310_machdep.c,v 1.72 2008/11/12 12:35:59 ad Exp $"); | 76 | __KERNEL_RCSID(0, "$NetBSD: iq80310_machdep.c,v 1.73 2008/11/30 18:21:33 martin Exp $"); | |
77 | 77 | |||
78 | #include "opt_ddb.h" | 78 | #include "opt_ddb.h" | |
79 | #include "opt_pmap_debug.h" | 79 | #include "opt_pmap_debug.h" | |
80 | 80 | |||
81 | #include <sys/param.h> | 81 | #include <sys/param.h> | |
82 | #include <sys/device.h> | 82 | #include <sys/device.h> | |
83 | #include <sys/systm.h> | 83 | #include <sys/systm.h> | |
84 | #include <sys/kernel.h> | 84 | #include <sys/kernel.h> | |
85 | #include <sys/exec.h> | 85 | #include <sys/exec.h> | |
86 | #include <sys/proc.h> | 86 | #include <sys/proc.h> | |
87 | #include <sys/msgbuf.h> | 87 | #include <sys/msgbuf.h> | |
88 | #include <sys/reboot.h> | 88 | #include <sys/reboot.h> | |
89 | #include <sys/termios.h> | 89 | #include <sys/termios.h> | |
@@ -755,31 +755,26 @@ initarm(void *arg) | @@ -755,31 +755,26 @@ initarm(void *arg) | |||
755 | #endif | 755 | #endif | |
756 | pmap_bootstrap(KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); | 756 | pmap_bootstrap(KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); | |
757 | 757 | |||
758 | /* Setup the IRQ system */ | 758 | /* Setup the IRQ system */ | |
759 | #ifdef VERBOSE_INIT_ARM | 759 | #ifdef VERBOSE_INIT_ARM | |
760 | printf("irq "); | 760 | printf("irq "); | |
761 | #endif | 761 | #endif | |
762 | iq80310_intr_init(); | 762 | iq80310_intr_init(); | |
763 | 763 | |||
764 | #ifdef VERBOSE_INIT_ARM | 764 | #ifdef VERBOSE_INIT_ARM | |
765 | printf("done.\n"); | 765 | printf("done.\n"); | |
766 | #endif | 766 | #endif | |
767 | 767 | |||
768 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
769 | /* Firmware doesn't load symbols. */ | |||
770 | ksyms_init(0, NULL, NULL); | |||
771 | #endif | |||
772 | ||||
773 | #ifdef DDB | 768 | #ifdef DDB | |
774 | db_machine_init(); | 769 | db_machine_init(); | |
775 | if (boothowto & RB_KDB) | 770 | if (boothowto & RB_KDB) | |
776 | Debugger(); | 771 | Debugger(); | |
777 | #endif | 772 | #endif | |
778 | 773 | |||
779 | /* We return the new stack pointer address */ | 774 | /* We return the new stack pointer address */ | |
780 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 775 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
781 | } | 776 | } | |
782 | 777 | |||
783 | void | 778 | void | |
784 | consinit(void) | 779 | consinit(void) | |
785 | { | 780 | { |
--- src/sys/arch/evbarm/iq80321/iq80321_machdep.c 2008/11/12 12:35:59 1.41
+++ src/sys/arch/evbarm/iq80321/iq80321_machdep.c 2008/11/30 18:21:33 1.42
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: iq80321_machdep.c,v 1.41 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: iq80321_machdep.c,v 1.42 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | 4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Jason R. Thorpe and Steve C. Woodford for Wasabi Systems, Inc. | 7 | * Written by Jason R. Thorpe and Steve C. Woodford 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 | |
@@ -63,27 +63,27 @@ | @@ -63,27 +63,27 @@ | |||
63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
69 | * SUCH DAMAGE. | 69 | * SUCH DAMAGE. | |
70 | * | 70 | * | |
71 | * Machine dependant functions for kernel setup for Intel IQ80321 evaluation | 71 | * Machine dependant functions for kernel setup for Intel IQ80321 evaluation | |
72 | * boards using RedBoot firmware. | 72 | * boards using RedBoot firmware. | |
73 | */ | 73 | */ | |
74 | 74 | |||
75 | #include <sys/cdefs.h> | 75 | #include <sys/cdefs.h> | |
76 | __KERNEL_RCSID(0, "$NetBSD: iq80321_machdep.c,v 1.41 2008/11/12 12:35:59 ad Exp $"); | 76 | __KERNEL_RCSID(0, "$NetBSD: iq80321_machdep.c,v 1.42 2008/11/30 18:21:33 martin Exp $"); | |
77 | 77 | |||
78 | #include "opt_ddb.h" | 78 | #include "opt_ddb.h" | |
79 | #include "opt_kgdb.h" | 79 | #include "opt_kgdb.h" | |
80 | #include "opt_pmap_debug.h" | 80 | #include "opt_pmap_debug.h" | |
81 | 81 | |||
82 | #include <sys/param.h> | 82 | #include <sys/param.h> | |
83 | #include <sys/device.h> | 83 | #include <sys/device.h> | |
84 | #include <sys/systm.h> | 84 | #include <sys/systm.h> | |
85 | #include <sys/kernel.h> | 85 | #include <sys/kernel.h> | |
86 | #include <sys/exec.h> | 86 | #include <sys/exec.h> | |
87 | #include <sys/proc.h> | 87 | #include <sys/proc.h> | |
88 | #include <sys/msgbuf.h> | 88 | #include <sys/msgbuf.h> | |
89 | #include <sys/reboot.h> | 89 | #include <sys/reboot.h> | |
@@ -774,31 +774,26 @@ initarm(void *arg) | @@ -774,31 +774,26 @@ initarm(void *arg) | |||
774 | #ifdef VERBOSE_INIT_ARM | 774 | #ifdef VERBOSE_INIT_ARM | |
775 | printf("irq "); | 775 | printf("irq "); | |
776 | #endif | 776 | #endif | |
777 | i80321_intr_init(); | 777 | i80321_intr_init(); | |
778 | 778 | |||
779 | #ifdef VERBOSE_INIT_ARM | 779 | #ifdef VERBOSE_INIT_ARM | |
780 | printf("done.\n"); | 780 | printf("done.\n"); | |
781 | #endif | 781 | #endif | |
782 | 782 | |||
783 | #ifdef BOOTHOWTO | 783 | #ifdef BOOTHOWTO | |
784 | boothowto = BOOTHOWTO; | 784 | boothowto = BOOTHOWTO; | |
785 | #endif | 785 | #endif | |
786 | 786 | |||
787 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
788 | /* Firmware doesn't load symbols. */ | |||
789 | ksyms_init(0, NULL, NULL); | |||
790 | #endif | |||
791 | ||||
792 | #ifdef DDB | 787 | #ifdef DDB | |
793 | db_machine_init(); | 788 | db_machine_init(); | |
794 | if (boothowto & RB_KDB) | 789 | if (boothowto & RB_KDB) | |
795 | Debugger(); | 790 | Debugger(); | |
796 | #endif | 791 | #endif | |
797 | 792 | |||
798 | /* We return the new stack pointer address */ | 793 | /* We return the new stack pointer address */ | |
799 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 794 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
800 | } | 795 | } | |
801 | 796 | |||
802 | void | 797 | void | |
803 | consinit(void) | 798 | consinit(void) | |
804 | { | 799 | { |
--- src/sys/arch/evbarm/ixdp425/ixdp425_machdep.c 2008/11/12 12:35:59 1.19
+++ src/sys/arch/evbarm/ixdp425/ixdp425_machdep.c 2008/11/30 18:21:33 1.20
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ixdp425_machdep.c,v 1.19 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: ixdp425_machdep.c,v 1.20 2008/11/30 18:21:33 martin Exp $ */ | |
2 | /* | 2 | /* | |
3 | * Copyright (c) 2003 | 3 | * Copyright (c) 2003 | |
4 | * Ichiro FUKUHARA <ichiro@ichiro.org>. | 4 | * Ichiro FUKUHARA <ichiro@ichiro.org>. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -60,27 +60,27 @@ | @@ -60,27 +60,27 @@ | |||
60 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 60 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
61 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 61 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
62 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 62 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
63 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 63 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
64 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 64 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
65 | * SUCH DAMAGE. | 65 | * SUCH DAMAGE. | |
66 | */ | 66 | */ | |
67 | 67 | |||
68 | /* Machine dependant functions for kernel setup for Intel IXP425 evaluation | 68 | /* Machine dependant functions for kernel setup for Intel IXP425 evaluation | |
69 | * boards using RedBoot firmware. | 69 | * boards using RedBoot firmware. | |
70 | */ | 70 | */ | |
71 | 71 | |||
72 | #include <sys/cdefs.h> | 72 | #include <sys/cdefs.h> | |
73 | __KERNEL_RCSID(0, "$NetBSD: ixdp425_machdep.c,v 1.19 2008/11/12 12:35:59 ad Exp $"); | 73 | __KERNEL_RCSID(0, "$NetBSD: ixdp425_machdep.c,v 1.20 2008/11/30 18:21:33 martin Exp $"); | |
74 | 74 | |||
75 | #include "opt_ddb.h" | 75 | #include "opt_ddb.h" | |
76 | #include "opt_kgdb.h" | 76 | #include "opt_kgdb.h" | |
77 | #include "opt_pmap_debug.h" | 77 | #include "opt_pmap_debug.h" | |
78 | 78 | |||
79 | #include <sys/param.h> | 79 | #include <sys/param.h> | |
80 | #include <sys/device.h> | 80 | #include <sys/device.h> | |
81 | #include <sys/systm.h> | 81 | #include <sys/systm.h> | |
82 | #include <sys/kernel.h> | 82 | #include <sys/kernel.h> | |
83 | #include <sys/exec.h> | 83 | #include <sys/exec.h> | |
84 | #include <sys/proc.h> | 84 | #include <sys/proc.h> | |
85 | #include <sys/msgbuf.h> | 85 | #include <sys/msgbuf.h> | |
86 | #include <sys/reboot.h> | 86 | #include <sys/reboot.h> | |
@@ -755,31 +755,26 @@ initarm(void *arg) | @@ -755,31 +755,26 @@ initarm(void *arg) | |||
755 | /* Setup the IRQ system */ | 755 | /* Setup the IRQ system */ | |
756 | #ifdef VERBOSE_INIT_ARM | 756 | #ifdef VERBOSE_INIT_ARM | |
757 | printf("irq "); | 757 | printf("irq "); | |
758 | #endif | 758 | #endif | |
759 | ixp425_intr_init(); | 759 | ixp425_intr_init(); | |
760 | #ifdef VERBOSE_INIT_ARM | 760 | #ifdef VERBOSE_INIT_ARM | |
761 | printf("\nAll initialize done!\nNow Starting NetBSD, Hear we go!\n"); | 761 | printf("\nAll initialize done!\nNow Starting NetBSD, Hear we go!\n"); | |
762 | #endif | 762 | #endif | |
763 | 763 | |||
764 | #ifdef BOOTHOWTO | 764 | #ifdef BOOTHOWTO | |
765 | boothowto = BOOTHOWTO; | 765 | boothowto = BOOTHOWTO; | |
766 | #endif | 766 | #endif | |
767 | 767 | |||
768 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
769 | /* Firmware doesn't load symbols. */ | |||
770 | ksyms_init(0, NULL, NULL); | |||
771 | #endif | |||
772 | ||||
773 | #ifdef DDB | 768 | #ifdef DDB | |
774 | db_machine_init(); | 769 | db_machine_init(); | |
775 | if (boothowto & RB_KDB) | 770 | if (boothowto & RB_KDB) | |
776 | Debugger(); | 771 | Debugger(); | |
777 | #endif | 772 | #endif | |
778 | 773 | |||
779 | /* We return the new stack pointer address */ | 774 | /* We return the new stack pointer address */ | |
780 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 775 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
781 | } | 776 | } | |
782 | 777 | |||
783 | /* | 778 | /* | |
784 | * consinit | 779 | * consinit | |
785 | */ | 780 | */ |
--- src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c 2008/11/12 12:35:59 1.36
+++ src/sys/arch/evbarm/ixm1200/ixm1200_machdep.c 2008/11/30 18:21:33 1.37
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ixm1200_machdep.c,v 1.36 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: ixm1200_machdep.c,v 1.37 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2002, 2003 | 4 | * Copyright (c) 2002, 2003 | |
5 | * Ichiro FUKUHARA <ichiro@ichiro.org>. | 5 | * Ichiro FUKUHARA <ichiro@ichiro.org>. | |
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 | |
@@ -57,27 +57,27 @@ | @@ -57,27 +57,27 @@ | |||
57 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | 57 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
58 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 58 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
59 | * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | 59 | * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | |
60 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 60 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
61 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 61 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
62 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 62 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
63 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 63 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
64 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 64 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
65 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 65 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
66 | * SUCH DAMAGE. | 66 | * SUCH DAMAGE. | |
67 | */ | 67 | */ | |
68 | 68 | |||
69 | #include <sys/cdefs.h> | 69 | #include <sys/cdefs.h> | |
70 | __KERNEL_RCSID(0, "$NetBSD: ixm1200_machdep.c,v 1.36 2008/11/12 12:35:59 ad Exp $"); | 70 | __KERNEL_RCSID(0, "$NetBSD: ixm1200_machdep.c,v 1.37 2008/11/30 18:21:33 martin Exp $"); | |
71 | 71 | |||
72 | #include "opt_ddb.h" | 72 | #include "opt_ddb.h" | |
73 | #include "opt_pmap_debug.h" | 73 | #include "opt_pmap_debug.h" | |
74 | 74 | |||
75 | #include <sys/param.h> | 75 | #include <sys/param.h> | |
76 | #include <sys/device.h> | 76 | #include <sys/device.h> | |
77 | #include <sys/systm.h> | 77 | #include <sys/systm.h> | |
78 | #include <sys/kernel.h> | 78 | #include <sys/kernel.h> | |
79 | #include <sys/exec.h> | 79 | #include <sys/exec.h> | |
80 | #include <sys/proc.h> | 80 | #include <sys/proc.h> | |
81 | #include <sys/msgbuf.h> | 81 | #include <sys/msgbuf.h> | |
82 | #include <sys/reboot.h> | 82 | #include <sys/reboot.h> | |
83 | #include <sys/termios.h> | 83 | #include <sys/termios.h> | |
@@ -732,27 +732,27 @@ initarm(void *arg) | @@ -732,27 +732,27 @@ initarm(void *arg) | |||
732 | 732 | |||
733 | consinit(); | 733 | consinit(); | |
734 | #ifdef VERBOSE_INIT_ARM | 734 | #ifdef VERBOSE_INIT_ARM | |
735 | printf("consinit \n"); | 735 | printf("consinit \n"); | |
736 | #endif | 736 | #endif | |
737 | 737 | |||
738 | ixdp_ixp12x0_cc_setup(); | 738 | ixdp_ixp12x0_cc_setup(); | |
739 | 739 | |||
740 | #ifdef VERBOSE_INIT_ARM | 740 | #ifdef VERBOSE_INIT_ARM | |
741 | printf("bootstrap done.\n"); | 741 | printf("bootstrap done.\n"); | |
742 | #endif | 742 | #endif | |
743 | 743 | |||
744 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 744 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
745 | ksyms_init(symbolsize, ((int *)&end), ((char *)&end) + symbolsize); | 745 | ksyms_addsyms_elf(symbolsize, ((int *)&end), ((char *)&end) + symbolsize); | |
746 | #endif | 746 | #endif | |
747 | 747 | |||
748 | #ifdef DDB | 748 | #ifdef DDB | |
749 | db_machine_init(); | 749 | db_machine_init(); | |
750 | if (boothowto & RB_KDB) | 750 | if (boothowto & RB_KDB) | |
751 | Debugger(); | 751 | Debugger(); | |
752 | #endif | 752 | #endif | |
753 | 753 | |||
754 | /* We return the new stack pointer address */ | 754 | /* We return the new stack pointer address */ | |
755 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 755 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
756 | } | 756 | } | |
757 | 757 | |||
758 | void | 758 | void |
--- src/sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c 2008/11/12 12:35:59 1.8
+++ src/sys/arch/evbarm/npwr_fc/npwr_fc_machdep.c 2008/11/30 18:21:33 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: npwr_fc_machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: npwr_fc_machdep.c,v 1.9 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | 4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Jason R. Thorpe and Steve C. Woodford for Wasabi Systems, Inc. | 7 | * Written by Jason R. Thorpe and Steve C. Woodford 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 | |
@@ -63,27 +63,27 @@ | @@ -63,27 +63,27 @@ | |||
63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 63 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 64 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 65 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 66 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 67 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 68 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
69 | * SUCH DAMAGE. | 69 | * SUCH DAMAGE. | |
70 | * | 70 | * | |
71 | * Machine dependant functions for kernel setup for Intel IQ80321 evaluation | 71 | * Machine dependant functions for kernel setup for Intel IQ80321 evaluation | |
72 | * boards using RedBoot firmware. | 72 | * boards using RedBoot firmware. | |
73 | */ | 73 | */ | |
74 | 74 | |||
75 | #include <sys/cdefs.h> | 75 | #include <sys/cdefs.h> | |
76 | __KERNEL_RCSID(0, "$NetBSD: npwr_fc_machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $"); | 76 | __KERNEL_RCSID(0, "$NetBSD: npwr_fc_machdep.c,v 1.9 2008/11/30 18:21:33 martin Exp $"); | |
77 | 77 | |||
78 | #include "opt_ddb.h" | 78 | #include "opt_ddb.h" | |
79 | #include "opt_kgdb.h" | 79 | #include "opt_kgdb.h" | |
80 | #include "opt_pmap_debug.h" | 80 | #include "opt_pmap_debug.h" | |
81 | 81 | |||
82 | #include <sys/param.h> | 82 | #include <sys/param.h> | |
83 | #include <sys/device.h> | 83 | #include <sys/device.h> | |
84 | #include <sys/systm.h> | 84 | #include <sys/systm.h> | |
85 | #include <sys/kernel.h> | 85 | #include <sys/kernel.h> | |
86 | #include <sys/exec.h> | 86 | #include <sys/exec.h> | |
87 | #include <sys/proc.h> | 87 | #include <sys/proc.h> | |
88 | #include <sys/msgbuf.h> | 88 | #include <sys/msgbuf.h> | |
89 | #include <sys/reboot.h> | 89 | #include <sys/reboot.h> | |
@@ -756,31 +756,26 @@ initarm(void *arg) | @@ -756,31 +756,26 @@ initarm(void *arg) | |||
756 | #ifdef VERBOSE_INIT_ARM | 756 | #ifdef VERBOSE_INIT_ARM | |
757 | printf("irq "); | 757 | printf("irq "); | |
758 | #endif | 758 | #endif | |
759 | i80321_intr_init(); | 759 | i80321_intr_init(); | |
760 | 760 | |||
761 | #ifdef VERBOSE_INIT_ARM | 761 | #ifdef VERBOSE_INIT_ARM | |
762 | printf("done.\n"); | 762 | printf("done.\n"); | |
763 | #endif | 763 | #endif | |
764 | 764 | |||
765 | #ifdef BOOTHOWTO | 765 | #ifdef BOOTHOWTO | |
766 | boothowto = BOOTHOWTO; | 766 | boothowto = BOOTHOWTO; | |
767 | #endif | 767 | #endif | |
768 | 768 | |||
769 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
770 | /* Firmware doesn't load symbols. */ | |||
771 | ksyms_init(0, NULL, NULL); | |||
772 | #endif | |||
773 | ||||
774 | #ifdef DDB | 769 | #ifdef DDB | |
775 | db_machine_init(); | 770 | db_machine_init(); | |
776 | if (boothowto & RB_KDB) | 771 | if (boothowto & RB_KDB) | |
777 | Debugger(); | 772 | Debugger(); | |
778 | #endif | 773 | #endif | |
779 | 774 | |||
780 | /* We return the new stack pointer address */ | 775 | /* We return the new stack pointer address */ | |
781 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 776 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
782 | } | 777 | } | |
783 | 778 | |||
784 | void | 779 | void | |
785 | consinit(void) | 780 | consinit(void) | |
786 | { | 781 | { |
--- src/sys/arch/evbarm/nslu2/nslu2_machdep.c 2008/11/12 12:35:59 1.9
+++ src/sys/arch/evbarm/nslu2/nslu2_machdep.c 2008/11/30 18:21:33 1.10
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: nslu2_machdep.c,v 1.9 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: nslu2_machdep.c,v 1.10 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2006 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2006 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 Steve C. Woodford. | 8 | * by Steve C. Woodford. | |
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. | |
@@ -90,27 +90,27 @@ | @@ -90,27 +90,27 @@ | |||
90 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 90 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
91 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 91 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
92 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 92 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
93 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 93 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
94 | * SUCH DAMAGE. | 94 | * SUCH DAMAGE. | |
95 | */ | 95 | */ | |
96 | 96 | |||
97 | /* | 97 | /* | |
98 | * Machine dependant functions for kernel setup for Linksys NSLU2 | 98 | * Machine dependant functions for kernel setup for Linksys NSLU2 | |
99 | * using RedBoot firmware. | 99 | * using RedBoot firmware. | |
100 | */ | 100 | */ | |
101 | 101 | |||
102 | #include <sys/cdefs.h> | 102 | #include <sys/cdefs.h> | |
103 | __KERNEL_RCSID(0, "$NetBSD: nslu2_machdep.c,v 1.9 2008/11/12 12:35:59 ad Exp $"); | 103 | __KERNEL_RCSID(0, "$NetBSD: nslu2_machdep.c,v 1.10 2008/11/30 18:21:33 martin Exp $"); | |
104 | 104 | |||
105 | #include "opt_ddb.h" | 105 | #include "opt_ddb.h" | |
106 | #include "opt_kgdb.h" | 106 | #include "opt_kgdb.h" | |
107 | #include "opt_pmap_debug.h" | 107 | #include "opt_pmap_debug.h" | |
108 | 108 | |||
109 | #include <sys/param.h> | 109 | #include <sys/param.h> | |
110 | #include <sys/device.h> | 110 | #include <sys/device.h> | |
111 | #include <sys/systm.h> | 111 | #include <sys/systm.h> | |
112 | #include <sys/kernel.h> | 112 | #include <sys/kernel.h> | |
113 | #include <sys/exec.h> | 113 | #include <sys/exec.h> | |
114 | #include <sys/proc.h> | 114 | #include <sys/proc.h> | |
115 | #include <sys/msgbuf.h> | 115 | #include <sys/msgbuf.h> | |
116 | #include <sys/reboot.h> | 116 | #include <sys/reboot.h> | |
@@ -823,31 +823,26 @@ initarm(void *arg) | @@ -823,31 +823,26 @@ initarm(void *arg) | |||
823 | /* Setup the IRQ system */ | 823 | /* Setup the IRQ system */ | |
824 | #ifdef VERBOSE_INIT_ARM | 824 | #ifdef VERBOSE_INIT_ARM | |
825 | printf("irq "); | 825 | printf("irq "); | |
826 | #endif | 826 | #endif | |
827 | ixp425_intr_init(); | 827 | ixp425_intr_init(); | |
828 | #ifdef VERBOSE_INIT_ARM | 828 | #ifdef VERBOSE_INIT_ARM | |
829 | printf("\nAll initialize done!\nNow Starting NetBSD, Hear we go!\n"); | 829 | printf("\nAll initialize done!\nNow Starting NetBSD, Hear we go!\n"); | |
830 | #endif | 830 | #endif | |
831 | 831 | |||
832 | #ifdef BOOTHOWTO | 832 | #ifdef BOOTHOWTO | |
833 | boothowto = BOOTHOWTO; | 833 | boothowto = BOOTHOWTO; | |
834 | #endif | 834 | #endif | |
835 | 835 | |||
836 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
837 | /* Firmware doesn't load symbols. */ | |||
838 | ksyms_init(0, NULL, NULL); | |||
839 | #endif | |||
840 | ||||
841 | #ifdef DDB | 836 | #ifdef DDB | |
842 | db_machine_init(); | 837 | db_machine_init(); | |
843 | if (boothowto & RB_KDB) | 838 | if (boothowto & RB_KDB) | |
844 | Debugger(); | 839 | Debugger(); | |
845 | #endif | 840 | #endif | |
846 | 841 | |||
847 | /* We return the new stack pointer address */ | 842 | /* We return the new stack pointer address */ | |
848 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 843 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
849 | } | 844 | } | |
850 | 845 | |||
851 | /* | 846 | /* | |
852 | * consinit | 847 | * consinit | |
853 | */ | 848 | */ |
--- src/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c 2008/11/18 18:20:10 1.21
+++ src/sys/arch/evbarm/smdk2xx0/smdk2410_machdep.c 2008/11/30 18:21:33 1.22
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: smdk2410_machdep.c,v 1.21 2008/11/18 18:20:10 cliff Exp $ */ | 1 | /* $NetBSD: smdk2410_machdep.c,v 1.22 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2002, 2003 Fujitsu Component Limited | 4 | * Copyright (c) 2002, 2003 Fujitsu Component Limited | |
5 | * Copyright (c) 2002, 2003, 2005 Genetec Corporation | 5 | * Copyright (c) 2002, 2003, 2005 Genetec Corporation | |
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 | |
@@ -95,27 +95,27 @@ | @@ -95,27 +95,27 @@ | |||
95 | * SUCH DAMAGE. | 95 | * SUCH DAMAGE. | |
96 | * | 96 | * | |
97 | * Machine dependant functions for kernel setup for integrator board | 97 | * Machine dependant functions for kernel setup for integrator board | |
98 | * | 98 | * | |
99 | * Created : 24/11/97 | 99 | * Created : 24/11/97 | |
100 | */ | 100 | */ | |
101 | 101 | |||
102 | /* | 102 | /* | |
103 | * Machine dependant functions for kernel setup for Samsung SMDK2410 | 103 | * Machine dependant functions for kernel setup for Samsung SMDK2410 | |
104 | * derived from integrator_machdep.c | 104 | * derived from integrator_machdep.c | |
105 | */ | 105 | */ | |
106 | 106 | |||
107 | #include <sys/cdefs.h> | 107 | #include <sys/cdefs.h> | |
108 | __KERNEL_RCSID(0, "$NetBSD: smdk2410_machdep.c,v 1.21 2008/11/18 18:20:10 cliff Exp $"); | 108 | __KERNEL_RCSID(0, "$NetBSD: smdk2410_machdep.c,v 1.22 2008/11/30 18:21:33 martin Exp $"); | |
109 | 109 | |||
110 | #include "opt_ddb.h" | 110 | #include "opt_ddb.h" | |
111 | #include "opt_kgdb.h" | 111 | #include "opt_kgdb.h" | |
112 | #include "opt_pmap_debug.h" | 112 | #include "opt_pmap_debug.h" | |
113 | #include "opt_md.h" | 113 | #include "opt_md.h" | |
114 | 114 | |||
115 | #include <sys/param.h> | 115 | #include <sys/param.h> | |
116 | #include <sys/device.h> | 116 | #include <sys/device.h> | |
117 | #include <sys/systm.h> | 117 | #include <sys/systm.h> | |
118 | #include <sys/kernel.h> | 118 | #include <sys/kernel.h> | |
119 | #include <sys/exec.h> | 119 | #include <sys/exec.h> | |
120 | #include <sys/proc.h> | 120 | #include <sys/proc.h> | |
121 | #include <sys/msgbuf.h> | 121 | #include <sys/msgbuf.h> | |
@@ -908,31 +908,26 @@ initarm(void *arg) | @@ -908,31 +908,26 @@ initarm(void *arg) | |||
908 | boothowto ^= RB_KDB; | 908 | boothowto ^= RB_KDB; | |
909 | #ifdef VERBOSE_INIT_ARM | 909 | #ifdef VERBOSE_INIT_ARM | |
910 | printf( "sw: %x boothowto: %x\n", gpio, boothowto ); | 910 | printf( "sw: %x boothowto: %x\n", gpio, boothowto ); | |
911 | #endif | 911 | #endif | |
912 | } | 912 | } | |
913 | 913 | |||
914 | #ifdef KGDB | 914 | #ifdef KGDB | |
915 | if (boothowto & RB_KDB) { | 915 | if (boothowto & RB_KDB) { | |
916 | kgdb_debug_init = 1; | 916 | kgdb_debug_init = 1; | |
917 | kgdb_connect(1); | 917 | kgdb_connect(1); | |
918 | } | 918 | } | |
919 | #endif | 919 | #endif | |
920 | 920 | |||
921 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
922 | /* Firmware doesn't load symbols. */ | |||
923 | ksyms_init(0, NULL, NULL); | |||
924 | #endif | |||
925 | ||||
926 | #ifdef DDB | 921 | #ifdef DDB | |
927 | db_machine_init(); | 922 | db_machine_init(); | |
928 | if (boothowto & RB_KDB) | 923 | if (boothowto & RB_KDB) | |
929 | Debugger(); | 924 | Debugger(); | |
930 | #endif | 925 | #endif | |
931 | 926 | |||
932 | /* We return the new stack pointer address */ | 927 | /* We return the new stack pointer address */ | |
933 | return (kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 928 | return (kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
934 | } | 929 | } | |
935 | 930 | |||
936 | void | 931 | void | |
937 | consinit(void) | 932 | consinit(void) | |
938 | { | 933 | { |
--- src/sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c 2008/11/18 18:20:10 1.29
+++ src/sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c 2008/11/30 18:21:33 1.30
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: smdk2800_machdep.c,v 1.29 2008/11/18 18:20:10 cliff Exp $ */ | 1 | /* $NetBSD: smdk2800_machdep.c,v 1.30 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2002, 2003, 2005 Fujitsu Component Limited | 4 | * Copyright (c) 2002, 2003, 2005 Fujitsu Component Limited | |
5 | * Copyright (c) 2002, 2003, 2005 Genetec Corporation | 5 | * Copyright (c) 2002, 2003, 2005 Genetec Corporation | |
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 | |
@@ -96,27 +96,27 @@ | @@ -96,27 +96,27 @@ | |||
96 | * SUCH DAMAGE. | 96 | * SUCH DAMAGE. | |
97 | * | 97 | * | |
98 | * Machine dependant functions for kernel setup for integrator board | 98 | * Machine dependant functions for kernel setup for integrator board | |
99 | * | 99 | * | |
100 | * Created : 24/11/97 | 100 | * Created : 24/11/97 | |
101 | */ | 101 | */ | |
102 | 102 | |||
103 | /* | 103 | /* | |
104 | * Machine dependant functions for kernel setup for Samsung SMDK2800 | 104 | * Machine dependant functions for kernel setup for Samsung SMDK2800 | |
105 | * derived from integrator_machdep.c | 105 | * derived from integrator_machdep.c | |
106 | */ | 106 | */ | |
107 | 107 | |||
108 | #include <sys/cdefs.h> | 108 | #include <sys/cdefs.h> | |
109 | __KERNEL_RCSID(0, "$NetBSD: smdk2800_machdep.c,v 1.29 2008/11/18 18:20:10 cliff Exp $"); | 109 | __KERNEL_RCSID(0, "$NetBSD: smdk2800_machdep.c,v 1.30 2008/11/30 18:21:33 martin Exp $"); | |
110 | 110 | |||
111 | #include "opt_ddb.h" | 111 | #include "opt_ddb.h" | |
112 | #include "opt_kgdb.h" | 112 | #include "opt_kgdb.h" | |
113 | #include "opt_pmap_debug.h" | 113 | #include "opt_pmap_debug.h" | |
114 | #include "opt_md.h" | 114 | #include "opt_md.h" | |
115 | #include "pci.h" | 115 | #include "pci.h" | |
116 | 116 | |||
117 | #include <sys/param.h> | 117 | #include <sys/param.h> | |
118 | #include <sys/device.h> | 118 | #include <sys/device.h> | |
119 | #include <sys/systm.h> | 119 | #include <sys/systm.h> | |
120 | #include <sys/kernel.h> | 120 | #include <sys/kernel.h> | |
121 | #include <sys/exec.h> | 121 | #include <sys/exec.h> | |
122 | #include <sys/proc.h> | 122 | #include <sys/proc.h> | |
@@ -825,31 +825,26 @@ initarm(void *arg) | @@ -825,31 +825,26 @@ initarm(void *arg) | |||
825 | boothowto ^= RB_KDB; | 825 | boothowto ^= RB_KDB; | |
826 | #ifdef VERBOSE_INIT_ARM | 826 | #ifdef VERBOSE_INIT_ARM | |
827 | printf( "sw: %x boothowto: %x\n", gpio, boothowto ); | 827 | printf( "sw: %x boothowto: %x\n", gpio, boothowto ); | |
828 | #endif | 828 | #endif | |
829 | } | 829 | } | |
830 | 830 | |||
831 | #ifdef KGDB | 831 | #ifdef KGDB | |
832 | if (boothowto & RB_KDB) { | 832 | if (boothowto & RB_KDB) { | |
833 | kgdb_debug_init = 1; | 833 | kgdb_debug_init = 1; | |
834 | kgdb_connect(1); | 834 | kgdb_connect(1); | |
835 | } | 835 | } | |
836 | #endif | 836 | #endif | |
837 | 837 | |||
838 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
839 | /* Firmware doesn't load symbols. */ | |||
840 | ksyms_init(0, NULL, NULL); | |||
841 | #endif | |||
842 | ||||
843 | #ifdef DDB | 838 | #ifdef DDB | |
844 | db_machine_init(); | 839 | db_machine_init(); | |
845 | if (boothowto & RB_KDB) | 840 | if (boothowto & RB_KDB) | |
846 | Debugger(); | 841 | Debugger(); | |
847 | #endif | 842 | #endif | |
848 | 843 | |||
849 | /* We return the new stack pointer address */ | 844 | /* We return the new stack pointer address */ | |
850 | return (kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 845 | return (kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
851 | } | 846 | } | |
852 | 847 | |||
853 | void | 848 | void | |
854 | consinit(void) | 849 | consinit(void) | |
855 | { | 850 | { |
--- src/sys/arch/evbarm/tsarm/tsarm_machdep.c 2008/11/12 12:35:59 1.9
+++ src/sys/arch/evbarm/tsarm/tsarm_machdep.c 2008/11/30 18:21:33 1.10
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: tsarm_machdep.c,v 1.9 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: tsarm_machdep.c,v 1.10 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | 4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Based on code written by Jason R. Thorpe and Steve C. Woodford for | 7 | * Based on code written by Jason R. Thorpe and Steve C. Woodford for | |
8 | * Wasabi Systems, Inc. | 8 | * 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. | |
@@ -63,27 +63,27 @@ | @@ -63,27 +63,27 @@ | |||
63 | * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | 63 | * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | |
64 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 64 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
65 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 65 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
66 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 66 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
67 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 67 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
68 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 68 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
69 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 69 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
70 | * SUCH DAMAGE. | 70 | * SUCH DAMAGE. | |
71 | * | 71 | * | |
72 | * Machine dependant functions for kernel setup for Iyonix. | 72 | * Machine dependant functions for kernel setup for Iyonix. | |
73 | */ | 73 | */ | |
74 | 74 | |||
75 | #include <sys/cdefs.h> | 75 | #include <sys/cdefs.h> | |
76 | __KERNEL_RCSID(0, "$NetBSD: tsarm_machdep.c,v 1.9 2008/11/12 12:35:59 ad Exp $"); | 76 | __KERNEL_RCSID(0, "$NetBSD: tsarm_machdep.c,v 1.10 2008/11/30 18:21:33 martin Exp $"); | |
77 | 77 | |||
78 | #include "opt_ddb.h" | 78 | #include "opt_ddb.h" | |
79 | #include "opt_kgdb.h" | 79 | #include "opt_kgdb.h" | |
80 | #include "opt_pmap_debug.h" | 80 | #include "opt_pmap_debug.h" | |
81 | 81 | |||
82 | #include <sys/param.h> | 82 | #include <sys/param.h> | |
83 | #include <sys/device.h> | 83 | #include <sys/device.h> | |
84 | #include <sys/systm.h> | 84 | #include <sys/systm.h> | |
85 | #include <sys/kernel.h> | 85 | #include <sys/kernel.h> | |
86 | #include <sys/exec.h> | 86 | #include <sys/exec.h> | |
87 | #include <sys/proc.h> | 87 | #include <sys/proc.h> | |
88 | #include <sys/msgbuf.h> | 88 | #include <sys/msgbuf.h> | |
89 | #include <sys/reboot.h> | 89 | #include <sys/reboot.h> | |
@@ -791,31 +791,26 @@ initarm(void *arg) | @@ -791,31 +791,26 @@ initarm(void *arg) | |||
791 | #endif | 791 | #endif | |
792 | isa_tsarm_init(TS7XXX_IO16_VBASE + TS7XXX_ISAIO, | 792 | isa_tsarm_init(TS7XXX_IO16_VBASE + TS7XXX_ISAIO, | |
793 | TS7XXX_IO16_VBASE + TS7XXX_ISAMEM); | 793 | TS7XXX_IO16_VBASE + TS7XXX_ISAMEM); | |
794 | #endif | 794 | #endif | |
795 | 795 | |||
796 | #ifdef VERBOSE_INIT_ARM | 796 | #ifdef VERBOSE_INIT_ARM | |
797 | printf("done.\n"); | 797 | printf("done.\n"); | |
798 | #endif | 798 | #endif | |
799 | 799 | |||
800 | #ifdef BOOTHOWTO | 800 | #ifdef BOOTHOWTO | |
801 | boothowto = BOOTHOWTO; | 801 | boothowto = BOOTHOWTO; | |
802 | #endif | 802 | #endif | |
803 | 803 | |||
804 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
805 | /* Firmware doesn't load symbols. */ | |||
806 | ksyms_init(0, NULL, NULL); | |||
807 | #endif | |||
808 | ||||
809 | #ifdef DDB | 804 | #ifdef DDB | |
810 | db_machine_init(); | 805 | db_machine_init(); | |
811 | if (boothowto & RB_KDB) | 806 | if (boothowto & RB_KDB) | |
812 | Debugger(); | 807 | Debugger(); | |
813 | #endif | 808 | #endif | |
814 | 809 | |||
815 | /* We return the new stack pointer address */ | 810 | /* We return the new stack pointer address */ | |
816 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 811 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
817 | } | 812 | } | |
818 | 813 | |||
819 | void | 814 | void | |
820 | consinit(void) | 815 | consinit(void) | |
821 | { | 816 | { |
--- src/sys/arch/evbmips/adm5120/machdep.c 2008/11/12 12:35:59 1.8
+++ src/sys/arch/evbmips/adm5120/machdep.c 2008/11/30 18:21:33 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.9 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. | 4 | * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or | 7 | * Redistribution and use in source and binary forms, with or | |
8 | * without modification, are permitted provided that the following | 8 | * without modification, are permitted provided that the following | |
9 | * conditions are met: | 9 | * conditions are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above | 12 | * 2. Redistributions in binary form must reproduce the above | |
13 | * copyright notice, this list of conditions and the following | 13 | * copyright notice, this list of conditions and the following | |
14 | * disclaimer in the documentation and/or other materials provided | 14 | * disclaimer in the documentation and/or other materials provided | |
@@ -97,27 +97,27 @@ | @@ -97,27 +97,27 @@ | |||
97 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 97 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
98 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 98 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
99 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 99 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
101 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 101 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
102 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 102 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
103 | * SUCH DAMAGE. | 103 | * SUCH DAMAGE. | |
104 | * | 104 | * | |
105 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | 105 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | |
106 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | 106 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | |
107 | */ | 107 | */ | |
108 | 108 | |||
109 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 109 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
110 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2008/11/12 12:35:59 ad Exp $"); | 110 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2008/11/30 18:21:33 martin Exp $"); | |
111 | 111 | |||
112 | #include "opt_ddb.h" | 112 | #include "opt_ddb.h" | |
113 | #include "opt_kgdb.h" | 113 | #include "opt_kgdb.h" | |
114 | 114 | |||
115 | #include "opt_memsize.h" | 115 | #include "opt_memsize.h" | |
116 | #include "opt_ethaddr.h" | 116 | #include "opt_ethaddr.h" | |
117 | 117 | |||
118 | #include "opt_pci.h" | 118 | #include "opt_pci.h" | |
119 | #include "pci.h" | 119 | #include "pci.h" | |
120 | 120 | |||
121 | #include <sys/param.h> | 121 | #include <sys/param.h> | |
122 | #include <sys/systm.h> | 122 | #include <sys/systm.h> | |
123 | #include <sys/kernel.h> | 123 | #include <sys/kernel.h> | |
@@ -437,29 +437,26 @@ mach_init(int argc, char **argv, void *a | @@ -437,29 +437,26 @@ mach_init(int argc, char **argv, void *a | |||
437 | 437 | |||
438 | /* | 438 | /* | |
439 | * Init mapping for u page(s) for proc0. | 439 | * Init mapping for u page(s) for proc0. | |
440 | */ | 440 | */ | |
441 | v = uvm_pageboot_alloc(USPACE); | 441 | v = uvm_pageboot_alloc(USPACE); | |
442 | lwp0.l_addr = proc0paddr = (struct user *)v; | 442 | lwp0.l_addr = proc0paddr = (struct user *)v; | |
443 | lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1; | 443 | lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1; | |
444 | proc0paddr->u_pcb.pcb_context[11] = | 444 | proc0paddr->u_pcb.pcb_context[11] = | |
445 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | 445 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | |
446 | 446 | |||
447 | /* | 447 | /* | |
448 | * Initialize debuggers, and break into them, if appropriate. | 448 | * Initialize debuggers, and break into them, if appropriate. | |
449 | */ | 449 | */ | |
450 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
451 | ksyms_init(0, 0, 0); | |||
452 | #endif | |||
453 | #ifdef DDB | 450 | #ifdef DDB | |
454 | if (boothowto & RB_KDB) | 451 | if (boothowto & RB_KDB) | |
455 | Debugger(); | 452 | Debugger(); | |
456 | #endif | 453 | #endif | |
457 | 454 | |||
458 | copy_args(argc, argv); | 455 | copy_args(argc, argv); | |
459 | } | 456 | } | |
460 | 457 | |||
461 | void | 458 | void | |
462 | consinit(void) | 459 | consinit(void) | |
463 | { | 460 | { | |
464 | 461 | |||
465 | /* | 462 | /* |
--- src/sys/arch/evbmips/alchemy/machdep.c 2008/11/12 12:35:59 1.39
+++ src/sys/arch/evbmips/alchemy/machdep.c 2008/11/30 18:21:33 1.40
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.39 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.40 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2006 Itronix Inc. | 4 | * Copyright (c) 2006 Itronix Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Portions written by Garrett D'Amore for Itronix Inc. | 7 | * Portions written by Garrett D'Amore for Itronix 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 | |
@@ -97,27 +97,27 @@ | @@ -97,27 +97,27 @@ | |||
97 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 97 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
98 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 98 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
99 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 99 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
101 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 101 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
102 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 102 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
103 | * SUCH DAMAGE. | 103 | * SUCH DAMAGE. | |
104 | * | 104 | * | |
105 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | 105 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | |
106 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | 106 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | |
107 | */ | 107 | */ | |
108 | 108 | |||
109 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 109 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
110 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.39 2008/11/12 12:35:59 ad Exp $"); | 110 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.40 2008/11/30 18:21:33 martin Exp $"); | |
111 | 111 | |||
112 | #include "opt_ddb.h" | 112 | #include "opt_ddb.h" | |
113 | #include "opt_kgdb.h" | 113 | #include "opt_kgdb.h" | |
114 | 114 | |||
115 | #include "opt_memsize.h" | 115 | #include "opt_memsize.h" | |
116 | #include "opt_ethaddr.h" | 116 | #include "opt_ethaddr.h" | |
117 | 117 | |||
118 | #include <sys/param.h> | 118 | #include <sys/param.h> | |
119 | #include <sys/systm.h> | 119 | #include <sys/systm.h> | |
120 | #include <sys/kernel.h> | 120 | #include <sys/kernel.h> | |
121 | #include <sys/buf.h> | 121 | #include <sys/buf.h> | |
122 | #include <sys/reboot.h> | 122 | #include <sys/reboot.h> | |
123 | #include <sys/user.h> | 123 | #include <sys/user.h> | |
@@ -363,29 +363,26 @@ mach_init(int argc, char **argv, yamon_e | @@ -363,29 +363,26 @@ mach_init(int argc, char **argv, yamon_e | |||
363 | 363 | |||
364 | /* | 364 | /* | |
365 | * Init mapping for u page(s) for proc0. | 365 | * Init mapping for u page(s) for proc0. | |
366 | */ | 366 | */ | |
367 | v = (void *) uvm_pageboot_alloc(USPACE); | 367 | v = (void *) uvm_pageboot_alloc(USPACE); | |
368 | lwp0.l_addr = proc0paddr = (struct user *)v; | 368 | lwp0.l_addr = proc0paddr = (struct user *)v; | |
369 | lwp0.l_md.md_regs = (struct frame *)((char *)v + USPACE) - 1; | 369 | lwp0.l_md.md_regs = (struct frame *)((char *)v + USPACE) - 1; | |
370 | proc0paddr->u_pcb.pcb_context[11] = | 370 | proc0paddr->u_pcb.pcb_context[11] = | |
371 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | 371 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | |
372 | 372 | |||
373 | /* | 373 | /* | |
374 | * Initialize debuggers, and break into them, if appropriate. | 374 | * Initialize debuggers, and break into them, if appropriate. | |
375 | */ | 375 | */ | |
376 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
377 | ksyms_init(0, 0, 0); | |||
378 | #endif | |||
379 | #ifdef DDB | 376 | #ifdef DDB | |
380 | if (boothowto & RB_KDB) | 377 | if (boothowto & RB_KDB) | |
381 | Debugger(); | 378 | Debugger(); | |
382 | #endif | 379 | #endif | |
383 | } | 380 | } | |
384 | 381 | |||
385 | void | 382 | void | |
386 | consinit(void) | 383 | consinit(void) | |
387 | { | 384 | { | |
388 | 385 | |||
389 | /* | 386 | /* | |
390 | * Everything related to console initialization is done | 387 | * Everything related to console initialization is done | |
391 | * in mach_init(). | 388 | * in mach_init(). |
--- src/sys/arch/evbmips/atheros/machdep.c 2008/11/12 12:35:59 1.15
+++ src/sys/arch/evbmips/atheros/machdep.c 2008/11/30 18:21:33 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.15 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.16 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2006 Urbana-Champaign Independent Media Center. | 4 | * Copyright (c) 2006 Urbana-Champaign Independent Media Center. | |
5 | * Copyright (c) 2006 Garrett D'Amore. | 5 | * Copyright (c) 2006 Garrett D'Amore. | |
6 | * All rights reserved. | 6 | * All rights reserved. | |
7 | * | 7 | * | |
8 | * Portions of this code were written by Garrett D'Amore for the | 8 | * Portions of this code were written by Garrett D'Amore for the | |
9 | * Champaign-Urbana Community Wireless Network Project. | 9 | * Champaign-Urbana Community Wireless Network Project. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or | 11 | * Redistribution and use in source and binary forms, with or | |
12 | * without modification, are permitted provided that the following | 12 | * without modification, are permitted provided that the following | |
13 | * conditions are met: | 13 | * conditions are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -137,27 +137,27 @@ | @@ -137,27 +137,27 @@ | |||
137 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 137 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
138 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 138 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
139 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 139 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
140 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 140 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
141 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 141 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
142 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 142 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
143 | * SUCH DAMAGE. | 143 | * SUCH DAMAGE. | |
144 | * | 144 | * | |
145 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | 145 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | |
146 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | 146 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | |
147 | */ | 147 | */ | |
148 | 148 | |||
149 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 149 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
150 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2008/11/12 12:35:59 ad Exp $"); | 150 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2008/11/30 18:21:33 martin Exp $"); | |
151 | 151 | |||
152 | #include "opt_ddb.h" | 152 | #include "opt_ddb.h" | |
153 | #include "opt_kgdb.h" | 153 | #include "opt_kgdb.h" | |
154 | 154 | |||
155 | #include <sys/param.h> | 155 | #include <sys/param.h> | |
156 | #include <sys/systm.h> | 156 | #include <sys/systm.h> | |
157 | #include <sys/kernel.h> | 157 | #include <sys/kernel.h> | |
158 | #include <sys/buf.h> | 158 | #include <sys/buf.h> | |
159 | #include <sys/reboot.h> | 159 | #include <sys/reboot.h> | |
160 | #include <sys/user.h> | 160 | #include <sys/user.h> | |
161 | #include <sys/mount.h> | 161 | #include <sys/mount.h> | |
162 | #include <sys/kcore.h> | 162 | #include <sys/kcore.h> | |
163 | #include <sys/boot_flag.h> | 163 | #include <sys/boot_flag.h> | |
@@ -329,30 +329,26 @@ mach_init(void) | @@ -329,30 +329,26 @@ mach_init(void) | |||
329 | 329 | |||
330 | /* | 330 | /* | |
331 | * Turn off watchpoint that may have been enabled by the | 331 | * Turn off watchpoint that may have been enabled by the | |
332 | * PROM. VxWorks bootloader seems to leave one set. | 332 | * PROM. VxWorks bootloader seems to leave one set. | |
333 | */ | 333 | */ | |
334 | __asm volatile ( | 334 | __asm volatile ( | |
335 | "mtc0 $0, $" ___STRING(MIPS_COP_0_WATCH_LO) " \n\t" | 335 | "mtc0 $0, $" ___STRING(MIPS_COP_0_WATCH_LO) " \n\t" | |
336 | "nop\n\t" | 336 | "nop\n\t" | |
337 | "nop\n\t"); | 337 | "nop\n\t"); | |
338 | 338 | |||
339 | /* | 339 | /* | |
340 | * Initialize debuggers, and break into them, if appropriate. | 340 | * Initialize debuggers, and break into them, if appropriate. | |
341 | */ | 341 | */ | |
342 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
343 | ksyms_init(0, 0, 0); | |||
344 | #endif | |||
345 | ||||
346 | #ifdef DDB | 342 | #ifdef DDB | |
347 | if (boothowto & RB_KDB) | 343 | if (boothowto & RB_KDB) | |
348 | Debugger(); | 344 | Debugger(); | |
349 | #endif | 345 | #endif | |
350 | } | 346 | } | |
351 | 347 | |||
352 | void | 348 | void | |
353 | consinit(void) | 349 | consinit(void) | |
354 | { | 350 | { | |
355 | 351 | |||
356 | /* | 352 | /* | |
357 | * Everything related to console initialization is done | 353 | * Everything related to console initialization is done | |
358 | * in mach_init(). | 354 | * in mach_init(). |
--- src/sys/arch/evbmips/malta/machdep.c 2008/11/12 12:35:59 1.30
+++ src/sys/arch/evbmips/malta/machdep.c 2008/11/30 18:21:33 1.31
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.30 2008/11/12 12:35:59 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.31 2008/11/30 18:21:33 martin 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 Jason R. Thorpe and Simon Burge for Wasabi Systems, Inc. | 7 | * Written by Jason R. Thorpe 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 | |
@@ -102,27 +102,27 @@ | @@ -102,27 +102,27 @@ | |||
102 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 102 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
103 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 103 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
104 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 104 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
105 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 105 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
106 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 106 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
107 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 107 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
108 | * SUCH DAMAGE. | 108 | * SUCH DAMAGE. | |
109 | * | 109 | * | |
110 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | 110 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | |
111 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | 111 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | |
112 | */ | 112 | */ | |
113 | 113 | |||
114 | #include <sys/cdefs.h> | 114 | #include <sys/cdefs.h> | |
115 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.30 2008/11/12 12:35:59 ad Exp $"); | 115 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.31 2008/11/30 18:21:33 martin Exp $"); | |
116 | 116 | |||
117 | #include "opt_ddb.h" | 117 | #include "opt_ddb.h" | |
118 | #include "opt_execfmt.h" | 118 | #include "opt_execfmt.h" | |
119 | 119 | |||
120 | #include <sys/param.h> | 120 | #include <sys/param.h> | |
121 | #include <sys/systm.h> | 121 | #include <sys/systm.h> | |
122 | #include <sys/kernel.h> | 122 | #include <sys/kernel.h> | |
123 | #include <sys/buf.h> | 123 | #include <sys/buf.h> | |
124 | #include <sys/reboot.h> | 124 | #include <sys/reboot.h> | |
125 | #include <sys/user.h> | 125 | #include <sys/user.h> | |
126 | #include <sys/mount.h> | 126 | #include <sys/mount.h> | |
127 | #include <sys/kcore.h> | 127 | #include <sys/kcore.h> | |
128 | #include <sys/boot_flag.h> | 128 | #include <sys/boot_flag.h> | |
@@ -319,30 +319,26 @@ mach_init(int argc, char **argv, yamon_e | @@ -319,30 +319,26 @@ mach_init(int argc, char **argv, yamon_e | |||
319 | 319 | |||
320 | /* | 320 | /* | |
321 | * Allocate space for proc0's USPACE. | 321 | * Allocate space for proc0's USPACE. | |
322 | */ | 322 | */ | |
323 | v = (void *)uvm_pageboot_alloc(USPACE); | 323 | v = (void *)uvm_pageboot_alloc(USPACE); | |
324 | lwp0.l_addr = proc0paddr = (struct user *)v; | 324 | lwp0.l_addr = proc0paddr = (struct user *)v; | |
325 | lwp0.l_md.md_regs = (struct frame *)((char *)v + USPACE) - 1; | 325 | lwp0.l_md.md_regs = (struct frame *)((char *)v + USPACE) - 1; | |
326 | proc0paddr->u_pcb.pcb_context[11] = | 326 | proc0paddr->u_pcb.pcb_context[11] = | |
327 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | 327 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | |
328 | 328 | |||
329 | /* | 329 | /* | |
330 | * Initialize debuggers, and break into them, if appropriate. | 330 | * Initialize debuggers, and break into them, if appropriate. | |
331 | */ | 331 | */ | |
332 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
333 | ksyms_init(0, 0, 0); | |||
334 | #endif | |||
335 | ||||
336 | #if defined(DDB) | 332 | #if defined(DDB) | |
337 | if (boothowto & RB_KDB) | 333 | if (boothowto & RB_KDB) | |
338 | Debugger(); | 334 | Debugger(); | |
339 | #endif | 335 | #endif | |
340 | } | 336 | } | |
341 | 337 | |||
342 | void | 338 | void | |
343 | consinit(void) | 339 | consinit(void) | |
344 | { | 340 | { | |
345 | 341 | |||
346 | /* | 342 | /* | |
347 | * Everything related to console initialization is done | 343 | * Everything related to console initialization is done | |
348 | * in mach_init(). | 344 | * in mach_init(). |
--- src/sys/arch/evbppc/ev64260/machdep.c 2008/11/12 12:36:00 1.22
+++ src/sys/arch/evbppc/ev64260/machdep.c 2008/11/30 18:21:33 1.23
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.22 2008/11/12 12:36:00 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.23 2008/11/30 18:21:33 martin 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.22 2008/11/12 12:36:00 ad Exp $"); | 35 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.23 2008/11/30 18:21:33 martin Exp $"); | |
36 | 36 | |||
37 | #include "opt_marvell.h" | 37 | #include "opt_marvell.h" | |
38 | #include "opt_ev64260.h" | 38 | #include "opt_ev64260.h" | |
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_inet.h" | 41 | #include "opt_inet.h" | |
42 | #include "opt_ccitt.h" | 42 | #include "opt_ccitt.h" | |
43 | #include "opt_iso.h" | 43 | #include "opt_iso.h" | |
44 | #include "opt_ns.h" | 44 | #include "opt_ns.h" | |
45 | #include "opt_ipkdb.h" | 45 | #include "opt_ipkdb.h" | |
46 | 46 | |||
47 | #include <sys/param.h> | 47 | #include <sys/param.h> | |
48 | #include <sys/conf.h> | 48 | #include <sys/conf.h> | |
@@ -224,27 +224,27 @@ initppc(startkernel, endkernel, args, bt | @@ -224,27 +224,27 @@ initppc(startkernel, endkernel, args, bt | |||
224 | /* | 224 | /* | |
225 | * Set the page size. | 225 | * Set the page size. | |
226 | */ | 226 | */ | |
227 | uvm_setpagesize(); | 227 | uvm_setpagesize(); | |
228 | 228 | |||
229 | /* | 229 | /* | |
230 | * Initialize pmap module. | 230 | * Initialize pmap module. | |
231 | */ | 231 | */ | |
232 | pmap_bootstrap(startkernel, endkernel); | 232 | pmap_bootstrap(startkernel, endkernel); | |
233 | 233 | |||
234 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 234 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
235 | { | 235 | { | |
236 | extern void *startsym, *endsym; | 236 | extern void *startsym, *endsym; | |
237 | ksyms_init((int)((u_int)endsym - (u_int)startsym), | 237 | ksyms_addsyms_elf((int)((u_int)endsym - (u_int)startsym), | |
238 | startsym, endsym); | 238 | startsym, endsym); | |
239 | } | 239 | } | |
240 | #endif | 240 | #endif | |
241 | #ifdef IPKDB | 241 | #ifdef IPKDB | |
242 | /* | 242 | /* | |
243 | * Now trap to IPKDB | 243 | * Now trap to IPKDB | |
244 | */ | 244 | */ | |
245 | ipkdb_init(); | 245 | ipkdb_init(); | |
246 | if (boothowto & RB_KDB) | 246 | if (boothowto & RB_KDB) | |
247 | ipkdb_connect(0); | 247 | ipkdb_connect(0); | |
248 | #endif | 248 | #endif | |
249 | } | 249 | } | |
250 | 250 |
--- src/sys/arch/evbppc/explora/machdep.c 2008/11/12 12:36:00 1.25
+++ src/sys/arch/evbppc/explora/machdep.c 2008/11/30 18:21:33 1.26
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.25 2008/11/12 12:36:00 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.26 2008/11/30 18:21:33 martin 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,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
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.25 2008/11/12 12:36:00 ad Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.26 2008/11/30 18:21:33 martin Exp $"); | |
34 | 34 | |||
35 | #include "opt_explora.h" | 35 | #include "opt_explora.h" | |
36 | #include "ksyms.h" | 36 | #include "ksyms.h" | |
37 | 37 | |||
38 | #include <sys/param.h> | 38 | #include <sys/param.h> | |
39 | #include <sys/systm.h> | 39 | #include <sys/systm.h> | |
40 | #include <sys/buf.h> | 40 | #include <sys/buf.h> | |
41 | #include <sys/msgbuf.h> | 41 | #include <sys/msgbuf.h> | |
42 | #include <sys/kernel.h> | 42 | #include <sys/kernel.h> | |
43 | #include <sys/mount.h> | 43 | #include <sys/mount.h> | |
44 | #include <sys/proc.h> | 44 | #include <sys/proc.h> | |
45 | #include <sys/user.h> | 45 | #include <sys/user.h> | |
46 | #include <sys/reboot.h> | 46 | #include <sys/reboot.h> | |
@@ -253,31 +253,26 @@ bootstrap(u_int startkernel, u_int endke | @@ -253,31 +253,26 @@ bootstrap(u_int startkernel, u_int endke | |||
253 | __asm volatile ( | 253 | __asm volatile ( | |
254 | " mfmsr %0 \n" | 254 | " mfmsr %0 \n" | |
255 | " ori %0,%0,%1 \n" | 255 | " ori %0,%0,%1 \n" | |
256 | " mtmsr %0 \n" | 256 | " mtmsr %0 \n" | |
257 | " sync \n" | 257 | " sync \n" | |
258 | : : "r" (0), "K" (PSL_IR|PSL_DR|PSL_ME) ); | 258 | : : "r" (0), "K" (PSL_IR|PSL_DR|PSL_ME) ); | |
259 | 259 | |||
260 | uvm_setpagesize(); | 260 | uvm_setpagesize(); | |
261 | 261 | |||
262 | /* | 262 | /* | |
263 | * Initialize pmap module. | 263 | * Initialize pmap module. | |
264 | */ | 264 | */ | |
265 | pmap_bootstrap(startkernel, endkernel); | 265 | pmap_bootstrap(startkernel, endkernel); | |
266 | ||||
267 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
268 | ksyms_init(0, NULL, NULL); | |||
269 | #endif | |||
270 | ||||
271 | fake_mapiodev = 0; | 266 | fake_mapiodev = 0; | |
272 | } | 267 | } | |
273 | 268 | |||
274 | static void | 269 | static void | |
275 | install_extint(void (*handler)(void)) | 270 | install_extint(void (*handler)(void)) | |
276 | { | 271 | { | |
277 | extern int extint, extsize; | 272 | extern int extint, extsize; | |
278 | extern u_long extint_call; | 273 | extern u_long extint_call; | |
279 | u_long offset = (u_long)handler - (u_long)&extint_call; | 274 | u_long offset = (u_long)handler - (u_long)&extint_call; | |
280 | int omsr, msr; | 275 | int omsr, msr; | |
281 | 276 | |||
282 | #ifdef DIAGNOSTIC | 277 | #ifdef DIAGNOSTIC | |
283 | if (offset > 0x1ffffff) | 278 | if (offset > 0x1ffffff) |
--- src/sys/arch/evbppc/obs405/obs200_machdep.c 2008/11/12 12:36:00 1.7
+++ src/sys/arch/evbppc/obs405/obs200_machdep.c 2008/11/30 18:21:33 1.8
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: obs200_machdep.c,v 1.7 2008/11/12 12:36:00 ad Exp $ */ | 1 | /* $NetBSD: obs200_machdep.c,v 1.8 2008/11/30 18:21:33 martin 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,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: obs200_machdep.c,v 1.7 2008/11/12 12:36:00 ad Exp $"); | 71 | __KERNEL_RCSID(0, "$NetBSD: obs200_machdep.c,v 1.8 2008/11/30 18:21:33 martin 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 | 76 | |||
77 | #include <sys/param.h> | 77 | #include <sys/param.h> | |
78 | #include <sys/kernel.h> | 78 | #include <sys/kernel.h> | |
79 | #include <sys/ksyms.h> | 79 | #include <sys/ksyms.h> | |
80 | #include <sys/mount.h> | 80 | #include <sys/mount.h> | |
81 | #include <sys/reboot.h> | 81 | #include <sys/reboot.h> | |
82 | #include <sys/systm.h> | 82 | #include <sys/systm.h> | |
83 | #include <sys/device.h> | 83 | #include <sys/device.h> | |
84 | 84 | |||
@@ -152,27 +152,27 @@ initppc(u_int startkernel, u_int endkern | @@ -152,27 +152,27 @@ initppc(u_int startkernel, u_int endkern | |||
152 | 152 | |||
153 | /* | 153 | /* | |
154 | * Initialize pmap module. | 154 | * Initialize pmap module. | |
155 | */ | 155 | */ | |
156 | pmap_bootstrap(startkernel, endkernel); | 156 | pmap_bootstrap(startkernel, endkernel); | |
157 | 157 | |||
158 | #ifdef DEBUG | 158 | #ifdef DEBUG | |
159 | bios_board_print(); | 159 | bios_board_print(); | |
160 | printf(" PLL Mode Register = 0x%08x\n", pllmode); | 160 | printf(" PLL Mode Register = 0x%08x\n", pllmode); | |
161 | printf(" Chip Pin Strapping Register = 0x%08x\n", psr); | 161 | printf(" Chip Pin Strapping Register = 0x%08x\n", psr); | |
162 | #endif | 162 | #endif | |
163 | 163 | |||
164 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 164 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
165 | ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | 165 | ksyms_addsyms_elf((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | |
166 | #endif | 166 | #endif | |
167 | #ifdef DDB | 167 | #ifdef DDB | |
168 | if (boothowto & RB_KDB) | 168 | if (boothowto & RB_KDB) | |
169 | Debugger(); | 169 | Debugger(); | |
170 | #endif | 170 | #endif | |
171 | #ifdef IPKDB | 171 | #ifdef IPKDB | |
172 | /* | 172 | /* | |
173 | * Now trap to IPKDB | 173 | * Now trap to IPKDB | |
174 | */ | 174 | */ | |
175 | ipkdb_init(); | 175 | ipkdb_init(); | |
176 | if (boothowto & RB_KDB) | 176 | if (boothowto & RB_KDB) | |
177 | ipkdb_connect(0); | 177 | ipkdb_connect(0); | |
178 | #endif | 178 | #endif |
--- src/sys/arch/evbppc/obs405/obs266_machdep.c 2008/11/12 12:36:00 1.8
+++ src/sys/arch/evbppc/obs405/obs266_machdep.c 2008/11/30 18:21:33 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: obs266_machdep.c,v 1.8 2008/11/12 12:36:00 ad Exp $ */ | 1 | /* $NetBSD: obs266_machdep.c,v 1.9 2008/11/30 18:21:33 martin 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,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: obs266_machdep.c,v 1.8 2008/11/12 12:36:00 ad Exp $"); | 71 | __KERNEL_RCSID(0, "$NetBSD: obs266_machdep.c,v 1.9 2008/11/30 18:21:33 martin 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 | 76 | |||
77 | #include <sys/param.h> | 77 | #include <sys/param.h> | |
78 | #include <sys/kernel.h> | 78 | #include <sys/kernel.h> | |
79 | #include <sys/ksyms.h> | 79 | #include <sys/ksyms.h> | |
80 | #include <sys/mount.h> | 80 | #include <sys/mount.h> | |
81 | #include <sys/reboot.h> | 81 | #include <sys/reboot.h> | |
82 | #include <sys/systm.h> | 82 | #include <sys/systm.h> | |
83 | #include <sys/device.h> | 83 | #include <sys/device.h> | |
84 | 84 | |||
@@ -146,27 +146,27 @@ initppc(u_int startkernel, u_int endkern | @@ -146,27 +146,27 @@ initppc(u_int startkernel, u_int endkern | |||
146 | */ | 146 | */ | |
147 | uvm_setpagesize(); | 147 | uvm_setpagesize(); | |
148 | 148 | |||
149 | /* | 149 | /* | |
150 | * Initialize pmap module. | 150 | * Initialize pmap module. | |
151 | */ | 151 | */ | |
152 | pmap_bootstrap(startkernel, endkernel); | 152 | pmap_bootstrap(startkernel, endkernel); | |
153 | 153 | |||
154 | #ifdef DEBUG | 154 | #ifdef DEBUG | |
155 | openbios_board_print(); | 155 | openbios_board_print(); | |
156 | #endif | 156 | #endif | |
157 | 157 | |||
158 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 158 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
159 | ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | 159 | ksyms_addsyms_elf((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | |
160 | #endif | 160 | #endif | |
161 | #ifdef DDB | 161 | #ifdef DDB | |
162 | if (boothowto & RB_KDB) | 162 | if (boothowto & RB_KDB) | |
163 | Debugger(); | 163 | Debugger(); | |
164 | #endif | 164 | #endif | |
165 | #ifdef IPKDB | 165 | #ifdef IPKDB | |
166 | /* | 166 | /* | |
167 | * Now trap to IPKDB | 167 | * Now trap to IPKDB | |
168 | */ | 168 | */ | |
169 | ipkdb_init(); | 169 | ipkdb_init(); | |
170 | if (boothowto & RB_KDB) | 170 | if (boothowto & RB_KDB) | |
171 | ipkdb_connect(0); | 171 | ipkdb_connect(0); | |
172 | #endif | 172 | #endif |
--- src/sys/arch/evbppc/pmppc/machdep.c 2008/11/12 12:36:00 1.5
+++ src/sys/arch/evbppc/pmppc/machdep.c 2008/11/30 18:21:33 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.5 2008/11/12 12:36:00 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.6 2008/11/30 18:21:33 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2002 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2002 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 Lennart Augustsson (lennart@augustsson.net) at Sandburst Corp. | 8 | * by Lennart Augustsson (lennart@augustsson.net) at Sandburst Corp. | |
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. | |
@@ -51,27 +51,27 @@ | @@ -51,27 +51,27 @@ | |||
51 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | 51 | * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR | |
52 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 52 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
53 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 53 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
54 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 54 | * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
56 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | 56 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | |
57 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | 57 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
58 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 58 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | |
59 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 59 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | |
60 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 60 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
61 | */ | 61 | */ | |
62 | 62 | |||
63 | #include <sys/cdefs.h> | 63 | #include <sys/cdefs.h> | |
64 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.5 2008/11/12 12:36:00 ad Exp $"); | 64 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.6 2008/11/30 18:21:33 martin Exp $"); | |
65 | 65 | |||
66 | #include "opt_compat_netbsd.h" | 66 | #include "opt_compat_netbsd.h" | |
67 | #include "opt_ddb.h" | 67 | #include "opt_ddb.h" | |
68 | #include "opt_ddbparam.h" | 68 | #include "opt_ddbparam.h" | |
69 | #include "opt_inet.h" | 69 | #include "opt_inet.h" | |
70 | #include "opt_ccitt.h" | 70 | #include "opt_ccitt.h" | |
71 | #include "opt_iso.h" | 71 | #include "opt_iso.h" | |
72 | #include "opt_ns.h" | 72 | #include "opt_ns.h" | |
73 | #include "opt_ipkdb.h" | 73 | #include "opt_ipkdb.h" | |
74 | 74 | |||
75 | #include <sys/param.h> | 75 | #include <sys/param.h> | |
76 | #include <sys/buf.h> | 76 | #include <sys/buf.h> | |
77 | #include <sys/conf.h> | 77 | #include <sys/conf.h> | |
@@ -234,33 +234,26 @@ initppc(u_int startkernel, u_int endkern | @@ -234,33 +234,26 @@ initppc(u_int startkernel, u_int endkern | |||
234 | 234 | |||
235 | printf("console set up\n"); | 235 | printf("console set up\n"); | |
236 | 236 | |||
237 | /* | 237 | /* | |
238 | * Set the page size. | 238 | * Set the page size. | |
239 | */ | 239 | */ | |
240 | uvm_setpagesize(); | 240 | uvm_setpagesize(); | |
241 | 241 | |||
242 | /* | 242 | /* | |
243 | * Initialize pmap module. | 243 | * Initialize pmap module. | |
244 | */ | 244 | */ | |
245 | pmap_bootstrap(startkernel, endkernel); | 245 | pmap_bootstrap(startkernel, endkernel); | |
246 | 246 | |||
247 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
248 | #ifdef SYMTAB_SPACE | |||
249 | ksyms_init(0, NULL, NULL); | |||
250 | #else | |||
251 | #error "No SYMTAB_SPACE" | |||
252 | #endif | |||
253 | #endif | |||
254 | #ifdef IPKDB | 247 | #ifdef IPKDB | |
255 | /* | 248 | /* | |
256 | * Now trap to IPKDB | 249 | * Now trap to IPKDB | |
257 | */ | 250 | */ | |
258 | ipkdb_init(); | 251 | ipkdb_init(); | |
259 | if (boothowto & RB_KDB) | 252 | if (boothowto & RB_KDB) | |
260 | ipkdb_connect(0); | 253 | ipkdb_connect(0); | |
261 | #endif | 254 | #endif | |
262 | #ifdef KGDB | 255 | #ifdef KGDB | |
263 | kgdb_port_init(); | 256 | kgdb_port_init(); | |
264 | if (boothowto & RB_KDB) { | 257 | if (boothowto & RB_KDB) { | |
265 | kgdb_debug_init = 1; | 258 | kgdb_debug_init = 1; | |
266 | kgdb_connect(1); | 259 | kgdb_connect(1); |
--- src/sys/arch/evbppc/virtex/machdep.c 2008/11/12 12:36:00 1.8
+++ src/sys/arch/evbppc/virtex/machdep.c 2008/11/30 18:21:33 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.8 2008/11/12 12:36:00 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.9 2008/11/30 18:21:33 martin 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,27 +24,27 @@ | @@ -24,27 +24,27 @@ | |||
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.8 2008/11/12 12:36:00 ad Exp $"); | 37 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2008/11/30 18:21:33 martin 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_virtex.h" | 42 | #include "opt_virtex.h" | |
43 | #include "opt_kgdb.h" | 43 | #include "opt_kgdb.h" | |
44 | 44 | |||
45 | #include <sys/param.h> | 45 | #include <sys/param.h> | |
46 | #include <sys/buf.h> | 46 | #include <sys/buf.h> | |
47 | #include <sys/exec.h> | 47 | #include <sys/exec.h> | |
48 | #include <sys/malloc.h> | 48 | #include <sys/malloc.h> | |
49 | #include <sys/mbuf.h> | 49 | #include <sys/mbuf.h> | |
50 | #include <sys/mount.h> | 50 | #include <sys/mount.h> | |
@@ -237,27 +237,27 @@ initppc(u_int startkernel, u_int endkern | @@ -237,27 +237,27 @@ initppc(u_int startkernel, u_int endkern | |||
237 | " ori %0,%0,%1 \n" | 237 | " ori %0,%0,%1 \n" | |
238 | " mtmsr %0 \n" | 238 | " mtmsr %0 \n" | |
239 | " sync \n" | 239 | " sync \n" | |
240 | " isync \n" | 240 | " isync \n" | |
241 | : : "r"(0), "K"(PSL_IR | PSL_DR | PSL_ME)); | 241 | : : "r"(0), "K"(PSL_IR | PSL_DR | PSL_ME)); | |
242 | 242 | |||
243 | /* now that we enabled MMU, we can map console */ | 243 | /* now that we enabled MMU, we can map console */ | |
244 | consinit(); | 244 | consinit(); | |
245 | 245 | |||
246 | uvm_setpagesize(); | 246 | uvm_setpagesize(); | |
247 | pmap_bootstrap(startkernel, endkernel); | 247 | pmap_bootstrap(startkernel, endkernel); | |
248 | 248 | |||
249 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 249 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
250 | ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | 250 | ksyms_addsyms_elf((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | |
251 | #endif | 251 | #endif | |
252 | #ifdef DDB | 252 | #ifdef DDB | |
253 | if (boothowto & RB_KDB) | 253 | if (boothowto & RB_KDB) | |
254 | Debugger(); | 254 | Debugger(); | |
255 | #endif | 255 | #endif | |
256 | #ifdef IPKDB | 256 | #ifdef IPKDB | |
257 | /* | 257 | /* | |
258 | * Now trap to IPKDB | 258 | * Now trap to IPKDB | |
259 | */ | 259 | */ | |
260 | ipkdb_init(); | 260 | ipkdb_init(); | |
261 | if (boothowto & RB_KDB) | 261 | if (boothowto & RB_KDB) | |
262 | ipkdb_connect(0); | 262 | ipkdb_connect(0); | |
263 | #endif | 263 | #endif |
--- src/sys/arch/evbppc/walnut/machdep.c 2008/11/12 12:36:00 1.38
+++ src/sys/arch/evbppc/walnut/machdep.c 2008/11/30 18:21:34 1.39
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.38 2008/11/12 12:36:00 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.39 2008/11/30 18:21:34 martin 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,27 +57,27 @@ | @@ -57,27 +57,27 @@ | |||
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.38 2008/11/12 12:36:00 ad Exp $"); | 70 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.39 2008/11/30 18:21:34 martin 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 | 75 | |||
76 | #include <sys/param.h> | 76 | #include <sys/param.h> | |
77 | #include <sys/buf.h> | 77 | #include <sys/buf.h> | |
78 | #include <sys/exec.h> | 78 | #include <sys/exec.h> | |
79 | #include <sys/malloc.h> | 79 | #include <sys/malloc.h> | |
80 | #include <sys/mbuf.h> | 80 | #include <sys/mbuf.h> | |
81 | #include <sys/mount.h> | 81 | #include <sys/mount.h> | |
82 | #include <sys/msgbuf.h> | 82 | #include <sys/msgbuf.h> | |
83 | #include <sys/proc.h> | 83 | #include <sys/proc.h> | |
@@ -312,27 +312,27 @@ initppc(u_int startkernel, u_int endkern | @@ -312,27 +312,27 @@ initppc(u_int startkernel, u_int endkern | |||
312 | board_data.mac_address_local[0], board_data.mac_address_local[1], | 312 | board_data.mac_address_local[0], board_data.mac_address_local[1], | |
313 | board_data.mac_address_local[2], board_data.mac_address_local[3], | 313 | board_data.mac_address_local[2], board_data.mac_address_local[3], | |
314 | board_data.mac_address_local[4], board_data.mac_address_local[5]); | 314 | board_data.mac_address_local[4], board_data.mac_address_local[5]); | |
315 | printf(" mac_address_pci = %02x:%02x:%02x:%02x:%02x:%02x\n", | 315 | printf(" mac_address_pci = %02x:%02x:%02x:%02x:%02x:%02x\n", | |
316 | board_data.mac_address_pci[0], board_data.mac_address_pci[1], | 316 | board_data.mac_address_pci[0], board_data.mac_address_pci[1], | |
317 | board_data.mac_address_pci[2], board_data.mac_address_pci[3], | 317 | board_data.mac_address_pci[2], board_data.mac_address_pci[3], | |
318 | board_data.mac_address_pci[4], board_data.mac_address_pci[5]); | 318 | board_data.mac_address_pci[4], board_data.mac_address_pci[5]); | |
319 | printf(" processor_speed = %u\n", board_data.processor_speed); | 319 | printf(" processor_speed = %u\n", board_data.processor_speed); | |
320 | printf(" plb_speed = %u\n", board_data.plb_speed); | 320 | printf(" plb_speed = %u\n", board_data.plb_speed); | |
321 | printf(" pci_speed = %u\n", board_data.pci_speed); | 321 | printf(" pci_speed = %u\n", board_data.pci_speed); | |
322 | #endif | 322 | #endif | |
323 | 323 | |||
324 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 324 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
325 | ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | 325 | ksyms_addsyms_elf((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | |
326 | #endif | 326 | #endif | |
327 | #ifdef DDB | 327 | #ifdef DDB | |
328 | if (boothowto & RB_KDB) | 328 | if (boothowto & RB_KDB) | |
329 | Debugger(); | 329 | Debugger(); | |
330 | #endif | 330 | #endif | |
331 | #ifdef IPKDB | 331 | #ifdef IPKDB | |
332 | /* | 332 | /* | |
333 | * Now trap to IPKDB | 333 | * Now trap to IPKDB | |
334 | */ | 334 | */ | |
335 | ipkdb_init(); | 335 | ipkdb_init(); | |
336 | if (boothowto & RB_KDB) | 336 | if (boothowto & RB_KDB) | |
337 | ipkdb_connect(0); | 337 | ipkdb_connect(0); | |
338 | #endif | 338 | #endif |
--- src/sys/arch/evbsh3/evbsh3/machdep.c 2008/11/12 12:36:00 1.62
+++ src/sys/arch/evbsh3/evbsh3/machdep.c 2008/11/30 18:21:34 1.63
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.62 2008/11/12 12:36:00 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.63 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996, 1997, 1998 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 Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace | 8 | * by Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace | |
9 | * Simulation Facility, NASA Ames Research Center. | 9 | * Simulation Facility, NASA Ames Research Center. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -55,27 +55,27 @@ | @@ -55,27 +55,27 @@ | |||
55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
62 | * SUCH DAMAGE. | 62 | * SUCH DAMAGE. | |
63 | * | 63 | * | |
64 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | 64 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | |
65 | */ | 65 | */ | |
66 | 66 | |||
67 | #include <sys/cdefs.h> | 67 | #include <sys/cdefs.h> | |
68 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.62 2008/11/12 12:36:00 ad Exp $"); | 68 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.63 2008/11/30 18:21:34 martin Exp $"); | |
69 | 69 | |||
70 | #include "opt_ddb.h" | 70 | #include "opt_ddb.h" | |
71 | #include "opt_kgdb.h" | 71 | #include "opt_kgdb.h" | |
72 | #include "opt_memsize.h" | 72 | #include "opt_memsize.h" | |
73 | #include "opt_initbsc.h" | 73 | #include "opt_initbsc.h" | |
74 | 74 | |||
75 | #include <sys/param.h> | 75 | #include <sys/param.h> | |
76 | #include <sys/systm.h> | 76 | #include <sys/systm.h> | |
77 | #include <sys/kernel.h> | 77 | #include <sys/kernel.h> | |
78 | #include <sys/user.h> | 78 | #include <sys/user.h> | |
79 | #include <sys/mount.h> | 79 | #include <sys/mount.h> | |
80 | #include <sys/reboot.h> | 80 | #include <sys/reboot.h> | |
81 | #include <sys/sysctl.h> | 81 | #include <sys/sysctl.h> | |
@@ -260,31 +260,27 @@ initSH3(void *pc) /* XXX return address | @@ -260,31 +260,27 @@ initSH3(void *pc) /* XXX return address | |||
260 | kernend = atop(round_page(SH3_P1SEG_TO_PHYS(end))); | 260 | kernend = atop(round_page(SH3_P1SEG_TO_PHYS(end))); | |
261 | physmem = atop(IOM_RAM_SIZE); | 261 | physmem = atop(IOM_RAM_SIZE); | |
262 | uvm_page_physload( | 262 | uvm_page_physload( | |
263 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | 263 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | |
264 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | 264 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | |
265 | VM_FREELIST_DEFAULT); | 265 | VM_FREELIST_DEFAULT); | |
266 | 266 | |||
267 | /* Initialize proc0 u-area */ | 267 | /* Initialize proc0 u-area */ | |
268 | sh_proc0_init(); | 268 | sh_proc0_init(); | |
269 | 269 | |||
270 | /* Initialize pmap and start to address translation */ | 270 | /* Initialize pmap and start to address translation */ | |
271 | pmap_bootstrap(); | 271 | pmap_bootstrap(); | |
272 | 272 | |||
273 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 273 | # /* | |
274 | ksyms_init(0, NULL, NULL); | |||
275 | #endif | |||
276 | ||||
277 | /* | |||
278 | * XXX We can't return here, because we change stack pointer. | 274 | * XXX We can't return here, because we change stack pointer. | |
279 | * So jump to return address directly. | 275 | * So jump to return address directly. | |
280 | */ | 276 | */ | |
281 | __asm volatile ( | 277 | __asm volatile ( | |
282 | "jmp @%0;" | 278 | "jmp @%0;" | |
283 | "mov %1, r15" | 279 | "mov %1, r15" | |
284 | :: "r"(pc),"r"(lwp0.l_md.md_pcb->pcb_sf.sf_r7_bank)); | 280 | :: "r"(pc),"r"(lwp0.l_md.md_pcb->pcb_sf.sf_r7_bank)); | |
285 | } | 281 | } | |
286 | 282 | |||
287 | /* | 283 | /* | |
288 | * consinit: | 284 | * consinit: | |
289 | * initialize the system console. | 285 | * initialize the system console. | |
290 | * XXX - shouldn't deal with this initted thing, but then, | 286 | * XXX - shouldn't deal with this initted thing, but then, |
--- src/sys/arch/ews4800mips/ews4800mips/machdep.c 2008/11/11 06:46:42 1.15
+++ src/sys/arch/ews4800mips/ews4800mips/machdep.c 2008/11/30 18:21:34 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.15 2008/11/11 06:46:42 dyoung Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.16 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2001, 2004, 2005 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2001, 2004, 2005 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -17,27 +17,27 @@ | @@ -17,27 +17,27 @@ | |||
17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
19 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 19 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
26 | * POSSIBILITY OF SUCH DAMAGE. | 26 | * POSSIBILITY OF SUCH DAMAGE. | |
27 | */ | 27 | */ | |
28 | 28 | |||
29 | #include <sys/cdefs.h> | 29 | #include <sys/cdefs.h> | |
30 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2008/11/11 06:46:42 dyoung Exp $"); | 30 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2008/11/30 18:21:34 martin Exp $"); | |
31 | 31 | |||
32 | #include "opt_ddb.h" | 32 | #include "opt_ddb.h" | |
33 | 33 | |||
34 | #include <sys/param.h> | 34 | #include <sys/param.h> | |
35 | #include <sys/systm.h> | 35 | #include <sys/systm.h> | |
36 | #include <sys/kernel.h> | 36 | #include <sys/kernel.h> | |
37 | #include <sys/proc.h> | 37 | #include <sys/proc.h> | |
38 | #include <sys/user.h> | 38 | #include <sys/user.h> | |
39 | #include <sys/buf.h> | 39 | #include <sys/buf.h> | |
40 | #include <sys/reboot.h> | 40 | #include <sys/reboot.h> | |
41 | #include <sys/mount.h> | 41 | #include <sys/mount.h> | |
42 | #include <sys/kcore.h> | 42 | #include <sys/kcore.h> | |
43 | #include <sys/boot_flag.h> | 43 | #include <sys/boot_flag.h> | |
@@ -187,27 +187,27 @@ option(int argc, char *argv[], struct bo | @@ -187,27 +187,27 @@ option(int argc, char *argv[], struct bo | |||
187 | char *p; | 187 | char *p; | |
188 | int i; | 188 | int i; | |
189 | 189 | |||
190 | printf("argc=%d argv=%p syminfo=%p\n", argc, argv, bi); | 190 | printf("argc=%d argv=%p syminfo=%p\n", argc, argv, bi); | |
191 | printf("version=%d size=%d nsym=%d ssym=%p esym=%p\n", | 191 | printf("version=%d size=%d nsym=%d ssym=%p esym=%p\n", | |
192 | bi->bi_version, bi->bi_size, bi->bi_nsym, bi->bi_ssym, bi->bi_esym); | 192 | bi->bi_version, bi->bi_size, bi->bi_nsym, bi->bi_ssym, bi->bi_esym); | |
193 | 193 | |||
194 | for (i = 0; i < argc; i++) | 194 | for (i = 0; i < argc; i++) | |
195 | printf("[%d] %s\n", i, argv[i]); | 195 | printf("[%d] %s\n", i, argv[i]); | |
196 | 196 | |||
197 | #ifdef DDB | 197 | #ifdef DDB | |
198 | /* Load symbol table */ | 198 | /* Load symbol table */ | |
199 | if (bi->bi_nsym) | 199 | if (bi->bi_nsym) | |
200 | ksyms_init(bi->bi_esym - bi->bi_ssym, | 200 | ksyms_addsyms_elf(bi->bi_esym - bi->bi_ssym, | |
201 | (void *)bi->bi_ssym, (void *)bi->bi_esym); | 201 | (void *)bi->bi_ssym, (void *)bi->bi_esym); | |
202 | #endif | 202 | #endif | |
203 | /* Parse option */ | 203 | /* Parse option */ | |
204 | boot_device_set = false; | 204 | boot_device_set = false; | |
205 | for (i = 2; i < argc; i++) { | 205 | for (i = 2; i < argc; i++) { | |
206 | p = argv[i]; | 206 | p = argv[i]; | |
207 | /* prompt for root device */ | 207 | /* prompt for root device */ | |
208 | if (p[0] == '-' && p[1] == 'a') | 208 | if (p[0] == '-' && p[1] == 'a') | |
209 | boot_device_set = true; | 209 | boot_device_set = true; | |
210 | 210 | |||
211 | /* root device option. ex) -b=net:netbsd, -b=sd0k:netbsd */ | 211 | /* root device option. ex) -b=net:netbsd, -b=sd0k:netbsd */ | |
212 | if (p[0] == '-' && p[1] == 'b') { | 212 | if (p[0] == '-' && p[1] == 'b') { | |
213 | boot_device_set = true; | 213 | boot_device_set = true; |
--- src/sys/arch/hp300/hp300/machdep.c 2008/11/12 12:36:00 1.202
+++ src/sys/arch/hp300/hp300/machdep.c 2008/11/30 18:21:34 1.203
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.202 2008/11/12 12:36:00 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.203 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1990, 1993 | 4 | * Copyright (c) 1982, 1986, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -67,27 +67,27 @@ | @@ -67,27 +67,27 @@ | |||
67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
72 | * SUCH DAMAGE. | 72 | * SUCH DAMAGE. | |
73 | * | 73 | * | |
74 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | 74 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | |
75 | * | 75 | * | |
76 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | 76 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | |
77 | */ | 77 | */ | |
78 | 78 | |||
79 | #include <sys/cdefs.h> | 79 | #include <sys/cdefs.h> | |
80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.202 2008/11/12 12:36:00 ad Exp $"); | 80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.203 2008/11/30 18:21:34 martin Exp $"); | |
81 | 81 | |||
82 | #include "opt_ddb.h" | 82 | #include "opt_ddb.h" | |
83 | #include "opt_compat_netbsd.h" | 83 | #include "opt_compat_netbsd.h" | |
84 | #include "opt_panicbutton.h" | 84 | #include "opt_panicbutton.h" | |
85 | #include "hil.h" | 85 | #include "hil.h" | |
86 | 86 | |||
87 | #include <sys/param.h> | 87 | #include <sys/param.h> | |
88 | #include <sys/systm.h> | 88 | #include <sys/systm.h> | |
89 | #include <sys/callout.h> | 89 | #include <sys/callout.h> | |
90 | #include <sys/buf.h> | 90 | #include <sys/buf.h> | |
91 | #include <sys/conf.h> | 91 | #include <sys/conf.h> | |
92 | #include <sys/exec.h> | 92 | #include <sys/exec.h> | |
93 | #include <sys/file.h> | 93 | #include <sys/file.h> | |
@@ -284,27 +284,27 @@ consinit(void) | @@ -284,27 +284,27 @@ consinit(void) | |||
284 | hp300_cninit(); | 284 | hp300_cninit(); | |
285 | 285 | |||
286 | /* | 286 | /* | |
287 | * Issue a warning if the boot loader didn't provide bootinfo. | 287 | * Issue a warning if the boot loader didn't provide bootinfo. | |
288 | */ | 288 | */ | |
289 | if (bootinfo_va == 0) | 289 | if (bootinfo_va == 0) | |
290 | printf("WARNING: boot loader did not provide bootinfo\n"); | 290 | printf("WARNING: boot loader did not provide bootinfo\n"); | |
291 | 291 | |||
292 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 292 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
293 | { | 293 | { | |
294 | extern int end; | 294 | extern int end; | |
295 | extern int *esym; | 295 | extern int *esym; | |
296 | 296 | |||
297 | ksyms_init((int)esym - (int)&end - sizeof(Elf32_Ehdr), | 297 | ksyms_addsyms_elf((int)esym - (int)&end - sizeof(Elf32_Ehdr), | |
298 | (void *)&end, esym); | 298 | (void *)&end, esym); | |
299 | } | 299 | } | |
300 | #endif | 300 | #endif | |
301 | #ifdef DDB | 301 | #ifdef DDB | |
302 | if (boothowto & RB_KDB) | 302 | if (boothowto & RB_KDB) | |
303 | Debugger(); | 303 | Debugger(); | |
304 | #endif | 304 | #endif | |
305 | } | 305 | } | |
306 | 306 | |||
307 | /* | 307 | /* | |
308 | * cpu_startup: allocate memory for variable-sized tables, | 308 | * cpu_startup: allocate memory for variable-sized tables, | |
309 | * initialize CPU | 309 | * initialize CPU | |
310 | */ | 310 | */ |
--- src/sys/arch/hp700/hp700/Attic/machdep.c 2008/11/25 15:51:34 1.53
+++ src/sys/arch/hp700/hp700/Attic/machdep.c 2008/11/30 18:21:34 1.54
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.53 2008/11/25 15:51:34 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.54 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2001, 2002 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 Matthew Fredette. | 8 | * by Matthew Fredette. | |
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. | |
@@ -53,27 +53,27 @@ | @@ -53,27 +53,27 @@ | |||
53 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 53 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
54 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 54 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
55 | * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, | 55 | * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, | |
56 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 56 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
57 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 57 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
58 | * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 58 | * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
60 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | 60 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | |
61 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | 61 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | |
62 | * THE POSSIBILITY OF SUCH DAMAGE. | 62 | * THE POSSIBILITY OF SUCH DAMAGE. | |
63 | */ | 63 | */ | |
64 | 64 | |||
65 | #include <sys/cdefs.h> | 65 | #include <sys/cdefs.h> | |
66 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.53 2008/11/25 15:51:34 ad Exp $"); | 66 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.54 2008/11/30 18:21:34 martin Exp $"); | |
67 | 67 | |||
68 | #include "opt_cputype.h" | 68 | #include "opt_cputype.h" | |
69 | #include "opt_ddb.h" | 69 | #include "opt_ddb.h" | |
70 | #include "opt_kgdb.h" | 70 | #include "opt_kgdb.h" | |
71 | #include "opt_useleds.h" | 71 | #include "opt_useleds.h" | |
72 | #include "opt_power_switch.h" | 72 | #include "opt_power_switch.h" | |
73 | 73 | |||
74 | #include <sys/param.h> | 74 | #include <sys/param.h> | |
75 | #include <sys/systm.h> | 75 | #include <sys/systm.h> | |
76 | #include <sys/signalvar.h> | 76 | #include <sys/signalvar.h> | |
77 | #include <sys/kernel.h> | 77 | #include <sys/kernel.h> | |
78 | #include <sys/proc.h> | 78 | #include <sys/proc.h> | |
79 | #include <sys/buf.h> | 79 | #include <sys/buf.h> | |
@@ -808,32 +808,32 @@ do { \ | @@ -808,32 +808,32 @@ do { \ | |||
808 | */ | 808 | */ | |
809 | hp700_kgdb_attached = false; | 809 | hp700_kgdb_attached = false; | |
810 | #if NCOM > 0 | 810 | #if NCOM > 0 | |
811 | if (!strcmp(KGDB_DEVNAME, "com")) { | 811 | if (!strcmp(KGDB_DEVNAME, "com")) { | |
812 | int com_gsc_kgdb_attach(void); | 812 | int com_gsc_kgdb_attach(void); | |
813 | if (com_gsc_kgdb_attach() == 0) | 813 | if (com_gsc_kgdb_attach() == 0) | |
814 | hp700_kgdb_attached = true; | 814 | hp700_kgdb_attached = true; | |
815 | } | 815 | } | |
816 | #endif /* NCOM > 0 */ | 816 | #endif /* NCOM > 0 */ | |
817 | #endif /* KGDB */ | 817 | #endif /* KGDB */ | |
818 | 818 | |||
819 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 819 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
820 | if ((bi_sym = lookup_bootinfo(BTINFO_SYMTAB)) != NULL) | 820 | if ((bi_sym = lookup_bootinfo(BTINFO_SYMTAB)) != NULL) | |
821 | ksyms_init(bi_sym->nsym, (int *)bi_sym->ssym, | 821 | ksyms_addsyms_elf(bi_sym->nsym, (int *)bi_sym->ssym, | |
822 | (int *)bi_sym->esym); | 822 | (int *)bi_sym->esym); | |
823 | else { | 823 | else { | |
824 | extern int end; | 824 | extern int end; | |
825 | 825 | |||
826 | ksyms_init(esym - (int)&end, &end, (int*)esym); | 826 | ksyms_addsyms_elf(esym - (int)&end, &end, (int*)esym); | |
827 | } | 827 | } | |
828 | #endif | 828 | #endif | |
829 | 829 | |||
830 | /* We will shortly go virtual. */ | 830 | /* We will shortly go virtual. */ | |
831 | pagezero_mapped = 0; | 831 | pagezero_mapped = 0; | |
832 | } | 832 | } | |
833 | 833 | |||
834 | void | 834 | void | |
835 | cpu_startup(void) | 835 | cpu_startup(void) | |
836 | { | 836 | { | |
837 | vaddr_t minaddr, maxaddr; | 837 | vaddr_t minaddr, maxaddr; | |
838 | char pbuf[3][9]; | 838 | char pbuf[3][9]; | |
839 | #ifdef PMAPDEBUG | 839 | #ifdef PMAPDEBUG |
--- src/sys/arch/hpcarm/hpcarm/hpc_machdep.c 2008/11/12 12:36:01 1.88
+++ src/sys/arch/hpcarm/hpcarm/hpc_machdep.c 2008/11/30 18:21:34 1.89
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: hpc_machdep.c,v 1.88 2008/11/12 12:36:01 ad Exp $ */ | 1 | /* $NetBSD: hpc_machdep.c,v 1.89 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1994-1998 Mark Brinicombe. | 4 | * Copyright (c) 1994-1998 Mark Brinicombe. | |
5 | * Copyright (c) 1994 Brini. | 5 | * Copyright (c) 1994 Brini. | |
6 | * All rights reserved. | 6 | * All rights reserved. | |
7 | * | 7 | * | |
8 | * This code is derived from software written for Brini by Mark Brinicombe | 8 | * This code is derived from software written for Brini by Mark Brinicombe | |
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. | |
@@ -30,27 +30,27 @@ | @@ -30,27 +30,27 @@ | |||
30 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 30 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
32 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 32 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
33 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 33 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
34 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 34 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
35 | * SUCH DAMAGE. | 35 | * SUCH DAMAGE. | |
36 | */ | 36 | */ | |
37 | 37 | |||
38 | /* | 38 | /* | |
39 | * Machine dependent functions for kernel setup. | 39 | * Machine dependent functions for kernel setup. | |
40 | */ | 40 | */ | |
41 | 41 | |||
42 | #include <sys/cdefs.h> | 42 | #include <sys/cdefs.h> | |
43 | __KERNEL_RCSID(0, "$NetBSD: hpc_machdep.c,v 1.88 2008/11/12 12:36:01 ad Exp $"); | 43 | __KERNEL_RCSID(0, "$NetBSD: hpc_machdep.c,v 1.89 2008/11/30 18:21:34 martin Exp $"); | |
44 | 44 | |||
45 | #include "opt_ddb.h" | 45 | #include "opt_ddb.h" | |
46 | #include "opt_pmap_debug.h" | 46 | #include "opt_pmap_debug.h" | |
47 | #include "fs_nfs.h" | 47 | #include "fs_nfs.h" | |
48 | #include "ksyms.h" | 48 | #include "ksyms.h" | |
49 | 49 | |||
50 | #include <sys/param.h> | 50 | #include <sys/param.h> | |
51 | #include <sys/systm.h> | 51 | #include <sys/systm.h> | |
52 | #include <sys/kernel.h> | 52 | #include <sys/kernel.h> | |
53 | #include <sys/reboot.h> | 53 | #include <sys/reboot.h> | |
54 | #include <sys/proc.h> | 54 | #include <sys/proc.h> | |
55 | #include <sys/msgbuf.h> | 55 | #include <sys/msgbuf.h> | |
56 | #include <sys/exec.h> | 56 | #include <sys/exec.h> | |
@@ -697,27 +697,27 @@ initarm(int argc, char **argv, struct bo | @@ -697,27 +697,27 @@ initarm(int argc, char **argv, struct bo | |||
697 | } | 697 | } | |
698 | 698 | |||
699 | /* Boot strap pmap telling it where the kernel page table is */ | 699 | /* Boot strap pmap telling it where the kernel page table is */ | |
700 | pmap_bootstrap(KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); | 700 | pmap_bootstrap(KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); | |
701 | 701 | |||
702 | #ifdef BOOT_DUMP | 702 | #ifdef BOOT_DUMP | |
703 | dumppages((char *)kernel_l1pt.pv_va, 16); | 703 | dumppages((char *)kernel_l1pt.pv_va, 16); | |
704 | #endif | 704 | #endif | |
705 | 705 | |||
706 | #ifdef DDB | 706 | #ifdef DDB | |
707 | db_machine_init(); | 707 | db_machine_init(); | |
708 | #endif | 708 | #endif | |
709 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 709 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
710 | ksyms_init(symbolsize, ((int *)&end), ((char *)&end) + symbolsize); | 710 | ksyms_addsyms_elf(symbolsize, ((int *)&end), ((char *)&end) + symbolsize); | |
711 | #endif | 711 | #endif | |
712 | 712 | |||
713 | printf("kernsize=0x%x", kerneldatasize); | 713 | printf("kernsize=0x%x", kerneldatasize); | |
714 | printf(" (including 0x%x symbols)\n", symbolsize); | 714 | printf(" (including 0x%x symbols)\n", symbolsize); | |
715 | 715 | |||
716 | #ifdef DDB | 716 | #ifdef DDB | |
717 | if (boothowto & RB_KDB) | 717 | if (boothowto & RB_KDB) | |
718 | Debugger(); | 718 | Debugger(); | |
719 | #endif /* DDB */ | 719 | #endif /* DDB */ | |
720 | 720 | |||
721 | if (bootinfo->magic == BOOTINFO_MAGIC) { | 721 | if (bootinfo->magic == BOOTINFO_MAGIC) { | |
722 | platid.dw.dw0 = bootinfo->platid_cpu; | 722 | platid.dw.dw0 = bootinfo->platid_cpu; | |
723 | platid.dw.dw1 = bootinfo->platid_machine; | 723 | platid.dw.dw1 = bootinfo->platid_machine; |
--- src/sys/arch/hpcmips/hpcmips/machdep.c 2008/11/12 12:36:01 1.98
+++ src/sys/arch/hpcmips/hpcmips/machdep.c 2008/11/30 18:21:34 1.99
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.98 2008/11/12 12:36:01 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.99 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1999 Shin Takemura, All rights reserved. | 4 | * Copyright (c) 1999 Shin Takemura, All rights reserved. | |
5 | * Copyright (c) 1999-2001 SATO Kazumi, All rights reserved. | 5 | * Copyright (c) 1999-2001 SATO Kazumi, All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -98,27 +98,27 @@ | @@ -98,27 +98,27 @@ | |||
98 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 98 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
99 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 99 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
101 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 101 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
102 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 102 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
103 | * SUCH DAMAGE. | 103 | * SUCH DAMAGE. | |
104 | * | 104 | * | |
105 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | 105 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | |
106 | * | 106 | * | |
107 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | 107 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | |
108 | */ | 108 | */ | |
109 | 109 | |||
110 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 110 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
111 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.98 2008/11/12 12:36:01 ad Exp $"); | 111 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.99 2008/11/30 18:21:34 martin Exp $"); | |
112 | 112 | |||
113 | #include "opt_vr41xx.h" | 113 | #include "opt_vr41xx.h" | |
114 | #include "opt_tx39xx.h" | 114 | #include "opt_tx39xx.h" | |
115 | #include "opt_boot_standalone.h" | 115 | #include "opt_boot_standalone.h" | |
116 | #include "opt_spec_platform.h" | 116 | #include "opt_spec_platform.h" | |
117 | #include "biconsdev.h" | 117 | #include "biconsdev.h" | |
118 | #include "fs_mfs.h" | 118 | #include "fs_mfs.h" | |
119 | #include "opt_ddb.h" | 119 | #include "opt_ddb.h" | |
120 | #include "opt_kgdb.h" | 120 | #include "opt_kgdb.h" | |
121 | #include "opt_rtc_offset.h" | 121 | #include "opt_rtc_offset.h" | |
122 | #include "fs_nfs.h" | 122 | #include "fs_nfs.h" | |
123 | #include "opt_kloader.h" | 123 | #include "opt_kloader.h" | |
124 | #include "opt_kloader_kernel_path.h" | 124 | #include "opt_kloader_kernel_path.h" | |
@@ -440,27 +440,27 @@ mach_init(int argc, char *argv[], struct | @@ -440,27 +440,27 @@ mach_init(int argc, char *argv[], struct | |||
440 | if (boothowto & RB_MINIROOT) { | 440 | if (boothowto & RB_MINIROOT) { | |
441 | size_t fssz; | 441 | size_t fssz; | |
442 | fssz = round_page(mfs_initminiroot(kernend)); | 442 | fssz = round_page(mfs_initminiroot(kernend)); | |
443 | #ifdef MEMORY_DISK_DYNAMIC | 443 | #ifdef MEMORY_DISK_DYNAMIC | |
444 | md_root_setconf(kernend, fssz); | 444 | md_root_setconf(kernend, fssz); | |
445 | #endif /* MEMORY_DISK_DYNAMIC */ | 445 | #endif /* MEMORY_DISK_DYNAMIC */ | |
446 | kernend = (char *)kernend + fssz; | 446 | kernend = (char *)kernend + fssz; | |
447 | } | 447 | } | |
448 | #endif /* MFS */ | 448 | #endif /* MFS */ | |
449 | 449 | |||
450 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 450 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
451 | /* init symbols if present */ | 451 | /* init symbols if present */ | |
452 | if (esym) | 452 | if (esym) | |
453 | ksyms_init(symbolsz, &end, esym); | 453 | ksyms_addsyms_elf(symbolsz, &end, esym); | |
454 | #endif /* DDB */ | 454 | #endif /* DDB */ | |
455 | /* | 455 | /* | |
456 | * Alloc u pages for lwp0 stealing KSEG0 memory. | 456 | * Alloc u pages for lwp0 stealing KSEG0 memory. | |
457 | */ | 457 | */ | |
458 | lwp0.l_addr = proc0paddr = (struct user *)kernend; | 458 | lwp0.l_addr = proc0paddr = (struct user *)kernend; | |
459 | lwp0.l_md.md_regs = | 459 | lwp0.l_md.md_regs = | |
460 | (struct frame *)((char *)kernend + UPAGES * PAGE_SIZE) - 1; | 460 | (struct frame *)((char *)kernend + UPAGES * PAGE_SIZE) - 1; | |
461 | memset(kernend, 0, UPAGES * PAGE_SIZE); | 461 | memset(kernend, 0, UPAGES * PAGE_SIZE); | |
462 | proc0paddr->u_pcb.pcb_context[11] = | 462 | proc0paddr->u_pcb.pcb_context[11] = | |
463 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | 463 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | |
464 | 464 | |||
465 | kernend = (char *)kernend + UPAGES * PAGE_SIZE; | 465 | kernend = (char *)kernend + UPAGES * PAGE_SIZE; | |
466 | 466 |
--- src/sys/arch/hpcsh/hpcsh/machdep.c 2008/11/17 02:05:13 1.64
+++ src/sys/arch/hpcsh/hpcsh/machdep.c 2008/11/30 18:21:34 1.65
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.64 2008/11/17 02:05:13 uwe Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.65 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2001, 2002, 2004 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -17,27 +17,27 @@ | @@ -17,27 +17,27 @@ | |||
17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
19 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 19 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
26 | * POSSIBILITY OF SUCH DAMAGE. | 26 | * POSSIBILITY OF SUCH DAMAGE. | |
27 | */ | 27 | */ | |
28 | 28 | |||
29 | #include <sys/cdefs.h> | 29 | #include <sys/cdefs.h> | |
30 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.64 2008/11/17 02:05:13 uwe Exp $"); | 30 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.65 2008/11/30 18:21:34 martin Exp $"); | |
31 | 31 | |||
32 | #include "opt_md.h" | 32 | #include "opt_md.h" | |
33 | #include "opt_ddb.h" | 33 | #include "opt_ddb.h" | |
34 | #include "opt_kgdb.h" | 34 | #include "opt_kgdb.h" | |
35 | #include "fs_mfs.h" | 35 | #include "fs_mfs.h" | |
36 | #include "fs_nfs.h" | 36 | #include "fs_nfs.h" | |
37 | #include "biconsdev.h" | 37 | #include "biconsdev.h" | |
38 | #include "debug_hpc.h" | 38 | #include "debug_hpc.h" | |
39 | #include "hd64465if.h" | 39 | #include "hd64465if.h" | |
40 | 40 | |||
41 | #include "opt_kloader.h" | 41 | #include "opt_kloader.h" | |
42 | #ifdef KLOADER | 42 | #ifdef KLOADER | |
43 | #if !defined(KLOADER_KERNEL_PATH) | 43 | #if !defined(KLOADER_KERNEL_PATH) | |
@@ -285,27 +285,27 @@ machine_startup(int argc, char *argv[], | @@ -285,27 +285,27 @@ machine_startup(int argc, char *argv[], | |||
285 | /* Find memory cluster. and load to UVM */ | 285 | /* Find memory cluster. and load to UVM */ | |
286 | physmem = mem_cluster_init(SH3_P1SEG_TO_PHYS(kernend)); | 286 | physmem = mem_cluster_init(SH3_P1SEG_TO_PHYS(kernend)); | |
287 | _DPRINTF("total memory = %dMbyte\n", (int)(sh3_ptob(physmem) >> 20)); | 287 | _DPRINTF("total memory = %dMbyte\n", (int)(sh3_ptob(physmem) >> 20)); | |
288 | mem_cluster_load(); | 288 | mem_cluster_load(); | |
289 | 289 | |||
290 | /* Initialize proc0 u-area */ | 290 | /* Initialize proc0 u-area */ | |
291 | sh_proc0_init(); | 291 | sh_proc0_init(); | |
292 | 292 | |||
293 | /* Initialize pmap and start to address translation */ | 293 | /* Initialize pmap and start to address translation */ | |
294 | pmap_bootstrap(); | 294 | pmap_bootstrap(); | |
295 | 295 | |||
296 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 296 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
297 | if (symbolsize) { | 297 | if (symbolsize) { | |
298 | ksyms_init(symbolsize, &end, end + symbolsize); | 298 | ksyms_addsyms_elf(symbolsize, &end, end + symbolsize); | |
299 | _DPRINTF("symbol size = %d byte\n", symbolsize); | 299 | _DPRINTF("symbol size = %d byte\n", symbolsize); | |
300 | } | 300 | } | |
301 | #endif | 301 | #endif | |
302 | #ifdef DDB | 302 | #ifdef DDB | |
303 | /* Debugger. */ | 303 | /* Debugger. */ | |
304 | if (boothowto & RB_KDB) | 304 | if (boothowto & RB_KDB) | |
305 | Debugger(); | 305 | Debugger(); | |
306 | #endif /* DDB */ | 306 | #endif /* DDB */ | |
307 | #ifdef KGDB | 307 | #ifdef KGDB | |
308 | if (boothowto & RB_KDB) { | 308 | if (boothowto & RB_KDB) { | |
309 | if (kgdb_dev == NODEV) { | 309 | if (kgdb_dev == NODEV) { | |
310 | printf("no kgdb console.\n"); | 310 | printf("no kgdb console.\n"); | |
311 | } else { | 311 | } else { |
--- src/sys/arch/i386/i386/machdep.c 2008/11/20 10:53:09 1.652
+++ src/sys/arch/i386/i386/machdep.c 2008/11/30 18:21:34 1.653
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.652 2008/11/20 10:53:09 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.653 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008 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 Charles M. Hannum, by Jason R. Thorpe of the Numerical Aerospace | 8 | * by Charles M. Hannum, by Jason R. Thorpe of the Numerical Aerospace | |
9 | * Simulation Facility, NASA Ames Research Center and by Julio M. Merino Vidal. | 9 | * Simulation Facility, NASA Ames Research Center and by Julio M. Merino Vidal. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -55,27 +55,27 @@ | @@ -55,27 +55,27 @@ | |||
55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
62 | * SUCH DAMAGE. | 62 | * SUCH DAMAGE. | |
63 | * | 63 | * | |
64 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | 64 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | |
65 | */ | 65 | */ | |
66 | 66 | |||
67 | #include <sys/cdefs.h> | 67 | #include <sys/cdefs.h> | |
68 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.652 2008/11/20 10:53:09 ad Exp $"); | 68 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.653 2008/11/30 18:21:34 martin Exp $"); | |
69 | 69 | |||
70 | #include "opt_beep.h" | 70 | #include "opt_beep.h" | |
71 | #include "opt_compat_ibcs2.h" | 71 | #include "opt_compat_ibcs2.h" | |
72 | #include "opt_compat_mach.h" /* need to get the right segment def */ | 72 | #include "opt_compat_mach.h" /* need to get the right segment def */ | |
73 | #include "opt_compat_netbsd.h" | 73 | #include "opt_compat_netbsd.h" | |
74 | #include "opt_compat_svr4.h" | 74 | #include "opt_compat_svr4.h" | |
75 | #include "opt_cpureset_delay.h" | 75 | #include "opt_cpureset_delay.h" | |
76 | #include "opt_ddb.h" | 76 | #include "opt_ddb.h" | |
77 | #include "opt_ipkdb.h" | 77 | #include "opt_ipkdb.h" | |
78 | #include "opt_kgdb.h" | 78 | #include "opt_kgdb.h" | |
79 | #include "opt_mtrr.h" | 79 | #include "opt_mtrr.h" | |
80 | #include "opt_multiprocessor.h" | 80 | #include "opt_multiprocessor.h" | |
81 | #include "opt_physmem.h" | 81 | #include "opt_physmem.h" | |
@@ -1252,38 +1252,38 @@ init386_pte0(void) | @@ -1252,38 +1252,38 @@ init386_pte0(void) | |||
1252 | 1252 | |||
1253 | static void | 1253 | static void | |
1254 | init386_ksyms(void) | 1254 | init386_ksyms(void) | |
1255 | { | 1255 | { | |
1256 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 1256 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
1257 | extern int end; | 1257 | extern int end; | |
1258 | struct btinfo_symtab *symtab; | 1258 | struct btinfo_symtab *symtab; | |
1259 | 1259 | |||
1260 | #ifdef DDB | 1260 | #ifdef DDB | |
1261 | db_machine_init(); | 1261 | db_machine_init(); | |
1262 | #endif | 1262 | #endif | |
1263 | 1263 | |||
1264 | #if defined(MULTIBOOT) | 1264 | #if defined(MULTIBOOT) | |
1265 | if (multiboot_ksyms_init()) | 1265 | if (multiboot_ksyms_addsyms_elf()) | |
1266 | return; | 1266 | return; | |
1267 | #endif | 1267 | #endif | |
1268 | 1268 | |||
1269 | if ((symtab = lookup_bootinfo(BTINFO_SYMTAB)) == NULL) { | 1269 | if ((symtab = lookup_bootinfo(BTINFO_SYMTAB)) == NULL) { | |
1270 | ksyms_init(*(int *)&end, ((int *)&end) + 1, esym); | 1270 | ksyms_addsyms_elf(*(int *)&end, ((int *)&end) + 1, esym); | |
1271 | return; | 1271 | return; | |
1272 | } | 1272 | } | |
1273 | 1273 | |||
1274 | symtab->ssym += KERNBASE; | 1274 | symtab->ssym += KERNBASE; | |
1275 | symtab->esym += KERNBASE; | 1275 | symtab->esym += KERNBASE; | |
1276 | ksyms_init(symtab->nsym, (int *)symtab->ssym, (int *)symtab->esym); | 1276 | ksyms_addsyms_elf(symtab->nsym, (int *)symtab->ssym, (int *)symtab->esym); | |
1277 | #endif | 1277 | #endif | |
1278 | } | 1278 | } | |
1279 | 1279 | |||
1280 | void | 1280 | void | |
1281 | init386(paddr_t first_avail) | 1281 | init386(paddr_t first_avail) | |
1282 | { | 1282 | { | |
1283 | extern void consinit(void); | 1283 | extern void consinit(void); | |
1284 | int x; | 1284 | int x; | |
1285 | #ifndef XEN | 1285 | #ifndef XEN | |
1286 | union descriptor *tgdt; | 1286 | union descriptor *tgdt; | |
1287 | extern struct extent *iomem_ex; | 1287 | extern struct extent *iomem_ex; | |
1288 | struct region_descriptor region; | 1288 | struct region_descriptor region; | |
1289 | struct btinfo_memmap *bim; | 1289 | struct btinfo_memmap *bim; |
--- src/sys/arch/i386/i386/multiboot.c 2008/10/11 11:06:19 1.17
+++ src/sys/arch/i386/i386/multiboot.c 2008/11/30 18:21:34 1.18
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: multiboot.c,v 1.17 2008/10/11 11:06:19 joerg Exp $ */ | 1 | /* $NetBSD: multiboot.c,v 1.18 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2005, 2006 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 Julio M. Merino Vidal. | 8 | * by Julio M. Merino Vidal. | |
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,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
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: multiboot.c,v 1.17 2008/10/11 11:06:19 joerg Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: multiboot.c,v 1.18 2008/11/30 18:21:34 martin Exp $"); | |
34 | 34 | |||
35 | #include "opt_multiboot.h" | 35 | #include "opt_multiboot.h" | |
36 | 36 | |||
37 | #include <sys/param.h> | 37 | #include <sys/param.h> | |
38 | #include <sys/systm.h> | 38 | #include <sys/systm.h> | |
39 | #include <sys/cdefs_elf.h> | 39 | #include <sys/cdefs_elf.h> | |
40 | #include <sys/boot_flag.h> | 40 | #include <sys/boot_flag.h> | |
41 | #include <sys/exec.h> | 41 | #include <sys/exec.h> | |
42 | #include <sys/exec_elf.h> | 42 | #include <sys/exec_elf.h> | |
43 | #include <sys/optstr.h> | 43 | #include <sys/optstr.h> | |
44 | #include <sys/ksyms.h> | 44 | #include <sys/ksyms.h> | |
45 | 45 | |||
46 | #include <machine/bootinfo.h> | 46 | #include <machine/bootinfo.h> | |
@@ -694,20 +694,20 @@ multiboot_ksyms_init(void) | @@ -694,20 +694,20 @@ multiboot_ksyms_init(void) | |||
694 | Elf32_Ehdr ehdr; | 694 | Elf32_Ehdr ehdr; | |
695 | 695 | |||
696 | KASSERT(esym != 0); | 696 | KASSERT(esym != 0); | |
697 | 697 | |||
698 | memcpy(ehdr.e_ident, ELFMAG, SELFMAG); | 698 | memcpy(ehdr.e_ident, ELFMAG, SELFMAG); | |
699 | ehdr.e_ident[EI_CLASS] = ELFCLASS32; | 699 | ehdr.e_ident[EI_CLASS] = ELFCLASS32; | |
700 | ehdr.e_ident[EI_DATA] = ELFDATA2LSB; | 700 | ehdr.e_ident[EI_DATA] = ELFDATA2LSB; | |
701 | ehdr.e_ident[EI_VERSION] = EV_CURRENT; | 701 | ehdr.e_ident[EI_VERSION] = EV_CURRENT; | |
702 | ehdr.e_type = ET_EXEC; | 702 | ehdr.e_type = ET_EXEC; | |
703 | ehdr.e_machine = EM_386; | 703 | ehdr.e_machine = EM_386; | |
704 | ehdr.e_version = 1; | 704 | ehdr.e_version = 1; | |
705 | ehdr.e_ehsize = sizeof(ehdr); | 705 | ehdr.e_ehsize = sizeof(ehdr); | |
706 | 706 | |||
707 | ksyms_init_explicit((void *)&ehdr, | 707 | ksyms_addsyms_explicit((void *)&ehdr, | |
708 | ms->s_symstart, ms->s_symsize, | 708 | ms->s_symstart, ms->s_symsize, | |
709 | ms->s_strstart, ms->s_strsize); | 709 | ms->s_strstart, ms->s_strsize); | |
710 | } | 710 | } | |
711 | 711 | |||
712 | return mi->mi_flags & MULTIBOOT_INFO_HAS_ELF_SYMS; | 712 | return mi->mi_flags & MULTIBOOT_INFO_HAS_ELF_SYMS; | |
713 | } | 713 | } |
--- src/sys/arch/ia64/ia64/machdep.c 2008/11/12 12:36:02 1.11
+++ src/sys/arch/ia64/ia64/machdep.c 2008/11/30 18:21:34 1.12
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.11 2008/11/12 12:36:02 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.12 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2003,2004 Marcel Moolenaar | 4 | * Copyright (c) 2003,2004 Marcel Moolenaar | |
5 | * Copyright (c) 2000,2001 Doug Rabson | 5 | * Copyright (c) 2000,2001 Doug Rabson | |
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 | |
@@ -740,27 +740,27 @@ ia64_init() | @@ -740,27 +740,27 @@ ia64_init() | |||
740 | ia64_set_tpr(0); | 740 | ia64_set_tpr(0); | |
741 | 741 | |||
742 | /* | 742 | /* | |
743 | * Save our current context so that we have a known (maybe even | 743 | * Save our current context so that we have a known (maybe even | |
744 | * sane) context as the initial context for new threads that are | 744 | * sane) context as the initial context for new threads that are | |
745 | * forked from us. | 745 | * forked from us. | |
746 | */ | 746 | */ | |
747 | if (savectx(&lwp0.l_addr->u_pcb)) panic("savectx failed"); | 747 | if (savectx(&lwp0.l_addr->u_pcb)) panic("savectx failed"); | |
748 | 748 | |||
749 | /* | 749 | /* | |
750 | * Initialize debuggers, and break into them if appropriate. | 750 | * Initialize debuggers, and break into them if appropriate. | |
751 | */ | 751 | */ | |
752 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 752 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
753 | ksyms_init((int)((u_int64_t)ksym_end - (u_int64_t)ksym_start), | 753 | ksyms_addsyms_elf((int)((u_int64_t)ksym_end - (u_int64_t)ksym_start), | |
754 | ksym_start, ksym_end); | 754 | ksym_start, ksym_end); | |
755 | #endif | 755 | #endif | |
756 | 756 | |||
757 | #if defined(DDB) | 757 | #if defined(DDB) | |
758 | Debugger(); | 758 | Debugger(); | |
759 | #endif | 759 | #endif | |
760 | 760 | |||
761 | extern void main(void); | 761 | extern void main(void); | |
762 | main(); | 762 | main(); | |
763 | 763 | |||
764 | panic("Wheeee!!! main() returned!!! \n"); | 764 | panic("Wheeee!!! main() returned!!! \n"); | |
765 | } | 765 | } | |
766 | 766 |
--- src/sys/arch/iyonix/iyonix/iyonix_machdep.c 2008/11/12 12:36:02 1.10
+++ src/sys/arch/iyonix/iyonix/iyonix_machdep.c 2008/11/30 18:21:34 1.11
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: iyonix_machdep.c,v 1.10 2008/11/12 12:36:02 ad Exp $ */ | 1 | /* $NetBSD: iyonix_machdep.c,v 1.11 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | 4 | * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Based on code written by Jason R. Thorpe and Steve C. Woodford for | 7 | * Based on code written by Jason R. Thorpe and Steve C. Woodford for | |
8 | * Wasabi Systems, Inc. | 8 | * 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. | |
@@ -63,27 +63,27 @@ | @@ -63,27 +63,27 @@ | |||
63 | * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | 63 | * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | |
64 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 64 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
65 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 65 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
66 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 66 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
67 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 67 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
68 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 68 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
69 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 69 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
70 | * SUCH DAMAGE. | 70 | * SUCH DAMAGE. | |
71 | * | 71 | * | |
72 | * Machine dependant functions for kernel setup for Iyonix. | 72 | * Machine dependant functions for kernel setup for Iyonix. | |
73 | */ | 73 | */ | |
74 | 74 | |||
75 | #include <sys/cdefs.h> | 75 | #include <sys/cdefs.h> | |
76 | __KERNEL_RCSID(0, "$NetBSD: iyonix_machdep.c,v 1.10 2008/11/12 12:36:02 ad Exp $"); | 76 | __KERNEL_RCSID(0, "$NetBSD: iyonix_machdep.c,v 1.11 2008/11/30 18:21:34 martin Exp $"); | |
77 | 77 | |||
78 | #include "opt_ddb.h" | 78 | #include "opt_ddb.h" | |
79 | #include "opt_kgdb.h" | 79 | #include "opt_kgdb.h" | |
80 | #include "opt_pmap_debug.h" | 80 | #include "opt_pmap_debug.h" | |
81 | 81 | |||
82 | #include <sys/param.h> | 82 | #include <sys/param.h> | |
83 | #include <sys/device.h> | 83 | #include <sys/device.h> | |
84 | #include <sys/systm.h> | 84 | #include <sys/systm.h> | |
85 | #include <sys/kernel.h> | 85 | #include <sys/kernel.h> | |
86 | #include <sys/exec.h> | 86 | #include <sys/exec.h> | |
87 | #include <sys/proc.h> | 87 | #include <sys/proc.h> | |
88 | #include <sys/msgbuf.h> | 88 | #include <sys/msgbuf.h> | |
89 | #include <sys/reboot.h> | 89 | #include <sys/reboot.h> | |
@@ -802,31 +802,26 @@ initarm(void *arg) | @@ -802,31 +802,26 @@ initarm(void *arg) | |||
802 | #ifdef VERBOSE_INIT_ARM | 802 | #ifdef VERBOSE_INIT_ARM | |
803 | printf("irq "); | 803 | printf("irq "); | |
804 | #endif | 804 | #endif | |
805 | i80321_intr_init(); | 805 | i80321_intr_init(); | |
806 | 806 | |||
807 | #ifdef VERBOSE_INIT_ARM | 807 | #ifdef VERBOSE_INIT_ARM | |
808 | printf("done.\n"); | 808 | printf("done.\n"); | |
809 | #endif | 809 | #endif | |
810 | 810 | |||
811 | #ifdef BOOTHOWTO | 811 | #ifdef BOOTHOWTO | |
812 | boothowto = BOOTHOWTO; | 812 | boothowto = BOOTHOWTO; | |
813 | #endif | 813 | #endif | |
814 | 814 | |||
815 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
816 | /* Firmware doesn't load symbols. */ | |||
817 | ksyms_init(0, NULL, NULL); | |||
818 | #endif | |||
819 | ||||
820 | #ifdef DDB | 815 | #ifdef DDB | |
821 | db_machine_init(); | 816 | db_machine_init(); | |
822 | if (boothowto & RB_KDB) | 817 | if (boothowto & RB_KDB) | |
823 | Debugger(); | 818 | Debugger(); | |
824 | #endif | 819 | #endif | |
825 | 820 | |||
826 | iyonix_pic_init(); | 821 | iyonix_pic_init(); | |
827 | 822 | |||
828 | /* We return the new stack pointer address */ | 823 | /* We return the new stack pointer address */ | |
829 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 824 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
830 | } | 825 | } | |
831 | 826 | |||
832 | void | 827 | void |
--- src/sys/arch/landisk/landisk/machdep.c 2008/11/17 01:55:00 1.9
+++ src/sys/arch/landisk/landisk/machdep.c 2008/11/30 18:21:34 1.10
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.9 2008/11/17 01:55:00 uwe Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.10 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996, 1997, 1998 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 Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace | 8 | * by Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace | |
9 | * Simulation Facility, NASA Ames Research Center. | 9 | * Simulation Facility, NASA Ames Research Center. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -55,27 +55,27 @@ | @@ -55,27 +55,27 @@ | |||
55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
62 | * SUCH DAMAGE. | 62 | * SUCH DAMAGE. | |
63 | * | 63 | * | |
64 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | 64 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | |
65 | */ | 65 | */ | |
66 | 66 | |||
67 | #include <sys/cdefs.h> | 67 | #include <sys/cdefs.h> | |
68 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2008/11/17 01:55:00 uwe Exp $"); | 68 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.10 2008/11/30 18:21:34 martin Exp $"); | |
69 | 69 | |||
70 | #include "opt_ddb.h" | 70 | #include "opt_ddb.h" | |
71 | #include "opt_kgdb.h" | 71 | #include "opt_kgdb.h" | |
72 | #include "opt_kloader.h" | 72 | #include "opt_kloader.h" | |
73 | #include "opt_kloader_kernel_path.h" | 73 | #include "opt_kloader_kernel_path.h" | |
74 | #include "opt_memsize.h" | 74 | #include "opt_memsize.h" | |
75 | #include "fs_mfs.h" | 75 | #include "fs_mfs.h" | |
76 | 76 | |||
77 | #include "ksyms.h" | 77 | #include "ksyms.h" | |
78 | #include "scif.h" | 78 | #include "scif.h" | |
79 | 79 | |||
80 | #include <sys/param.h> | 80 | #include <sys/param.h> | |
81 | #include <sys/systm.h> | 81 | #include <sys/systm.h> | |
@@ -220,27 +220,27 @@ landisk_startup(int howto, void *bi) | @@ -220,27 +220,27 @@ landisk_startup(int howto, void *bi) | |||
220 | physmem, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | 220 | physmem, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | |
221 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | 221 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | |
222 | VM_FREELIST_DEFAULT); | 222 | VM_FREELIST_DEFAULT); | |
223 | 223 | |||
224 | /* Initialize proc0 u-area */ | 224 | /* Initialize proc0 u-area */ | |
225 | sh_proc0_init(); | 225 | sh_proc0_init(); | |
226 | 226 | |||
227 | /* Initialize pmap and start to address translation */ | 227 | /* Initialize pmap and start to address translation */ | |
228 | pmap_bootstrap(); | 228 | pmap_bootstrap(); | |
229 | 229 | |||
230 | /* Debugger. */ | 230 | /* Debugger. */ | |
231 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 231 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
232 | if (symbolsize != 0) { | 232 | if (symbolsize != 0) { | |
233 | ksyms_init(symbolsize, &end, end + symbolsize); | 233 | ksyms_addsyms_elf(symbolsize, &end, end + symbolsize); | |
234 | } | 234 | } | |
235 | #endif | 235 | #endif | |
236 | #if defined(DDB) | 236 | #if defined(DDB) | |
237 | if (boothowto & RB_KDB) { | 237 | if (boothowto & RB_KDB) { | |
238 | Debugger(); | 238 | Debugger(); | |
239 | } | 239 | } | |
240 | #endif | 240 | #endif | |
241 | #if defined(KGDB) && (NSCIF > 0) | 241 | #if defined(KGDB) && (NSCIF > 0) | |
242 | if (scif_kgdb_init() == 0) { | 242 | if (scif_kgdb_init() == 0) { | |
243 | if (boothowto & RB_KDB) { | 243 | if (boothowto & RB_KDB) { | |
244 | kgdb_debug_init = 1; | 244 | kgdb_debug_init = 1; | |
245 | kgdb_connect(1); | 245 | kgdb_connect(1); | |
246 | } | 246 | } |
--- src/sys/arch/luna68k/luna68k/machdep.c 2008/11/12 12:36:02 1.57
+++ src/sys/arch/luna68k/luna68k/machdep.c 2008/11/30 18:21:34 1.58
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.57 2008/11/12 12:36:02 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.58 2008/11/30 18:21:34 martin 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.57 2008/11/12 12:36:02 ad Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.58 2008/11/30 18:21:34 martin 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_panicbutton.h" | 39 | #include "opt_panicbutton.h" | |
40 | 40 | |||
41 | #include <sys/param.h> | 41 | #include <sys/param.h> | |
42 | #include <sys/systm.h> | 42 | #include <sys/systm.h> | |
43 | #include <sys/kernel.h> | 43 | #include <sys/kernel.h> | |
44 | #include <sys/proc.h> | 44 | #include <sys/proc.h> | |
45 | #include <sys/buf.h> | 45 | #include <sys/buf.h> | |
46 | #include <sys/reboot.h> | 46 | #include <sys/reboot.h> | |
47 | #include <sys/conf.h> | 47 | #include <sys/conf.h> | |
@@ -209,27 +209,27 @@ consinit() | @@ -209,27 +209,27 @@ consinit() | |||
209 | { | 209 | { | |
210 | if (sysconsole == 0) | 210 | if (sysconsole == 0) | |
211 | syscnattach(0); | 211 | syscnattach(0); | |
212 | else { | 212 | else { | |
213 | omfb_cnattach(); | 213 | omfb_cnattach(); | |
214 | ws_cnattach(); | 214 | ws_cnattach(); | |
215 | } | 215 | } | |
216 | 216 | |||
217 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 217 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
218 | { | 218 | { | |
219 | extern char end[]; | 219 | extern char end[]; | |
220 | extern int *esym; | 220 | extern int *esym; | |
221 | 221 | |||
222 | ksyms_init(*(int *)&end, ((int *)&end) + 1, esym); | 222 | ksyms_addsyms_elf(*(int *)&end, ((int *)&end) + 1, esym); | |
223 | } | 223 | } | |
224 | #endif | 224 | #endif | |
225 | #ifdef DDB | 225 | #ifdef DDB | |
226 | if (boothowto & RB_KDB) | 226 | if (boothowto & RB_KDB) | |
227 | cpu_Debugger(); | 227 | cpu_Debugger(); | |
228 | #endif | 228 | #endif | |
229 | } | 229 | } | |
230 | 230 | |||
231 | /* | 231 | /* | |
232 | * cpu_startup: allocate memory for variable-sized tables. | 232 | * cpu_startup: allocate memory for variable-sized tables. | |
233 | */ | 233 | */ | |
234 | void | 234 | void | |
235 | cpu_startup() | 235 | cpu_startup() |
--- src/sys/arch/mac68k/mac68k/machdep.c 2008/11/12 12:36:03 1.324
+++ src/sys/arch/mac68k/mac68k/machdep.c 2008/11/30 18:21:34 1.325
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.324 2008/11/12 12:36:03 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.325 2008/11/30 18:21:34 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1990 The Regents of the University of California. | 4 | * Copyright (c) 1982, 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -97,27 +97,27 @@ | @@ -97,27 +97,27 @@ | |||
97 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 97 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
98 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 98 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
99 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 99 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
100 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 100 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
101 | * | 101 | * | |
102 | */ | 102 | */ | |
103 | /* | 103 | /* | |
104 | * from: Utah $Hdr: machdep.c 1.63 91/04/24$ | 104 | * from: Utah $Hdr: machdep.c 1.63 91/04/24$ | |
105 | * | 105 | * | |
106 | * @(#)machdep.c 7.16 (Berkeley) 6/3/91 | 106 | * @(#)machdep.c 7.16 (Berkeley) 6/3/91 | |
107 | */ | 107 | */ | |
108 | 108 | |||
109 | #include <sys/cdefs.h> | 109 | #include <sys/cdefs.h> | |
110 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.324 2008/11/12 12:36:03 ad Exp $"); | 110 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.325 2008/11/30 18:21:34 martin Exp $"); | |
111 | 111 | |||
112 | #include "opt_adb.h" | 112 | #include "opt_adb.h" | |
113 | #include "opt_ddb.h" | 113 | #include "opt_ddb.h" | |
114 | #include "opt_ddbparam.h" | 114 | #include "opt_ddbparam.h" | |
115 | #include "opt_kgdb.h" | 115 | #include "opt_kgdb.h" | |
116 | #include "opt_compat_netbsd.h" | 116 | #include "opt_compat_netbsd.h" | |
117 | #include "akbd.h" | 117 | #include "akbd.h" | |
118 | #include "macfb.h" | 118 | #include "macfb.h" | |
119 | #include "zsc.h" | 119 | #include "zsc.h" | |
120 | 120 | |||
121 | #include <sys/param.h> | 121 | #include <sys/param.h> | |
122 | #include <sys/systm.h> | 122 | #include <sys/systm.h> | |
123 | #include <sys/buf.h> | 123 | #include <sys/buf.h> | |
@@ -372,27 +372,27 @@ consinit(void) | @@ -372,27 +372,27 @@ consinit(void) | |||
372 | } | 372 | } | |
373 | #endif | 373 | #endif | |
374 | 374 | |||
375 | mac68k_calibrate_delay(); | 375 | mac68k_calibrate_delay(); | |
376 | 376 | |||
377 | #if NZSC > 0 && defined(KGDB) | 377 | #if NZSC > 0 && defined(KGDB) | |
378 | zs_kgdb_init(); | 378 | zs_kgdb_init(); | |
379 | #endif | 379 | #endif | |
380 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 380 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
381 | /* | 381 | /* | |
382 | * Initialize kernel debugger, if compiled in. | 382 | * Initialize kernel debugger, if compiled in. | |
383 | */ | 383 | */ | |
384 | 384 | |||
385 | ksyms_init(symsize, ssym, esym); | 385 | ksyms_addsyms_elf(symsize, ssym, esym); | |
386 | #endif | 386 | #endif | |
387 | 387 | |||
388 | if (boothowto & RB_KDB) { | 388 | if (boothowto & RB_KDB) { | |
389 | #ifdef KGDB | 389 | #ifdef KGDB | |
390 | /* XXX - Ask on console for kgdb_dev? */ | 390 | /* XXX - Ask on console for kgdb_dev? */ | |
391 | /* Note: this will just return if kgdb_dev==NODEV */ | 391 | /* Note: this will just return if kgdb_dev==NODEV */ | |
392 | kgdb_connect(1); | 392 | kgdb_connect(1); | |
393 | #else /* KGDB */ | 393 | #else /* KGDB */ | |
394 | #ifdef DDB | 394 | #ifdef DDB | |
395 | /* Enter DDB. We don't have a monitor PROM. */ | 395 | /* Enter DDB. We don't have a monitor PROM. */ | |
396 | Debugger(); | 396 | Debugger(); | |
397 | #endif /* DDB */ | 397 | #endif /* DDB */ | |
398 | #endif /* KGDB */ | 398 | #endif /* KGDB */ |
--- src/sys/arch/mipsco/mipsco/machdep.c 2008/11/12 12:36:04 1.60
+++ src/sys/arch/mipsco/mipsco/machdep.c 2008/11/30 18:21:35 1.61
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.60 2008/11/12 12:36:04 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.61 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1992, 1993 | 4 | * Copyright (c) 1992, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department, The Mach Operating System project at | 9 | * Science Department, The Mach Operating System project at | |
10 | * Carnegie-Mellon University and Ralph Campbell. | 10 | * Carnegie-Mellon University and Ralph Campbell. | |
11 | * | 11 | * | |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without | |
13 | * modification, are permitted provided that the following conditions | 13 | * modification, are permitted provided that the following conditions | |
14 | * are met: | 14 | * are met: | |
@@ -66,27 +66,27 @@ | @@ -66,27 +66,27 @@ | |||
66 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 66 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
72 | * SUCH DAMAGE. | 72 | * SUCH DAMAGE. | |
73 | * | 73 | * | |
74 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | 74 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | |
75 | */ | 75 | */ | |
76 | 76 | |||
77 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 77 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
78 | 78 | |||
79 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.60 2008/11/12 12:36:04 ad Exp $"); | 79 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.61 2008/11/30 18:21:35 martin Exp $"); | |
80 | 80 | |||
81 | /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ | 81 | /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ | |
82 | 82 | |||
83 | #include "opt_ddb.h" | 83 | #include "opt_ddb.h" | |
84 | #include "opt_kgdb.h" | 84 | #include "opt_kgdb.h" | |
85 | 85 | |||
86 | #include <sys/param.h> | 86 | #include <sys/param.h> | |
87 | #include <sys/systm.h> | 87 | #include <sys/systm.h> | |
88 | #include <sys/signalvar.h> | 88 | #include <sys/signalvar.h> | |
89 | #include <sys/kernel.h> | 89 | #include <sys/kernel.h> | |
90 | #include <sys/proc.h> | 90 | #include <sys/proc.h> | |
91 | #include <sys/buf.h> | 91 | #include <sys/buf.h> | |
92 | #include <sys/reboot.h> | 92 | #include <sys/reboot.h> | |
@@ -322,27 +322,27 @@ mach_init(argc, argv, envp, bim, bip) | @@ -322,27 +322,27 @@ mach_init(argc, argv, envp, bim, bip) | |||
322 | howto = 0; | 322 | howto = 0; | |
323 | BOOT_FLAG(*cp, howto); | 323 | BOOT_FLAG(*cp, howto); | |
324 | if (! howto) | 324 | if (! howto) | |
325 | printf("bootflag '%c' not recognised\n", *cp); | 325 | printf("bootflag '%c' not recognised\n", *cp); | |
326 | else | 326 | else | |
327 | boothowto |= howto; | 327 | boothowto |= howto; | |
328 | } | 328 | } | |
329 | } | 329 | } | |
330 | 330 | |||
331 | 331 | |||
332 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 332 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
333 | /* init symbols if present */ | 333 | /* init symbols if present */ | |
334 | if (esym) | 334 | if (esym) | |
335 | ksyms_init(esym - ssym, ssym, esym); | 335 | ksyms_addsyms_elf(esym - ssym, ssym, esym); | |
336 | #endif | 336 | #endif | |
337 | #ifdef DDB | 337 | #ifdef DDB | |
338 | if (boothowto & RB_KDB) | 338 | if (boothowto & RB_KDB) | |
339 | Debugger(); | 339 | Debugger(); | |
340 | #endif | 340 | #endif | |
341 | #ifdef KGDB | 341 | #ifdef KGDB | |
342 | zs_kgdb_init(); /* XXX */ | 342 | zs_kgdb_init(); /* XXX */ | |
343 | if (boothowto & RB_KDB) | 343 | if (boothowto & RB_KDB) | |
344 | kgdb_connect(0); | 344 | kgdb_connect(0); | |
345 | #endif | 345 | #endif | |
346 | 346 | |||
347 | #ifdef MFS | 347 | #ifdef MFS | |
348 | /* | 348 | /* |
--- src/sys/arch/mmeye/mmeye/machdep.c 2008/11/12 12:36:04 1.45
+++ src/sys/arch/mmeye/mmeye/machdep.c 2008/11/30 18:21:35 1.46
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.45 2008/11/12 12:36:04 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.46 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996, 1997, 1998 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 Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace | 8 | * by Charles M. Hannum and by Jason R. Thorpe of the Numerical Aerospace | |
9 | * Simulation Facility, NASA Ames Research Center. | 9 | * Simulation Facility, NASA Ames Research Center. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -55,27 +55,27 @@ | @@ -55,27 +55,27 @@ | |||
55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 55 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 56 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 57 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 58 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 59 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 60 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 61 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
62 | * SUCH DAMAGE. | 62 | * SUCH DAMAGE. | |
63 | * | 63 | * | |
64 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | 64 | * @(#)machdep.c 7.4 (Berkeley) 6/3/91 | |
65 | */ | 65 | */ | |
66 | 66 | |||
67 | #include <sys/cdefs.h> | 67 | #include <sys/cdefs.h> | |
68 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.45 2008/11/12 12:36:04 ad Exp $"); | 68 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.46 2008/11/30 18:21:35 martin Exp $"); | |
69 | 69 | |||
70 | #include "opt_ddb.h" | 70 | #include "opt_ddb.h" | |
71 | #include "opt_memsize.h" | 71 | #include "opt_memsize.h" | |
72 | 72 | |||
73 | #include <sys/param.h> | 73 | #include <sys/param.h> | |
74 | #include <sys/systm.h> | 74 | #include <sys/systm.h> | |
75 | #include <sys/kernel.h> | 75 | #include <sys/kernel.h> | |
76 | #include <sys/user.h> | 76 | #include <sys/user.h> | |
77 | #include <sys/mount.h> | 77 | #include <sys/mount.h> | |
78 | #include <sys/reboot.h> | 78 | #include <sys/reboot.h> | |
79 | #include <sys/sysctl.h> | 79 | #include <sys/sysctl.h> | |
80 | #include <sys/msgbuf.h> | 80 | #include <sys/msgbuf.h> | |
81 | #include <uvm/uvm_extern.h> | 81 | #include <uvm/uvm_extern.h> | |
@@ -249,27 +249,27 @@ initSH3(void *pc) /* XXX return address | @@ -249,27 +249,27 @@ initSH3(void *pc) /* XXX return address | |||
249 | physmem = atop(IOM_RAM_SIZE); | 249 | physmem = atop(IOM_RAM_SIZE); | |
250 | uvm_page_physload( | 250 | uvm_page_physload( | |
251 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | 251 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | |
252 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | 252 | kernend, atop(IOM_RAM_BEGIN + IOM_RAM_SIZE), | |
253 | VM_FREELIST_DEFAULT); | 253 | VM_FREELIST_DEFAULT); | |
254 | 254 | |||
255 | /* Initialize proc0 u-area */ | 255 | /* Initialize proc0 u-area */ | |
256 | sh_proc0_init(); | 256 | sh_proc0_init(); | |
257 | 257 | |||
258 | /* Initialize pmap and start to address translation */ | 258 | /* Initialize pmap and start to address translation */ | |
259 | pmap_bootstrap(); | 259 | pmap_bootstrap(); | |
260 | 260 | |||
261 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 261 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
262 | ksyms_init(1, end, end + 0x40000); /* XXX */ | 262 | ksyms_addsyms_elf(1, end, end + 0x40000); /* XXX */ | |
263 | #endif | 263 | #endif | |
264 | /* | 264 | /* | |
265 | * XXX We can't return here, because we change stack pointer. | 265 | * XXX We can't return here, because we change stack pointer. | |
266 | * So jump to return address directly. | 266 | * So jump to return address directly. | |
267 | */ | 267 | */ | |
268 | __asm volatile ( | 268 | __asm volatile ( | |
269 | "jmp @%0;" | 269 | "jmp @%0;" | |
270 | "mov %1, r15" | 270 | "mov %1, r15" | |
271 | :: "r"(pc),"r"(lwp0.l_md.md_pcb->pcb_sf.sf_r7_bank)); | 271 | :: "r"(pc),"r"(lwp0.l_md.md_pcb->pcb_sf.sf_r7_bank)); | |
272 | } | 272 | } | |
273 | 273 | |||
274 | /* | 274 | /* | |
275 | * consinit: | 275 | * consinit: |
--- src/sys/arch/mvme68k/mvme68k/machdep.c 2008/11/25 15:51:34 1.132
+++ src/sys/arch/mvme68k/mvme68k/machdep.c 2008/11/30 18:21:35 1.133
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.132 2008/11/25 15:51:34 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.133 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1990, 1993 | 4 | * Copyright (c) 1982, 1986, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -67,27 +67,27 @@ | @@ -67,27 +67,27 @@ | |||
67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
72 | * SUCH DAMAGE. | 72 | * SUCH DAMAGE. | |
73 | * | 73 | * | |
74 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | 74 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | |
75 | * | 75 | * | |
76 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | 76 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | |
77 | */ | 77 | */ | |
78 | 78 | |||
79 | #include <sys/cdefs.h> | 79 | #include <sys/cdefs.h> | |
80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.132 2008/11/25 15:51:34 ad Exp $"); | 80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.133 2008/11/30 18:21:35 martin Exp $"); | |
81 | 81 | |||
82 | #include "opt_ddb.h" | 82 | #include "opt_ddb.h" | |
83 | #include "opt_m060sp.h" | 83 | #include "opt_m060sp.h" | |
84 | #include "opt_panicbutton.h" | 84 | #include "opt_panicbutton.h" | |
85 | 85 | |||
86 | #include <sys/param.h> | 86 | #include <sys/param.h> | |
87 | #include <sys/systm.h> | 87 | #include <sys/systm.h> | |
88 | #include <sys/signalvar.h> | 88 | #include <sys/signalvar.h> | |
89 | #include <sys/kernel.h> | 89 | #include <sys/kernel.h> | |
90 | #include <sys/proc.h> | 90 | #include <sys/proc.h> | |
91 | #include <sys/buf.h> | 91 | #include <sys/buf.h> | |
92 | #include <sys/reboot.h> | 92 | #include <sys/reboot.h> | |
93 | #include <sys/conf.h> | 93 | #include <sys/conf.h> | |
@@ -433,27 +433,27 @@ void | @@ -433,27 +433,27 @@ void | |||
433 | consinit(void) | 433 | consinit(void) | |
434 | { | 434 | { | |
435 | 435 | |||
436 | /* | 436 | /* | |
437 | * Initialize the console before we print anything out. | 437 | * Initialize the console before we print anything out. | |
438 | */ | 438 | */ | |
439 | cninit(); | 439 | cninit(); | |
440 | 440 | |||
441 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 441 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
442 | { | 442 | { | |
443 | extern char end[]; | 443 | extern char end[]; | |
444 | extern int *esym; | 444 | extern int *esym; | |
445 | 445 | |||
446 | ksyms_init((int)esym - (int)&end - sizeof(Elf32_Ehdr), | 446 | ksyms_addsyms_elf((int)esym - (int)&end - sizeof(Elf32_Ehdr), | |
447 | (void *)&end, esym); | 447 | (void *)&end, esym); | |
448 | } | 448 | } | |
449 | #endif | 449 | #endif | |
450 | #ifdef DDB | 450 | #ifdef DDB | |
451 | if (boothowto & RB_KDB) | 451 | if (boothowto & RB_KDB) | |
452 | Debugger(); | 452 | Debugger(); | |
453 | #endif | 453 | #endif | |
454 | } | 454 | } | |
455 | 455 | |||
456 | /* | 456 | /* | |
457 | * cpu_startup: allocate memory for variable-sized tables, | 457 | * cpu_startup: allocate memory for variable-sized tables, | |
458 | * initialize CPU, and do autoconfiguration. | 458 | * initialize CPU, and do autoconfiguration. | |
459 | */ | 459 | */ |
--- src/sys/arch/netwinder/netwinder/netwinder_machdep.c 2008/11/12 12:36:04 1.68
+++ src/sys/arch/netwinder/netwinder/netwinder_machdep.c 2008/11/30 18:21:35 1.69
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: netwinder_machdep.c,v 1.68 2008/11/12 12:36:04 ad Exp $ */ | 1 | /* $NetBSD: netwinder_machdep.c,v 1.69 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1997,1998 Mark Brinicombe. | 4 | * Copyright (c) 1997,1998 Mark Brinicombe. | |
5 | * Copyright (c) 1997,1998 Causality Limited. | 5 | * Copyright (c) 1997,1998 Causality Limited. | |
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 | |
@@ -30,27 +30,27 @@ | @@ -30,27 +30,27 @@ | |||
30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
34 | * SUCH DAMAGE. | 34 | * SUCH DAMAGE. | |
35 | * | 35 | * | |
36 | * Machine dependant functions for kernel setup for EBSA285 core architecture | 36 | * Machine dependant functions for kernel setup for EBSA285 core architecture | |
37 | * using Netwinder firmware | 37 | * using Netwinder firmware | |
38 | * | 38 | * | |
39 | * Created : 24/11/97 | 39 | * Created : 24/11/97 | |
40 | */ | 40 | */ | |
41 | 41 | |||
42 | #include <sys/cdefs.h> | 42 | #include <sys/cdefs.h> | |
43 | __KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.68 2008/11/12 12:36:04 ad Exp $"); | 43 | __KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.69 2008/11/30 18:21:35 martin Exp $"); | |
44 | 44 | |||
45 | #include "opt_ddb.h" | 45 | #include "opt_ddb.h" | |
46 | #include "opt_pmap_debug.h" | 46 | #include "opt_pmap_debug.h" | |
47 | 47 | |||
48 | #include <sys/param.h> | 48 | #include <sys/param.h> | |
49 | #include <sys/device.h> | 49 | #include <sys/device.h> | |
50 | #include <sys/systm.h> | 50 | #include <sys/systm.h> | |
51 | #include <sys/kernel.h> | 51 | #include <sys/kernel.h> | |
52 | #include <sys/exec.h> | 52 | #include <sys/exec.h> | |
53 | #include <sys/proc.h> | 53 | #include <sys/proc.h> | |
54 | #include <sys/msgbuf.h> | 54 | #include <sys/msgbuf.h> | |
55 | #include <sys/reboot.h> | 55 | #include <sys/reboot.h> | |
56 | #include <sys/termios.h> | 56 | #include <sys/termios.h> | |
@@ -845,31 +845,26 @@ initarm(void *arg) | @@ -845,31 +845,26 @@ initarm(void *arg) | |||
845 | 845 | |||
846 | /* Setup the IRQ system */ | 846 | /* Setup the IRQ system */ | |
847 | printf("irq "); | 847 | printf("irq "); | |
848 | footbridge_intr_init(); | 848 | footbridge_intr_init(); | |
849 | printf("done.\n"); | 849 | printf("done.\n"); | |
850 | 850 | |||
851 | /* | 851 | /* | |
852 | * Warn the user if the bootinfo was bogus. We already | 852 | * Warn the user if the bootinfo was bogus. We already | |
853 | * faked up some safe values. | 853 | * faked up some safe values. | |
854 | */ | 854 | */ | |
855 | if (nwbootinfo.bi_pagesize == 0xdeadbeef) | 855 | if (nwbootinfo.bi_pagesize == 0xdeadbeef) | |
856 | printf("WARNING: NeTTrom boot info corrupt\n"); | 856 | printf("WARNING: NeTTrom boot info corrupt\n"); | |
857 | 857 | |||
858 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |||
859 | /* Firmware doesn't load symbols. */ | |||
860 | ksyms_init(0, NULL, NULL); | |||
861 | #endif | |||
862 | ||||
863 | #ifdef DDB | 858 | #ifdef DDB | |
864 | db_machine_init(); | 859 | db_machine_init(); | |
865 | if (boothowto & RB_KDB) | 860 | if (boothowto & RB_KDB) | |
866 | Debugger(); | 861 | Debugger(); | |
867 | #endif | 862 | #endif | |
868 | 863 | |||
869 | /* Turn the led green */ | 864 | /* Turn the led green */ | |
870 | ISA_PUTBYTE(0x338, 0x06); | 865 | ISA_PUTBYTE(0x338, 0x06); | |
871 | 866 | |||
872 | /* We return the new stack pointer address */ | 867 | /* We return the new stack pointer address */ | |
873 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 868 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
874 | } | 869 | } | |
875 | 870 |
--- src/sys/arch/news68k/news68k/machdep.c 2008/11/25 15:51:34 1.75
+++ src/sys/arch/news68k/news68k/machdep.c 2008/11/30 18:21:35 1.76
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.75 2008/11/25 15:51:34 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.76 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1990, 1993 | 4 | * Copyright (c) 1982, 1986, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -67,27 +67,27 @@ | @@ -67,27 +67,27 @@ | |||
67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
72 | * SUCH DAMAGE. | 72 | * SUCH DAMAGE. | |
73 | * | 73 | * | |
74 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | 74 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | |
75 | * | 75 | * | |
76 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | 76 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | |
77 | */ | 77 | */ | |
78 | 78 | |||
79 | #include <sys/cdefs.h> | 79 | #include <sys/cdefs.h> | |
80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.75 2008/11/25 15:51:34 ad Exp $"); | 80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.76 2008/11/30 18:21:35 martin Exp $"); | |
81 | 81 | |||
82 | #include "opt_ddb.h" | 82 | #include "opt_ddb.h" | |
83 | #include "opt_compat_netbsd.h" | 83 | #include "opt_compat_netbsd.h" | |
84 | 84 | |||
85 | #include <sys/param.h> | 85 | #include <sys/param.h> | |
86 | #include <sys/systm.h> | 86 | #include <sys/systm.h> | |
87 | #include <sys/buf.h> | 87 | #include <sys/buf.h> | |
88 | #include <sys/conf.h> | 88 | #include <sys/conf.h> | |
89 | #include <sys/kernel.h> | 89 | #include <sys/kernel.h> | |
90 | #include <sys/device.h> | 90 | #include <sys/device.h> | |
91 | #include <sys/malloc.h> | 91 | #include <sys/malloc.h> | |
92 | #include <sys/mbuf.h> | 92 | #include <sys/mbuf.h> | |
93 | #include <sys/mount.h> | 93 | #include <sys/mount.h> | |
@@ -1075,21 +1075,21 @@ consinit(void) | @@ -1075,21 +1075,21 @@ consinit(void) | |||
1075 | int dipsw = *dip_switch; | 1075 | int dipsw = *dip_switch; | |
1076 | 1076 | |||
1077 | dipsw &= ~SW_CONSOLE; | 1077 | dipsw &= ~SW_CONSOLE; | |
1078 | 1078 | |||
1079 | switch (dipsw & SW_CONSOLE) { | 1079 | switch (dipsw & SW_CONSOLE) { | |
1080 | default: /* XXX no fb support yet */ | 1080 | default: /* XXX no fb support yet */ | |
1081 | case 0: | 1081 | case 0: | |
1082 | tty00_is_console = 1; | 1082 | tty00_is_console = 1; | |
1083 | cn_tab = &consdev_zs; | 1083 | cn_tab = &consdev_zs; | |
1084 | (*cn_tab->cn_init)(cn_tab); | 1084 | (*cn_tab->cn_init)(cn_tab); | |
1085 | break; | 1085 | break; | |
1086 | } | 1086 | } | |
1087 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 1087 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
1088 | ksyms_init((int)esym - (int)&end - sizeof(Elf32_Ehdr), | 1088 | ksyms_addsyms_elf((int)esym - (int)&end - sizeof(Elf32_Ehdr), | |
1089 | (void *)&end, esym); | 1089 | (void *)&end, esym); | |
1090 | #endif | 1090 | #endif | |
1091 | #ifdef DDB | 1091 | #ifdef DDB | |
1092 | if (boothowto & RB_KDB) | 1092 | if (boothowto & RB_KDB) | |
1093 | Debugger(); | 1093 | Debugger(); | |
1094 | #endif | 1094 | #endif | |
1095 | } | 1095 | } |
--- src/sys/arch/newsmips/newsmips/machdep.c 2008/11/12 12:36:04 1.100
+++ src/sys/arch/newsmips/newsmips/machdep.c 2008/11/30 18:21:35 1.101
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.100 2008/11/12 12:36:04 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.101 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1992, 1993 | 4 | * Copyright (c) 1992, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department, The Mach Operating System project at | 9 | * Science Department, The Mach Operating System project at | |
10 | * Carnegie-Mellon University and Ralph Campbell. | 10 | * Carnegie-Mellon University and Ralph Campbell. | |
11 | * | 11 | * | |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without | |
13 | * modification, are permitted provided that the following conditions | 13 | * modification, are permitted provided that the following conditions | |
14 | * are met: | 14 | * are met: | |
@@ -66,27 +66,27 @@ | @@ -66,27 +66,27 @@ | |||
66 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 66 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
72 | * SUCH DAMAGE. | 72 | * SUCH DAMAGE. | |
73 | * | 73 | * | |
74 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | 74 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | |
75 | */ | 75 | */ | |
76 | 76 | |||
77 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 77 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
78 | 78 | |||
79 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.100 2008/11/12 12:36:04 ad Exp $"); | 79 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.101 2008/11/30 18:21:35 martin Exp $"); | |
80 | 80 | |||
81 | /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ | 81 | /* from: Utah Hdr: machdep.c 1.63 91/04/24 */ | |
82 | 82 | |||
83 | #include "fs_mfs.h" | 83 | #include "fs_mfs.h" | |
84 | #include "opt_ddb.h" | 84 | #include "opt_ddb.h" | |
85 | #include "opt_execfmt.h" | 85 | #include "opt_execfmt.h" | |
86 | 86 | |||
87 | #include <sys/param.h> | 87 | #include <sys/param.h> | |
88 | #include <sys/systm.h> | 88 | #include <sys/systm.h> | |
89 | #include <sys/signalvar.h> | 89 | #include <sys/signalvar.h> | |
90 | #include <sys/kernel.h> | 90 | #include <sys/kernel.h> | |
91 | #include <sys/proc.h> | 91 | #include <sys/proc.h> | |
92 | #include <sys/buf.h> | 92 | #include <sys/buf.h> | |
@@ -331,27 +331,27 @@ mach_init(int x_boothowto, int x_bootdev | @@ -331,27 +331,27 @@ mach_init(int x_boothowto, int x_bootdev | |||
331 | * Initialize locore-function vector. | 331 | * Initialize locore-function vector. | |
332 | * Clear out the I and D caches. | 332 | * Clear out the I and D caches. | |
333 | */ | 333 | */ | |
334 | mips_vector_init(); | 334 | mips_vector_init(); | |
335 | 335 | |||
336 | /* | 336 | /* | |
337 | * We know the CPU type now. Initialize our DMA tags (might | 337 | * We know the CPU type now. Initialize our DMA tags (might | |
338 | * need this early). | 338 | * need this early). | |
339 | */ | 339 | */ | |
340 | newsmips_bus_dma_init(); | 340 | newsmips_bus_dma_init(); | |
341 | 341 | |||
342 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 342 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
343 | if (nsym) | 343 | if (nsym) | |
344 | ksyms_init(esym - ssym, ssym, esym); | 344 | ksyms_addsyms_elf(esym - ssym, ssym, esym); | |
345 | #endif | 345 | #endif | |
346 | 346 | |||
347 | #ifdef KADB | 347 | #ifdef KADB | |
348 | boothowto |= RB_KDB; | 348 | boothowto |= RB_KDB; | |
349 | #endif | 349 | #endif | |
350 | 350 | |||
351 | #ifdef MFS | 351 | #ifdef MFS | |
352 | /* | 352 | /* | |
353 | * Check to see if a mini-root was loaded into memory. It resides | 353 | * Check to see if a mini-root was loaded into memory. It resides | |
354 | * at the start of the next page just after the end of BSS. | 354 | * at the start of the next page just after the end of BSS. | |
355 | */ | 355 | */ | |
356 | if (boothowto & RB_MINIROOT) | 356 | if (boothowto & RB_MINIROOT) | |
357 | kernend += round_page(mfs_initminiroot(kernend)); | 357 | kernend += round_page(mfs_initminiroot(kernend)); |
--- src/sys/arch/next68k/next68k/machdep.c 2008/11/25 15:51:34 1.88
+++ src/sys/arch/next68k/next68k/machdep.c 2008/11/30 18:21:35 1.89
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.88 2008/11/25 15:51:34 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.89 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998 Darrin B. Jewell | 4 | * Copyright (c) 1998 Darrin B. Jewell | |
5 | * Copyright (c) 1982, 1986, 1990, 1993 | 5 | * Copyright (c) 1982, 1986, 1990, 1993 | |
6 | * The Regents of the University of California. All rights reserved. | 6 | * The Regents of the University of California. All rights reserved. | |
7 | * | 7 | * | |
8 | * This code is derived from software contributed to Berkeley by | 8 | * This code is derived from software contributed to Berkeley by | |
9 | * the Systems Programming Group of the University of Utah Computer | 9 | * the Systems Programming Group of the University of Utah Computer | |
10 | * Science Department. | 10 | * Science Department. | |
11 | * | 11 | * | |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without | |
13 | * modification, are permitted provided that the following conditions | 13 | * modification, are permitted provided that the following conditions | |
14 | * are met: | 14 | * are met: | |
@@ -69,27 +69,27 @@ | @@ -69,27 +69,27 @@ | |||
69 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 69 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
70 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 70 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
71 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 71 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
72 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 72 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
73 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 73 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
74 | * SUCH DAMAGE. | 74 | * SUCH DAMAGE. | |
75 | * | 75 | * | |
76 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | 76 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | |
77 | * | 77 | * | |
78 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | 78 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | |
79 | */ | 79 | */ | |
80 | 80 | |||
81 | #include <sys/cdefs.h> | 81 | #include <sys/cdefs.h> | |
82 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.88 2008/11/25 15:51:34 ad Exp $"); | 82 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.89 2008/11/30 18:21:35 martin Exp $"); | |
83 | 83 | |||
84 | #include "opt_ddb.h" | 84 | #include "opt_ddb.h" | |
85 | #include "opt_kgdb.h" | 85 | #include "opt_kgdb.h" | |
86 | 86 | |||
87 | #include <sys/param.h> | 87 | #include <sys/param.h> | |
88 | #include <sys/systm.h> | 88 | #include <sys/systm.h> | |
89 | #include <sys/signalvar.h> | 89 | #include <sys/signalvar.h> | |
90 | #include <sys/kernel.h> | 90 | #include <sys/kernel.h> | |
91 | #include <sys/proc.h> | 91 | #include <sys/proc.h> | |
92 | #include <sys/buf.h> | 92 | #include <sys/buf.h> | |
93 | #include <sys/reboot.h> | 93 | #include <sys/reboot.h> | |
94 | #include <sys/conf.h> | 94 | #include <sys/conf.h> | |
95 | #include <sys/file.h> | 95 | #include <sys/file.h> | |
@@ -278,27 +278,27 @@ consinit(void) | @@ -278,27 +278,27 @@ consinit(void) | |||
278 | /* | 278 | /* | |
279 | * Generic console: sys/dev/cons.c | 279 | * Generic console: sys/dev/cons.c | |
280 | * Initializes either ite or ser as console. | 280 | * Initializes either ite or ser as console. | |
281 | * Can be called from locore.s and init_main.c. | 281 | * Can be called from locore.s and init_main.c. | |
282 | */ | 282 | */ | |
283 | 283 | |||
284 | if (!init) { | 284 | if (!init) { | |
285 | cninit(); | 285 | cninit(); | |
286 | #if defined(KGDB) && (NZSC > 0) | 286 | #if defined(KGDB) && (NZSC > 0) | |
287 | zs_kgdb_init(); | 287 | zs_kgdb_init(); | |
288 | #endif | 288 | #endif | |
289 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 289 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
290 | /* Initialize kernel symbol table, if compiled in. */ | 290 | /* Initialize kernel symbol table, if compiled in. */ | |
291 | ksyms_init(nsym, ssym, esym); | 291 | ksyms_addsyms_elf(nsym, ssym, esym); | |
292 | #endif | 292 | #endif | |
293 | if (boothowto & RB_KDB) { | 293 | if (boothowto & RB_KDB) { | |
294 | #if defined(KGDB) | 294 | #if defined(KGDB) | |
295 | kgdb_connect(1); | 295 | kgdb_connect(1); | |
296 | #elif defined(DDB) | 296 | #elif defined(DDB) | |
297 | Debugger(); | 297 | Debugger(); | |
298 | #endif | 298 | #endif | |
299 | } | 299 | } | |
300 | 300 | |||
301 | init = 1; | 301 | init = 1; | |
302 | } else { | 302 | } else { | |
303 | next68k_calibrate_delay(); | 303 | next68k_calibrate_delay(); | |
304 | } | 304 | } |
--- src/sys/arch/pmax/pmax/machdep.c 2008/11/12 12:36:05 1.225
+++ src/sys/arch/pmax/pmax/machdep.c 2008/11/30 18:21:35 1.226
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.225 2008/11/12 12:36:05 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.226 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1992, 1993 | 4 | * Copyright (c) 1992, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department, The Mach Operating System project at | 9 | * Science Department, The Mach Operating System project at | |
10 | * Carnegie-Mellon University and Ralph Campbell. | 10 | * Carnegie-Mellon University and Ralph Campbell. | |
11 | * | 11 | * | |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without | |
13 | * modification, are permitted provided that the following conditions | 13 | * modification, are permitted provided that the following conditions | |
14 | * are met: | 14 | * are met: | |
@@ -67,27 +67,27 @@ | @@ -67,27 +67,27 @@ | |||
67 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 67 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
68 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 68 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
69 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 69 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
70 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 70 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
71 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 71 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
72 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 72 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
73 | * SUCH DAMAGE. | 73 | * SUCH DAMAGE. | |
74 | * | 74 | * | |
75 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | 75 | * @(#)machdep.c 8.3 (Berkeley) 1/12/94 | |
76 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | 76 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | |
77 | */ | 77 | */ | |
78 | 78 | |||
79 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | 79 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.225 2008/11/12 12:36:05 ad Exp $"); | 80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.226 2008/11/30 18:21:35 martin Exp $"); | |
81 | 81 | |||
82 | #include "fs_mfs.h" | 82 | #include "fs_mfs.h" | |
83 | #include "opt_ddb.h" | 83 | #include "opt_ddb.h" | |
84 | 84 | |||
85 | #include <sys/param.h> | 85 | #include <sys/param.h> | |
86 | #include <sys/systm.h> | 86 | #include <sys/systm.h> | |
87 | #include <sys/kernel.h> | 87 | #include <sys/kernel.h> | |
88 | #include <sys/buf.h> | 88 | #include <sys/buf.h> | |
89 | #include <sys/reboot.h> | 89 | #include <sys/reboot.h> | |
90 | #include <sys/user.h> | 90 | #include <sys/user.h> | |
91 | #include <sys/mount.h> | 91 | #include <sys/mount.h> | |
92 | #include <sys/kcore.h> | 92 | #include <sys/kcore.h> | |
93 | #include <sys/boot_flag.h> | 93 | #include <sys/boot_flag.h> | |
@@ -323,27 +323,27 @@ mach_init(argc, argv, code, cv, bim, bip | @@ -323,27 +323,27 @@ mach_init(argc, argv, code, cv, bim, bip | |||
323 | 323 | |||
324 | #ifdef MFS | 324 | #ifdef MFS | |
325 | /* | 325 | /* | |
326 | * Check to see if a mini-root was loaded into memory. It resides | 326 | * Check to see if a mini-root was loaded into memory. It resides | |
327 | * at the start of the next page just after the end of BSS. | 327 | * at the start of the next page just after the end of BSS. | |
328 | */ | 328 | */ | |
329 | if (boothowto & RB_MINIROOT) | 329 | if (boothowto & RB_MINIROOT) | |
330 | kernend += round_page(mfs_initminiroot(kernend)); | 330 | kernend += round_page(mfs_initminiroot(kernend)); | |
331 | #endif | 331 | #endif | |
332 | 332 | |||
333 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 333 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
334 | /* init symbols if present */ | 334 | /* init symbols if present */ | |
335 | if (esym) | 335 | if (esym) | |
336 | ksyms_init((char *)esym - (char *)ssym, ssym, esym); | 336 | ksyms_addsyms_elf((char *)esym - (char *)ssym, ssym, esym); | |
337 | #endif | 337 | #endif | |
338 | #ifdef DDB | 338 | #ifdef DDB | |
339 | if (boothowto & RB_KDB) | 339 | if (boothowto & RB_KDB) | |
340 | Debugger(); | 340 | Debugger(); | |
341 | #endif | 341 | #endif | |
342 | 342 | |||
343 | /* | 343 | /* | |
344 | * Alloc u pages for proc0 stealing KSEG0 memory. | 344 | * Alloc u pages for proc0 stealing KSEG0 memory. | |
345 | */ | 345 | */ | |
346 | lwp0.l_addr = proc0paddr = (struct user *)kernend; | 346 | lwp0.l_addr = proc0paddr = (struct user *)kernend; | |
347 | lwp0.l_md.md_regs = (struct frame *)(kernend + USPACE) - 1; | 347 | lwp0.l_md.md_regs = (struct frame *)(kernend + USPACE) - 1; | |
348 | memset(lwp0.l_addr, 0, USPACE); | 348 | memset(lwp0.l_addr, 0, USPACE); | |
349 | proc0paddr->u_pcb.pcb_context[11] = | 349 | proc0paddr->u_pcb.pcb_context[11] = |
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c 2008/11/12 12:36:05 1.15
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c 2008/11/30 18:21:35 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ofwoea_machdep.c,v 1.15 2008/11/12 12:36:05 ad Exp $ */ | 1 | /* $NetBSD: ofwoea_machdep.c,v 1.16 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2007 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 Tim Rightnour | 8 | * by Tim Rightnour | |
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,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
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: ofwoea_machdep.c,v 1.15 2008/11/12 12:36:05 ad Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.16 2008/11/30 18:21:35 martin Exp $"); | |
34 | 34 | |||
35 | #include "opt_ppcarch.h" | 35 | #include "opt_ppcarch.h" | |
36 | #include "opt_compat_netbsd.h" | 36 | #include "opt_compat_netbsd.h" | |
37 | #include "opt_ddb.h" | 37 | #include "opt_ddb.h" | |
38 | #include "opt_kgdb.h" | 38 | #include "opt_kgdb.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/boot_flag.h> | 43 | #include <sys/boot_flag.h> | |
44 | #include <sys/extent.h> | 44 | #include <sys/extent.h> | |
45 | #include <sys/kernel.h> | 45 | #include <sys/kernel.h> | |
46 | #include <sys/ksyms.h> | 46 | #include <sys/ksyms.h> | |
@@ -229,27 +229,27 @@ ofwoea_initppc(u_int startkernel, u_int | @@ -229,27 +229,27 @@ ofwoea_initppc(u_int startkernel, u_int | |||
229 | if (oeacpufeat & OEACPU_64_BRIDGE) | 229 | if (oeacpufeat & OEACPU_64_BRIDGE) | |
230 | pmap_setup_segment0_map(0, 0xf4000000, 0xf4000000, 0x1000, 0x0); | 230 | pmap_setup_segment0_map(0, 0xf4000000, 0xf4000000, 0x1000, 0x0); | |
231 | #endif /* PMAC_G5 */ | 231 | #endif /* PMAC_G5 */ | |
232 | #endif /* PPC_OEA64 || PPC_OEA64_BRIDGE */ | 232 | #endif /* PPC_OEA64 || PPC_OEA64_BRIDGE */ | |
233 | 233 | |||
234 | /* Now enable translation (and machine checks/recoverable interrupts) */ | 234 | /* Now enable translation (and machine checks/recoverable interrupts) */ | |
235 | __asm __volatile ("sync; mfmsr %0; ori %0,%0,%1; mtmsr %0; isync" | 235 | __asm __volatile ("sync; mfmsr %0; ori %0,%0,%1; mtmsr %0; isync" | |
236 | : "=r"(scratch) | 236 | : "=r"(scratch) | |
237 | : "K"(PSL_IR|PSL_DR|PSL_ME|PSL_RI)); | 237 | : "K"(PSL_IR|PSL_DR|PSL_ME|PSL_RI)); | |
238 | 238 | |||
239 | restore_ofmap(ofmap, ofmaplen); | 239 | restore_ofmap(ofmap, ofmaplen); | |
240 | 240 | |||
241 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 241 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
242 | ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | 242 | ksyms_addsyms_elf((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | |
243 | #endif | 243 | #endif | |
244 | 244 | |||
245 | /* CPU clock stuff */ | 245 | /* CPU clock stuff */ | |
246 | set_timebase(); | 246 | set_timebase(); | |
247 | } | 247 | } | |
248 | 248 | |||
249 | void | 249 | void | |
250 | set_timebase(void) | 250 | set_timebase(void) | |
251 | { | 251 | { | |
252 | int qhandle, phandle, msr, scratch; | 252 | int qhandle, phandle, msr, scratch; | |
253 | char type[32]; | 253 | char type[32]; | |
254 | 254 | |||
255 | if (timebase_freq != 0) { | 255 | if (timebase_freq != 0) { |
--- src/sys/arch/powerpc/oea/prep_machdep.c 2008/11/12 12:36:05 1.4
+++ src/sys/arch/powerpc/oea/prep_machdep.c 2008/11/30 18:21:35 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: prep_machdep.c,v 1.4 2008/11/12 12:36:05 ad Exp $ */ | 1 | /* $NetBSD: prep_machdep.c,v 1.5 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2007 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 Tim Rightnour | 8 | * by Tim Rightnour | |
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. | |
@@ -27,27 +27,27 @@ | @@ -27,27 +27,27 @@ | |||
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 | /* | 32 | /* | |
33 | * This is a set of general routines that most PReP-similar machines have | 33 | * This is a set of general routines that most PReP-similar machines have | |
34 | * in common. Machines that use these routines do not have to be fully | 34 | * in common. Machines that use these routines do not have to be fully | |
35 | * PReP compliant, the only requirement is that they use a PReP memory map. | 35 | * PReP compliant, the only requirement is that they use a PReP memory map. | |
36 | * IE, io at 0x80000000 and mem at 0xc0000000. | 36 | * IE, io at 0x80000000 and mem at 0xc0000000. | |
37 | */ | 37 | */ | |
38 | 38 | |||
39 | #include <sys/cdefs.h> | 39 | #include <sys/cdefs.h> | |
40 | __KERNEL_RCSID(0, "$NetBSD: prep_machdep.c,v 1.4 2008/11/12 12:36:05 ad Exp $"); | 40 | __KERNEL_RCSID(0, "$NetBSD: prep_machdep.c,v 1.5 2008/11/30 18:21:35 martin Exp $"); | |
41 | 41 | |||
42 | #include <sys/param.h> | 42 | #include <sys/param.h> | |
43 | #include <sys/extent.h> | 43 | #include <sys/extent.h> | |
44 | #include <sys/kernel.h> | 44 | #include <sys/kernel.h> | |
45 | #include <sys/malloc.h> | 45 | #include <sys/malloc.h> | |
46 | #include <sys/reboot.h> | 46 | #include <sys/reboot.h> | |
47 | #include <sys/ksyms.h> | 47 | #include <sys/ksyms.h> | |
48 | 48 | |||
49 | #include <uvm/uvm_extern.h> | 49 | #include <uvm/uvm_extern.h> | |
50 | #include <machine/powerpc.h> | 50 | #include <machine/powerpc.h> | |
51 | #include <machine/bus.h> | 51 | #include <machine/bus.h> | |
52 | #include <machine/pmap.h> | 52 | #include <machine/pmap.h> | |
53 | #include <powerpc/oea/bat.h> | 53 | #include <powerpc/oea/bat.h> | |
@@ -156,27 +156,27 @@ prep_initppc(u_long startkernel, u_long | @@ -156,27 +156,27 @@ prep_initppc(u_long startkernel, u_long | |||
156 | /* Initialize bus_space. */ | 156 | /* Initialize bus_space. */ | |
157 | prep_bus_space_init(); | 157 | prep_bus_space_init(); | |
158 | 158 | |||
159 | /* Initialize the console asap. */ | 159 | /* Initialize the console asap. */ | |
160 | consinit(); | 160 | consinit(); | |
161 | 161 | |||
162 | /* Set the page size */ | 162 | /* Set the page size */ | |
163 | uvm_setpagesize(); | 163 | uvm_setpagesize(); | |
164 | 164 | |||
165 | /* Initialize pmap module */ | 165 | /* Initialize pmap module */ | |
166 | pmap_bootstrap(startkernel, endkernel); | 166 | pmap_bootstrap(startkernel, endkernel); | |
167 | 167 | |||
168 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 168 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
169 | ksyms_init((int)((u_long)endsym - (u_long)startsym), startsym, endsym); | 169 | ksyms_addsyms_elf((int)((u_long)endsym - (u_long)startsym), startsym, endsym); | |
170 | #endif | 170 | #endif | |
171 | 171 | |||
172 | #ifdef DDB | 172 | #ifdef DDB | |
173 | boothowto = args; | 173 | boothowto = args; | |
174 | if (boothowto & RB_KDB) | 174 | if (boothowto & RB_KDB) | |
175 | Debugger(); | 175 | Debugger(); | |
176 | #endif | 176 | #endif | |
177 | } | 177 | } | |
178 | 178 | |||
179 | void | 179 | void | |
180 | mem_regions(struct mem_region **mem, struct mem_region **avail) | 180 | mem_regions(struct mem_region **mem, struct mem_region **avail) | |
181 | { | 181 | { | |
182 | 182 |
--- src/sys/arch/rs6000/rs6000/machdep.c 2008/11/12 12:36:05 1.4
+++ src/sys/arch/rs6000/rs6000/machdep.c 2008/11/30 18:21:35 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.4 2008/11/12 12:36:05 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.5 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2007 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2007 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 Tim Rightnour | 8 | * by Tim Rightnour | |
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,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
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.4 2008/11/12 12:36:05 ad Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.5 2008/11/30 18:21:35 martin Exp $"); | |
34 | 34 | |||
35 | #include "opt_compat_netbsd.h" | 35 | #include "opt_compat_netbsd.h" | |
36 | #include "opt_ddb.h" | 36 | #include "opt_ddb.h" | |
37 | 37 | |||
38 | #include <sys/param.h> | 38 | #include <sys/param.h> | |
39 | #include <sys/buf.h> | 39 | #include <sys/buf.h> | |
40 | #include <sys/conf.h> | 40 | #include <sys/conf.h> | |
41 | #include <sys/device.h> | 41 | #include <sys/device.h> | |
42 | #include <sys/exec.h> | 42 | #include <sys/exec.h> | |
43 | #include <sys/extent.h> | 43 | #include <sys/extent.h> | |
44 | #include <sys/kernel.h> | 44 | #include <sys/kernel.h> | |
45 | #include <sys/malloc.h> | 45 | #include <sys/malloc.h> | |
46 | #include <sys/mbuf.h> | 46 | #include <sys/mbuf.h> | |
@@ -371,27 +371,27 @@ initppc(u_long startkernel, u_long endke | @@ -371,27 +371,27 @@ initppc(u_long startkernel, u_long endke | |||
371 | printf("sysinfo scr_addr %p -> %x\n", sysinfo->scr_addr, | 371 | printf("sysinfo scr_addr %p -> %x\n", sysinfo->scr_addr, | |
372 | *sysinfo->scr_addr); | 372 | *sysinfo->scr_addr); | |
373 | #endif | 373 | #endif | |
374 | 374 | |||
375 | /* Initialize bus_space. */ | 375 | /* Initialize bus_space. */ | |
376 | rs6000_bus_space_init(); | 376 | rs6000_bus_space_init(); | |
377 | setled(0x40600000); | 377 | setled(0x40600000); | |
378 | 378 | |||
379 | /* Initialize the console */ | 379 | /* Initialize the console */ | |
380 | consinit(); | 380 | consinit(); | |
381 | setled(0x41000000); | 381 | setled(0x41000000); | |
382 | 382 | |||
383 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 383 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
384 | ksyms_init((int)((u_long)endsym - (u_long)startsym), startsym, endsym); | 384 | ksyms_addsyms_elf((int)((u_long)endsym - (u_long)startsym), startsym, endsym); | |
385 | #endif | 385 | #endif | |
386 | 386 | |||
387 | #ifdef DDB | 387 | #ifdef DDB | |
388 | if (boothowto & RB_KDB) | 388 | if (boothowto & RB_KDB) | |
389 | Debugger(); | 389 | Debugger(); | |
390 | #endif | 390 | #endif | |
391 | } | 391 | } | |
392 | 392 | |||
393 | void | 393 | void | |
394 | mem_regions(struct mem_region **mem, struct mem_region **avail) | 394 | mem_regions(struct mem_region **mem, struct mem_region **avail) | |
395 | { | 395 | { | |
396 | 396 | |||
397 | *mem = physmemr; | 397 | *mem = physmemr; |
--- src/sys/arch/sandpoint/sandpoint/machdep.c 2008/11/12 12:36:05 1.44
+++ src/sys/arch/sandpoint/sandpoint/machdep.c 2008/11/30 18:21:35 1.45
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.44 2008/11/12 12:36:05 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.45 2008/11/30 18:21:35 martin 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.44 2008/11/12 12:36:05 ad Exp $"); | 35 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.45 2008/11/30 18:21:35 martin 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> | |
@@ -169,45 +169,45 @@ initppc(u_int startkernel, u_int endkern | @@ -169,45 +169,45 @@ initppc(u_int startkernel, u_int endkern | |||
169 | */ | 169 | */ | |
170 | oea_batinit( | 170 | oea_batinit( | |
171 | 0x80000000, BAT_BL_256M, /* SANDPOINT_BUS_SPACE_MEM */ | 171 | 0x80000000, BAT_BL_256M, /* SANDPOINT_BUS_SPACE_MEM */ | |
172 | 0xfc000000, BAT_BL_64M, /* _EUMB|_IO */ | 172 | 0xfc000000, BAT_BL_64M, /* _EUMB|_IO */ | |
173 | 0); | 173 | 0); | |
174 | 174 | |||
175 | /* Install vectors and interrupt handler */ | 175 | /* Install vectors and interrupt handler */ | |
176 | oea_init(NULL); | 176 | oea_init(NULL); | |
177 | 177 | |||
178 | #if 1 /* bumpy ride in pre-dawn time, for people knows what he/she is doing */ | 178 | #if 1 /* bumpy ride in pre-dawn time, for people knows what he/she is doing */ | |
179 | cn_tab = &kcomcons; | 179 | cn_tab = &kcomcons; | |
180 | (*cn_tab->cn_init)(&kcomcons); | 180 | (*cn_tab->cn_init)(&kcomcons); | |
181 | 181 | |||
182 | ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | 182 | ksyms_addsyms_elf((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | |
183 | if (boothowto & RB_KDB) | 183 | if (boothowto & RB_KDB) | |
184 | Debugger(); | 184 | Debugger(); | |
185 | #endif | 185 | #endif | |
186 | 186 | |||
187 | /* Initialize bus_space */ | 187 | /* Initialize bus_space */ | |
188 | sandpoint_bus_space_init(); | 188 | sandpoint_bus_space_init(); | |
189 | 189 | |||
190 | /* Initialize the console */ | 190 | /* Initialize the console */ | |
191 | consinit(); | 191 | consinit(); | |
192 | 192 | |||
193 | /* Set the page size */ | 193 | /* Set the page size */ | |
194 | uvm_setpagesize(); | 194 | uvm_setpagesize(); | |
195 | 195 | |||
196 | /* Initialize pmap module */ | 196 | /* Initialize pmap module */ | |
197 | pmap_bootstrap(startkernel, endkernel); | 197 | pmap_bootstrap(startkernel, endkernel); | |
198 | 198 | |||
199 | #if 0 /* NKSYMS || defined(DDB) || defined(MODULAR) */ | 199 | #if 0 /* NKSYMS || defined(DDB) || defined(MODULAR) */ | |
200 | ksyms_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | 200 | ksyms_addsyms_elf((int)((u_int)endsym - (u_int)startsym), startsym, endsym); | |
201 | #endif | 201 | #endif | |
202 | #ifdef IPKDB | 202 | #ifdef IPKDB | |
203 | /* | 203 | /* | |
204 | * Now trap to IPKDB | 204 | * Now trap to IPKDB | |
205 | */ | 205 | */ | |
206 | ipkdb_init(); | 206 | ipkdb_init(); | |
207 | if (boothowto & RB_KDB) | 207 | if (boothowto & RB_KDB) | |
208 | ipkdb_connect(0); | 208 | ipkdb_connect(0); | |
209 | #endif | 209 | #endif | |
210 | } | 210 | } | |
211 | 211 | |||
212 | void | 212 | void | |
213 | mem_regions(struct mem_region **mem, struct mem_region **avail) | 213 | mem_regions(struct mem_region **mem, struct mem_region **avail) |
--- src/sys/arch/sbmips/sbmips/machdep.c 2008/11/12 12:36:05 1.40
+++ src/sys/arch/sbmips/sbmips/machdep.c 2008/11/30 18:21:35 1.41
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.40 2008/11/12 12:36:05 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.41 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 2000, 2001 | 4 | * Copyright 2000, 2001 | |
5 | * Broadcom Corporation. All rights reserved. | 5 | * Broadcom Corporation. All rights reserved. | |
6 | * | 6 | * | |
7 | * This software is furnished under license and may be used and copied only | 7 | * This software is furnished under license and may be used and copied only | |
8 | * in accordance with the following terms and conditions. Subject to these | 8 | * in accordance with the following terms and conditions. Subject to these | |
9 | * conditions, you may download, copy, install, use, modify and distribute | 9 | * conditions, you may download, copy, install, use, modify and distribute | |
10 | * modified or unmodified copies of this software in source and/or binary | 10 | * modified or unmodified copies of this software in source and/or binary | |
11 | * form. No title or ownership is transferred hereby. | 11 | * form. No title or ownership is transferred hereby. | |
12 | * | 12 | * | |
13 | * 1) Any source code used, modified or distributed must reproduce and | 13 | * 1) Any source code used, modified or distributed must reproduce and | |
14 | * retain this copyright notice and list of conditions as they appear in | 14 | * retain this copyright notice and list of conditions as they appear in | |
@@ -48,27 +48,27 @@ | @@ -48,27 +48,27 @@ | |||
48 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 48 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
49 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 49 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
50 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 50 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
51 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 51 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
52 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 52 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
53 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 53 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
54 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 54 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
55 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 55 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
56 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 56 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
57 | * SUCH DAMAGE. | 57 | * SUCH DAMAGE. | |
58 | */ | 58 | */ | |
59 | 59 | |||
60 | #include <sys/cdefs.h> | 60 | #include <sys/cdefs.h> | |
61 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.40 2008/11/12 12:36:05 ad Exp $"); | 61 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.41 2008/11/30 18:21:35 martin Exp $"); | |
62 | 62 | |||
63 | #include "opt_ddb.h" | 63 | #include "opt_ddb.h" | |
64 | #include "opt_execfmt.h" | 64 | #include "opt_execfmt.h" | |
65 | 65 | |||
66 | #include <sys/param.h> | 66 | #include <sys/param.h> | |
67 | #include <sys/systm.h> | 67 | #include <sys/systm.h> | |
68 | #include <sys/kernel.h> | 68 | #include <sys/kernel.h> | |
69 | #include <sys/proc.h> | 69 | #include <sys/proc.h> | |
70 | #include <sys/buf.h> | 70 | #include <sys/buf.h> | |
71 | #include <sys/reboot.h> | 71 | #include <sys/reboot.h> | |
72 | #include <sys/conf.h> | 72 | #include <sys/conf.h> | |
73 | #include <sys/file.h> | 73 | #include <sys/file.h> | |
74 | #include <sys/malloc.h> | 74 | #include <sys/malloc.h> | |
@@ -321,27 +321,27 @@ mach_init(long fwhandle, long magic, lon | @@ -321,27 +321,27 @@ mach_init(long fwhandle, long magic, lon | |||
321 | */ | 321 | */ | |
322 | p0 = (void *)pmap_steal_memory(USPACE, NULL, NULL); | 322 | p0 = (void *)pmap_steal_memory(USPACE, NULL, NULL); | |
323 | lwp0.l_addr = proc0paddr = (struct user *)p0; | 323 | lwp0.l_addr = proc0paddr = (struct user *)p0; | |
324 | lwp0.l_md.md_regs = (struct frame *)((char *)p0 + USPACE) - 1; | 324 | lwp0.l_md.md_regs = (struct frame *)((char *)p0 + USPACE) - 1; | |
325 | proc0paddr->u_pcb.pcb_context[11] = | 325 | proc0paddr->u_pcb.pcb_context[11] = | |
326 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | 326 | MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */ | |
327 | 327 | |||
328 | pmap_bootstrap(); | 328 | pmap_bootstrap(); | |
329 | 329 | |||
330 | /* | 330 | /* | |
331 | * Initialize debuggers, and break into them, if appropriate. | 331 | * Initialize debuggers, and break into them, if appropriate. | |
332 | */ | 332 | */ | |
333 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 333 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
334 | ksyms_init(((uintptr_t)ksym_end - (uintptr_t)ksym_start), | 334 | ksyms_addsyms_elf(((uintptr_t)ksym_end - (uintptr_t)ksym_start), | |
335 | ksym_start, ksym_end); | 335 | ksym_start, ksym_end); | |
336 | #endif | 336 | #endif | |
337 | 337 | |||
338 | if (boothowto & RB_KDB) { | 338 | if (boothowto & RB_KDB) { | |
339 | #if defined(DDB) | 339 | #if defined(DDB) | |
340 | Debugger(); | 340 | Debugger(); | |
341 | #endif | 341 | #endif | |
342 | } | 342 | } | |
343 | } | 343 | } | |
344 | 344 | |||
345 | /* | 345 | /* | |
346 | * Allocate memory for variable-sized tables, | 346 | * Allocate memory for variable-sized tables, | |
347 | */ | 347 | */ |
--- src/sys/arch/sgimips/sgimips/machdep.c 2008/11/12 12:36:06 1.123
+++ src/sys/arch/sgimips/sgimips/machdep.c 2008/11/30 18:21:35 1.124
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.123 2008/11/12 12:36:06 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.124 2008/11/30 18:21:35 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2000 Soren S. Jorvang | 4 | * Copyright (c) 2000 Soren S. Jorvang | |
5 | * Copyright (c) 2001, 2002, 2003 Rafal K. Boni | 5 | * Copyright (c) 2001, 2002, 2003 Rafal K. Boni | |
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 | |
@@ -24,27 +24,27 @@ | @@ -24,27 +24,27 @@ | |||
24 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | 24 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
25 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 25 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
26 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 26 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
27 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 27 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
28 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 28 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
29 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 29 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
30 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 30 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
31 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 31 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
33 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 33 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <sys/cdefs.h> | 36 | #include <sys/cdefs.h> | |
37 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.123 2008/11/12 12:36:06 ad Exp $"); | 37 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.124 2008/11/30 18:21:35 martin Exp $"); | |
38 | 38 | |||
39 | #include "opt_ddb.h" | 39 | #include "opt_ddb.h" | |
40 | #include "opt_kgdb.h" | 40 | #include "opt_kgdb.h" | |
41 | #include "opt_execfmt.h" | 41 | #include "opt_execfmt.h" | |
42 | #include "opt_cputype.h" | 42 | #include "opt_cputype.h" | |
43 | #include "opt_mips_cache.h" | 43 | #include "opt_mips_cache.h" | |
44 | 44 | |||
45 | #include <sys/param.h> | 45 | #include <sys/param.h> | |
46 | #include <sys/systm.h> | 46 | #include <sys/systm.h> | |
47 | #include <sys/kernel.h> | 47 | #include <sys/kernel.h> | |
48 | #include <sys/proc.h> | 48 | #include <sys/proc.h> | |
49 | #include <sys/buf.h> | 49 | #include <sys/buf.h> | |
50 | #include <sys/reboot.h> | 50 | #include <sys/reboot.h> | |
@@ -475,31 +475,27 @@ mach_init(int argc, char *argv[], u_int | @@ -475,31 +475,27 @@ mach_init(int argc, char *argv[], u_int | |||
475 | } | 475 | } | |
476 | } | 476 | } | |
477 | 477 | |||
478 | #ifdef DEBUG | 478 | #ifdef DEBUG | |
479 | boothowto |= AB_DEBUG; | 479 | boothowto |= AB_DEBUG; | |
480 | #endif | 480 | #endif | |
481 | aprint_debug("argc = %d\n", argc); | 481 | aprint_debug("argc = %d\n", argc); | |
482 | for (i = 0; i < argc; i++) | 482 | for (i = 0; i < argc; i++) | |
483 | aprint_debug("argv[%d] = %s\n", i, argv[i]); | 483 | aprint_debug("argv[%d] = %s\n", i, argv[i]); | |
484 | 484 | |||
485 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 485 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
486 | /* init symbols if present */ | 486 | /* init symbols if present */ | |
487 | if (esym) | 487 | if (esym) | |
488 | ksyms_init(nsym, ssym, esym); | 488 | ksyms_addsyms_elf(nsym, ssym, esym); | |
489 | #ifdef SYMTAB_SPACE | |||
490 | else | |||
491 | ksyms_init(0, NULL, NULL); | |||
492 | #endif /* SYMTAB_SPACE */ | |||
493 | #endif /* NKSYMS || defined(DDB) || defined(MODULAR) */ | 489 | #endif /* NKSYMS || defined(DDB) || defined(MODULAR) */ | |
494 | 490 | |||
495 | #if defined(KGDB) || defined(DDB) | 491 | #if defined(KGDB) || defined(DDB) | |
496 | /* Set up DDB hook to turn off watchdog on entry */ | 492 | /* Set up DDB hook to turn off watchdog on entry */ | |
497 | db_trap_callback = ddb_trap_hook; | 493 | db_trap_callback = ddb_trap_hook; | |
498 | 494 | |||
499 | #ifdef DDB | 495 | #ifdef DDB | |
500 | if (boothowto & RB_KDB) | 496 | if (boothowto & RB_KDB) | |
501 | Debugger(); | 497 | Debugger(); | |
502 | #endif | 498 | #endif | |
503 | 499 | |||
504 | #ifdef KGDB | 500 | #ifdef KGDB | |
505 | kgdb_port_init(); | 501 | kgdb_port_init(); |
--- src/sys/arch/shark/shark/shark_machdep.c 2008/11/12 12:36:06 1.31
+++ src/sys/arch/shark/shark/shark_machdep.c 2008/11/30 18:21:36 1.32
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: shark_machdep.c,v 1.31 2008/11/12 12:36:06 ad Exp $ */ | 1 | /* $NetBSD: shark_machdep.c,v 1.32 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997 | 4 | * Copyright 1997 | |
5 | * Digital Equipment Corporation. All rights reserved. | 5 | * Digital Equipment Corporation. All rights reserved. | |
6 | * | 6 | * | |
7 | * This software is furnished under license and may be used and | 7 | * This software is furnished under license and may be used and | |
8 | * copied only in accordance with the following terms and conditions. | 8 | * copied only in accordance with the following terms and conditions. | |
9 | * Subject to these conditions, you may download, copy, install, | 9 | * Subject to these conditions, you may download, copy, install, | |
10 | * use, modify and distribute this software in source and/or binary | 10 | * use, modify and distribute this software in source and/or binary | |
11 | * form. No title or ownership is transferred hereby. | 11 | * form. No title or ownership is transferred hereby. | |
12 | * | 12 | * | |
13 | * 1) Any source code used, modified or distributed must reproduce | 13 | * 1) Any source code used, modified or distributed must reproduce | |
14 | * and retain this copyright notice and list of conditions as | 14 | * and retain this copyright notice and list of conditions as | |
@@ -28,27 +28,27 @@ | @@ -28,27 +28,27 @@ | |||
28 | * liable for any damages whatsoever, and in particular, DIGITAL | 28 | * liable for any damages whatsoever, and in particular, DIGITAL | |
29 | * shall not be liable for special, indirect, consequential, or | 29 | * shall not be liable for special, indirect, consequential, or | |
30 | * incidental damages or damages for lost profits, loss of | 30 | * incidental damages or damages for lost profits, loss of | |
31 | * revenue or loss of use, whether such damages arise in contract, | 31 | * revenue or loss of use, whether such damages arise in contract, | |
32 | * negligence, tort, under statute, in equity, at law or otherwise, | 32 | * negligence, tort, under statute, in equity, at law or otherwise, | |
33 | * even if advised of the possibility of such damage. | 33 | * even if advised of the possibility of such damage. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | /* | 36 | /* | |
37 | * Kernel setup for the SHARK Configuration | 37 | * Kernel setup for the SHARK Configuration | |
38 | */ | 38 | */ | |
39 | 39 | |||
40 | #include <sys/cdefs.h> | 40 | #include <sys/cdefs.h> | |
41 | __KERNEL_RCSID(0, "$NetBSD: shark_machdep.c,v 1.31 2008/11/12 12:36:06 ad Exp $"); | 41 | __KERNEL_RCSID(0, "$NetBSD: shark_machdep.c,v 1.32 2008/11/30 18:21:36 martin Exp $"); | |
42 | 42 | |||
43 | #include "opt_ddb.h" | 43 | #include "opt_ddb.h" | |
44 | 44 | |||
45 | #include <sys/types.h> | 45 | #include <sys/types.h> | |
46 | #include <sys/param.h> | 46 | #include <sys/param.h> | |
47 | #include <sys/systm.h> | 47 | #include <sys/systm.h> | |
48 | #include <sys/reboot.h> | 48 | #include <sys/reboot.h> | |
49 | #include <sys/proc.h> | 49 | #include <sys/proc.h> | |
50 | #include <sys/kernel.h> | 50 | #include <sys/kernel.h> | |
51 | #include <sys/buf.h> | 51 | #include <sys/buf.h> | |
52 | #include <sys/exec.h> | 52 | #include <sys/exec.h> | |
53 | #include <sys/ksyms.h> | 53 | #include <sys/ksyms.h> | |
54 | 54 | |||
@@ -290,35 +290,33 @@ initarm(void *arg) | @@ -290,35 +290,33 @@ initarm(void *arg) | |||
290 | shark_fiqhandler.fh_regs = &shark_fiqregs; | 290 | shark_fiqhandler.fh_regs = &shark_fiqregs; | |
291 | 291 | |||
292 | shark_fiqregs.fr_r8 = isa_io_virtaddr; | 292 | shark_fiqregs.fr_r8 = isa_io_virtaddr; | |
293 | shark_fiqregs.fr_r9 = 0; /* no routine right now */ | 293 | shark_fiqregs.fr_r9 = 0; /* no routine right now */ | |
294 | shark_fiqregs.fr_r10 = 0; /* no arg right now */ | 294 | shark_fiqregs.fr_r10 = 0; /* no arg right now */ | |
295 | shark_fiqregs.fr_r11 = 0; /* scratch */ | 295 | shark_fiqregs.fr_r11 = 0; /* scratch */ | |
296 | shark_fiqregs.fr_r12 = 0; /* scratch */ | 296 | shark_fiqregs.fr_r12 = 0; /* scratch */ | |
297 | shark_fiqregs.fr_r13 = 0; /* must set a stack when r9 is set! */ | 297 | shark_fiqregs.fr_r13 = 0; /* must set a stack when r9 is set! */ | |
298 | 298 | |||
299 | if (fiq_claim(&shark_fiqhandler)) | 299 | if (fiq_claim(&shark_fiqhandler)) | |
300 | panic("Cannot claim FIQ vector."); | 300 | panic("Cannot claim FIQ vector."); | |
301 | 301 | |||
302 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 302 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
303 | #ifdef __ELF__ | 303 | #ifndef __ELF__ /* XXX */ | |
304 | ksyms_init(0, NULL, NULL); /* XXX */ | |||
305 | #else | |||
306 | { | 304 | { | |
307 | struct exec *kernexec = (struct exec *)KERNEL_TEXT_BASE; | 305 | struct exec *kernexec = (struct exec *)KERNEL_TEXT_BASE; | |
308 | extern int end; | 306 | extern int end; | |
309 | extern char *esym; | 307 | extern char *esym; | |
310 | 308 | |||
311 | ksyms_init(kernexec->a_syms, &end, esym); | 309 | ksyms_addsyms_elf(kernexec->a_syms, &end, esym); | |
312 | } | 310 | } | |
313 | #endif /* __ELF__ */ | 311 | #endif /* __ELF__ */ | |
314 | #endif /* NKSYMS || defined(DDB) || defined(MODULAR) */ | 312 | #endif /* NKSYMS || defined(DDB) || defined(MODULAR) */ | |
315 | 313 | |||
316 | #ifdef DDB | 314 | #ifdef DDB | |
317 | db_machine_init(); | 315 | db_machine_init(); | |
318 | if (boothowto & RB_KDB) | 316 | if (boothowto & RB_KDB) | |
319 | Debugger(); | 317 | Debugger(); | |
320 | #endif | 318 | #endif | |
321 | 319 | |||
322 | /* Return the new stackbase. */ | 320 | /* Return the new stackbase. */ | |
323 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | 321 | return(kernelstack.pv_va + USPACE_SVC_STACK_TOP); | |
324 | } | 322 | } |
--- src/sys/arch/sparc/sparc/autoconf.c 2008/11/12 12:36:06 1.230
+++ src/sys/arch/sparc/sparc/autoconf.c 2008/11/30 18:21:36 1.231
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: autoconf.c,v 1.230 2008/11/12 12:36:06 ad Exp $ */ | 1 | /* $NetBSD: autoconf.c,v 1.231 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1996 | 4 | * Copyright (c) 1996 | |
5 | * The President and Fellows of Harvard College. All rights reserved. | 5 | * The President and Fellows of Harvard College. All rights reserved. | |
6 | * Copyright (c) 1992, 1993 | 6 | * Copyright (c) 1992, 1993 | |
7 | * The Regents of the University of California. All rights reserved. | 7 | * The Regents of the University of California. All rights reserved. | |
8 | * | 8 | * | |
9 | * This software was developed by the Computer Systems Engineering group | 9 | * This software was developed by the Computer Systems Engineering group | |
10 | * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and | 10 | * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and | |
11 | * contributed to Berkeley. | 11 | * contributed to Berkeley. | |
12 | * | 12 | * | |
13 | * All advertising materials mentioning features or use of this software | 13 | * All advertising materials mentioning features or use of this software | |
14 | * must display the following acknowledgement: | 14 | * must display the following acknowledgement: | |
@@ -38,27 +38,27 @@ | @@ -38,27 +38,27 @@ | |||
38 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 38 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
39 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 39 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
40 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 40 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
41 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 41 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
42 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 42 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
43 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 43 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
44 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 44 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
45 | * SUCH DAMAGE. | 45 | * SUCH DAMAGE. | |
46 | * | 46 | * | |
47 | * @(#)autoconf.c 8.4 (Berkeley) 10/1/93 | 47 | * @(#)autoconf.c 8.4 (Berkeley) 10/1/93 | |
48 | */ | 48 | */ | |
49 | 49 | |||
50 | #include <sys/cdefs.h> | 50 | #include <sys/cdefs.h> | |
51 | __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.230 2008/11/12 12:36:06 ad Exp $"); | 51 | __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.231 2008/11/30 18:21:36 martin Exp $"); | |
52 | 52 | |||
53 | #include "opt_ddb.h" | 53 | #include "opt_ddb.h" | |
54 | #include "opt_kgdb.h" | 54 | #include "opt_kgdb.h" | |
55 | #include "opt_multiprocessor.h" | 55 | #include "opt_multiprocessor.h" | |
56 | #include "opt_sparc_arch.h" | 56 | #include "opt_sparc_arch.h" | |
57 | 57 | |||
58 | #include "scsibus.h" | 58 | #include "scsibus.h" | |
59 | 59 | |||
60 | #include <sys/param.h> | 60 | #include <sys/param.h> | |
61 | #include <sys/kernel.h> | 61 | #include <sys/kernel.h> | |
62 | #include <sys/systm.h> | 62 | #include <sys/systm.h> | |
63 | #include <sys/endian.h> | 63 | #include <sys/endian.h> | |
64 | #include <sys/proc.h> | 64 | #include <sys/proc.h> | |
@@ -311,27 +311,27 @@ bootstrap(void) | @@ -311,27 +311,27 @@ bootstrap(void) | |||
311 | * bytes available for the buffer at this location (see the | 311 | * bytes available for the buffer at this location (see the | |
312 | * comment in locore.s at the top of the .text segment). | 312 | * comment in locore.s at the top of the .text segment). | |
313 | */ | 313 | */ | |
314 | initmsgbuf((void *)KERNBASE, 8192); | 314 | initmsgbuf((void *)KERNBASE, 8192); | |
315 | #endif | 315 | #endif | |
316 | 316 | |||
317 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 317 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
318 | if ((bi_sym = lookup_bootinfo(BTINFO_SYMTAB)) != NULL) { | 318 | if ((bi_sym = lookup_bootinfo(BTINFO_SYMTAB)) != NULL) { | |
319 | if (bi_sym->ssym < KERNBASE) { | 319 | if (bi_sym->ssym < KERNBASE) { | |
320 | /* Assume low-loading boot loader */ | 320 | /* Assume low-loading boot loader */ | |
321 | bi_sym->ssym += KERNBASE; | 321 | bi_sym->ssym += KERNBASE; | |
322 | bi_sym->esym += KERNBASE; | 322 | bi_sym->esym += KERNBASE; | |
323 | } | 323 | } | |
324 | ksyms_init(bi_sym->nsym, (int *)bi_sym->ssym, | 324 | ksyms_addsyms_elf(bi_sym->nsym, (int *)bi_sym->ssym, | |
325 | (int *)bi_sym->esym); | 325 | (int *)bi_sym->esym); | |
326 | } | 326 | } | |
327 | #endif | 327 | #endif | |
328 | 328 | |||
329 | #if defined(SUN4M) | 329 | #if defined(SUN4M) | |
330 | /* | 330 | /* | |
331 | * sun4m bootstrap is complex and is totally different for "normal" 4m | 331 | * sun4m bootstrap is complex and is totally different for "normal" 4m | |
332 | * and for microSPARC-IIep - so it's split into separate functions. | 332 | * and for microSPARC-IIep - so it's split into separate functions. | |
333 | */ | 333 | */ | |
334 | if (CPU_ISSUN4M) { | 334 | if (CPU_ISSUN4M) { | |
335 | #if !defined(MSIIEP) | 335 | #if !defined(MSIIEP) | |
336 | bootstrap4m(); | 336 | bootstrap4m(); | |
337 | #else | 337 | #else |
--- src/sys/arch/sparc64/sparc64/autoconf.c 2008/11/12 12:36:06 1.157
+++ src/sys/arch/sparc64/sparc64/autoconf.c 2008/11/30 18:21:36 1.158
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: autoconf.c,v 1.157 2008/11/12 12:36:06 ad Exp $ */ | 1 | /* $NetBSD: autoconf.c,v 1.158 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1996 | 4 | * Copyright (c) 1996 | |
5 | * The President and Fellows of Harvard College. All rights reserved. | 5 | * The President and Fellows of Harvard College. All rights reserved. | |
6 | * Copyright (c) 1992, 1993 | 6 | * Copyright (c) 1992, 1993 | |
7 | * The Regents of the University of California. All rights reserved. | 7 | * The Regents of the University of California. All rights reserved. | |
8 | * | 8 | * | |
9 | * This software was developed by the Computer Systems Engineering group | 9 | * This software was developed by the Computer Systems Engineering group | |
10 | * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and | 10 | * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and | |
11 | * contributed to Berkeley. | 11 | * contributed to Berkeley. | |
12 | * | 12 | * | |
13 | * All advertising materials mentioning features or use of this software | 13 | * All advertising materials mentioning features or use of this software | |
14 | * must display the following acknowledgement: | 14 | * must display the following acknowledgement: | |
@@ -38,27 +38,27 @@ | @@ -38,27 +38,27 @@ | |||
38 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 38 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
39 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 39 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
40 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 40 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
41 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 41 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
42 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 42 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
43 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 43 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
44 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 44 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
45 | * SUCH DAMAGE. | 45 | * SUCH DAMAGE. | |
46 | * | 46 | * | |
47 | * @(#)autoconf.c 8.4 (Berkeley) 10/1/93 | 47 | * @(#)autoconf.c 8.4 (Berkeley) 10/1/93 | |
48 | */ | 48 | */ | |
49 | 49 | |||
50 | #include <sys/cdefs.h> | 50 | #include <sys/cdefs.h> | |
51 | __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.157 2008/11/12 12:36:06 ad Exp $"); | 51 | __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.158 2008/11/30 18:21:36 martin Exp $"); | |
52 | 52 | |||
53 | #include "opt_ddb.h" | 53 | #include "opt_ddb.h" | |
54 | #include "opt_kgdb.h" | 54 | #include "opt_kgdb.h" | |
55 | #include "opt_multiprocessor.h" | 55 | #include "opt_multiprocessor.h" | |
56 | 56 | |||
57 | #include <sys/param.h> | 57 | #include <sys/param.h> | |
58 | #include <sys/kernel.h> | 58 | #include <sys/kernel.h> | |
59 | #include <sys/systm.h> | 59 | #include <sys/systm.h> | |
60 | #include <sys/buf.h> | 60 | #include <sys/buf.h> | |
61 | #include <sys/disklabel.h> | 61 | #include <sys/disklabel.h> | |
62 | #include <sys/device.h> | 62 | #include <sys/device.h> | |
63 | #include <sys/disk.h> | 63 | #include <sys/disk.h> | |
64 | #include <sys/conf.h> | 64 | #include <sys/conf.h> | |
@@ -303,27 +303,27 @@ die_old_boot_loader: | @@ -303,27 +303,27 @@ die_old_boot_loader: | |||
303 | printf("No bootinfo information.\n"); | 303 | printf("No bootinfo information.\n"); | |
304 | goto die_old_boot_loader; | 304 | goto die_old_boot_loader; | |
305 | } | 305 | } | |
306 | 306 | |||
307 | bootinfo = (void*)(u_long)((uint64_t*)bi)[1]; | 307 | bootinfo = (void*)(u_long)((uint64_t*)bi)[1]; | |
308 | LOOKUP_BOOTINFO(bi_kend, BTINFO_KERNEND); | 308 | LOOKUP_BOOTINFO(bi_kend, BTINFO_KERNEND); | |
309 | 309 | |||
310 | if (bi_kend->addr == (vaddr_t)0) { | 310 | if (bi_kend->addr == (vaddr_t)0) { | |
311 | panic("Kernel end address is not found in bootinfo.\n"); | 311 | panic("Kernel end address is not found in bootinfo.\n"); | |
312 | } | 312 | } | |
313 | 313 | |||
314 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 314 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
315 | LOOKUP_BOOTINFO(bi_sym, BTINFO_SYMTAB); | 315 | LOOKUP_BOOTINFO(bi_sym, BTINFO_SYMTAB); | |
316 | ksyms_init(bi_sym->nsym, (int *)(u_long)bi_sym->ssym, | 316 | ksyms_addsyms_elf(bi_sym->nsym, (int *)(u_long)bi_sym->ssym, | |
317 | (int *)(u_long)bi_sym->esym); | 317 | (int *)(u_long)bi_sym->esym); | |
318 | #ifdef DDB | 318 | #ifdef DDB | |
319 | #ifdef __arch64__ | 319 | #ifdef __arch64__ | |
320 | /* This can only be installed on an 64-bit system cause otherwise our stack is screwed */ | 320 | /* This can only be installed on an 64-bit system cause otherwise our stack is screwed */ | |
321 | OF_set_symbol_lookup(OF_sym2val, OF_val2sym); | 321 | OF_set_symbol_lookup(OF_sym2val, OF_val2sym); | |
322 | #else | 322 | #else | |
323 | OF_set_symbol_lookup(OF_sym2val32, OF_val2sym32); | 323 | OF_set_symbol_lookup(OF_sym2val32, OF_val2sym32); | |
324 | #endif | 324 | #endif | |
325 | #endif | 325 | #endif | |
326 | #endif | 326 | #endif | |
327 | 327 | |||
328 | LOOKUP_BOOTINFO(bi_count, BTINFO_DTLB_SLOTS); | 328 | LOOKUP_BOOTINFO(bi_count, BTINFO_DTLB_SLOTS); | |
329 | kernel_tlb_slots = bi_count->count; | 329 | kernel_tlb_slots = bi_count->count; |
--- src/sys/arch/sun2/sun2/machdep.c 2008/11/25 15:51:34 1.56
+++ src/sys/arch/sun2/sun2/machdep.c 2008/11/30 18:21:36 1.57
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.56 2008/11/25 15:51:34 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.57 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1990, 1993 | 4 | * Copyright (c) 1982, 1986, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -143,27 +143,27 @@ | @@ -143,27 +143,27 @@ | |||
143 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 143 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
144 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 144 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
145 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 145 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
146 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 146 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
147 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 147 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
148 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 148 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
149 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 149 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
150 | * SUCH DAMAGE. | 150 | * SUCH DAMAGE. | |
151 | * | 151 | * | |
152 | * @(#)machdep.c 8.6 (Berkeley) 1/14/94 | 152 | * @(#)machdep.c 8.6 (Berkeley) 1/14/94 | |
153 | */ | 153 | */ | |
154 | 154 | |||
155 | #include <sys/cdefs.h> | 155 | #include <sys/cdefs.h> | |
156 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.56 2008/11/25 15:51:34 ad Exp $"); | 156 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.57 2008/11/30 18:21:36 martin Exp $"); | |
157 | 157 | |||
158 | #include "opt_ddb.h" | 158 | #include "opt_ddb.h" | |
159 | #include "opt_kgdb.h" | 159 | #include "opt_kgdb.h" | |
160 | #include "opt_fpu_emulate.h" | 160 | #include "opt_fpu_emulate.h" | |
161 | 161 | |||
162 | #include <sys/param.h> | 162 | #include <sys/param.h> | |
163 | #include <sys/systm.h> | 163 | #include <sys/systm.h> | |
164 | #include <sys/kernel.h> | 164 | #include <sys/kernel.h> | |
165 | #include <sys/proc.h> | 165 | #include <sys/proc.h> | |
166 | #include <sys/buf.h> | 166 | #include <sys/buf.h> | |
167 | #include <sys/reboot.h> | 167 | #include <sys/reboot.h> | |
168 | #include <sys/conf.h> | 168 | #include <sys/conf.h> | |
169 | #include <sys/file.h> | 169 | #include <sys/file.h> | |
@@ -291,27 +291,27 @@ cpu_startup(void) | @@ -291,27 +291,27 @@ cpu_startup(void) | |||
291 | * for its vector table and other stuff.) | 291 | * for its vector table and other stuff.) | |
292 | * Its mapping was prepared in pmap_bootstrap(). | 292 | * Its mapping was prepared in pmap_bootstrap(). | |
293 | * Also, offset some to avoid PROM scribbles. | 293 | * Also, offset some to avoid PROM scribbles. | |
294 | */ | 294 | */ | |
295 | v = (void *) (PAGE_SIZE * 4); | 295 | v = (void *) (PAGE_SIZE * 4); | |
296 | msgbufaddr = (void *)((char *)v + MSGBUFOFF); | 296 | msgbufaddr = (void *)((char *)v + MSGBUFOFF); | |
297 | initmsgbuf(msgbufaddr, MSGBUFSIZE); | 297 | initmsgbuf(msgbufaddr, MSGBUFSIZE); | |
298 | 298 | |||
299 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 299 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
300 | { | 300 | { | |
301 | extern int nsym; | 301 | extern int nsym; | |
302 | extern char *ssym, *esym; | 302 | extern char *ssym, *esym; | |
303 | 303 | |||
304 | ksyms_init(nsym, ssym, esym); | 304 | ksyms_addsyms_elf(nsym, ssym, esym); | |
305 | } | 305 | } | |
306 | #endif /* DDB */ | 306 | #endif /* DDB */ | |
307 | 307 | |||
308 | /* | 308 | /* | |
309 | * Good {morning,afternoon,evening,night}. | 309 | * Good {morning,afternoon,evening,night}. | |
310 | */ | 310 | */ | |
311 | printf("%s%s", copyright, version); | 311 | printf("%s%s", copyright, version); | |
312 | identifycpu(); | 312 | identifycpu(); | |
313 | fputype = FPU_NONE; | 313 | fputype = FPU_NONE; | |
314 | #ifdef FPU_EMULATE | 314 | #ifdef FPU_EMULATE | |
315 | printf("fpu: emulator\n"); | 315 | printf("fpu: emulator\n"); | |
316 | #else | 316 | #else | |
317 | printf("fpu: no math support\n"); | 317 | printf("fpu: no math support\n"); |
--- src/sys/arch/sun3/sun3/machdep.c 2008/11/25 15:51:35 1.188
+++ src/sys/arch/sun3/sun3/machdep.c 2008/11/30 18:21:36 1.189
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.188 2008/11/25 15:51:35 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.189 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1990, 1993 | 4 | * Copyright (c) 1982, 1986, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -68,27 +68,27 @@ | @@ -68,27 +68,27 @@ | |||
68 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 68 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
69 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 69 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
70 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 70 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
71 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 71 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
72 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 72 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
73 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 73 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
74 | * SUCH DAMAGE. | 74 | * SUCH DAMAGE. | |
75 | * | 75 | * | |
76 | * from: Utah Hdr: machdep.c 1.74 92/12/20 | 76 | * from: Utah Hdr: machdep.c 1.74 92/12/20 | |
77 | * from: @(#)machdep.c 8.10 (Berkeley) 4/20/94 | 77 | * from: @(#)machdep.c 8.10 (Berkeley) 4/20/94 | |
78 | */ | 78 | */ | |
79 | 79 | |||
80 | #include <sys/cdefs.h> | 80 | #include <sys/cdefs.h> | |
81 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.188 2008/11/25 15:51:35 ad Exp $"); | 81 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.189 2008/11/30 18:21:36 martin Exp $"); | |
82 | 82 | |||
83 | #include "opt_ddb.h" | 83 | #include "opt_ddb.h" | |
84 | #include "opt_kgdb.h" | 84 | #include "opt_kgdb.h" | |
85 | 85 | |||
86 | #include <sys/param.h> | 86 | #include <sys/param.h> | |
87 | #include <sys/systm.h> | 87 | #include <sys/systm.h> | |
88 | #include <sys/kernel.h> | 88 | #include <sys/kernel.h> | |
89 | #include <sys/proc.h> | 89 | #include <sys/proc.h> | |
90 | #include <sys/buf.h> | 90 | #include <sys/buf.h> | |
91 | #include <sys/reboot.h> | 91 | #include <sys/reboot.h> | |
92 | #include <sys/conf.h> | 92 | #include <sys/conf.h> | |
93 | #include <sys/file.h> | 93 | #include <sys/file.h> | |
94 | #include <sys/device.h> | 94 | #include <sys/device.h> | |
@@ -174,27 +174,27 @@ consinit(void) | @@ -174,27 +174,27 @@ consinit(void) | |||
174 | { | 174 | { | |
175 | 175 | |||
176 | /* | 176 | /* | |
177 | * Switch from the PROM console (output only) | 177 | * Switch from the PROM console (output only) | |
178 | * to our own console driver. | 178 | * to our own console driver. | |
179 | */ | 179 | */ | |
180 | cninit(); | 180 | cninit(); | |
181 | 181 | |||
182 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 182 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
183 | { | 183 | { | |
184 | extern int nsym; | 184 | extern int nsym; | |
185 | extern char *ssym, *esym; | 185 | extern char *ssym, *esym; | |
186 | 186 | |||
187 | ksyms_init(nsym, ssym, esym); | 187 | ksyms_addsyms_elf(nsym, ssym, esym); | |
188 | } | 188 | } | |
189 | #endif /* DDB */ | 189 | #endif /* DDB */ | |
190 | 190 | |||
191 | /* | 191 | /* | |
192 | * Now that the console can do input as well as | 192 | * Now that the console can do input as well as | |
193 | * output, consider stopping for a debugger. | 193 | * output, consider stopping for a debugger. | |
194 | */ | 194 | */ | |
195 | if (boothowto & RB_KDB) { | 195 | if (boothowto & RB_KDB) { | |
196 | #ifdef KGDB | 196 | #ifdef KGDB | |
197 | /* XXX - Ask on console for kgdb_dev? */ | 197 | /* XXX - Ask on console for kgdb_dev? */ | |
198 | /* Note: this will just return if kgdb_dev==NODEV */ | 198 | /* Note: this will just return if kgdb_dev==NODEV */ | |
199 | kgdb_connect(1); | 199 | kgdb_connect(1); | |
200 | #else /* KGDB */ | 200 | #else /* KGDB */ |
--- src/sys/arch/sun3/sun3x/machdep.c 2008/11/25 15:51:35 1.114
+++ src/sys/arch/sun3/sun3x/machdep.c 2008/11/30 18:21:36 1.115
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.114 2008/11/25 15:51:35 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.115 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1990, 1993 | 4 | * Copyright (c) 1982, 1986, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -65,27 +65,27 @@ | @@ -65,27 +65,27 @@ | |||
65 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 65 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
66 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 66 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
67 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 67 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
68 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 68 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
69 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 69 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
70 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 70 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
71 | * SUCH DAMAGE. | 71 | * SUCH DAMAGE. | |
72 | * | 72 | * | |
73 | * from: Utah Hdr: machdep.c 1.74 92/12/20 | 73 | * from: Utah Hdr: machdep.c 1.74 92/12/20 | |
74 | * from: @(#)machdep.c 8.10 (Berkeley) 4/20/94 | 74 | * from: @(#)machdep.c 8.10 (Berkeley) 4/20/94 | |
75 | */ | 75 | */ | |
76 | 76 | |||
77 | #include <sys/cdefs.h> | 77 | #include <sys/cdefs.h> | |
78 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.114 2008/11/25 15:51:35 ad Exp $"); | 78 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.115 2008/11/30 18:21:36 martin Exp $"); | |
79 | 79 | |||
80 | #include "opt_ddb.h" | 80 | #include "opt_ddb.h" | |
81 | #include "opt_kgdb.h" | 81 | #include "opt_kgdb.h" | |
82 | 82 | |||
83 | #include <sys/param.h> | 83 | #include <sys/param.h> | |
84 | #include <sys/systm.h> | 84 | #include <sys/systm.h> | |
85 | #include <sys/kernel.h> | 85 | #include <sys/kernel.h> | |
86 | #include <sys/proc.h> | 86 | #include <sys/proc.h> | |
87 | #include <sys/buf.h> | 87 | #include <sys/buf.h> | |
88 | #include <sys/reboot.h> | 88 | #include <sys/reboot.h> | |
89 | #include <sys/conf.h> | 89 | #include <sys/conf.h> | |
90 | #include <sys/file.h> | 90 | #include <sys/file.h> | |
91 | #include <sys/device.h> | 91 | #include <sys/device.h> | |
@@ -175,27 +175,27 @@ consinit(void) | @@ -175,27 +175,27 @@ consinit(void) | |||
175 | { | 175 | { | |
176 | 176 | |||
177 | /* | 177 | /* | |
178 | * Switch from the PROM console (output only) | 178 | * Switch from the PROM console (output only) | |
179 | * to our own console driver. | 179 | * to our own console driver. | |
180 | */ | 180 | */ | |
181 | cninit(); | 181 | cninit(); | |
182 | 182 | |||
183 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 183 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
184 | { | 184 | { | |
185 | extern int nsym; | 185 | extern int nsym; | |
186 | extern char *ssym, *esym; | 186 | extern char *ssym, *esym; | |
187 | 187 | |||
188 | ksyms_init(nsym, ssym, esym); | 188 | ksyms_addsyms_elf(nsym, ssym, esym); | |
189 | } | 189 | } | |
190 | #endif /* DDB */ | 190 | #endif /* DDB */ | |
191 | 191 | |||
192 | /* | 192 | /* | |
193 | * Now that the console can do input as well as | 193 | * Now that the console can do input as well as | |
194 | * output, consider stopping for a debugger. | 194 | * output, consider stopping for a debugger. | |
195 | */ | 195 | */ | |
196 | if (boothowto & RB_KDB) { | 196 | if (boothowto & RB_KDB) { | |
197 | #ifdef KGDB | 197 | #ifdef KGDB | |
198 | /* XXX - Ask on console for kgdb_dev? */ | 198 | /* XXX - Ask on console for kgdb_dev? */ | |
199 | /* Note: this will just return if kgdb_dev==NODEV */ | 199 | /* Note: this will just return if kgdb_dev==NODEV */ | |
200 | kgdb_connect(1); | 200 | kgdb_connect(1); | |
201 | #else /* KGDB */ | 201 | #else /* KGDB */ |
--- src/sys/arch/vax/vax/machdep.c 2008/11/19 20:26:40 1.170
+++ src/sys/arch/vax/vax/machdep.c 2008/11/30 18:21:36 1.171
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.170 2008/11/19 20:26:40 hans Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.171 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. | 4 | * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Changed for the VAX port (and for readability) /IC | 7 | * Changed for the VAX port (and for readability) /IC | |
8 | * | 8 | * | |
9 | * This code is derived from software contributed to Berkeley by the Systems | 9 | * This code is derived from software contributed to Berkeley by the Systems | |
10 | * Programming Group of the University of Utah Computer Science Department. | 10 | * Programming Group of the University of Utah Computer Science Department. | |
11 | * | 11 | * | |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without | |
13 | * modification, are permitted provided that the following conditions | 13 | * modification, are permitted provided that the following conditions | |
14 | * are met: | 14 | * are met: | |
@@ -73,27 +73,27 @@ | @@ -73,27 +73,27 @@ | |||
73 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 73 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
74 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 74 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
75 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 75 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
76 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 76 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
77 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 77 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
78 | * SUCH DAMAGE. | 78 | * SUCH DAMAGE. | |
79 | * | 79 | * | |
80 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | 80 | * from: Utah Hdr: machdep.c 1.63 91/04/24 | |
81 | * | 81 | * | |
82 | * @(#)machdep.c 7.16 (Berkeley) 6/3/91 | 82 | * @(#)machdep.c 7.16 (Berkeley) 6/3/91 | |
83 | */ | 83 | */ | |
84 | 84 | |||
85 | #include <sys/cdefs.h> | 85 | #include <sys/cdefs.h> | |
86 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.170 2008/11/19 20:26:40 hans Exp $"); | 86 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.171 2008/11/30 18:21:36 martin Exp $"); | |
87 | 87 | |||
88 | #include "opt_ddb.h" | 88 | #include "opt_ddb.h" | |
89 | #include "opt_compat_netbsd.h" | 89 | #include "opt_compat_netbsd.h" | |
90 | #include "opt_compat_ultrix.h" | 90 | #include "opt_compat_ultrix.h" | |
91 | #include "opt_multiprocessor.h" | 91 | #include "opt_multiprocessor.h" | |
92 | #include "opt_lockdebug.h" | 92 | #include "opt_lockdebug.h" | |
93 | #include "opt_compat_ibcs2.h" | 93 | #include "opt_compat_ibcs2.h" | |
94 | 94 | |||
95 | #include <sys/param.h> | 95 | #include <sys/param.h> | |
96 | #include <sys/systm.h> | 96 | #include <sys/systm.h> | |
97 | #include <sys/extent.h> | 97 | #include <sys/extent.h> | |
98 | #include <sys/proc.h> | 98 | #include <sys/proc.h> | |
99 | #include <sys/user.h> | 99 | #include <sys/user.h> | |
@@ -314,27 +314,27 @@ consinit(void) | @@ -314,27 +314,27 @@ consinit(void) | |||
314 | * for the console routines. | 314 | * for the console routines. | |
315 | */ | 315 | */ | |
316 | KASSERT(iospace != 0); | 316 | KASSERT(iospace != 0); | |
317 | iomap_ex = extent_create("iomap", iospace + VAX_NBPG, | 317 | iomap_ex = extent_create("iomap", iospace + VAX_NBPG, | |
318 | iospace + ((IOSPSZ * VAX_NBPG) - 1), M_DEVBUF, | 318 | iospace + ((IOSPSZ * VAX_NBPG) - 1), M_DEVBUF, | |
319 | (void *) iomap_ex_storage, sizeof(iomap_ex_storage), | 319 | (void *) iomap_ex_storage, sizeof(iomap_ex_storage), | |
320 | EX_NOCOALESCE|EX_NOWAIT); | 320 | EX_NOCOALESCE|EX_NOWAIT); | |
321 | #ifdef DEBUG | 321 | #ifdef DEBUG | |
322 | iospace_inited = 1; | 322 | iospace_inited = 1; | |
323 | #endif | 323 | #endif | |
324 | cninit(); | 324 | cninit(); | |
325 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 325 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
326 | if (symtab_start != NULL && symtab_nsyms != 0 && symtab_end != NULL) { | 326 | if (symtab_start != NULL && symtab_nsyms != 0 && symtab_end != NULL) { | |
327 | ksyms_init(symtab_nsyms, symtab_start, symtab_end); | 327 | ksyms_addsyms_elf(symtab_nsyms, symtab_start, symtab_end); | |
328 | } | 328 | } | |
329 | #endif | 329 | #endif | |
330 | #ifdef DEBUG | 330 | #ifdef DEBUG | |
331 | if (sizeof(struct user) > REDZONEADDR) | 331 | if (sizeof(struct user) > REDZONEADDR) | |
332 | panic("struct user inside red zone"); | 332 | panic("struct user inside red zone"); | |
333 | #endif | 333 | #endif | |
334 | } | 334 | } | |
335 | 335 | |||
336 | int waittime = -1; | 336 | int waittime = -1; | |
337 | static volatile int showto; /* Must be volatile to survive MM on -> MM off */ | 337 | static volatile int showto; /* Must be volatile to survive MM on -> MM off */ | |
338 | 338 | |||
339 | void | 339 | void | |
340 | cpu_reboot(int howto, char *b) | 340 | cpu_reboot(int howto, char *b) |
--- src/sys/arch/x68k/x68k/machdep.c 2008/11/25 15:51:35 1.153
+++ src/sys/arch/x68k/x68k/machdep.c 2008/11/30 18:21:36 1.154
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: machdep.c,v 1.153 2008/11/25 15:51:35 ad Exp $ */ | 1 | /* $NetBSD: machdep.c,v 1.154 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1986, 1990, 1993 | 4 | * Copyright (c) 1982, 1986, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -67,27 +67,27 @@ | @@ -67,27 +67,27 @@ | |||
67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 67 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 68 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 69 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 70 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 71 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
72 | * SUCH DAMAGE. | 72 | * SUCH DAMAGE. | |
73 | * | 73 | * | |
74 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | 74 | * from: Utah $Hdr: machdep.c 1.74 92/12/20$ | |
75 | * | 75 | * | |
76 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | 76 | * @(#)machdep.c 8.10 (Berkeley) 4/20/94 | |
77 | */ | 77 | */ | |
78 | 78 | |||
79 | #include <sys/cdefs.h> | 79 | #include <sys/cdefs.h> | |
80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.153 2008/11/25 15:51:35 ad Exp $"); | 80 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.154 2008/11/30 18:21:36 martin Exp $"); | |
81 | 81 | |||
82 | #include "opt_ddb.h" | 82 | #include "opt_ddb.h" | |
83 | #include "opt_kgdb.h" | 83 | #include "opt_kgdb.h" | |
84 | #include "opt_compat_netbsd.h" | 84 | #include "opt_compat_netbsd.h" | |
85 | #include "opt_m680x0.h" | 85 | #include "opt_m680x0.h" | |
86 | #include "opt_fpu_emulate.h" | 86 | #include "opt_fpu_emulate.h" | |
87 | #include "opt_m060sp.h" | 87 | #include "opt_m060sp.h" | |
88 | #include "opt_panicbutton.h" | 88 | #include "opt_panicbutton.h" | |
89 | #include "opt_extmem.h" | 89 | #include "opt_extmem.h" | |
90 | 90 | |||
91 | #include <sys/param.h> | 91 | #include <sys/param.h> | |
92 | #include <sys/systm.h> | 92 | #include <sys/systm.h> | |
93 | #include <sys/callout.h> | 93 | #include <sys/callout.h> | |
@@ -218,27 +218,27 @@ consinit(void) | @@ -218,27 +218,27 @@ consinit(void) | |||
218 | * bring graphics layer up. | 218 | * bring graphics layer up. | |
219 | */ | 219 | */ | |
220 | config_console(); | 220 | config_console(); | |
221 | 221 | |||
222 | /* | 222 | /* | |
223 | * Initialize the console before we print anything out. | 223 | * Initialize the console before we print anything out. | |
224 | */ | 224 | */ | |
225 | cninit(); | 225 | cninit(); | |
226 | 226 | |||
227 | #ifdef KGDB | 227 | #ifdef KGDB | |
228 | zs_kgdb_init(); /* XXX */ | 228 | zs_kgdb_init(); /* XXX */ | |
229 | #endif | 229 | #endif | |
230 | #if NKSYMS || defined(DDB) || defined(MODULAR) | 230 | #if NKSYMS || defined(DDB) || defined(MODULAR) | |
231 | ksyms_init((int)esym - (int)&end - sizeof(Elf32_Ehdr), | 231 | ksyms_addsyms_elf((int)esym - (int)&end - sizeof(Elf32_Ehdr), | |
232 | (void *)&end, esym); | 232 | (void *)&end, esym); | |
233 | #endif | 233 | #endif | |
234 | #ifdef DDB | 234 | #ifdef DDB | |
235 | if (boothowto & RB_KDB) | 235 | if (boothowto & RB_KDB) | |
236 | Debugger(); | 236 | Debugger(); | |
237 | #endif | 237 | #endif | |
238 | 238 | |||
239 | /* | 239 | /* | |
240 | * Tell the VM system about available physical memory. | 240 | * Tell the VM system about available physical memory. | |
241 | */ | 241 | */ | |
242 | uvm_page_physload(atop(avail_start), atop(avail_end), | 242 | uvm_page_physload(atop(avail_start), atop(avail_end), | |
243 | atop(avail_start), atop(avail_end), | 243 | atop(avail_start), atop(avail_end), | |
244 | VM_FREELIST_DEFAULT); | 244 | VM_FREELIST_DEFAULT); |
--- src/sys/ddb/db_sym.c 2008/10/24 13:55:42 1.57
+++ src/sys/ddb/db_sym.c 2008/11/30 18:21:36 1.58
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: db_sym.c,v 1.57 2008/10/24 13:55:42 christos Exp $ */ | 1 | /* $NetBSD: db_sym.c,v 1.58 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Mach Operating System | 4 | * Mach Operating System | |
5 | * Copyright (c) 1991,1990 Carnegie Mellon University | 5 | * Copyright (c) 1991,1990 Carnegie Mellon University | |
6 | * All Rights Reserved. | 6 | * All Rights Reserved. | |
7 | * | 7 | * | |
8 | * Permission to use, copy, modify and distribute this software and its | 8 | * Permission to use, copy, modify and distribute this software and its | |
9 | * documentation is hereby granted, provided that both the copyright | 9 | * documentation is hereby granted, provided that both the copyright | |
10 | * notice and this permission notice appear in all copies of the | 10 | * notice and this permission notice appear in all copies of the | |
11 | * software, derivative works or modified versions, and any portions | 11 | * software, derivative works or modified versions, and any portions | |
12 | * thereof, and that both notices appear in supporting documentation. | 12 | * thereof, and that both notices appear in supporting documentation. | |
13 | * | 13 | * | |
14 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | 14 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | |
@@ -17,27 +17,27 @@ | @@ -17,27 +17,27 @@ | |||
17 | * | 17 | * | |
18 | * Carnegie Mellon requests users of this software to return to | 18 | * Carnegie Mellon requests users of this software to return to | |
19 | * | 19 | * | |
20 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | 20 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
21 | * School of Computer Science | 21 | * School of Computer Science | |
22 | * Carnegie Mellon University | 22 | * Carnegie Mellon University | |
23 | * Pittsburgh PA 15213-3890 | 23 | * Pittsburgh PA 15213-3890 | |
24 | * | 24 | * | |
25 | * any improvements or extensions that they make and grant Carnegie the | 25 | * any improvements or extensions that they make and grant Carnegie the | |
26 | * rights to redistribute these changes. | 26 | * rights to redistribute these changes. | |
27 | */ | 27 | */ | |
28 | 28 | |||
29 | #include <sys/cdefs.h> | 29 | #include <sys/cdefs.h> | |
30 | __KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.57 2008/10/24 13:55:42 christos Exp $"); | 30 | __KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.58 2008/11/30 18:21:36 martin Exp $"); | |
31 | 31 | |||
32 | #include "opt_ddbparam.h" | 32 | #include "opt_ddbparam.h" | |
33 | 33 | |||
34 | #include <sys/param.h> | 34 | #include <sys/param.h> | |
35 | #include <sys/proc.h> | 35 | #include <sys/proc.h> | |
36 | #include <sys/systm.h> | 36 | #include <sys/systm.h> | |
37 | #include <sys/ksyms.h> | 37 | #include <sys/ksyms.h> | |
38 | 38 | |||
39 | #include <machine/db_machdep.h> | 39 | #include <machine/db_machdep.h> | |
40 | 40 | |||
41 | #include <ddb/db_lex.h> | 41 | #include <ddb/db_lex.h> | |
42 | #include <ddb/db_sym.h> | 42 | #include <ddb/db_sym.h> | |
43 | #include <ddb/db_output.h> | 43 | #include <ddb/db_output.h> | |
@@ -62,27 +62,27 @@ extern db_symformat_t db_symformat_aout; | @@ -62,27 +62,27 @@ extern db_symformat_t db_symformat_aout; | |||
62 | * table. Note that if initializing the master symbol table fails, | 62 | * table. Note that if initializing the master symbol table fails, | |
63 | * no other symbol tables can be loaded. | 63 | * no other symbol tables can be loaded. | |
64 | */ | 64 | */ | |
65 | void | 65 | void | |
66 | ddb_init(int symsize, void *vss, void *vse) | 66 | ddb_init(int symsize, void *vss, void *vse) | |
67 | { | 67 | { | |
68 | #ifdef DB_AOUT_SYMBOLS | 68 | #ifdef DB_AOUT_SYMBOLS | |
69 | db_symformat = &db_symformat_aout; | 69 | db_symformat = &db_symformat_aout; | |
70 | if ((*db_symformat->sym_init)(symsize, vss, vse, TBLNAME) == true) { | 70 | if ((*db_symformat->sym_init)(symsize, vss, vse, TBLNAME) == true) { | |
71 | using_aout_symtab = true; | 71 | using_aout_symtab = true; | |
72 | return; | 72 | return; | |
73 | } | 73 | } | |
74 | #endif | 74 | #endif | |
75 | ksyms_init(symsize, vss, vse); /* Will complain if necessary */ | 75 | ksyms_addsyms_elf(symsize, vss, vse); /* Will complain if necessary */ | |
76 | } | 76 | } | |
77 | 77 | |||
78 | bool | 78 | bool | |
79 | db_eqname(const char *src, const char *dst, int c) | 79 | db_eqname(const char *src, const char *dst, int c) | |
80 | { | 80 | { | |
81 | 81 | |||
82 | if (!strcmp(src, dst)) | 82 | if (!strcmp(src, dst)) | |
83 | return (true); | 83 | return (true); | |
84 | if (src[0] == c) | 84 | if (src[0] == c) | |
85 | return (!strcmp(src+1,dst)); | 85 | return (!strcmp(src+1,dst)); | |
86 | return (false); | 86 | return (false); | |
87 | } | 87 | } | |
88 | 88 |
--- src/sys/kern/init_main.c 2008/11/18 11:36:58 1.375
+++ src/sys/kern/init_main.c 2008/11/30 18:21:36 1.376
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: init_main.c,v 1.375 2008/11/18 11:36:58 pooka Exp $ */ | 1 | /* $NetBSD: init_main.c,v 1.376 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2008 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2008 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -87,27 +87,27 @@ | @@ -87,27 +87,27 @@ | |||
87 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | 87 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
88 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 88 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
89 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 89 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
90 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 90 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
91 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 91 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
92 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 92 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
93 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 93 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
94 | * SUCH DAMAGE. | 94 | * SUCH DAMAGE. | |
95 | * | 95 | * | |
96 | * @(#)init_main.c 8.16 (Berkeley) 5/14/95 | 96 | * @(#)init_main.c 8.16 (Berkeley) 5/14/95 | |
97 | */ | 97 | */ | |
98 | 98 | |||
99 | #include <sys/cdefs.h> | 99 | #include <sys/cdefs.h> | |
100 | __KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.375 2008/11/18 11:36:58 pooka Exp $"); | 100 | __KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.376 2008/11/30 18:21:36 martin Exp $"); | |
101 | 101 | |||
102 | #include "opt_ddb.h" | 102 | #include "opt_ddb.h" | |
103 | #include "opt_ipsec.h" | 103 | #include "opt_ipsec.h" | |
104 | #include "opt_ntp.h" | 104 | #include "opt_ntp.h" | |
105 | #include "opt_pipe.h" | 105 | #include "opt_pipe.h" | |
106 | #include "opt_syscall_debug.h" | 106 | #include "opt_syscall_debug.h" | |
107 | #include "opt_sysv.h" | 107 | #include "opt_sysv.h" | |
108 | #include "opt_fileassoc.h" | 108 | #include "opt_fileassoc.h" | |
109 | #include "opt_ktrace.h" | 109 | #include "opt_ktrace.h" | |
110 | #include "opt_pax.h" | 110 | #include "opt_pax.h" | |
111 | #include "opt_wapbl.h" | 111 | #include "opt_wapbl.h" | |
112 | 112 | |||
113 | #include "rnd.h" | 113 | #include "rnd.h" | |
@@ -325,26 +325,28 @@ main(void) | @@ -325,26 +325,28 @@ main(void) | |||
325 | #endif | 325 | #endif | |
326 | 326 | |||
327 | /* | 327 | /* | |
328 | * Attempt to find console and initialize | 328 | * Attempt to find console and initialize | |
329 | * in case of early panic or other messages. | 329 | * in case of early panic or other messages. | |
330 | */ | 330 | */ | |
331 | consinit(); | 331 | consinit(); | |
332 | 332 | |||
333 | kernel_lock_init(); | 333 | kernel_lock_init(); | |
334 | once_init(); | 334 | once_init(); | |
335 | 335 | |||
336 | uvm_init(); | 336 | uvm_init(); | |
337 | 337 | |||
338 | ksyms_init(); | |||
339 | ||||
338 | percpu_init(); | 340 | percpu_init(); | |
339 | 341 | |||
340 | /* Initialize lock caches. */ | 342 | /* Initialize lock caches. */ | |
341 | mutex_obj_init(); | 343 | mutex_obj_init(); | |
342 | 344 | |||
343 | /* Initialize the extent manager. */ | 345 | /* Initialize the extent manager. */ | |
344 | extent_init(); | 346 | extent_init(); | |
345 | 347 | |||
346 | /* Do machine-dependent initialization. */ | 348 | /* Do machine-dependent initialization. */ | |
347 | cpu_startup(); | 349 | cpu_startup(); | |
348 | 350 | |||
349 | /* Initialize callouts, part 1. */ | 351 | /* Initialize callouts, part 1. */ | |
350 | callout_startup(); | 352 | callout_startup(); |
--- src/sys/kern/kern_ksyms.c 2008/11/16 16:15:58 1.46
+++ src/sys/kern/kern_ksyms.c 2008/11/30 18:21:36 1.47
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: kern_ksyms.c,v 1.46 2008/11/16 16:15:58 ad Exp $ */ | 1 | /* $NetBSD: kern_ksyms.c,v 1.47 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2008 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2008 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software developed for The NetBSD Foundation | 7 | * This code is derived from software developed for The NetBSD Foundation | |
8 | * by Andrew Doran. | 8 | * by Andrew Doran. | |
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. | |
@@ -61,27 +61,27 @@ | @@ -61,27 +61,27 @@ | |||
61 | * | 61 | * | |
62 | * For each loaded module the symbol table info is kept track of by a | 62 | * For each loaded module the symbol table info is kept track of by a | |
63 | * struct, placed in a circular list. The first entry is the kernel | 63 | * struct, placed in a circular list. The first entry is the kernel | |
64 | * symbol table. | 64 | * symbol table. | |
65 | */ | 65 | */ | |
66 | 66 | |||
67 | /* | 67 | /* | |
68 | * TODO: | 68 | * TODO: | |
69 | * | 69 | * | |
70 | * Add support for mmap, poll. | 70 | * Add support for mmap, poll. | |
71 | */ | 71 | */ | |
72 | 72 | |||
73 | #include <sys/cdefs.h> | 73 | #include <sys/cdefs.h> | |
74 | __KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.46 2008/11/16 16:15:58 ad Exp $"); | 74 | __KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.47 2008/11/30 18:21:36 martin Exp $"); | |
75 | 75 | |||
76 | #ifdef _KERNEL | 76 | #ifdef _KERNEL | |
77 | #include "opt_ddb.h" | 77 | #include "opt_ddb.h" | |
78 | #include "opt_ddbparam.h" /* for SYMTAB_SPACE */ | 78 | #include "opt_ddbparam.h" /* for SYMTAB_SPACE */ | |
79 | #endif | 79 | #endif | |
80 | 80 | |||
81 | #define _KSYMS_PRIVATE | 81 | #define _KSYMS_PRIVATE | |
82 | 82 | |||
83 | #include <sys/param.h> | 83 | #include <sys/param.h> | |
84 | #include <sys/queue.h> | 84 | #include <sys/queue.h> | |
85 | #include <sys/exec.h> | 85 | #include <sys/exec.h> | |
86 | #include <sys/systm.h> | 86 | #include <sys/systm.h> | |
87 | #include <sys/conf.h> | 87 | #include <sys/conf.h> | |
@@ -194,26 +194,33 @@ findsym(const char *name, struct ksyms_s | @@ -194,26 +194,33 @@ findsym(const char *name, struct ksyms_s | |||
194 | } | 194 | } | |
195 | return NULL; | 195 | return NULL; | |
196 | } | 196 | } | |
197 | 197 | |||
198 | /* | 198 | /* | |
199 | * The "attach" is in reality done in ksyms_init(). | 199 | * The "attach" is in reality done in ksyms_init(). | |
200 | */ | 200 | */ | |
201 | void | 201 | void | |
202 | ksymsattach(int arg) | 202 | ksymsattach(int arg) | |
203 | { | 203 | { | |
204 | 204 | |||
205 | } | 205 | } | |
206 | 206 | |||
207 | void | |||
208 | ksyms_init() | |||
209 | { | |||
210 | ||||
211 | mutex_init(&ksyms_lock, MUTEX_DEFAULT, IPL_NONE); | |||
212 | } | |||
213 | ||||
207 | /* | 214 | /* | |
208 | * Add a symbol table. | 215 | * Add a symbol table. | |
209 | * This is intended for use when the symbol table and its corresponding | 216 | * This is intended for use when the symbol table and its corresponding | |
210 | * string table are easily available. If they are embedded in an ELF | 217 | * string table are easily available. If they are embedded in an ELF | |
211 | * image, use addsymtab_elf() instead. | 218 | * image, use addsymtab_elf() instead. | |
212 | * | 219 | * | |
213 | * name - Symbol's table name. | 220 | * name - Symbol's table name. | |
214 | * symstart, symsize - Address and size of the symbol table. | 221 | * symstart, symsize - Address and size of the symbol table. | |
215 | * strstart, strsize - Address and size of the string table. | 222 | * strstart, strsize - Address and size of the string table. | |
216 | * tab - Symbol table to be updated with this information. | 223 | * tab - Symbol table to be updated with this information. | |
217 | * newstart - Address to which the symbol table has to be copied during | 224 | * newstart - Address to which the symbol table has to be copied during | |
218 | * shrinking. If NULL, it is not moved. | 225 | * shrinking. If NULL, it is not moved. | |
219 | */ | 226 | */ | |
@@ -320,35 +327,34 @@ addsymtab(const char *name, void *symsta | @@ -320,35 +327,34 @@ addsymtab(const char *name, void *symsta | |||
320 | panic("addsymtab"); | 327 | panic("addsymtab"); | |
321 | 328 | |||
322 | /* ksymsread() is unlocked, so membar. */ | 329 | /* ksymsread() is unlocked, so membar. */ | |
323 | membar_producer(); | 330 | membar_producer(); | |
324 | TAILQ_INSERT_TAIL(&ksyms_symtabs, tab, sd_queue); | 331 | TAILQ_INSERT_TAIL(&ksyms_symtabs, tab, sd_queue); | |
325 | ksyms_sizes_calc(); | 332 | ksyms_sizes_calc(); | |
326 | ksyms_initted = true; | 333 | ksyms_initted = true; | |
327 | } | 334 | } | |
328 | 335 | |||
329 | /* | 336 | /* | |
330 | * Setup the kernel symbol table stuff. | 337 | * Setup the kernel symbol table stuff. | |
331 | */ | 338 | */ | |
332 | void | 339 | void | |
333 | ksyms_init(int symsize, void *start, void *end) | 340 | ksyms_addsyms_elf(int symsize, void *start, void *end) | |
334 | { | 341 | { | |
335 | int i, j; | 342 | int i, j; | |
336 | Elf_Shdr *shdr; | 343 | Elf_Shdr *shdr; | |
337 | char *symstart = NULL, *strstart = NULL; | 344 | char *symstart = NULL, *strstart = NULL; | |
338 | size_t strsize = 0; | 345 | size_t strsize = 0; | |
339 | Elf_Ehdr *ehdr; | 346 | Elf_Ehdr *ehdr; | |
340 | 347 | |||
341 | mutex_init(&ksyms_lock, MUTEX_DEFAULT, IPL_NONE); | |||
342 | #ifdef SYMTAB_SPACE | 348 | #ifdef SYMTAB_SPACE | |
343 | if (symsize <= 0 && | 349 | if (symsize <= 0 && | |
344 | strncmp(db_symtab, SYMTAB_FILLER, sizeof(SYMTAB_FILLER))) { | 350 | strncmp(db_symtab, SYMTAB_FILLER, sizeof(SYMTAB_FILLER))) { | |
345 | symsize = db_symtabsize; | 351 | symsize = db_symtabsize; | |
346 | start = db_symtab; | 352 | start = db_symtab; | |
347 | end = db_symtab + db_symtabsize; | 353 | end = db_symtab + db_symtabsize; | |
348 | } | 354 | } | |
349 | #endif | 355 | #endif | |
350 | if (symsize <= 0) { | 356 | if (symsize <= 0) { | |
351 | printf("[ Kernel symbol table missing! ]\n"); | 357 | printf("[ Kernel symbol table missing! ]\n"); | |
352 | return; | 358 | return; | |
353 | } | 359 | } | |
354 | 360 | |||
@@ -401,32 +407,30 @@ ksyms_init(int symsize, void *start, voi | @@ -401,32 +407,30 @@ ksyms_init(int symsize, void *start, voi | |||
401 | (long)kernel_symtab.sd_symsize/sizeof(Elf_Sym)); | 407 | (long)kernel_symtab.sd_symsize/sizeof(Elf_Sym)); | |
402 | #endif | 408 | #endif | |
403 | } | 409 | } | |
404 | 410 | |||
405 | /* | 411 | /* | |
406 | * Setup the kernel symbol table stuff. | 412 | * Setup the kernel symbol table stuff. | |
407 | * Use this when the address of the symbol and string tables are known; | 413 | * Use this when the address of the symbol and string tables are known; | |
408 | * otherwise use ksyms_init with an ELF image. | 414 | * otherwise use ksyms_init with an ELF image. | |
409 | * We need to pass a minimal ELF header which will later be completed by | 415 | * We need to pass a minimal ELF header which will later be completed by | |
410 | * ksyms_hdr_init and handed off to userland through /dev/ksyms. We use | 416 | * ksyms_hdr_init and handed off to userland through /dev/ksyms. We use | |
411 | * a void *rather than a pointer to avoid exposing the Elf_Ehdr type. | 417 | * a void *rather than a pointer to avoid exposing the Elf_Ehdr type. | |
412 | */ | 418 | */ | |
413 | void | 419 | void | |
414 | ksyms_init_explicit(void *ehdr, void *symstart, size_t symsize, | 420 | ksyms_addsyms_explicit(void *ehdr, void *symstart, size_t symsize, | |
415 | void *strstart, size_t strsize) | 421 | void *strstart, size_t strsize) | |
416 | { | 422 | { | |
417 | 423 | |||
418 | mutex_init(&ksyms_lock, MUTEX_DEFAULT, IPL_NONE); | |||
419 | ||||
420 | if (!ksyms_verify(symstart, strstart)) | 424 | if (!ksyms_verify(symstart, strstart)) | |
421 | return; | 425 | return; | |
422 | 426 | |||
423 | ksyms_hdr_init(ehdr); | 427 | ksyms_hdr_init(ehdr); | |
424 | addsymtab("netbsd", symstart, symsize, strstart, strsize, | 428 | addsymtab("netbsd", symstart, symsize, strstart, strsize, | |
425 | &kernel_symtab, symstart); | 429 | &kernel_symtab, symstart); | |
426 | } | 430 | } | |
427 | 431 | |||
428 | /* | 432 | /* | |
429 | * Get the value associated with a symbol. | 433 | * Get the value associated with a symbol. | |
430 | * "mod" is the module name, or null if any module. | 434 | * "mod" is the module name, or null if any module. | |
431 | * "sym" is the symbol name. | 435 | * "sym" is the symbol name. | |
432 | * "val" is a pointer to the corresponding value, if call succeeded. | 436 | * "val" is a pointer to the corresponding value, if call succeeded. |
--- src/sys/sys/ksyms.h 2008/11/16 15:28:15 1.20
+++ src/sys/sys/ksyms.h 2008/11/30 18:21:36 1.21
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ksyms.h,v 1.20 2008/11/16 15:28:15 ad Exp $ */ | 1 | /* $NetBSD: ksyms.h,v 1.21 2008/11/30 18:21:36 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001, 2003 Anders Magnusson (ragge@ludd.luth.se). | 4 | * Copyright (c) 2001, 2003 Anders Magnusson (ragge@ludd.luth.se). | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | |
8 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | |
9 | * are met: | 9 | * are met: | |
10 | * 1. Redistributions of source code must retain the above copyright | 10 | * 1. Redistributions of source code must retain the above copyright | |
11 | * notice, this list of conditions and the following disclaimer. | 11 | * notice, this list of conditions and the following disclaimer. | |
12 | * 2. Redistributions in binary form must reproduce the above copyright | 12 | * 2. Redistributions in binary form must reproduce the above copyright | |
13 | * notice, this list of conditions and the following disclaimer in the | 13 | * notice, this list of conditions and the following disclaimer in the | |
14 | * documentation and/or other materials provided with the distribution. | 14 | * documentation and/or other materials provided with the distribution. | |
@@ -95,21 +95,22 @@ struct ksyms_gsymbol { | @@ -95,21 +95,22 @@ struct ksyms_gsymbol { | |||
95 | #define KSYMS_EXACT 0002 /* Only exact match allowed */ | 95 | #define KSYMS_EXACT 0002 /* Only exact match allowed */ | |
96 | #define KSYMS_EXTERN 0000 /* Only external symbols (pseudo) */ | 96 | #define KSYMS_EXTERN 0000 /* Only external symbols (pseudo) */ | |
97 | #define KSYMS_PROC 0100 /* Procedures only */ | 97 | #define KSYMS_PROC 0100 /* Procedures only */ | |
98 | #define KSYMS_ANY 0200 /* Also local symbols (DDB use only) */ | 98 | #define KSYMS_ANY 0200 /* Also local symbols (DDB use only) */ | |
99 | 99 | |||
100 | /* | 100 | /* | |
101 | * Prototypes | 101 | * Prototypes | |
102 | */ | 102 | */ | |
103 | int ksyms_getname(const char **, const char **, vaddr_t, int); | 103 | int ksyms_getname(const char **, const char **, vaddr_t, int); | |
104 | int ksyms_getval(const char *, const char *, unsigned long *, int); | 104 | int ksyms_getval(const char *, const char *, unsigned long *, int); | |
105 | int ksyms_getval_unlocked(const char *, const char *, unsigned long *, int); | 105 | int ksyms_getval_unlocked(const char *, const char *, unsigned long *, int); | |
106 | int ksyms_addsymtab(const char *, void *, vsize_t, char *, vsize_t); | 106 | int ksyms_addsymtab(const char *, void *, vsize_t, char *, vsize_t); | |
107 | int ksyms_delsymtab(const char *); | 107 | int ksyms_delsymtab(const char *); | |
108 | void ksyms_init(int, void *, void *); | 108 | void ksyms_init(void); | |
109 | void ksyms_init_explicit(void *, void *, size_t, void *, size_t); | 109 | void ksyms_addsyms_elf(int, void *, void *); | |
110 | void ksyms_addsyms_explicit(void *, void *, size_t, void *, size_t); | |||
110 | int ksyms_sift(char *, char *, int); | 111 | int ksyms_sift(char *, char *, int); | |
111 | void ksyms_modload(const char *, void *, vsize_t, char *, vsize_t); | 112 | void ksyms_modload(const char *, void *, vsize_t, char *, vsize_t); | |
112 | void ksyms_modunload(const char *); | 113 | void ksyms_modunload(const char *); | |
113 | 114 | |||
114 | #endif /* _KERNEL */ | 115 | #endif /* _KERNEL */ | |
115 | #endif /* _SYS_KSYMS_H_ */ | 116 | #endif /* _SYS_KSYMS_H_ */ |