From owner-svn-src-head@FreeBSD.ORG Sat Sep 12 00:12:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACAA4106566B; Sat, 12 Sep 2009 00:12:47 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 81E5D8FC13; Sat, 12 Sep 2009 00:12:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8C0Clgq067631; Sat, 12 Sep 2009 00:12:47 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8C0ClCB067628; Sat, 12 Sep 2009 00:12:47 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200909120012.n8C0ClCB067628@svn.freebsd.org> From: Xin LI Date: Sat, 12 Sep 2009 00:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197109 - in head: share/man/man4 sys/dev/syscons X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Sep 2009 00:12:47 -0000 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@. 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 #include +#include #include #include #include @@ -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;