PERFORCE change 76991 for review

Marcel Moolenaar marcel at FreeBSD.org
Sat May 14 16:53:18 PDT 2005


http://perforce.freebsd.org/chv.cgi?CH=76991

Change 76991 by marcel at marcel_nfs on 2005/05/14 23:52:17

	Update file contents to reflect reorganization. Minor tweaks
	here and there while I'm in the vicinity.

Affected files ...

.. //depot/projects/tty/sys/conf/files#28 edit
.. //depot/projects/tty/sys/conf/files.alpha#13 edit
.. //depot/projects/tty/sys/conf/files.amd64#16 edit
.. //depot/projects/tty/sys/conf/files.i386#20 edit
.. //depot/projects/tty/sys/conf/files.ia64#16 edit
.. //depot/projects/tty/sys/conf/files.sparc64#13 edit
.. //depot/projects/tty/sys/dev/vtc/hw/gmch/gmch.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/gmch/gmch.h#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/gmch/gmch_bus_pci.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/vga/vga.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/vga/vga.h#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/vga/vga_bus_isa.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/vga/vga_bus_pci.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/vga/vga_con.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/vga/vga_cpu_alpha.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/vga/vga_cpu_amd64.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/vga/vga_cpu_i386.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/vga/vga_cpu_ia64.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/hw/vga/vga_cpu_sparc64.c#2 edit
.. //depot/projects/tty/sys/dev/vtc/vtc.h#2 edit
.. //depot/projects/tty/sys/dev/vtc/vtc_con.c#8 edit
.. //depot/projects/tty/sys/dev/vtc/vtc_core.c#4 edit
.. //depot/projects/tty/sys/dev/vtc/vtc_font.c#3 edit
.. //depot/projects/tty/sys/dev/vtc/vtc_logo.c#2 edit

Differences ...

==== //depot/projects/tty/sys/conf/files#28 (text+ko) ====

@@ -555,8 +555,6 @@
 dev/fxp/if_fxp.c		optional fxp
 dev/gem/if_gem.c		optional gem
 dev/gem/if_gem_pci.c		optional gem pci
-dev/gmch/gmch.c			optional gmch
-dev/gmch/gmch_bus_pci.c		optional gmch pci
 dev/harp/if_harp.c		optional harp pci
 dev/hatm/if_hatm.c		optional hatm pci
 dev/hatm/if_hatm_intr.c		optional hatm pci
@@ -915,16 +913,18 @@
 dev/utopia/idtphy.c		optional utopia
 dev/utopia/suni.c		optional utopia
 dev/utopia/utopia.c		optional utopia
-dev/vga/vga.c			optional vga
-dev/vga/vga_bus_isa.c		optional vga isa
-dev/vga/vga_bus_pci.c		optional vga pci
-dev/vga/vga_con.c		optional vga
-dev/vga/vga_logo.c		optional vga
 dev/vge/if_vge.c		optional vge
 dev/vkbd/vkbd.c			optional vkbd
 dev/vtc/vtc_con.c		optional vtc
 dev/vtc/vtc_core.c		optional vtc
 dev/vtc/vtc_font.c		optional vtc
+dev/vtc/vtc_logo.c		optional vtc
+dev/vtc/hw/gmch/gmch.c		optional gmch vtc
+dev/vtc/hw/gmch/gmch_bus_pci.c	optional gmch vtc pci
+dev/vtc/hw/vga/vga.c		optional vga vtc
+dev/vtc/hw/vga/vga_bus_isa.c	optional vga vtc isa
+dev/vtc/hw/vga/vga_bus_pci.c	optional vga vtc pci
+dev/vtc/hw/vga/vga_con.c	optional vga vtc
 dev/vx/if_vx.c			optional vx
 dev/vx/if_vx_eisa.c		optional vx eisa
 dev/vx/if_vx_pci.c		optional vx pci

==== //depot/projects/tty/sys/conf/files.alpha#13 (text+ko) ====

@@ -178,7 +178,7 @@
 dev/sio/sio.c			optional	sio
 dev/sio/sio_isa.c		optional	sio isa
 dev/uart/uart_cpu_alpha.c	optional	uart
