diff --git a/sys/arch/arm32/arm32/machdep.c b/sys/arch/arm32/arm32/machdep.c index 979b24ce448d..276b926a24af 100644 --- a/sys/arch/arm32/arm32/machdep.c +++ b/sys/arch/arm32/arm32/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.91 2001/03/20 18:20:53 reinoud Exp $ */ +/* $NetBSD: machdep.c,v 1.92 2001/04/12 20:15:06 reinoud Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -122,9 +122,12 @@ struct user *proc0paddr; char *booted_kernel; + /* Prototypes */ void consinit __P((void)); +extern void comcninit __P((struct consdev *cp)); + void map_section __P((vaddr_t pt, vaddr_t va, paddr_t pa, int cacheable)); @@ -141,6 +144,7 @@ void zero_page_readwrite __P((void)); extern void configure __P((void)); extern void dumpsys __P((void)); + /* * Debug function just to park the CPU */ @@ -494,6 +498,10 @@ consinit(void) if (consinit_called != 0) return; consinit_called = 1; +#ifdef COMCONSOLE + ksc = ksc; /* Not used */ + comcninit(NULL); +#else /* set up bus variables for attachment */ ksc->sc_iot = &iomd_bs_tag; ksc->t_isconsole = 1; @@ -504,6 +512,7 @@ consinit(void) rpckbd_cnattach((struct device *) ksc); vidcvideo_cnattach(videomemory.vidm_vbase); +#endif } #else diff --git a/sys/arch/arm32/conf/A7000 b/sys/arch/arm32/conf/A7000 index 08b41e28ff27..7fac53529766 100644 --- a/sys/arch/arm32/conf/A7000 +++ b/sys/arch/arm32/conf/A7000 @@ -1,4 +1,4 @@ -# $NetBSD: A7000,v 1.41 2001/02/20 22:49:55 reinoud Exp $ +# $NetBSD: A7000,v 1.42 2001/04/12 20:15:07 reinoud Exp $ # # A7000 - Full A7000 configuration # @@ -125,7 +125,10 @@ options DDB # in-kernel debugger #makeoptions DEBUG="-g" # compile full symbol table config netbsd root on ? type ? -#options COMCONSOLE=0,CONADDR=0x3f8,CONUNIT=0,CONSPEED=9600 + +# serial console ... the conaddr is hardcoded as the pioc address + 4*com offset +# this really be fixed some day +#options COMCONSOLE,CONADDR="0x210000+4*0x3f8",CONUNIT=0,CONSPEED=9600 # The main bus device mainbus0 at root diff --git a/sys/arch/arm32/conf/A7INST b/sys/arch/arm32/conf/A7INST index 3d56e4874feb..9278ce9747a6 100644 --- a/sys/arch/arm32/conf/A7INST +++ b/sys/arch/arm32/conf/A7INST @@ -1,4 +1,4 @@ -# $NetBSD: A7INST,v 1.30 2001/02/20 22:49:55 reinoud Exp $ +# $NetBSD: A7INST,v 1.31 2001/04/12 20:15:07 reinoud Exp $ # # A7INST - A7000 install configuration # @@ -121,7 +121,10 @@ options DDB # in-kernel debugger #makeoptions DEBUG="-g" # compile full symbol table config netbsd root on ? type ffs -#options COMCONSOLE=0,CONADDR=0x3f8,CONUNIT=0,CONSPEED=9600 + +# serial console ... the conaddr is hardcoded as the pioc address + 4*com offset +# this really be fixed some day +#options COMCONSOLE,CONADDR="0x210000+4*0x3f8",CONUNIT=0,CONSPEED=9600 # The main bus device mainbus0 at root diff --git a/sys/arch/arm32/conf/GENERIC b/sys/arch/arm32/conf/GENERIC index 793215b17abc..1ef66facebcb 100644 --- a/sys/arch/arm32/conf/GENERIC +++ b/sys/arch/arm32/conf/GENERIC @@ -1,11 +1,11 @@ -# $NetBSD: GENERIC,v 1.77 2001/02/20 22:49:55 reinoud Exp $ +# $NetBSD: GENERIC,v 1.78 2001/04/12 20:15:07 reinoud Exp $ # # GENERIC -- everything that's currently supported # include "arch/arm32/conf/std.arm32" -#ident "GENERIC-$Revision: 1.77 $" +#ident "GENERIC-$Revision: 1.78 $" # estimated number of users maxusers 32 @@ -130,7 +130,10 @@ options DDB # in-kernel debugger #makeoptions DEBUG="-g" # compile full symbol table config netbsd root on ? type ? -#options COMCONSOLE=0,CONADDR=0x3f8,CONUNIT=0,CONSPEED=9600 + +# serial console ... the conaddr is hardcoded as the pioc address + 4*com offset +# this really be fixed some day +#options COMCONSOLE,CONADDR="0x210000+4*0x3f8",CONUNIT=0,CONSPEED=9600 # The main bus device mainbus0 at root diff --git a/sys/arch/arm32/conf/NC b/sys/arch/arm32/conf/NC index 6e5861bed48d..2763e567911b 100644 --- a/sys/arch/arm32/conf/NC +++ b/sys/arch/arm32/conf/NC @@ -1,4 +1,4 @@ -# $NetBSD: NC,v 1.1 2001/04/05 22:34:28 reinoud Exp $ +# $NetBSD: NC,v 1.2 2001/04/12 20:15:07 reinoud Exp $ # # NC - with vidcconsole # @@ -129,7 +129,10 @@ options DIAGNOSTIC # internally consistency checks config netbsd root on ne0 type nfs options NFS_BOOT_DHCP #options NFS_BOOTPARAM -#options COMCONSOLE=0,CONADDR=0x3f8,CONUNIT=0,CONSPEED=9600 + +# serial console ... the conaddr is hardcoded as the pioc address + 4*com offset +# this really be fixed some day +#options COMCONSOLE,CONADDR="0x210000+4*0x3f8",CONUNIT=0,CONSPEED=9600 # The main bus device mainbus0 at root @@ -276,6 +279,8 @@ pseudo-device rnd # /dev/random and /dev/urandom #makeoptions MONITOR="Taxan875+LR" makeoptions MONITOR="AKF85" -#makeoptions MODES="800,600,60" makeoptions MODES="640,480,70" -#makeoptions MODES="1024,768,60" +#makeoptions MODES="800,600,60" +#makeoptions MONITOR="PALTV" +#makeoptions MODES="640,256,60 640,480,60 1024,768,60 1024,768,70 800,600,60 1280,1024 1152,900" + diff --git a/sys/arch/arm32/conf/NC_WSCONS b/sys/arch/arm32/conf/NC_WSCONS index 93d1fd8fe0eb..36cd3415e656 100644 --- a/sys/arch/arm32/conf/NC_WSCONS +++ b/sys/arch/arm32/conf/NC_WSCONS @@ -1,4 +1,4 @@ -# $NetBSD: NC_WSCONS,v 1.1 2001/04/05 22:34:28 reinoud Exp $ +# $NetBSD: NC_WSCONS,v 1.2 2001/04/12 20:15:07 reinoud Exp $ # # NC - with wscons # @@ -129,7 +129,10 @@ options DIAGNOSTIC # internally consistency checks config netbsd root on ne0 type nfs options NFS_BOOT_DHCP #options NFS_BOOTPARAM -#options COMCONSOLE=0,CONADDR=0x3f8,CONUNIT=0,CONSPEED=9600 + +# serial console ... the conaddr is hardcoded as the pioc address + 4*com offset +# this really be fixed some day +#options COMCONSOLE,CONADDR="0x210000+4*0x3f8",CONUNIT=0,CONSPEED=9600 # The main bus device mainbus0 at root @@ -169,9 +172,9 @@ options WSEMUL_VT100 #options FONT_LUCIDA16x29 #options FONT_OMRON12x20 # looks funny #options FONT_QVSS8x15 # broken ? -options FONT_SONY12x25 # looks like VT220 font -options FONT_SONY8x16 # not tested -#options FONT_VT220L8x8 # 8x8 font as in Arch. cons +#options FONT_SONY12x25 # looks like VT220 font +#options FONT_SONY8x16 # not tested +options FONT_VT220L8x8 # 8x8 font as in Arch. cons #options FONT_VT220L8x16 # 8x(2x8) font as in Arch. cons #options FONT_VT220L8x10 # not tested #options FONT_VT220L8x20 # not tested @@ -300,7 +303,10 @@ pseudo-device md 1 # Ramdisk driver pseudo-device rnd # /dev/random and /dev/urandom #makeoptions MONITOR="Taxan875+LR" -makeoptions MONITOR="AKF85" -#makeoptions MODES="800,600,60" +makeoptions MONITOR="AKF85"" makeoptions MODES="640,480,70" -#makeoptions MODES="1024,768,60" +#makeoptions MODES="800,600,60" + +#makeoptions MONITOR="PALTV" +#makeoptions MODES="640,256,60 640,480,60 1024,768,60 1024,768,70 800,600,60 1280,1024 1152,900" + diff --git a/sys/arch/arm32/conf/RISCPC b/sys/arch/arm32/conf/RISCPC index 7a92fb17fdb2..19b807f5b322 100644 --- a/sys/arch/arm32/conf/RISCPC +++ b/sys/arch/arm32/conf/RISCPC @@ -1,4 +1,4 @@ -# $NetBSD: RISCPC,v 1.32 2001/02/20 22:49:56 reinoud Exp $ +# $NetBSD: RISCPC,v 1.33 2001/04/12 20:15:07 reinoud Exp $ # # RISCPC -- Full RiscPC config # @@ -128,7 +128,10 @@ options DDB # in-kernel debugger #makeoptions DEBUG="-g" # compile full symbol table config netbsd root on ? type ? -#options COMCONSOLE=0,CONADDR=0x3f8,CONUNIT=0,CONSPEED=9600 + +# serial console ... the conaddr is hardcoded as the pioc address + 4*com offset +# this really be fixed some day +#options COMCONSOLE,CONADDR="0x210000+4*0x3f8",CONUNIT=0,CONSPEED=9600 # The main bus device mainbus0 at root diff --git a/sys/arch/arm32/conf/RPCINST b/sys/arch/arm32/conf/RPCINST index 905d858aa2d8..7b5f07893fb7 100644 --- a/sys/arch/arm32/conf/RPCINST +++ b/sys/arch/arm32/conf/RPCINST @@ -1,4 +1,4 @@ -# $NetBSD: RPCINST,v 1.29 2001/02/20 22:49:56 reinoud Exp $ +# $NetBSD: RPCINST,v 1.30 2001/04/12 20:15:07 reinoud Exp $ # # RPCINST -- RiscPC install configuration # @@ -121,7 +121,10 @@ options DDB # in-kernel debugger #makeoptions DEBUG="-g" # compile full symbol table config netbsd root on ? type ffs -#options COMCONSOLE=0,CONADDR=0x3f8,CONUNIT=0,CONSPEED=9600 + +# serial console ... the conaddr is hardcoded as the pioc address + 4*com offset +# this really be fixed some day +#options COMCONSOLE,CONADDR="0x210000+4*0x3f8",CONUNIT=0,CONSPEED=9600 # The main bus device mainbus0 at root diff --git a/sys/arch/arm32/conf/RPC_WSCONS b/sys/arch/arm32/conf/RPC_WSCONS index 473daf2a33dd..05c87d1af2f9 100644 --- a/sys/arch/arm32/conf/RPC_WSCONS +++ b/sys/arch/arm32/conf/RPC_WSCONS @@ -1,4 +1,4 @@ -# $NetBSD: RPC_WSCONS,v 1.1 2001/03/20 18:20:54 reinoud Exp $ +# $NetBSD: RPC_WSCONS,v 1.2 2001/04/12 20:15:07 reinoud Exp $ # # RPC_WSCONS -- Full RiscPC config with wscons # @@ -128,7 +128,10 @@ options DDB # in-kernel debugger #makeoptions DEBUG="-g" # compile full symbol table config netbsd root on ? type ? -#options COMCONSOLE=0,CONADDR=0x3f8,CONUNIT=0,CONSPEED=9600 + +# serial console ... the conaddr is hardcoded as the pioc address + 4*com offset +# this really be fixed some day +options COMCONSOLE,CONADDR="0x210000+4*0x3f8",CONUNIT=0,CONSPEED=9600 # The main bus device mainbus0 at root diff --git a/sys/arch/arm32/conf/VOYAGER b/sys/arch/arm32/conf/VOYAGER index d1facfd1d4c1..a2e35c72b90d 100644 --- a/sys/arch/arm32/conf/VOYAGER +++ b/sys/arch/arm32/conf/VOYAGER @@ -1,4 +1,4 @@ -# $NetBSD: VOYAGER,v 1.52 2001/02/20 22:49:56 reinoud Exp $ +# $NetBSD: VOYAGER,v 1.53 2001/04/12 20:15:07 reinoud Exp $ # # VOYAGER - Mark's development kernel # @@ -125,7 +125,10 @@ options DDB # in-kernel debugger #makeoptions DEBUG="-g" # compile full symbol table config netbsd root on ? type ? -#options COMCONSOLE=0,CONADDR=0x3f8,CONUNIT=0,CONSPEED=9600 + +# serial console ... the conaddr is hardcoded as the pioc address + 4*com offset +# this really be fixed some day +#options COMCONSOLE,CONADDR="0x210000+4*0x3f8",CONUNIT=0,CONSPEED=9600 # The main bus device mainbus0 at root diff --git a/sys/arch/arm32/iomd/rpckbd_iomd.c b/sys/arch/arm32/iomd/rpckbd_iomd.c index 8e81fd3216e1..6a13c42cda9f 100644 --- a/sys/arch/arm32/iomd/rpckbd_iomd.c +++ b/sys/arch/arm32/iomd/rpckbd_iomd.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpckbd_iomd.c,v 1.1 2001/03/20 18:20:55 reinoud Exp $ */ +/* $NetBSD: rpckbd_iomd.c,v 1.2 2001/04/12 20:15:07 reinoud Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -95,12 +95,13 @@ rpckbd_iomd_attach(parent, self, aux) struct kbd_attach_args *ka = aux; int error, isconsole; - isconsole = (sc->sc_device.dv_unit == 0); - - if (isconsole) { - console_kbd.sc_device = sc->sc_device; - sc = &console_kbd; - }; +#ifdef COMCONSOLE + isconsole = 0; +#else + isconsole = 1; + console_kbd.sc_device = sc->sc_device; + sc = &console_kbd; +#endif sc->sc_iot = ka->ka_iot; sc->sc_ioh = ka->ka_ioh; diff --git a/sys/arch/arm32/mainbus/com_pioc.c b/sys/arch/arm32/mainbus/com_pioc.c index 42589446e2ab..8873600eec80 100644 --- a/sys/arch/arm32/mainbus/com_pioc.c +++ b/sys/arch/arm32/mainbus/com_pioc.c @@ -1,4 +1,4 @@ -/* $NetBSD: com_pioc.c,v 1.7 1998/09/16 21:30:59 is Exp $ */ +/* $NetBSD: com_pioc.c,v 1.8 2001/04/12 20:15:08 reinoud Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -81,6 +81,7 @@ #include #include +#include #include #include @@ -171,6 +172,9 @@ com_pioc_attach(parent, self, aux) iot = sc->sc_iot = pa->pa_iot; iobase = sc->sc_iobase = pa->pa_iobase + pa->pa_offset; +/* + printf(" (iot = %p, iobase = 0x%08x) ", iot, iobase); +*/ if (!com_is_console(iot, iobase, &sc->sc_ioh) && bus_space_map(iot, iobase, COM_NPORTS, 0, &sc->sc_ioh)) panic("comattach: io mapping failed"); @@ -244,6 +248,7 @@ void comcninit(cp) struct consdev *cp; { + int result; #ifndef CONMODE #define CONMODE ((TTYDEF_CFLAG & ~(CSIZE | CSTOPB | PARENB)) | CS8) /* 8N1 */ @@ -254,8 +259,12 @@ comcninit(cp) #ifndef CONADDR #define CONADDR 0x3f8 #endif - if (comcnattach(comconstag, CONADDR << 2, CONSPEED, COM_FREQ, CONMODE)) - panic("can't init serial console @%x", CONADDR << 2); + + result = comcnattach(comconstag, (IO_CONF_BASE + CONADDR), CONSPEED, COM_FREQ, CONMODE); + if (result) { + printf("initialising serial; got errornr %d\n", result); + panic("can't init serial console @%x", CONADDR); + }; }