Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jun 2003 14:34:59 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 33856 for review
Message-ID:  <200306292134.h5TLYxar082313@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=33856

Change 33856 by marcel@marcel_nfs on 2003/06/29 14:34:48

	Add alpha specific global option NO_SIO to allow building a
	kernel without sio(4). The option removes all sio(4) related
	code from the model specific initialization and introduces
	a regular call to cninit() in machdep.c

Affected files ...

.. //depot/projects/uart/alpha/alpha/api_up1000.c#2 edit
.. //depot/projects/uart/alpha/alpha/dec_1000a.c#2 edit
.. //depot/projects/uart/alpha/alpha/dec_2100_a50.c#2 edit
.. //depot/projects/uart/alpha/alpha/dec_2100_a500.c#2 edit
.. //depot/projects/uart/alpha/alpha/dec_axppci_33.c#2 edit
.. //depot/projects/uart/alpha/alpha/dec_eb164.c#2 edit
.. //depot/projects/uart/alpha/alpha/dec_eb64plus.c#2 edit
.. //depot/projects/uart/alpha/alpha/dec_kn20aa.c#2 edit
.. //depot/projects/uart/alpha/alpha/dec_kn300.c#2 edit
.. //depot/projects/uart/alpha/alpha/dec_st550.c#2 edit
.. //depot/projects/uart/alpha/alpha/dec_st6600.c#2 edit
.. //depot/projects/uart/alpha/alpha/machdep.c#2 edit
.. //depot/projects/uart/conf/options.alpha#2 edit

Differences ...

==== //depot/projects/uart/alpha/alpha/api_up1000.c#2 (text+ko) ====

@@ -48,18 +48,21 @@
 
 #include "opt_dev_sc.h"
 
+#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);
 
-extern int siocnattach(int, int);
-extern int siogdbattach(int, int);
-extern int sccnattach(void);
-
 void
 api_up1000_init()
 {
@@ -74,38 +77,38 @@
 	platform.cons_init = api_up1000_cons_init;
 }
 
-extern int comconsole;
-
 static void
 api_up1000_cons_init()
 {
 	struct ctb *ctb;
 
 	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: 
+	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");
+		/*
+		 * 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;
-		}
+		boothowto |= RB_SERIAL;
+#endif
+		break;
 
 	case 3:
 		/* display console ... */

==== //depot/projects/uart/alpha/alpha/dec_1000a.c#2 (text+ko) ====

@@ -94,15 +94,21 @@
 
 #include "opt_dev_sc.h"
 
+#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);
 
-
 static void dec_1000_intr_map(void *);
 static void dec_1000_intr_disable(int);
 static void dec_1000_intr_enable(int);
@@ -113,11 +119,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);
-
-
 static const struct alpha_variation_table dec_1000_variations[] = {
 	{ 0, "AlphaServer 1000" },
 	{ 0, NULL },
@@ -172,8 +173,6 @@
 
 }
 
-/* XXX for forcing comconsole when srm serial console is used */
-extern int comconsole;
 
 static void
 dec_1000a_cons_init()
@@ -186,35 +185,36 @@
 		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 ... */
