Date: Mon, 30 Dec 2002 21:32:08 -0800 (PST) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 22965 for review Message-ID: <200212310532.gBV5W8g7039093@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=22965 Change 22965 by marcel@marcel_nfs on 2002/12/30 21:31:28 Port alpha to sio/ng. Console handling on alpha is weird or broken. Or both... Affected files ... .. //depot/projects/ia64/sys/alpha/alpha/api_up1000.c#4 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_1000a.c#4 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_2100_a50.c#5 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_2100_a500.c#4 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_axppci_33.c#6 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_eb164.c#4 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_eb64plus.c#5 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_kn20aa.c#4 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_kn300.c#5 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_st550.c#4 edit .. //depot/projects/ia64/sys/alpha/alpha/dec_st6600.c#4 edit .. //depot/projects/ia64/sys/alpha/alpha/machdep.c#22 edit .. //depot/projects/ia64/sys/alpha/alpha/sio_machdep.c#1 add .. //depot/projects/ia64/sys/conf/files.alpha#14 edit Differences ... ==== //depot/projects/ia64/sys/alpha/alpha/api_up1000.c#4 (text+ko) ==== @@ -55,8 +55,6 @@ 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 @@ -81,30 +79,13 @@ 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 ... */ - /* 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; - } + break; case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_1000a.c#4 (text+ko) ==== @@ -93,11 +93,6 @@ #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); @@ -112,8 +107,6 @@ 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); @@ -185,35 +178,12 @@ 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 ... */ - /* 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; - } + break; case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_2100_a50.c#5 (text+ko) ==== @@ -51,10 +51,6 @@ #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); @@ -63,8 +59,6 @@ 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[] = { @@ -110,32 +104,12 @@ 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 ... */ - /* 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; - } + break; case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_2100_a500.c#4 (text+ko) ==== @@ -44,17 +44,11 @@ #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 @@ -97,29 +91,11 @@ 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#6 (text+ko) ==== @@ -48,17 +48,11 @@ #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[] = { @@ -121,32 +115,12 @@ 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 ... */ - /* 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; - } + break; case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_eb164.c#4 (text+ko) ==== @@ -47,11 +47,6 @@ #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); @@ -60,8 +55,6 @@ 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 @@ -95,35 +88,12 @@ 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); - - /* - * 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; - } + break; case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_eb64plus.c#5 (text+ko) ==== @@ -67,11 +67,6 @@ #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); @@ -82,7 +77,6 @@ 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[] = { @@ -131,26 +125,7 @@ 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; - } + break; case 3: #ifdef DEV_SC ==== //depot/projects/ia64/sys/alpha/alpha/dec_kn20aa.c#4 (text+ko) ==== @@ -49,11 +49,6 @@ #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); @@ -61,8 +56,6 @@ 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 @@ -104,29 +97,12 @@ 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 ... */ - /* 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; - } + break; case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/dec_kn300.c#5 (text+ko) ==== @@ -57,11 +57,6 @@ #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); @@ -73,8 +68,6 @@ }; -extern int siocnattach(int, int); -extern int siogdbattach(int, int); extern int sccnattach(void); void @@ -103,26 +96,12 @@ 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#4 (text+ko) ==== @@ -54,11 +54,6 @@ #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); @@ -70,8 +65,6 @@ #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 @@ -102,27 +95,11 @@ 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#4 (text+ko) ==== @@ -46,11 +46,6 @@ #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); @@ -58,8 +53,6 @@ #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 @@ -85,30 +78,13 @@ 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 ... */ - /* 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; - } + break; case 3: /* display console ... */ ==== //depot/projects/ia64/sys/alpha/alpha/machdep.c#22 (text+ko) ==== @@ -119,6 +119,7 @@ #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> @@ -593,10 +594,11 @@ * 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(); - } + promcndetach(); + cninit(); + /* NO MORE FIRMWARE ACCESS ALLOWED */ #ifdef _PMAP_MAY_USE_PROM_CONSOLE /* ==== //depot/projects/ia64/sys/conf/files.alpha#14 (text+ko) ==== @@ -80,6 +80,7 @@ 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212310532.gBV5W8g7039093>