From owner-freebsd-current@FreeBSD.ORG Fri May 23 03:33:24 2014 Return-Path: Delivered-To: freebsd-current@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 E7247949; Fri, 23 May 2014 03:33:24 +0000 (UTC) Received: from mail-ve0-x22d.google.com (mail-ve0-x22d.google.com [IPv6:2607:f8b0:400c:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 965962A88; Fri, 23 May 2014 03:33:24 +0000 (UTC) Received: by mail-ve0-f173.google.com with SMTP id pa12so5602930veb.18 for ; Thu, 22 May 2014 20:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zSJ+njrOFBdTZmtW0sYuJslJXQkkhOwzuvRCElxIulE=; b=wxA9GyCCB/xU9h42dgWiPt5ZdYkqX8In5eBkAYiN1mkkL5DPpt1JjtiHUXu+rrFgVl /jCpXw+AmUcPmucu8Qog6uQ/Q+zPwN8twlC3Qp2ESx6KbNZQSdOHg80YRzr9JGNVRh/z 9dsz9UwZlpGNWxp4e9Tx14tXymr/drOwj1mHTw39HI0Epy2r56hCTQBOoAcCqqGVyoOB G0GQjUkoQ9JUZdpnr+M/2odnJOl+A7hcoBkFDScGbzRrV4+hrhknRvmMFwqwVzcV9VMd uTEEbtVkY+WDW3ZdGNQ1yXt21M+YjfoDUdD6jkn1hj4vNDK5GyoHoi4JNnotw/vFW1V1 qAfQ== MIME-Version: 1.0 X-Received: by 10.58.23.6 with SMTP id i6mr1788633vef.12.1400816003606; Thu, 22 May 2014 20:33:23 -0700 (PDT) Received: by 10.52.8.101 with HTTP; Thu, 22 May 2014 20:33:23 -0700 (PDT) In-Reply-To: References: Date: Thu, 22 May 2014 23:33:23 -0400 Message-ID: Subject: Re: [patch] Switch to text mode during efi boot From: =?UTF-8?Q?Rafael_Esp=C3=ADndola?= To: Ed Maste Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 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, 23 May 2014 03:33:25 -0000 > Great, thank you Rafael. There's framebuffer corruption issues on > some other hardware as well, so it may be that the eventual fix for > those will also solve the MBP issue. Awesome! >> Some design questions: >> >> * Why do we have both boot1 and loader? It is just the issue with >> building a usb image without root that requires having a boot1 that >> has a predictable size? > > No, boot1.efi only exists so that the loader and related Forth and > config files can be placed in a UFS root filesystem, as is done with > the x86 BIOS boot and on other platforms. This way the UEFI boot > easily integrates with the existing installer and tools. > > We could put the loader and files in the FAT EFI system partition > instead, but it would require more substantial changes in the > installer and system configuration. I see. What should be done for a machine with multiple freebsd installations (versions 11 and 12 for example)? Will there be a single boot1 and two loaders? Right now I think boot1 always opens the first loader it finds. >> * Even if we want to keep both boot1 and loader, could boot1 use libefi? > > I don't think there's any fundamental reason we couldn't. However, > we're going to need to take a broader look at reworking some of this > in the context of secure boot anyway (as we look at a signed shim > loader). Is the idea to develop boot1 to be the signed loader? >> * Is it ok to always switch to text mode in libefi or should it >> provide a switch_to_text_mode function? > > I suspect it's fine / correct to always switch; we've just been > "lucky" that the current approach works with most firmwares. I confess I don't know the big picture of how EFI is designed. The API file I found was in a directory called EdkCompatibilityPkg, so maybe this is just something that newer EFI implementations don't need but old ones do? What is the next step? Unfortunately the only EFI capable machines I have are Macs (or VMs). Can you test it on some other implementation? Cheers, Rafael