Make use of the more flexable device hints by adding a new field,

vesa_mode to specify VESA mode, as suggested by jhb@.
This commit is contained in:
Xin LI 2009-09-12 00:12:47 +00:00
parent 7d05808361
commit 7ec7f6d5ed
2 changed files with 10 additions and 5 deletions

View File

@ -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

View File

@ -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;