Sat Aug 11 01:21:05 2012 UTC ()
Sprinkle extern to appease gcc -fno-common.


(tsutsui)
diff -r1.108 -r1.109 src/sys/arch/next68k/next68k/machdep.c
diff -r1.24 -r1.25 src/sys/arch/next68k/next68k/nextrom.c

cvs diff -r1.108 -r1.109 src/sys/arch/next68k/next68k/machdep.c (expand / switch to unified diff)

--- src/sys/arch/next68k/next68k/machdep.c 2012/07/28 19:08:24 1.108
+++ src/sys/arch/next68k/next68k/machdep.c 2012/08/11 01:21:04 1.109
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: machdep.c,v 1.108 2012/07/28 19:08:24 matt Exp $ */ 1/* $NetBSD: machdep.c,v 1.109 2012/08/11 01:21:04 tsutsui Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998 Darrin B. Jewell 4 * Copyright (c) 1998 Darrin B. Jewell
5 * Copyright (c) 1988 University of Utah. 5 * Copyright (c) 1988 University of Utah.
6 * Copyright (c) 1982, 1986, 1990, 1993 6 * Copyright (c) 1982, 1986, 1990, 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 code is derived from software contributed to Berkeley by 9 * This code is derived from software contributed to Berkeley by
10 * the Systems Programming Group of the University of Utah Computer 10 * the Systems Programming Group of the University of Utah Computer
11 * Science Department. 11 * Science Department.
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
@@ -30,27 +30,27 @@ @@ -30,27 +30,27 @@
30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * OR 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 * from: Utah $Hdr: machdep.c 1.74 92/12/20$ 37 * from: Utah $Hdr: machdep.c 1.74 92/12/20$
38 * 38 *
39 * @(#)machdep.c 8.10 (Berkeley) 4/20/94 39 * @(#)machdep.c 8.10 (Berkeley) 4/20/94
40 */ 40 */
41 41
42#include <sys/cdefs.h> 42#include <sys/cdefs.h>
43__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2012/07/28 19:08:24 matt Exp $"); 43__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.109 2012/08/11 01:21:04 tsutsui Exp $");
44 44
45#include "opt_ddb.h" 45#include "opt_ddb.h"
46#include "opt_kgdb.h" 46#include "opt_kgdb.h"
47#include "opt_modular.h" 47#include "opt_modular.h"
48 48
49#include <sys/param.h> 49#include <sys/param.h>
50#include <sys/systm.h> 50#include <sys/systm.h>
51#include <sys/signalvar.h> 51#include <sys/signalvar.h>
52#include <sys/kernel.h> 52#include <sys/kernel.h>
53#include <sys/proc.h> 53#include <sys/proc.h>
54#include <sys/buf.h> 54#include <sys/buf.h>
55#include <sys/reboot.h> 55#include <sys/reboot.h>
56#include <sys/conf.h> 56#include <sys/conf.h>
@@ -105,27 +105,28 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v  @@ -105,27 +105,28 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v
105 105
106#include <machine/kcore.h> /* XXX should be pulled in by sys/kcore.h */ 106#include <machine/kcore.h> /* XXX should be pulled in by sys/kcore.h */
107 107
108#include <next68k/next68k/isr.h> 108#include <next68k/next68k/isr.h>
109#include <next68k/next68k/nextrom.h> 109#include <next68k/next68k/nextrom.h>
110#include <next68k/next68k/rtc.h> 110#include <next68k/next68k/rtc.h>
111#include <next68k/next68k/seglist.h> 111#include <next68k/next68k/seglist.h>
112 112
113#include <dev/mm.h> 113#include <dev/mm.h>
114 114
115#include "ksyms.h" 115#include "ksyms.h"
116 116
117int nsym; 117int nsym;
118char *ssym, *esym; 118char *ssym;
 119extern char *esym;