-		/* XXX */
-		{
-			/*
-			 * Delay to allow PROM putchars to complete.
-			 * FIFO depth * character time,
-			 * character time = (1000000 / (defaultrate / 10)).
-			 */
-			DELAY(160000000 / comcnrate);
+		/*
+		 * 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");
+		/*
+		 * 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;
-		}
+		boothowto |= RB_SERIAL;
+#endif
+		break;
 
 	case 3:
 		/* display console ... */

==== //depot/projects/uart/alpha/alpha/dec_2100_a50.c#2 (text+ko) ====

@@ -52,22 +52,23 @@
 #include <alpha/pci/apecsvar.h>
 
 #include "opt_dev_sc.h"
+
+#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 *);
-void sio_intr_establish(int);
-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[] = {
 	{ SV_ST_AVANTI,	"AlphaStation 400 4/233 (\"Avanti\")" },
 	{ SV_ST_MUSTANG2_4_166, "AlphaStation 200 4/166 (\"Mustang II\")" },
@@ -101,9 +102,6 @@
 	platform.pci_intr_map  = dec_2100_a50_intr_map;
 }
 
-/* XXX for forcing comconsole when srm serial console is used */
-extern int comconsole;
-
 static void
 dec_2100_a50_cons_init()
 {
@@ -111,32 +109,34 @@
 
 	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 ... */
-		/* 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");
+		/*
+		 * 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;
-		}
+		boothowto |= RB_SERIAL;
+#endif
+		break;
 
 	case 3:
 		/* display console ... */

==== //depot/projects/uart/alpha/alpha/dec_2100_a500.c#2 (text+ko) ====

@@ -45,19 +45,23 @@
 #include <alpha/pci/t2reg.h>
 
 #include "opt_dev_sc.h"
+
+#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);
 
-extern int siocnattach(int, int);
-extern int siogdbattach(int, int);
-extern int sccnattach(void);
-
 void
 dec_2100_a500_init(int cputype)
 {
@@ -89,8 +93,6 @@
 	t2_init();
 }
 
-/* XXX for forcing comconsole when srm serial console is used */
-extern int comconsole; 
 
 static void
 dec_2100_a500_cons_init()
@@ -98,15 +100,18 @@
 	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 ... */
-		/* XXX */
 		/*
 		 * Delay to allow PROM putchars to complete.
 		 * FIFO depth * character time,
@@ -121,6 +126,7 @@
 			panic("can't init serial console");
 
 		boothowto |= RB_SERIAL;
+#endif
 		break;
 
 	case 3:

==== //depot/projects/uart/alpha/alpha/dec_axppci_33.c#2 (text+ko) ====

@@ -49,19 +49,23 @@
 #include <alpha/pci/lcavar.h>
 
 #include "opt_dev_sc.h"
+
+#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);
 
-extern int siocnattach(int, int);
-extern int siogdbattach(int, int);
-extern int sccnattach(void);
-
 const struct alpha_variation_table dec_axppci_33_variations[] = {
 	{ 0, "Alpha PC AXPpci33 (\"NoName\")" },
 	{ 0, NULL },
@@ -112,8 +116,6 @@
 	outb(NSIO_PORT + NSIO_DATA, cfg0val);
 }
 
-/* XXX for forcing comconsole when srm serial console is used */
-extern int comconsole;
 
 static void
 dec_axppci_33_cons_init()
@@ -122,32 +124,34 @@
 
 	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 ... */
-		/* 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");
+		/*
+		 * 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;
-		}
+		boothowto |= RB_SERIAL;
+#endif
+		break;
 
 	case 3:
 		/* display console ... */

==== //depot/projects/uart/alpha/alpha/dec_eb164.c#2 (text+ko) ====

@@ -48,10 +48,17 @@
 
 #include "opt_dev_sc.h"
 
+#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);
@@ -61,10 +68,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
 dec_eb164_init()
 {
@@ -88,7 +91,6 @@
 	}
 }
 
-extern int comconsole; /* XXX for forcing comconsole when srm serial console is used */
 static void
 dec_eb164_cons_init()
 {
@@ -96,35 +98,36 @@
 
 	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);
+		/*
+		 * 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");
+		/*
+		 * 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;
-		}
+		boothowto |= RB_SERIAL;
+#endif
+		break;
 
 	case 3:
 		/* display console ... */

==== //depot/projects/uart/alpha/alpha/dec_eb64plus.c#2 (text+ko) ====

@@ -68,10 +68,16 @@
 
 #include "opt_dev_sc.h"
 
+#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);
@@ -83,9 +89,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[] = {
 	{ 0, "DEC EB64-plus" },
 	{ 0, NULL },
@@ -116,8 +119,6 @@
 
 }
 
-/* XXX for forcing comconsole when srm serial console is used */
-extern int comconsole;
 
 /* init the console, serial or graphics */
 static void
@@ -131,27 +132,26 @@
 
 	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);
