summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-09-12 00:12:47 +0000
committerdelphij <delphij@FreeBSD.org>2009-09-12 00:12:47 +0000
commitd726778302a63f783bb073e4c0d533ecb1d6f128 (patch)
tree16a1c5f20f5e31962e2923f9b7998323e4553177
parent54935c59e4652bd9ad4cc849258a12565dfdea15 (diff)
downloadFreeBSD-src-d726778302a63f783bb073e4c0d533ecb1d6f128.zip
FreeBSD-src-d726778302a63f783bb073e4c0d533ecb1d6f128.tar.gz
Make use of the more flexable device hints by adding a new field,
vesa_mode to specify VESA mode, as suggested by jhb@.
-rw-r--r--share/man/man4/syscons.410
-rw-r--r--sys/dev/syscons/syscons.c5
2 files changed, 10 insertions, 5 deletions
diff --git a/share/man/man4/syscons.4 b/share/man/man4/syscons.4
index 2c9d21d..b0f98a1 100644
--- a/share/man/man4/syscons.4
+++ b/share/man/man4/syscons.4
@@ -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
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 4fcbf41..e75db9d 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -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;
OpenPOWER on IntegriCloud