-dev/vga/vga_cpu_alpha.c		optional	vga
+dev/vtc/hw/vga/vga_cpu_alpha.c	optional	vga vtc
 geom/geom_bsd.c			standard
 geom/geom_bsd_enc.c		standard
 isa/atkbd_isa.c			optional	atkbd

==== //depot/projects/tty/sys/conf/files.amd64#16 (text+ko) ====

@@ -148,7 +148,7 @@
 dev/sio/sio.c			optional	sio
 dev/sio/sio_isa.c		optional	sio isa
 dev/uart/uart_cpu_amd64.c	optional	uart
-dev/vga/vga_cpu_amd64.c		optional	vga
+dev/vtc/hw/vga/vga_cpu_amd64.c	optional	vga vtc
 geom/geom_bsd.c			standard
 geom/geom_bsd_enc.c		standard
 geom/geom_mbr.c			standard

==== //depot/projects/tty/sys/conf/files.i386#20 (text+ko) ====

@@ -196,7 +196,7 @@
 dev/sio/sio_isa.c		optional sio isa
 dev/sr/if_sr_isa.c		optional sr isa
 dev/uart/uart_cpu_i386.c	optional uart
-dev/vga/vga_cpu_i386.c		optional	vga
+dev/vtc/hw/vga/vga_cpu_i386.c	optional vga vtc
 geom/geom_bsd.c			standard
 geom/geom_bsd_enc.c		standard
 geom/geom_mbr.c			standard

==== //depot/projects/tty/sys/conf/files.ia64#16 (text+ko) ====

@@ -44,7 +44,7 @@
 dev/kbd/kbd.c			optional	ukbd
 dev/ppc/ppc.c			optional	ppc isa
 dev/uart/uart_cpu_ia64.c	optional	uart
-dev/vga/vga_cpu_ia64.c		optional	vga
+dev/vtc/hw/vga/vga_cpu_ia64.c	optional	vga vtc
 geom/geom_bsd.c			standard
 geom/geom_bsd_enc.c		standard
 geom/geom_gpt.c			standard

==== //depot/projects/tty/sys/conf/files.sparc64#13 (text+ko) ====

@@ -24,7 +24,7 @@
 dev/sound/sbus/cs4231.c		optional	snd_audiocs sbus
 dev/uart/uart_cpu_sparc64.c	optional	uart
 #dev/uart/uart_kbd_sun.c	optional	uart sc
-dev/vga/vga_cpu_sparc64.c	optional	vga
+dev/vtc/hw/vga/vga_cpu_sparc64.c optional	vga vtc
 geom/geom_bsd.c			standard
 geom/geom_bsd_enc.c		standard
 geom/geom_sunlabel.c		standard

==== //depot/projects/tty/sys/dev/vtc/hw/gmch/gmch.c#2 (text+ko) ====

@@ -34,15 +34,25 @@
 #include <sys/bus.h>
 #include <sys/rman.h>
 
-#include <dev/gmch/gmch.h>
+#include <dev/vtc/hw/gmch/gmch.h>
 
 devclass_t gmch_devclass;
 char gmch_device_name[] = "gmch";
 
 int
+gmch_attach(device_t dev)
+{
+	struct gmch_softc *sc;
+
+	sc = device_get_softc(dev);
+	sc->gmch_dev = dev;
+	return (0);
+}
+
+int
 gmch_vbitblt(struct gmch_softc *sc, int op, uintptr_t dst, uintptr_t src,
     int width, int height, va_list ap)
 {
 
-	return (0);
+	return (ENXIO);
 }

==== //depot/projects/tty/sys/dev/vtc/hw/gmch/gmch.h#2 (text+ko) ====

@@ -26,8 +26,8 @@
  * $FreeBSD$
  */
 
-#ifndef _DEV_GMCH_GMCH_H_
-#define	_DEV_GMCH_GMCH_H_
+#ifndef _DEV_VTC_HW_GMCH_H_
+#define	_DEV_VTC_HW_GMCH_H_
 
 #include <machine/stdarg.h>
 
