From owner-freebsd-current@FreeBSD.ORG Mon Dec 29 19:13:05 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0421D4A; Mon, 29 Dec 2014 19:13:05 +0000 (UTC) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48E7A1D59; Mon, 29 Dec 2014 19:13:04 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.9/8.14.9/ALCHEMY.FRANKEN.DE) with ESMTP id sBTJCgiF092214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 29 Dec 2014 20:12:42 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.9/8.14.9/Submit) id sBTJCgnf092213; Mon, 29 Dec 2014 20:12:42 +0100 (CET) (envelope-from marius) Date: Mon, 29 Dec 2014 20:12:42 +0100 From: Marius Strobl To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Subject: Re: r276200: EFI boot failure: kernel stops booting at pci0: on pcib0 Message-ID: <20141229191242.GA63463@alchemy.franken.de> References: <20141225194207.5dfd3636.ohartman@zedat.fu-berlin.de> <20141226130113.5200bfbb.ohartman@zedat.fu-berlin.de> <1419621822.1018.187.camel@freebsd.org> <20141228205739.154243d8.ohartman@zedat.fu-berlin.de> <1419797387.1018.215.camel@freebsd.org> <54A13DDB.2040206@FreeBSD.org> <54A18780.7080601@citrix.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54A18780.7080601@citrix.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (alchemy.franken.de [0.0.0.0]); Mon, 29 Dec 2014 20:12:42 +0100 (CET) Cc: Adrian Chadd , Roger Pau =?iso-8859-1?Q?Monn=E9?= , "O. Hartmann" , Ian Lepore , FreeBSD CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Dec 2014 19:13:06 -0000 --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Mon, Dec 29, 2014 at 05:55:28PM +0100, Roger Pau Monné wrote: > El 29/12/14 a les 12.41, Roger Pau Monné ha escrit: > > Hello, > > > > Sorry for not noticing this earlier, I've been without a computer for > > some days. Do you get a panic message, or the system just freezes? > > > > Can you please post the full boot output with boot_verbose enabled? > > I'm not able to reproduce the problem with Qemu and OVMF, and I don't > have any box right now that uses UEFI. > > I'm guessing that this is due to some memory reservation conflict, so > I'm attaching a patch that should help diagnose it. You'll probably want to nuke RF_ACTIVE so the resources are marked as taken but in case of vt_efifb(4), the memory isn't mapped twice. I don't not know whether the latter actually is a problem for x86, though, it'll likely at least replace the VM_MEMATTR_WRITE_COMBINING mapping done in vt_efifb_remap(). Removing RF_ACTIVE in turn might not be sufficient for the Xen bits to mark the resource as reserved, this should be fixed in the FreeBSD/Xen code then, however. Also end = size - 1, see the attached patch. Marius --5mCyUwZo2JvN/JJP Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="efifb_vt_vga.diff" Index: dev/vt/hw/efifb/efifb.c =================================================================== --- dev/vt/hw/efifb/efifb.c (revision 276343) +++ dev/vt/hw/efifb/efifb.c (working copy) @@ -211,8 +211,8 @@ res_id = 0; pseudo_phys_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &res_id, local_info.fb_pbase, - local_info.fb_pbase + local_info.fb_size, - local_info.fb_size, RF_ACTIVE); + local_info.fb_pbase + local_info.fb_size - 1, + local_info.fb_size, 0); if (pseudo_phys_res == NULL) panic("Unable to reserve vt_efifb memory"); return (0); Index: dev/vt/hw/vga/vt_vga.c =================================================================== --- dev/vt/hw/vga/vt_vga.c (revision 276343) +++ dev/vt/hw/vga/vt_vga.c (working copy) @@ -1275,8 +1275,8 @@ res_id = 0; pseudo_phys_res = bus_alloc_resource(dev, SYS_RES_MEMORY, - &res_id, VGA_MEM_BASE, VGA_MEM_BASE + VGA_MEM_SIZE, - VGA_MEM_SIZE, RF_ACTIVE); + &res_id, VGA_MEM_BASE, VGA_MEM_BASE + VGA_MEM_SIZE - 1, + VGA_MEM_SIZE, 0); if (pseudo_phys_res == NULL) panic("Unable to reserve vt_vga memory"); return (0); --5mCyUwZo2JvN/JJP--