From owner-freebsd-current@freebsd.org Fri Jul 31 19:40:26 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 594D19AFA0D for ; Fri, 31 Jul 2015 19:40:26 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B1A01A27 for ; Fri, 31 Jul 2015 19:40:25 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZLGA9-0000w4-AX for freebsd-current@freebsd.org; Fri, 31 Jul 2015 21:40:13 +0200 Received: from ip5b41fb99.dynamic.kabel-deutschland.de ([91.65.251.153]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jul 2015 21:40:13 +0200 Received: from holger by ip5b41fb99.dynamic.kabel-deutschland.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Jul 2015 21:40:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: Holger Freyther Subject: boot1.efi and gpt support Date: Fri, 31 Jul 2015 19:40:01 +0000 (UTC) Lines: 33 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 91.65.251.153 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Fri, 31 Jul 2015 19:40:26 -0000 Hi, we have an appliance that is using the gptboot bootme/bootonce/bootfailed scheme and we looked into using machines that only have an UEFI bios. boot1.efi currently does not allow this boot scheme and picks the first UFS partition it can find. I have played with qemu+tianocore and looked at what is required to use the gptboot.c within boot1.efi and it doesn't seem to be much. I would like to receive feedback and wonder if this functionality could get integrated? I have created a bug report[1] and attached my current patch that works with tianocore and the physical machine that was tested. * I need to allocate the primary/backup GPT tables in the heap as otherwise tianocore wouldn't even execute boot1.efi * I couldn't find a protocol in UEFI to give me the GPT partitions. So I have to be a bit crazy in finding a disk, then selecting the partition to boot and then finding the device using UEFI protocols. It is crazy but the amount of assumptions I make on the implementation are few. * I have no control in which disk will be listed first by UEFI. So maybe this is something that should be configured for boot1.efi as well. I am looking forward to receive some feedback. kind regards holger [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201788