@@ -40,7 +40,8 @@
 extern devclass_t gmch_devclass;
 extern char gmch_device_name[];
 
+int gmch_attach(device_t);
 int gmch_vbitblt(struct gmch_softc *, int, uintptr_t, uintptr_t, int, int,
     va_list);
 
-#endif /* !_DEV_GMCH_GMCH_H_ */
+#endif /* !_DEV_VTC_HW_GMCH_H_ */

==== //depot/projects/tty/sys/dev/vtc/hw/gmch/gmch_bus_pci.c#2 (text+ko) ====

@@ -39,7 +39,7 @@
 #include <dev/pci/pcireg.h>
 #include <dev/pci/pcivar.h>
 
-#include <dev/gmch/gmch.h>
+#include <dev/vtc/hw/gmch/gmch.h>
 
 #define	PCI_VENDOR_INTEL	0x8086
 #define	PCI_DEVICE_I830M	0x3577
@@ -64,7 +64,7 @@
 gmch_pci_attach(device_t dev)
 {
 
-	return (0);
+	return (gmch_attach(dev));
 }
 
 static int

==== //depot/projects/tty/sys/dev/vtc/hw/vga/vga.c#2 (text+ko) ====

@@ -33,14 +33,10 @@
 #include <machine/resource.h>
 #include <sys/bus.h>
 #include <sys/rman.h>
-#include <sys/vtc.h>
 
 #include <dev/ic/vga.h>
-#include <dev/vga/vga.h>
-
-extern int vga_logo_height;
-extern int vga_logo_width;
-extern u_char vga_logo_image[];
+#include <dev/vtc/hw/vga/vga.h>
+#include <dev/vtc/vtc.h>
 
 /* Convenience macros. */
 #define	MEM_READ(sc, ofs)		\
@@ -460,9 +456,9 @@
 	if (error)
 		return (error);
 
-	vga_bitblt_h4tofb(sc, vga_logo_image,
-	    640 * (480 - vga_logo_height) / 2 + (640 - vga_logo_width) / 2,
-	    vga_logo_width, vga_logo_height);
+	vga_bitblt_h4tofb(sc, vtc_logo4_image,
+	    640 * (480 - vtc_logo4_height) / 2 + (640 - vtc_logo4_width) / 2,
+	    vtc_logo4_width, vtc_logo4_height);
 
 	return (0);
 }

==== //depot/projects/tty/sys/dev/vtc/hw/vga/vga.h#2 (text+ko) ====

@@ -26,8 +26,8 @@
  * $FreeBSD$
  */
 
-#ifndef _DEV_VGA_VGA_H_
-#define	_DEV_VGA_VGA_H_
+#ifndef _DEV_VTC_HW_VGA_H_
+#define	_DEV_VTC_HW_VGA_H_
 
 #include <machine/stdarg.h>
 
@@ -75,4 +75,4 @@
 int vga_init(struct vga_softc *);
 int vga_probe(struct vga_softc *);
 
-#endif /* !_DEV_VGA_VGA_H_ */
+#endif /* !_DEV_VTC_HW_VGA_H_ */

==== //depot/projects/tty/sys/dev/vtc/hw/vga/vga_bus_isa.c#2 (text+ko) ====

@@ -40,7 +40,7 @@
 #include <isa/isavar.h>
 
 #include <dev/ic/vga.h>
-#include <dev/vga/vga.h>
+#include <dev/vtc/hw/vga/vga.h>
 
 static int vga_isa_attach(device_t);
 static int vga_isa_probe(device_t);

==== //depot/projects/tty/sys/dev/vtc/hw/vga/vga_bus_pci.c#2 (text+ko) ====

@@ -40,7 +40,7 @@
 #include <dev/pci/pcivar.h>
 
 #include <dev/ic/vga.h>
-#include <dev/vga/vga.h>
+#include <dev/vtc/hw/vga/vga.h>
 
 static int vga_pci_attach(device_t dev);
 static int vga_pci_probe(device_t dev);

==== //depot/projects/tty/sys/dev/vtc/hw/vga/vga_con.c#2 (text+ko) ====

@@ -36,7 +36,8 @@
 #include <sys/tty.h>
 
 #include <dev/ic/vga.h>
