From owner-svn-src-head@FreeBSD.ORG Sun Apr 27 09:16:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 007E695B; Sun, 27 Apr 2014 09:16:47 +0000 (UTC) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id AE58F1DDD; Sun, 27 Apr 2014 09:16:47 +0000 (UTC) Received: from rnote.ddteam.net (10-89-133-95.pool.ukrtel.net [95.133.89.10]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 7047DC4927; Sun, 27 Apr 2014 12:16:39 +0300 (EEST) Date: Sun, 27 Apr 2014 12:16:36 +0300 From: Aleksandr Rybalko To: Nathan Whitehorn Subject: Re: svn commit: r264997 - head/sys/dev/vt/hw/vga Message-Id: <20140427121636.b93682e4.ray@freebsd.org> In-Reply-To: <201404270219.s3R2Jr60076569@svn.freebsd.org> References: <201404270219.s3R2Jr60076569@svn.freebsd.org> Organization: FreeBSD.ORG X-Mailer: Sylpheed 3.1.2 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) X-Operating-System: FreeBSD Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 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: Sun, 27 Apr 2014 09:16:48 -0000 On Sun, 27 Apr 2014 02:19:53 +0000 (UTC) Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Sun Apr 27 02:19:53 2014 > New Revision: 264997 > URL: http://svnweb.freebsd.org/changeset/base/264997 > > Log: > Disable vga if EFI framebuffer present. vt(9) should handle this > internally based on efifb's higher priority, but it doesn't, and this > at least lets us build a kernel that boots on both BIOS and EFI > systems for now. > > Modified: > head/sys/dev/vt/hw/vga/vga.c > > Modified: head/sys/dev/vt/hw/vga/vga.c > ============================================================================== > --- head/sys/dev/vt/hw/vga/vga.c Sun Apr 27 01:15:10 > 2014 (r264996) +++ head/sys/dev/vt/hw/vga/vga.c Sun Apr > 27 02:19:53 2014 (r264997) @@ -45,8 +45,10 @@ __FBSDID > ("$FreeBSD$"); > #if defined(__amd64__) || defined(__i386__) > #include > #include > +#include > #include > #include > +#include > #endif /* __amd64__ || __i386__ */ > > struct vga_softc { > @@ -637,6 +639,19 @@ vga_init(struct vt_device *vd) > int textmode = 0; > > #if defined(__amd64__) || defined(__i386__) > + /* Disable if EFI framebuffer present. Should be handled by > priority > + * logic in vt(9), but this will do for now. XXX */ > + > + caddr_t kmdp, efifb; > + kmdp = preload_search_by_type("elf kernel"); > + if (kmdp == NULL) > + kmdp = preload_search_by_type("elf64 kernel"); > + efifb = preload_search_info(kmdp, MODINFO_METADATA | > MODINFOMD_EFI_FB); > + if (efifb != NULL) > + return (CN_DEAD); > +#endif > + > +#if defined(__amd64__) || defined(__i386__) > sc->vga_fb_tag = X86_BUS_SPACE_MEM; > sc->vga_fb_handle = KERNBASE + VGA_MEM_BASE; > sc->vga_reg_tag = X86_BUS_SPACE_IO; > I have patch for that, but it require testing: http://people.freebsd.org/~ray/newcons/vt_early_select.patch WBW -- Aleksandr Rybalko