svn commit: r197109 - in head: share/man/man4 sys/dev/syscons

Xin LI delphij at FreeBSD.org
Sat Sep 12 00:12:47 UTC 2009


Author: delphij
Date: Sat Sep 12 00:12:47 2009
New Revision: 197109
URL: http://svn.freebsd.org/changeset/base/197109

Log:
  Make use of the more flexable device hints by adding a new field,
  vesa_mode to specify VESA mode, as suggested by jhb at .

Modified:
  head/share/man/man4/syscons.4
  head/sys/dev/syscons/syscons.c

Modified: head/share/man/man4/syscons.4
==============================================================================
--- head/share/man/man4/syscons.4	Fri Sep 11 23:41:11 2009	(r197108)
+++ head/share/man/man4/syscons.4	Sat Sep 12 00:12:47 2009	(r197109)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 10, 2009
+.Dd September 11, 2009
 .Dt SYSCONS 4
 .Os
 .Sh NAME
@@ -61,6 +61,7 @@
 In
 .Pa /boot/device.hints :
 .Cd hint.sc.0.at="isa"
+.Cd hint.sc.0.vesa_mode=0x103
 .Sh DESCRIPTION
 The
 .Nm
@@ -427,8 +428,11 @@ or else at the loader prompt (see
 .\"This option suppresses the bell, whether audible or visual,
 .\"if it is rung in a background virtual terminal.
 .It 0x0080 (VESAMODE)
-This option puts the video card in the VESA mode specified by higher
-16 bits of the flags during kernel initialization.
+This option puts the video card in the VESA mode specified by
+.Pa /boot/device.hints
+variable
+.Va vesa_mode
+during kernel initialization.
 Note that in order for this flag to work, the kernel must be
 compiled with the
 .Dv SC_PIXEL_MODE

Modified: head/sys/dev/syscons/syscons.c
==============================================================================
--- head/sys/dev/syscons/syscons.c	Fri Sep 11 23:41:11 2009	(r197108)
+++ head/sys/dev/syscons/syscons.c	Sat Sep 12 00:12:47 2009	(r197109)
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
 #include <sys/systm.h>
+#include <sys/bus.h>
 #include <sys/conf.h>
 #include <sys/cons.h>
 #include <sys/consio.h>
@@ -352,7 +353,7 @@ sc_attach_unit(int unit, int flags)
 #endif
     int vc;
     struct cdev *dev;
-    u_int16_t vmode;
+    unsigned int vmode = 0;
 
     flags &= ~SC_KERNEL_CONSOLE;
 
@@ -373,7 +374,7 @@ sc_attach_unit(int unit, int flags)
     if (sc_console == NULL)	/* sc_console_unit < 0 */
 	sc_console = scp;
 
-    vmode = (flags >> 16) & 0x1fff;
+    (void)resource_int_value("sc", unit, "vesa_mode", &vmode);
     if (vmode < M_VESA_BASE || vmode > M_VESA_MODE_MAX)
 	vmode = M_VESA_FULL_800;
 


More information about the svn-src-head mailing list