-#include <dev/vga/vga.h>
+#include <dev/vtc/hw/vga/vga.h>
+
 #include <dev/vtc/vtc_con.h>
 
 static vtc_con_bitblt_f vga_con_bitblt;

==== //depot/projects/tty/sys/dev/vtc/hw/vga/vga_cpu_alpha.c#2 (text+ko) ====

@@ -33,7 +33,7 @@
 #include <machine/bus.h>
 
 #include <dev/ic/vga.h>
-#include <dev/vga/vga.h>
+#include <dev/vtc/hw/vga/vga.h>
 
 int
 vga_get_console(struct vga_consdata *cd)

==== //depot/projects/tty/sys/dev/vtc/hw/vga/vga_cpu_amd64.c#2 (text+ko) ====

@@ -39,7 +39,7 @@
 #include <machine/vmparam.h>
 
 #include <dev/ic/vga.h>
-#include <dev/vga/vga.h>
+#include <dev/vtc/hw/vga/vga.h>
 
 int
 vga_get_console(struct vga_consdata *cd)

==== //depot/projects/tty/sys/dev/vtc/hw/vga/vga_cpu_i386.c#2 (text+ko) ====

@@ -39,7 +39,7 @@
 #include <machine/vmparam.h>
 
 #include <dev/ic/vga.h>
-#include <dev/vga/vga.h>
+#include <dev/vtc/hw/vga/vga.h>
 
 int
 vga_get_console(struct vga_consdata *cd)

==== //depot/projects/tty/sys/dev/vtc/hw/vga/vga_cpu_ia64.c#2 (text+ko) ====

@@ -33,7 +33,7 @@
 #include <machine/bus.h>
 
 #include <dev/ic/vga.h>
-#include <dev/vga/vga.h>
+#include <dev/vtc/hw/vga/vga.h>
 
 int
 vga_get_console(struct vga_consdata *cd)

==== //depot/projects/tty/sys/dev/vtc/hw/vga/vga_cpu_sparc64.c#2 (text+ko) ====

@@ -37,7 +37,7 @@
 #include <machine/ofw_machdep.h>
 
 #include <dev/ic/vga.h>
-#include <dev/vga/vga.h>
+#include <dev/vtc/hw/vga/vga.h>
 
 int
 vga_get_console(struct vga_consdata *cd)

==== //depot/projects/tty/sys/dev/vtc/vtc.h#2 (text+ko) ====

@@ -26,8 +26,8 @@
  * $FreeBSD$
  */
 
-#ifndef _SYS_VTC_H_
-#define	_SYS_VTC_H_
+#ifndef _DEV_VTC_H_
+#define	_DEV_VTC_H_
 
 /* BitBlt operations. */
 #define	BITBLT_CTOFB		0x0001
@@ -39,4 +39,15 @@
 #define	BITBLT_H32TOFB		0x0007
 #define	BITBLT_FBTOFB		0x0008
 
-#endif /* !_SYS_VTC_H_ */
+/* Beastie logos. */
+extern int vtc_logo4_width;
+extern int vtc_logo4_height;
+extern unsigned char vtc_logo4_image[];
+
+/* Built-in fonts. */
+extern unsigned char vtc_font_8x16[];
+
+/* Miscellaneous. */
+extern char vtc_device_name[];
+
+#endif /* !_DEV_VTC_H_ */

==== //depot/projects/tty/sys/dev/vtc/vtc_con.c#8 (text+ko) ====

@@ -35,13 +35,10 @@
 #include <sys/cons.h>
 #include <sys/rman.h>
 #include <sys/tty.h>
-#include <sys/vtc.h>
 
+#include <dev/vtc/vtc.h>
 #include <dev/vtc/vtc_con.h>
 
-extern char vtc_device_name[];		/* XXX Should be in a header file. */
-extern u_char vtc_font_8x16[];
-
 static cn_checkc_t vtc_cncheckc;
 static cn_getc_t vtc_cngetc;
 static cn_init_t vtc_cninit;
@@ -49,6 +46,9 @@
 static cn_putc_t vtc_cnputc;
 static cn_term_t vtc_cnterm;
 