+		/*
+		 * 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");
+		/*
+		 * 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;
-		}
+		boothowto |= RB_SERIAL;
+#endif
+		break;
 
 	case 3:
 #ifdef DEV_SC

==== //depot/projects/uart/alpha/alpha/dec_kn20aa.c#2 (text+ko) ====

@@ -50,11 +50,18 @@
 
 #include "opt_dev_sc.h"
 
+#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);
@@ -62,10 +69,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
 static void dec_kn20aa_device_register(struct device *, void *);
 #endif
@@ -74,7 +77,6 @@
 	{ 0, "AlphaStation 500 or 600 (KN20AA)" },
 	{ 0, NULL },
 };
-extern int comconsole; /* XXX for forcing comconsole when srm serial console is used */
 
 void
 dec_kn20aa_init()
@@ -105,29 +107,31 @@
 
 	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 ... */
-		/* 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");
+		/*
+		 * 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;
-		}
+		boothowto |= RB_SERIAL;
+#endif
+		break;
 
 	case 3:
 		/* display console ... */

==== //depot/projects/uart/alpha/alpha/dec_kn300.c#2 (text+ko) ====

@@ -58,11 +58,18 @@
 
 #include "opt_dev_sc.h"
 
+#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);
 
@@ -74,10 +81,6 @@
 };
 
 
-extern int siocnattach(int, int);
-extern int siogdbattach(int, int);
-extern int sccnattach(void);
-
 void
 dec_kn300_init()
 {
@@ -96,22 +99,24 @@
 	platform.cons_init = dec_kn300_cons_init;
 }
 
-extern int comconsole;
-
 void
 dec_kn300_cons_init()
 {
 	struct ctb *ctb;
 
 	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.
@@ -124,6 +129,7 @@
 			panic("can't init serial console");
 
 		boothowto |= RB_SERIAL;
+#endif
 		break;
 
 	case 3:

==== //depot/projects/uart/alpha/alpha/dec_st550.c#2 (text+ko) ====

@@ -56,11 +56,18 @@
 
 #include "opt_dev_sc.h"
 
+#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);
@@ -72,10 +79,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
 st550_init()
 {
@@ -95,8 +98,6 @@
 	platform.pci_intr_enable = st550_intr_enable;
 }
 
-extern int comconsole;
-
 static void
 st550_cons_init()
 {
@@ -104,14 +105,17 @@
 
 	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 */
 		/*
@@ -125,6 +129,7 @@
 			panic("can't init serial console");
 
 		boothowto |= RB_SERIAL;
+#endif
 		break;
 
 	case 3:

==== //depot/projects/uart/alpha/alpha/dec_st6600.c#2 (text+ko) ====

@@ -47,11 +47,18 @@
 
 #include "opt_dev_sc.h"
 
+#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);
@@ -59,10 +66,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
 st6600_init()
 {
@@ -78,38 +81,38 @@
 	platform.pci_intr_init = st6600_intr_init;
 }
 
-extern int comconsole;
-
 static void
 st6600_cons_init()
 {
 	struct ctb *ctb;
 
 	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 ... */
-		/* 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");
+		/*
+		 * 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;
-		}
+		boothowto |= RB_SERIAL;
+#endif
+		break;
 
 	case 3:
 		/* display console ... */

==== //depot/projects/uart/alpha/alpha/machdep.c#2 (text+ko) ====

@@ -121,6 +121,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>
@@ -581,10 +582,18 @@
 	 * Initalize the real console, so the the bootstrap console is
 	 * no longer necessary.
 	 */
+#ifndef NO_SIO
 	if (platform.cons_init) {
 		platform.cons_init();
 		promcndetach();
 	}
+#else
+	if (platform.cons_init)
+		platform.cons_init();
+	promcndetach();
+	cninit();
+#endif
+
 	/* NO MORE FIRMWARE ACCESS ALLOWED */
 #ifdef _PMAP_MAY_USE_PROM_CONSOLE
 	/*

==== //depot/projects/uart/conf/options.alpha#2 (text+ko) ====

@@ -16,6 +16,8 @@
 DEC_1000A		opt_cpu.h
 API_UP1000		opt_cpu.h
 
+NO_SIO			opt_global.h
+
 MAXMEM
 
 PPC_PROBE_CHIPSET       opt_ppc.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306292134.h5TLYxar082313>