From owner-p4-projects@FreeBSD.ORG Sun May 23 12:41:18 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CE7DF16A4D0; Sun, 23 May 2004 12:41:17 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7023C16A4CE for ; Sun, 23 May 2004 12:41:17 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66C4043D31 for ; Sun, 23 May 2004 12:41:17 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i4NJefVo056317 for ; Sun, 23 May 2004 12:40:41 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i4NJefLc056314 for perforce@freebsd.org; Sun, 23 May 2004 12:40:41 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Sun, 23 May 2004 12:40:41 -0700 (PDT) Message-Id: <200405231940.i4NJefLc056314@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 53326 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 19:41:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=53326 Change 53326 by marcel@marcel_nfs on 2004/05/23 12:40:00 Now that uart(4) can be used as a debug port, cut the lifeline by removing NO_SIO. This means that alpha unconditionally calls cninit() in machdep.c, like all the other platforms. Likewise, the need for DEV_SC is pretty much gone as well. We now use the RB_SERIAL flag of bootinfo to signal whether to use sc(4) on the on hand or sio(4), uart(4) or zs(4) on the other hand. When sio(4) is used, hints needs to be added if sio(4) is to be used as a debug port. Affected files ... .. //depot/projects/gdb/sys/alpha/alpha/api_up1000.c#2 edit .. //depot/projects/gdb/sys/alpha/alpha/dec_1000a.c#2 edit .. //depot/projects/gdb/sys/alpha/alpha/dec_2100_a50.c#2 edit .. //depot/projects/gdb/sys/alpha/alpha/dec_2100_a500.c#2 edit .. //depot/projects/gdb/sys/alpha/alpha/dec_axppci_33.c#2 edit .. //depot/projects/gdb/sys/alpha/alpha/dec_eb164.c#2 edit .. //depot/projects/gdb/sys/alpha/alpha/dec_eb64plus.c#2 edit .. //depot/projects/gdb/sys/alpha/alpha/dec_kn20aa.c#2 edit .. //depot/projects/gdb/sys/alpha/alpha/dec_kn300.c#2 edit .. //depot/projects/gdb/sys/alpha/alpha/dec_st550.c#2 edit .. //depot/projects/gdb/sys/alpha/alpha/dec_st6600.c#2 edit .. //depot/projects/gdb/sys/alpha/alpha/machdep.c#9 edit .. //depot/projects/gdb/sys/conf/options.alpha#2 edit Differences ... ==== //depot/projects/gdb/sys/alpha/alpha/api_up1000.c#2 (text+ko) ==== @@ -27,9 +27,6 @@ #include __FBSDID("$FreeBSD: src/sys/alpha/alpha/api_up1000.c,v 1.10 2003/08/25 03:43:07 marcel Exp $"); -#include "opt_ddb.h" -#include "opt_dev_sc.h" - #include #include #include @@ -49,18 +46,6 @@ #include #include -#ifndef NO_SIO -#ifndef CONSPEED -#define CONSPEED TTYDEF_SPEED -#endif -static int comcnrate = CONSPEED; -extern int comconsole; -extern int siocnattach(int, int); -extern int siogdbattach(int, int); -#endif - -extern int sccnattach(void); - void api_up1000_init(void); static void api_up1000_cons_init(void); @@ -85,40 +70,15 @@ irongate_init(); -#ifndef NO_SIO -#ifdef DDB - siogdbattach(0x2f8, 57600); -#endif -#endif - ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: -#ifndef NO_SIO - /* 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; -#endif break; case 3: - /* display console ... */ - /* XXX */ -#ifdef DEV_SC - sccnattach(); -#else - panic("not configured to use display && keyboard console"); -#endif + boothowto &= ~RB_SERIAL; break; default: ==== //depot/projects/gdb/sys/alpha/alpha/dec_1000a.c#2 (text+ko) ==== @@ -74,9 +74,6 @@ #include __FBSDID("$FreeBSD: src/sys/alpha/alpha/dec_1000a.c,v 1.17 2003/08/25 03:43:07 marcel Exp $"); -#include "opt_ddb.h" -#include "opt_dev_sc.h" - #include #include #include @@ -94,18 +91,6 @@ #include -#ifndef NO_SIO -#ifndef CONSPEED -#define CONSPEED TTYDEF_SPEED -#endif -static int comcnrate = CONSPEED; -extern int comconsole; -extern int siocnattach(int, int); -extern int siogdbattach(int, int); -#endif - -extern int sccnattach(void); - void dec_1000a_init(int); static void dec_1000a_cons_init(void); @@ -185,45 +170,15 @@ apecs_init(); } -#ifndef NO_SIO -#ifdef DDB - siogdbattach(0x2f8, 57600); -#endif -#endif - ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: -#ifndef NO_SIO - /* serial console ... */ - /* - * 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; -#endif break; case 3: - /* display console ... */ - /* XXX */ -#ifdef DEV_SC - sccnattach(); -#else - panic("not configured to use display && keyboard console"); -#endif + boothowto &= ~RB_SERIAL; break; default: ==== //depot/projects/gdb/sys/alpha/alpha/dec_2100_a50.c#2 (text+ko) ==== @@ -35,9 +35,6 @@ #include __FBSDID("$FreeBSD: src/sys/alpha/alpha/dec_2100_a50.c,v 1.18 2003/08/25 03:43:07 marcel Exp $"); -#include "opt_ddb.h" -#include "opt_dev_sc.h" - #include #include #include @@ -54,18 +51,6 @@ #include #include -#ifndef NO_SIO -#ifndef CONSPEED -#define CONSPEED TTYDEF_SPEED -#endif -static int comcnrate = CONSPEED; -extern int comconsole; -extern int siocnattach(int, int); -extern int siogdbattach(int, int); -#endif - -extern int sccnattach(void); - void dec_2100_a50_init(void); static void dec_2100_a50_cons_init(void); static void dec_2100_a50_intr_map(void *); @@ -110,43 +95,15 @@ apecs_init(); -#ifndef NO_SIO -#ifdef DDB - siogdbattach(0x2f8, 9600); -#endif -#endif - ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: -#ifndef NO_SIO - /* serial console ... */ - /* - * 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; -#endif break; case 3: - /* display console ... */ - /* XXX */ -#ifdef DEV_SC - sccnattach(); -#else - panic("not configured to use display && keyboard console"); -#endif + boothowto &= ~RB_SERIAL; break; default: ==== //depot/projects/gdb/sys/alpha/alpha/dec_2100_a500.c#2 (text+ko) ==== @@ -27,9 +27,6 @@ #include __FBSDID("$FreeBSD: src/sys/alpha/alpha/dec_2100_a500.c,v 1.17 2003/08/25 03:43:07 marcel Exp $"); -#include "opt_ddb.h" -#include "opt_dev_sc.h" - #include #include #include @@ -47,18 +44,6 @@ #include #include -#ifndef NO_SIO -#ifndef CONSPEED -#define CONSPEED TTYDEF_SPEED -#endif -static int comcnrate = CONSPEED; -extern int comconsole; -extern int siocnattach(int, int); -extern int siogdbattach(int, int); -#endif - -extern int sccnattach(void); - void dec_2100_a500_init(int); static void dec_2100_a500_cons_init(void); static void dec_2100_a500_intr_init(void); @@ -101,43 +86,15 @@ struct ctb *ctb; t2_init(); -#ifndef NO_SIO -#ifdef DDB - siogdbattach(0x2f8, 9600); -#endif -#endif - ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: -#ifndef NO_SIO - /* serial console ... */ - /* - * 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; -#endif break; case 3: - /* display console ... */ - /* XXX */ -#ifdef DEV_SC - sccnattach(); -#else - panic("not configured to use display && keyboard console"); -#endif + boothowto &= ~RB_SERIAL; break; default: ==== //depot/projects/gdb/sys/alpha/alpha/dec_axppci_33.c#2 (text+ko) ==== @@ -32,9 +32,6 @@ #include __FBSDID("$FreeBSD: src/sys/alpha/alpha/dec_axppci_33.c,v 1.21 2003/08/25 03:43:07 marcel Exp $"); -#include "opt_ddb.h" -#include "opt_dev_sc.h" - #include #include #include @@ -51,18 +48,6 @@ #include #include -#ifndef NO_SIO -#ifndef CONSPEED -#define CONSPEED TTYDEF_SPEED -#endif -static int comcnrate = CONSPEED; -extern int comconsole; -extern int siocnattach(int, int); -extern int siogdbattach(int, int); -#endif - -extern int sccnattach(void); - 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); @@ -125,43 +110,15 @@ lca_init(); -#ifndef NO_SIO -#ifdef DDB - siogdbattach(0x2f8, 9600); -#endif -#endif - ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: -#ifndef NO_SIO - /* serial console ... */ - /* - * 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; -#endif break; case 3: - /* display console ... */ - /* XXX */ -#ifdef DEV_SC - sccnattach(); -#else - panic("not configured to use display && keyboard console"); -#endif + boothowto &= ~RB_SERIAL; break; default: ==== //depot/projects/gdb/sys/alpha/alpha/dec_eb164.c#2 (text+ko) ==== @@ -32,9 +32,6 @@ #include __FBSDID("$FreeBSD: src/sys/alpha/alpha/dec_eb164.c,v 1.19 2003/08/25 03:43:07 marcel Exp $"); -#include "opt_ddb.h" -#include "opt_dev_sc.h" - #include #include #include @@ -48,18 +45,6 @@ #include -#ifndef NO_SIO -#ifndef CONSPEED -#define CONSPEED TTYDEF_SPEED -#endif -static int comcnrate = CONSPEED; -extern int comconsole; -extern int siocnattach(int, int); -extern int siogdbattach(int, int); -#endif - -extern int sccnattach(void); - void dec_eb164_init(void); static void dec_eb164_cons_init(void); static void eb164_intr_init(void); @@ -98,45 +83,15 @@ cia_init(); -#ifndef NO_SIO -#ifdef DDB - siogdbattach(0x2f8, 57600); -#endif -#endif - ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: -#ifndef NO_SIO - /* serial console ... */ - /* - * 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; -#endif break; case 3: - /* display console ... */ - /* XXX */ -#ifdef DEV_SC - sccnattach(); -#else - panic("not configured to use display && keyboard console"); -#endif + boothowto &= ~RB_SERIAL; break; default: ==== //depot/projects/gdb/sys/alpha/alpha/dec_eb64plus.c#2 (text+ko) ==== @@ -48,9 +48,6 @@ #include __FBSDID("$FreeBSD: src/sys/alpha/alpha/dec_eb64plus.c,v 1.16 2003/08/25 03:43:07 marcel Exp $"); -#include "opt_ddb.h" -#include "opt_dev_sc.h" - #include #include #include @@ -68,17 +65,6 @@ #include #include -#ifndef NO_SIO -#ifndef CONSPEED -#define CONSPEED TTYDEF_SPEED -#endif -static int comcnrate = CONSPEED; -extern int comconsole; -extern int siocnattach(int, int); -#endif - -extern int sccnattach(void); - void dec_eb64plus_init(void); static void dec_eb64plus_cons_init(void); static void dec_eb64plus_intr_init(void); @@ -132,34 +118,11 @@ switch (ctb->ctb_term_type) { case 2: -#ifndef NO_SIO - /* serial console ... */ - /* - * 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; -#endif break; case 3: -#ifdef DEV_SC - /* graphics adapter console */ - sccnattach(); -#else - panic("not configured to use display && keyboard console"); -#endif + boothowto &= ~RB_SERIAL; break; default: ==== //depot/projects/gdb/sys/alpha/alpha/dec_kn20aa.c#2 (text+ko) ==== @@ -32,9 +32,6 @@ #include __FBSDID("$FreeBSD: src/sys/alpha/alpha/dec_kn20aa.c,v 1.18 2003/08/25 03:43:07 marcel Exp $"); -#include "opt_ddb.h" -#include "opt_dev_sc.h" - #include #include #include @@ -51,18 +48,6 @@ #include #include -#ifndef NO_SIO -#ifndef CONSPEED -#define CONSPEED TTYDEF_SPEED -#endif -static int comcnrate = CONSPEED; -extern int comconsole; -extern int siocnattach(int, int); -extern int siogdbattach(int, int); -#endif - -extern int sccnattach(void); - void dec_kn20aa_init(void); static void dec_kn20aa_cons_init(void); static void dec_kn20aa_intr_init(void); @@ -108,40 +93,15 @@ cia_init(); -#ifndef NO_SIO -#ifdef DDB - siogdbattach(0x2f8, 9600); -#endif -#endif - ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: -#ifndef NO_SIO - /* 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; -#endif break; case 3: - /* display console ... */ - /* XXX */ -#ifdef DEV_SC - sccnattach(); -#else - panic("not configured to use display && keyboard console"); -#endif + boothowto &= ~RB_SERIAL; break; default: ==== //depot/projects/gdb/sys/alpha/alpha/dec_kn300.c#2 (text+ko) ==== @@ -31,9 +31,6 @@ #include __FBSDID("$FreeBSD: src/sys/alpha/alpha/dec_kn300.c,v 1.13 2003/08/25 03:43:07 marcel Exp $"); -#include "opt_ddb.h" -#include "opt_dev_sc.h" - #include #include #include @@ -54,18 +51,6 @@ #include #include -#ifndef NO_SIO -#ifndef CONSPEED -#define CONSPEED TTYDEF_SPEED -#endif -static int comcnrate = CONSPEED; -extern int comconsole; -extern int siocnattach(int, int); -extern int siogdbattach(int, int); -#endif - -extern int sccnattach(void); - void dec_kn300_init(void); void dec_kn300_cons_init(void); @@ -102,38 +87,15 @@ mcbus_init(); -#ifndef NO_SIO -#ifdef DDB - siogdbattach(0x2f8, 57600); -#endif -#endif - ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: -#ifndef NO_SIO - /* 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; -#endif break; case 3: -#ifdef DEV_SC - sccnattach(); -#else - panic("not configured to use display && keyboard console"); -#endif + boothowto &= ~RB_SERIAL; break; default: ==== //depot/projects/gdb/sys/alpha/alpha/dec_st550.c#2 (text+ko) ==== @@ -34,9 +34,6 @@ #include __FBSDID("$FreeBSD: src/sys/alpha/alpha/dec_st550.c,v 1.16 2003/08/25 03:43:07 marcel Exp $"); -#include "opt_ddb.h" -#include "opt_dev_sc.h" - #include #include #include @@ -56,18 +53,6 @@ #include #include -#ifndef NO_SIO -#ifndef CONSPEED -#define CONSPEED TTYDEF_SPEED -#endif -static int comcnrate = CONSPEED; -extern int comconsole; -extern int siocnattach(int, int); -extern int siogdbattach(int, int); -#endif - -extern int sccnattach(void); - void st550_init(void); static void st550_cons_init(void); static void st550_intr_init(void); @@ -105,41 +90,15 @@ cia_init(); -#ifndef NO_SIO -#ifdef DDB - siogdbattach(0x2f8, 57600); -#endif -#endif - ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: -#ifndef NO_SIO - /* 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; -#endif break; case 3: - /* display console ... */ - /* XXX */ -#ifdef DEV_SC - sccnattach(); -#else - panic("not configured to use display && keyboard console"); -#endif + boothowto &= ~RB_SERIAL; break; default: ==== //depot/projects/gdb/sys/alpha/alpha/dec_st6600.c#2 (text+ko) ==== @@ -27,9 +27,6 @@ #include __FBSDID("$FreeBSD: src/sys/alpha/alpha/dec_st6600.c,v 1.17 2003/08/25 03:43:07 marcel Exp $"); -#include "opt_ddb.h" -#include "opt_dev_sc.h" - #include #include #include @@ -48,18 +45,6 @@ #include #include -#ifndef NO_SIO -#ifndef CONSPEED -#define CONSPEED TTYDEF_SPEED -#endif -static int comcnrate = CONSPEED; -extern int comconsole; -extern int siocnattach(int, int); -extern int siogdbattach(int, int); -#endif - -extern int sccnattach(void); - void st6600_init(void); static void st6600_cons_init(void); static void st6600_intr_init(void); @@ -89,40 +74,15 @@ tsunami_init(); -#ifndef NO_SIO -#ifdef DDB - siogdbattach(0x2f8, 57600); -#endif -#endif - ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case 2: -#ifndef NO_SIO - /* 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; -#endif break; case 3: - /* display console ... */ - /* XXX */ -#ifdef DEV_SC - sccnattach(); -#else - panic("not configured to use display && keyboard console"); -#endif + boothowto &= ~RB_SERIAL; break; default: ==== //depot/projects/gdb/sys/alpha/alpha/machdep.c#9 (text+ko) ==== @@ -879,17 +879,10 @@ * of some operations so needs to be after proc0/thread0/curthread * become valid. */ -#ifndef NO_SIO - if (platform.cons_init) { - platform.cons_init(); - promcndetach(); - } -#else if (platform.cons_init) platform.cons_init(); promcndetach(); cninit(); -#endif /* * Check to see if promcons needs to make_dev() now, ==== //depot/projects/gdb/sys/conf/options.alpha#2 (text+ko) ==== @@ -16,15 +16,11 @@ DEC_1000A opt_cpu.h API_UP1000 opt_cpu.h -NO_SIO opt_global.h - MAXMEM PPC_PROBE_CHIPSET opt_ppc.h PPC_DEBUG opt_ppc.h -DEV_SC - VGA_ALT_SEQACCESS opt_vga.h VGA_DEBUG opt_vga.h VGA_NO_FONT_LOADING opt_vga.h