+static int cncol = 0;
+static int cnrow = 0;
+
 CONS_DRIVER(vtc, vtc_cnprobe, vtc_cninit, vtc_cnterm, vtc_cngetc, vtc_cncheckc,
     vtc_cnputc, NULL);
 
@@ -91,7 +91,6 @@
 static void
 vtc_cnputc(struct consdev *cp, int c)
 {
-	static int col = 0, row = 0;
 	struct vtc_conout *vc = cp->cn_arg;
 	int ch, width;
 	u_char *glyph;
@@ -103,25 +102,25 @@
 	width = vc->vtc_con_width;
 	switch (c) {
 	case 8:		/* BS */
-		if (col > 0)
-			col--;
+		if (cncol > 0)
+			cncol--;
 		ch = ' ';
 		break;
 	case 9:		/* HT */
-		col = (col + 7) & 7;
-		if (col >= 80)
-			col = 79;
+		cncol = (cncol + 7) & 7;
+		if (cncol >= 80)
+			cncol = 79;
 		ch = 0;
 		break;
 	case 10:	/* LF */
 	case 11:	/* VT (processed as LF) */
 	case 12:	/* FF (processed as LF) */
-		col = 0;
-		row++;
+		cncol = 0;
+		cnrow++;
 		ch = 0;
 		break;
 	case 13:	/* CR */
-		col = 0;
+		cncol = 0;
 		ch = 0;
 		break;
 	default:
@@ -132,21 +131,21 @@
 	if (ch != 0) {
 		glyph = vtc_font_8x16 + ((ch - ' ') * 16);
 		vc->vtc_con_bitblt(vc, BITBLT_H1TOFB, (uintptr_t)glyph,
-		    width * row * 16 + col * 8, 8, 16, 0, 7);
+		    width * cnrow * 16 + cncol * 8, 8, 16, 0, 7);
 		if (c != 8)
-			col++;
+			cncol++;
 	}
 
-	if (col >= 80) {
-		col = 0;
-		row++;
+	if (cncol >= 80) {
+		cncol = 0;
+		cnrow++;
 	}
-	if (row >= 30) {
+	if (cnrow >= 30) {
 		vc->vtc_con_bitblt(vc, BITBLT_FBTOFB, width * 16, 0, width,
 		    29 * 16);
 		vc->vtc_con_bitblt(vc, BITBLT_CTOFB, 0, width * 29 * 16, width,
 		    16);
-		row = 29;
+		cnrow = 29;
 	}
 }
 

==== //depot/projects/tty/sys/dev/vtc/vtc_core.c#4 (text+ko) ====

@@ -33,6 +33,8 @@
 #include <sys/kernel.h>
 #include <sys/module.h>
 
+#include <dev/vtc/vtc.h>
+
 char vtc_device_name[] = "vtc";
 
 static int

==== //depot/projects/tty/sys/dev/vtc/vtc_font.c#3 (text+ko) ====

@@ -27,6 +27,8 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <dev/vtc/vtc.h>
+
 unsigned char vtc_font_8x16[16 * (256 - 32)] = {
 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
 0,0,24,60,60,60,24,24,24,0,24,24,0,0,0,0,

==== //depot/projects/tty/sys/dev/vtc/vtc_logo.c#2 (text+ko) ====

@@ -27,6 +27,8 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
+#include <dev/vtc/vtc.h>
+
 #define	__	0
 #define	BR	4
 #define	BW	15
@@ -37,9 +39,14 @@
 #define	WR	244
 #define	WW	255
 
-int vga_logo_width = 232;
-int vga_logo_height = 138;
-unsigned char vga_logo_image[] = {
+int vtc_logo4_width = 232;
+int vtc_logo4_height = 140;
+unsigned char vtc_logo4_image[] = {
+__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
+__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
+__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
+__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
+
 __,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
 __,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
 RR,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
@@ -729,4 +736,9 @@
 __,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,RR,RR,RB,__,__,__,__,
 __,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
 __,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
+
+__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
+__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
+__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
+__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,__,
 };


More information about the p4-projects mailing list