Date: Thu, 31 Jul 2003 23:59:35 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 35321 for review Message-ID: <200308010659.h716xZGm049132@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=35321 Change 35321 by marcel@marcel_nfs on 2003/07/31 23:59:33 Undo the sio/ng changes for alpha on this branch. They are also present on the sio branch and further obsoleted by the uart branch. Affected files ... .. //depot/projects/ia64/sys/alpha/alpha/api_up1000.c#6 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_1000a.c#6 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_2100_a50.c#7 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_2100_a500.c#7 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_axppci_33.c#8 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_eb164.c#6 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_eb64plus.c#7 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_kn20aa.c#6 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_kn300.c#7 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_st550.c#6 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_st6600.c#6 edit .. //depot/projects/ia64/sys/alpha/alpha/machdep.c#35 edit .. //depot/projects/ia64/sys/alpha/alpha/sio_machdep.c#2 delete .. //depot/projects/ia64/sys/conf/files.alpha#22 edit Differences ... ==== //depot/projects/ia64/sys/alpha/alpha/api_up1000.c#6 (text+ko) ==== @@ -56,6 +56,8 @@ void api_up1000_init(void); static void api_up1000_cons_init(void); +extern int siocnattach(int, int); +extern int siogdbattach(int, int); extern int sccnattach(void); void @@ -80,13 +82,30 @@ struct ctb *ctb; irongate_init(); +#ifdef DDB + siogdbattach(0x2f8, 57600); +#endif ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: /* serial console ... */ - break; + /* XXX */ + { + /* + * Delay to allow PROM putchars to complete. + * FIFO depth * character time, + * character time = (1000000 / (defaultrate / 10)) + */ + DELAY(160000000 / comcnrate); + comconsole = 0; + if (siocnattach(0x3f8, comcnrate)) + panic("can't init serial console"); + + boothowto |= RB_SERIAL; + break; + } case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_1000a.c#6 (text+ko) ==== @@ -94,6 +94,11 @@ #include "opt_dev_sc.h" +#ifndef CONSPEED +#define CONSPEED TTYDEF_SPEED +#endif +static int comcnrate = CONSPEED; + void dec_1000a_init(int); static void dec_1000a_cons_init(void); @@ -108,6 +113,8 @@ static void dec_1000a_intr_enable(int); static void dec_1000a_intr_init(void); +extern int siocnattach(int, int); +extern int siogdbattach(int, int); extern int sccnattach(void); @@ -179,12 +186,35 @@ apecs_init(); } +#ifdef DDB + siogdbattach(0x2f8, 57600); +#endif + ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: /* serial console ... */ - break; + /* XXX */ + { + /* + * Delay to allow PROM putchars to complete. + * FIFO depth * character time, + * character time = (1000000 / (defaultrate / 10)). + */ + DELAY(160000000 / comcnrate); + + /* + * Force a comconsole on com1 if the SRM has a serial + * console. + */ + comconsole = 0; + if (siocnattach(0x3f8, comcnrate)) + panic("can't init serial console"); + + boothowto |= RB_SERIAL; + break; + } case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_2100_a50.c#7 (text+ko) ==== @@ -52,6 +52,10 @@ #include <alpha/pci/apecsvar.h> #include "opt_dev_sc.h" +#ifndef CONSPEED +#define CONSPEED TTYDEF_SPEED +#endif +static int comcnrate = CONSPEED; void dec_2100_a50_init(void); static void dec_2100_a50_cons_init(void); @@ -60,6 +64,8 @@ void sio_intr_disestablish(int); void sio_intr_setup(void); +extern int siocnattach(int, int); +extern int siogdbattach(int, int); extern int sccnattach(void); const struct alpha_variation_table dec_2100_a50_variations[] = { @@ -105,12 +111,32 @@ apecs_init(); +#ifdef DDB + siogdbattach(0x2f8, 9600); +#endif ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: /* serial console ... */ - break; + /* XXX */ + { + /* + * Delay to allow PROM putchars to complete. + * FIFO depth * character time, + * character time = (1000000 / (defaultrate / 10)). + */ + DELAY(160000000 / comcnrate); + /* + * Force a comconsole on com1 if the SRM has a serial console. + */ + comconsole = 0; + if (siocnattach(0x3f8, comcnrate)) + panic("can't init serial console"); + + boothowto |= RB_SERIAL; + break; + } case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_2100_a500.c#7 (text+ko) ==== @@ -45,11 +45,17 @@ #include <alpha/pci/t2reg.h> #include "opt_dev_sc.h" +#ifndef CONSPEED +#define CONSPEED TTYDEF_SPEED +#endif +static int comcnrate = CONSPEED; void dec_2100_a500_init(int); static void dec_2100_a500_cons_init(void); static void dec_2100_a500_intr_init(void); +extern int siocnattach(int, int); +extern int siogdbattach(int, int); extern int sccnattach(void); void @@ -92,11 +98,29 @@ struct ctb *ctb; t2_init(); +#ifdef DDB + siogdbattach(0x2f8, 9600); +#endif ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: /* serial console ... */ + /* XXX */ + /* + * Delay to allow PROM putchars to complete. + * FIFO depth * character time, + * character time = (1000000 / (defaultrate / 10)) + */ + DELAY(160000000 / comcnrate); + /* + * force a comconsole on com1 if the SRM has a serial console + */ + comconsole = 0; + if (siocnattach(0x3f8, comcnrate)) + panic("can't init serial console"); + + boothowto |= RB_SERIAL; break; case 3: ==== //depot/projects/ia64/sys/alpha/alpha/dec_axppci_33.c#8 (text+ko) ==== @@ -49,11 +49,17 @@ #include <alpha/pci/lcavar.h> #include "opt_dev_sc.h" +#ifndef CONSPEED +#define CONSPEED TTYDEF_SPEED +#endif +static int comcnrate = CONSPEED; void dec_axppci_33_init(void); static void dec_axppci_33_cons_init(void); static int dec_axppci_33_intr_route (device_t, device_t, int); +extern int siocnattach(int, int); +extern int siogdbattach(int, int); extern int sccnattach(void); const struct alpha_variation_table dec_axppci_33_variations[] = { @@ -116,12 +122,32 @@ lca_init(); +#ifdef DDB + siogdbattach(0x2f8, 9600); +#endif ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: /* serial console ... */ - break; + /* XXX */ + { + /* + * Delay to allow PROM putchars to complete. + * FIFO depth * character time, + * character time = (1000000 / (defaultrate / 10)) + */ + DELAY(160000000 / comcnrate); + /* + * force a comconsole on com1 if the SRM has a serial console + */ + comconsole = 0; + if (siocnattach(0x3f8, comcnrate)) + panic("can't init serial console"); + + boothowto |= RB_SERIAL; + break; + } case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_eb164.c#6 (text+ko) ==== @@ -48,6 +48,11 @@ #include "opt_dev_sc.h" +#ifndef CONSPEED +#define CONSPEED TTYDEF_SPEED +#endif +static int comcnrate = CONSPEED; + void dec_eb164_init(void); static void dec_eb164_cons_init(void); static void eb164_intr_init(void); @@ -56,6 +61,8 @@ extern void eb164_intr_enable_icsr(int irq); extern void eb164_intr_disable_icsr(int irq); +extern int siocnattach(int, int); +extern int siogdbattach(int, int); extern int sccnattach(void); void @@ -89,12 +96,35 @@ cia_init(); +#ifdef DDB + siogdbattach(0x2f8, 57600); +#endif + ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: /* serial console ... */ - break; + /* XXX */ + { + /* + * Delay to allow PROM putchars to complete. + * FIFO depth * character time, + * character time = (1000000 / (defaultrate / 10)) + */ + DELAY(160000000 / comcnrate); + + /* + * Force a comconsole on com1 if the SRM has a serial + * console. + */ + comconsole = 0; + if (siocnattach(0x3f8, comcnrate)) + panic("can't init serial console"); + + boothowto |= RB_SERIAL; + break; + } case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_eb64plus.c#7 (text+ko) ==== @@ -68,6 +68,11 @@ #include "opt_dev_sc.h" +#ifndef CONSPEED +#define CONSPEED TTYDEF_SPEED +#endif +static int comcnrate = CONSPEED; + void dec_eb64plus_init(void); static void dec_eb64plus_cons_init(void); static void dec_eb64plus_intr_init(void); @@ -78,6 +83,7 @@ extern const char * bootdev_protocol(void); extern int bootdev_boot_dev_type(void); +extern int siocnattach(int, int); extern int sccnattach(void); const struct alpha_variation_table dec_eb64plus_variations[] = { @@ -126,7 +132,26 @@ switch (ctb->ctb_term_type) { case 2: /* serial console ... */ - break; + /* XXX */ + { + /* + * Delay to allow PROM putchars to complete. + * FIFO depth * character time, + * character time = (1000000 / (defaultrate / 10)) + */ + DELAY(160000000 / comcnrate); + + /* + * force a comconsole on com1 if the SRM has a serial + * console. + */ + comconsole = 0; + if (siocnattach(0x3f8, comcnrate)) + panic("can't init serial console"); + + boothowto |= RB_SERIAL; + break; + } case 3: #ifdef DEV_SC ==== //depot/projects/ia64/sys/alpha/alpha/dec_kn20aa.c#6 (text+ko) ==== @@ -50,6 +50,11 @@ #include "opt_dev_sc.h" +#ifndef CONSPEED +#define CONSPEED TTYDEF_SPEED +#endif +static int comcnrate = CONSPEED; + void dec_kn20aa_init(void); static void dec_kn20aa_cons_init(void); static void dec_kn20aa_intr_init(void); @@ -57,6 +62,8 @@ static void dec_kn20aa_intr_disable(int); static void dec_kn20aa_intr_enable(int); +extern int siocnattach(int, int); +extern int siogdbattach(int, int); extern int sccnattach(void); #if 0 @@ -98,12 +105,29 @@ cia_init(); +#ifdef DDB + siogdbattach(0x2f8, 9600); +#endif ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: /* serial console ... */ - break; + /* XXX */ + { + /* + * Delay to allow PROM putchars to complete. + * FIFO depth * character time, + * character time = (1000000 / (defaultrate / 10)) + */ + DELAY(160000000 / comcnrate); + comconsole = 0; + if (siocnattach(0x3f8, comcnrate)) + panic("can't init serial console"); + + boothowto |= RB_SERIAL; + break; + } case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_kn300.c#7 (text+ko) ==== @@ -58,6 +58,11 @@ #include "opt_dev_sc.h" +#ifndef CONSPEED +#define CONSPEED TTYDEF_SPEED +#endif +static int comcnrate = CONSPEED; + void dec_kn300_init(void); void dec_kn300_cons_init(void); @@ -69,6 +74,8 @@ }; +extern int siocnattach(int, int); +extern int siogdbattach(int, int); extern int sccnattach(void); void @@ -97,12 +104,26 @@ struct ctb *ctb; mcbus_init(); +#ifdef DDB + siogdbattach(0x2f8, 57600); +#endif ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: /* serial console ... */ + /* + * Delay to allow PROM putchars to complete. + * FIFO depth * character time, + * character time = (1000000 / (defaultrate / 10)) + */ + DELAY(160000000 / comcnrate); + comconsole = 0; + if (siocnattach(0x3f8, comcnrate)) + panic("can't init serial console"); + + boothowto |= RB_SERIAL; break; case 3: ==== //depot/projects/ia64/sys/alpha/alpha/dec_st550.c#6 (text+ko) ==== @@ -56,6 +56,11 @@ #include "opt_dev_sc.h" +#ifndef CONSPEED +#define CONSPEED TTYDEF_SPEED +#endif +static int comcnrate = CONSPEED; + void st550_init(void); static void st550_cons_init(void); static void st550_intr_init(void); @@ -67,6 +72,8 @@ #define ST550_PCI_IRQ_BEGIN 8 #define ST550_PCI_MAX_IRQ 47 +extern int siocnattach(int, int); +extern int siogdbattach(int, int); extern int sccnattach(void); void @@ -97,11 +104,27 @@ cia_init(); +#ifdef DDB + siogdbattach(0x2f8, 57600); +#endif + ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: /* serial console ... */ + /* XXX */ + /* + * Delay to allow PROM putchars to complete. + * FIFO depth * character time, + * character time = (1000000 / (defaultrate / 10)) + */ + DELAY(160000000 / comcnrate); + comconsole = 0; + if (siocnattach(0x3f8, comcnrate)) + panic("can't init serial console"); + + boothowto |= RB_SERIAL; break; case 3: ==== //depot/projects/ia64/sys/alpha/alpha/dec_st6600.c#6 (text+ko) ==== @@ -47,6 +47,11 @@ #include "opt_dev_sc.h" +#ifndef CONSPEED +#define CONSPEED TTYDEF_SPEED +#endif +static int comcnrate = CONSPEED; + void st6600_init(void); static void st6600_cons_init(void); static void st6600_intr_init(void); @@ -54,6 +59,8 @@ #define ST6600_PCI_IRQ_BEGIN 8 #define ST6600_PCI_MAX_IRQ 63 +extern int siocnattach(int, int); +extern int siogdbattach(int, int); extern int sccnattach(void); void @@ -79,13 +86,30 @@ struct ctb *ctb; tsunami_init(); +#ifdef DDB + siogdbattach(0x2f8, 57600); +#endif ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: /* serial console ... */ - break; + /* XXX */ + { + /* + * Delay to allow PROM putchars to complete. + * FIFO depth * character time, + * character time = (1000000 / (defaultrate / 10)) + */ + DELAY(160000000 / comcnrate); + comconsole = 0; + if (siocnattach(0x3f8, comcnrate)) + panic("can't init serial console"); + + boothowto |= RB_SERIAL; + break; + } case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/machdep.c#35 (text+ko) ==== @@ -122,7 +122,6 @@ #include <sys/sysctl.h> #include <sys/uio.h> #include <sys/linker.h> -#include <sys/cons.h> #include <net/netisr.h> #include <vm/vm.h> #include <vm/vm_kern.h> @@ -586,11 +585,10 @@ * Initalize the real console, so the the bootstrap console is * no longer necessary. */ - if (platform.cons_init) + if (platform.cons_init) { platform.cons_init(); - promcndetach(); - cninit(); - + promcndetach(); + } /* NO MORE FIRMWARE ACCESS ALLOWED */ #ifdef _PMAP_MAY_USE_PROM_CONSOLE /* ==== //depot/projects/ia64/sys/conf/files.alpha#22 (text+ko) ==== @@ -78,7 +78,6 @@ alpha/alpha/promcons.c standard alpha/alpha/prom_disp.s standard alpha/alpha/sgmap.c standard -alpha/alpha/sio_machdep.c optional sio alpha/alpha/support.s standard alpha/alpha/swtch.s standard alpha/alpha/sys_machdep.c standard @@ -179,6 +178,7 @@ dev/kbd/kbd.c optional kbd dev/kbd/kbd.c optional sc dev/kbd/kbd.c optional ukbd +dev/sio/sio.c optional sio dev/sio/sio_isa.c optional sio isa dev/syscons/schistory.c optional sc dev/syscons/scmouse.c optional sc
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200308010659.h716xZGm049132>