119 120
120#define MAXMEM 64*1024 /* XXX - from cmap.h */ 121#define MAXMEM 64*1024 /* XXX - from cmap.h */
121 122
122/* the following is used externally (sysctl_hw) */ 123/* the following is used externally (sysctl_hw) */
123char machine[] = MACHINE; /* from <machine/param.h> */ 124char machine[] = MACHINE; /* from <machine/param.h> */
124 125
125/* Our exported CPU info; we can have only one. */  126/* Our exported CPU info; we can have only one. */
126struct cpu_info cpu_info_store; 127struct cpu_info cpu_info_store;
127 128
128struct vm_map *phys_map = NULL; 129struct vm_map *phys_map = NULL;
129 130
130paddr_t msgbufpa; /* PA of message buffer */ 131paddr_t msgbufpa; /* PA of message buffer */
131 132

cvs diff -r1.24 -r1.25 src/sys/arch/next68k/next68k/nextrom.c (expand / switch to unified diff)

--- src/sys/arch/next68k/next68k/nextrom.c 2011/12/18 04:29:32 1.24
+++ src/sys/arch/next68k/next68k/nextrom.c 2012/08/11 01:21:04 1.25
@@ -1,67 +1,67 @@ @@ -1,67 +1,67 @@
1/* $NetBSD: nextrom.c,v 1.24 2011/12/18 04:29:32 tsutsui Exp $ */ 1/* $NetBSD: nextrom.c,v 1.25 2012/08/11 01:21:04 tsutsui Exp $ */
2/* 2/*
3 * Copyright (c) 1998 Darrin B. Jewell 3 * Copyright (c) 1998 Darrin B. Jewell
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 * 14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27#include <sys/cdefs.h> 27#include <sys/cdefs.h>
28__KERNEL_RCSID(0, "$NetBSD: nextrom.c,v 1.24 2011/12/18 04:29:32 tsutsui Exp $"); 28__KERNEL_RCSID(0, "$NetBSD: nextrom.c,v 1.25 2012/08/11 01:21:04 tsutsui Exp $");
29 29
30#include "opt_ddb.h" 30#include "opt_ddb.h"
31#include "opt_serial.h" 31#include "opt_serial.h"
32 32
33#include <sys/types.h> 33#include <sys/types.h>
34#include <machine/cpu.h> 34#include <machine/cpu.h>
35 35
36#include <next68k/next68k/seglist.h> 36#include <next68k/next68k/seglist.h>
37#include <next68k/next68k/nextrom.h> 37#include <next68k/next68k/nextrom.h>
38 38
39#ifdef DDB 39#ifdef DDB
40#include <sys/param.h> 40#include <sys/param.h>
41#include <sys/systm.h> 41#include <sys/systm.h>
42#include <sys/proc.h> 42#include <sys/proc.h>
43#define ELFSIZE 32 43#define ELFSIZE 32
44#include <sys/exec_elf.h> 44#include <sys/exec_elf.h>
45#endif 45#endif
46 46
47void next68k_bootargs(unsigned char **); 47void next68k_bootargs(unsigned char **);
48 48
49int mon_getc(void); 49int mon_getc(void);
50int mon_putc(int); 50int mon_putc(int);
51 51
52extern char etext[], edata[], end[]; 52extern char etext[], edata[], end[];
53int nsym; 53extern int nsym;
54char *ssym, *esym; 54extern char *ssym, *esym;
55 55
56volatile struct mon_global *mg; 56volatile struct mon_global *mg;
57 57
58 58
59#define MON(type, off) (*(type *)((u_int) (mg) + off)) 59#define MON(type, off) (*(type *)((u_int) (mg) + off))
60 60
61#define RELOC(v, t) (*((t *)((u_int)&(v) + NEXT_RAMBASE))) 61#define RELOC(v, t) (*((t *)((u_int)&(v) + NEXT_RAMBASE)))
62 62
63#define MONRELOC(type, off) \ 63#define MONRELOC(type, off) \
64 (*(volatile type *)((u_int)RELOC(mg, volatile struct mon_global *) + off)) 64 (*(volatile type *)((u_int)RELOC(mg, volatile struct mon_global *) + off))
65 65
66 66
67typedef int (*getcptr)(void); 67typedef int (*getcptr)(void);