From owner-freebsd-current@freebsd.org Tue Sep 6 17:10:19 2016 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 30F97BC65A6 for ; Tue, 6 Sep 2016 17:10:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-yb0-x229.google.com (mail-yb0-x229.google.com [IPv6:2607:f8b0:4002:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 005F6100 for ; Tue, 6 Sep 2016 17:10:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-yb0-x229.google.com with SMTP id g5so28045568yba.2 for ; Tue, 06 Sep 2016 10:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=hol/+EOJ2ehO1mGil6rmR8ySDIViQX4IjoOnzRfiKTc=; b=hobB46F9lT+GEzwoAmTuHcZ7eE2tJERcovNnlZFc+wgGJLiVhCMr0MjUPoHsyVVkCV iGNzPSxv5/uLVqHYd766RqzxArUjf+8bBOxwCQTaQwjn280wGiSm+6c0HzZ9Yegf4o/L RLtUf7PsCn2YhaWDitlhZqTXSFeTqK1T5KF1JyNYH2AN4HtuIlrAIGo3WRn1ppBp17dE uoosHdXzT70Cx9NYIMBP5sbbKozXjUXxc6VXlnnL6r0XUvIe8WbGbdMbBr2Agxb1hhFR WCbZOI/6xdz8Hg07pxydArqPxMVq123UqU6fDqYFKEWcE34FcTgrBiGYvibHJ1H2G0vX 4zJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=hol/+EOJ2ehO1mGil6rmR8ySDIViQX4IjoOnzRfiKTc=; b=X4Ty3YKLcbkPK5OlGVwq5co4kOv9Z2rT/w+PYnVZZlbnzUu1HRXq5vZ8OnNOR8daRb GdwXMVewU/HHyUe0OURcZSxxlsqG2Xkus+5qSvNZsB/Rz1DEOacID61GKe3FZXvoRmqY +zHUSrPc++sGKsrfVW24FsoA+NSsEE0hUj9c3QmZJJ5Zwst/v2d7lZmijKEOnngugOTQ vIzc903fvlPxPTBntXhaxgNlhlrScXXMgHDAkW4y7LV3vws2AOTSXQIezbQnOx+Mhrj0 hWdmg1j8L5OqCLsmhl2Cyo8l+1kzYpyN7t4erSLmowQFpEySJFJZEGt2Ol1zxFonYvkZ 37vA== X-Gm-Message-State: AE9vXwP+h3O5f8qeEsk92QNuiqvrEv2diuTUc9Hh8ml2ZqeaTqkS+66WSiSUrysjtzgiSwSH6b6lXvq2H7h1XA== X-Received: by 10.36.149.193 with SMTP id m184mr32575065itd.94.1473181818099; Tue, 06 Sep 2016 10:10:18 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Tue, 6 Sep 2016 10:10:17 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: References: From: Warner Losh Date: Tue, 6 Sep 2016 11:10:17 -0600 X-Google-Sender-Auth: iPg-zWJnLhhyat2b6VYVO9VRlHo Message-ID: Subject: Re: The state of UEFI support in the Kernel and installer To: Allan Jude Cc: FreeBSD Current Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 06 Sep 2016 17:10:19 -0000 On Tue, Sep 6, 2016 at 10:26 AM, Allan Jude wrote: >> The other problem is that as far as I can tell, there is no code that cr= eates the EFI boot entry in any case. By default, the installer just moves= either boot1.efi or loader.efi (not sure) to: >> (ESP)/EFI/bootx64.efi, >> which is the default location for EFI firmware. I was wondering if the = kernel has the requisite API/driver for adding EFI boot entries yet. On (A= rch) Linux, you can add an entry to the NVRAM with a tool called bootctl, w= hich is part of the sd-boot package. >> >> Also, wondering if FreeBSD has any plan to add something like initramfs/= EFIStub booting, which allows for much easier bootloader configuration with= sd-boot than the current FreeBSD EFI bootloader, which must be chainloaded= and has its configuration stored off of the ESP. >> > > For historic reasons, users expect to configure the loader via > /boot/loader.conf not by modifying files on the ESP. Not entirely true. We need to support the EFI boot manager protocol (the EFI boot entries) to properly support next boot, as well as supporting booting off any partition. The boot manager protocol is done with EFI environment variables, so there's nothing to change in the ESP. The rub is to set a EFI variable you have to call runtime services, and to do that you have to setup a mapping table before calling ExitBootServices and that's trickier than it sounds. I've been working on this, but haven't finished. Warner