[{"id":1765936,"web_url":"http://patchwork.ozlabs.org/comment/1765936/","msgid":"<CAF6AEGvrxsWsJY6dEUH3TWFJtZOsdZgp5=KftLepLJrQx6mCTQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-10T11:38:14","subject":"Re: [U-Boot] [PATCH v2 00/21] efi_loader: enough UEFI for standard\n\tdistro boot","submitter":{"id":18760,"url":"http://patchwork.ozlabs.org/api/people/18760/","name":"Rob Clark","email":"robdclark@gmail.com"},"content":"Blerg.. pls ignore the resend of \"readdir\" patchset which hitched a\nride on the git-send-email train.. apparently I should not send\npatches in the morning before coffee..\n\nBR,\n-R\n\nOn Sun, Sep 10, 2017 at 7:21 AM, Rob Clark <robdclark@gmail.com> wrote:\n> This patchset fleshes out EFI_LOADER enough to support booting an\n> upstream \\EFI\\BOOT\\bootaa64.efi (which then loads fallback.efi and\n> then eventually the per-distro shim.efi which loads the per-distro\n> grubaa64.efi) without resorting to hacks to hard-code u-boot to load\n> a particular distro's grub, or other hacks like setting up the\n> distro installation as live-media.\n>\n> Background: with a normal UEFI implementation, the boot process is:\n>\n> a) firmware (u-boot) looks at BootOrder and the BootXXXX variables\n>    to try to determine what to boot.\n> b) the firmware will look at the BootXXXX variables (which contain\n>    an EFI_LOAD_OPTION \"struct\" in order specified by BootOrder, and\n>    will boot the first bootable option.\n> c) The EFI_LOAD_OPTION specifies a device-path which identifies the\n>    device and file path of the .efi payload to exectute.\n>\n> This is implemented with the 'bootefi bootmgr' command.\n>\n> If there are no bootable options the firmware falls back to loading\n> \\EFI\\BOOT\\bootaa64.efi (exact name varies depending on arch), which\n> for distro's using fallback/shim (which should include most modern\n> linux distros) then loads fallback.efi which uses the\n> EFI_SIMPLE_FILE_SYSTEM_PROTCOL and EFI_FILE_PROTOCOL to search for\n> any \\EFI\\*\\boot.csv, and will then set BootOrder and BootXXXX EFI\n> variables accordingly so that on next boot fallback.efi is not\n> necessary.\n>\n> The last 5 patches are a bit unrelated, just pulling forward some of\n> the patches I have from the next patchset, to get Shell.efi and SCT\n> working.\n>\n> Peter Jones (2):\n>   part: extract MBR signature from partitions\n>   efi: add some more device path structures\n>\n> Rob Clark (19):\n>   part: move efi_guid_t\n>   efi: add some missing __packed\n>   efi_loader: add device-path utils\n>   efi_loader: drop redundant efi_device_path_protocol\n>   efi_loader: flesh out device-path to text\n>   efi_loader: use proper device-paths for partitions\n>   efi_loader: use proper device-paths for net\n>   efi_loader: refactor boot device and loaded_image handling\n>   efi_loader: add file/filesys support\n>   efi_loader: support load_image() from a file-path\n>   efi_loader: make pool allocations cacheline aligned\n>   efi_loader: efi variable support\n>   efi_loader: add bootmgr\n>   efi_loader: file_path should be variable length\n>   efi_loader: set loaded image code/data type properly\n>   efi_loader: print GUIDs\n>   efi_loader: split out escape sequence based size query\n>   efi_loader: Correctly figure out size for vidconsole\n>   efi_loader: Some console improvements for vidconsole\n>\n>  cmd/bootefi.c                            | 249 ++++++--------\n>  disk/part_dos.c                          |  12 +-\n>  disk/part_efi.c                          |  20 ++\n>  include/blk.h                            |  15 +\n>  include/config_distro_bootcmd.h          |   5 +\n>  include/efi.h                            |  25 ++\n>  include/efi_api.h                        | 162 ++++++++-\n>  include/efi_loader.h                     |  62 +++-\n>  include/part.h                           |   3 +-\n>  include/part_efi.h                       |   4 -\n>  include/pe.h                             |   6 +\n>  lib/efi_loader/Makefile                  |   3 +-\n>  lib/efi_loader/efi_bootmgr.c             | 169 ++++++++++\n>  lib/efi_loader/efi_boottime.c            | 162 +++++++--\n>  lib/efi_loader/efi_console.c             | 123 ++++---\n>  lib/efi_loader/efi_device_path.c         | 563 +++++++++++++++++++++++++++++++\n>  lib/efi_loader/efi_device_path_to_text.c | 242 +++++++++----\n>  lib/efi_loader/efi_disk.c                |  86 +++--\n>  lib/efi_loader/efi_file.c                | 556 ++++++++++++++++++++++++++++++\n>  lib/efi_loader/efi_image_loader.c        |  26 ++\n>  lib/efi_loader/efi_memory.c              |   5 +-\n>  lib/efi_loader/efi_net.c                 |  24 +-\n>  lib/efi_loader/efi_runtime.c             |  17 +-\n>  lib/efi_loader/efi_variable.c            | 335 ++++++++++++++++++\n>  24 files changed, 2520 insertions(+), 354 deletions(-)\n>  create mode 100644 lib/efi_loader/efi_bootmgr.c\n>  create mode 100644 lib/efi_loader/efi_device_path.c\n>  create mode 100644 lib/efi_loader/efi_file.c\n>  create mode 100644 lib/efi_loader/efi_variable.c\n>\n> --\n> 2.13.5\n>","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"NDvRIJ/s\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xqq0k1Jktz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 10 Sep 2017 21:42:14 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid EC773C21F75; Sun, 10 Sep 2017 11:39:28 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 00AC4C21F65;\n\tSun, 10 Sep 2017 11:39:26 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid A8B96C21F7F; Sun, 10 Sep 2017 11:38:16 +0000 (UTC)","from mail-lf0-f65.google.com (mail-lf0-f65.google.com\n\t[209.85.215.65])\n\tby lists.denx.de (Postfix) with ESMTPS id 43F46C21F7E\n\tfor <u-boot@lists.denx.de>; Sun, 10 Sep 2017 11:38:16 +0000 (UTC)","by mail-lf0-f65.google.com with SMTP id c8so2800470lfe.2\n\tfor <u-boot@lists.denx.de>; Sun, 10 Sep 2017 04:38:16 -0700 (PDT)","by 10.46.29.20 with HTTP; Sun, 10 Sep 2017 04:38:14 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=32Ps1Gc8kskS+413i8+seHUA9hhSVvcrTQqhfoXaQXg=;\n\tb=NDvRIJ/smUAauZIswNgQP8jwycKl0BeAl1UijcNif3ioTqYhdk6G3exVpq56/P2jLI\n\tWQ+g1aaNe5pfx6ps/x8Qrx0LjpjypDdiapM/AcbFhGo/jcIG1qC4H8BICWkxe1Er1q5r\n\tght2cwYBu7n4QWZG/RI+gnfhHDpC3fk5eV2IJBSfHcOFsGC0YT/VVf1xtnLxkM1X5yXp\n\tB+VOPyGiS7jZYiUP2MYojIbd4z88pw9koAZw1c9tGnuPnrIOElrM3o6AU5fhFeVeHxkP\n\ttSW6J18fRWLitivMcQ2bIMzQ6mnPtmrK5Czw8ZuvzZTH2iZB6ZELxCaO8NWotXNuZfBE\n\t+y1A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=32Ps1Gc8kskS+413i8+seHUA9hhSVvcrTQqhfoXaQXg=;\n\tb=QbIeMB9v3R1qJaLrojdTifBGM2bK7GC7nJGXQd/APOTfgABzGDfQAixLEtirYr5gDU\n\tcJ15dy3cIG3DFejvrsBZAnVZY2SUEZSx1wV0jPqECHJ0qyefezwmfq82zI+A0njjXz7e\n\tV9dYpWialIenegsVT8AHebZWl0VR4XAnZlH1zjFSVUrKl2H6NozWWTHIqLKqULzZ9pE7\n\tjpN+iButeDA/Plby8dBJSzPhl77dF5igLwPEspmhwm9YvN8ahOPQeMpCxbd7azjTYBSF\n\tRAxUjIVRSwMw4KPLy4TlhH7L/YnMq9kIGBqTABN3K7n4ft/EPj3BC9d1Z1f93KjlC4rh\n\tJ5mA==","X-Gm-Message-State":"AHPjjUgwI1YR0G+l5J6XRHbD4jv1rUDa/kb4IwcGZzRmjrHXvTzZeodO\n\tLaUA4J0kBLipVqsq46c2lPOCxlahZnSu","X-Google-Smtp-Source":"AOwi7QCptwSaUn0+fOBnGn05qk45tMLrhHumB/7+p/Pyfklc5KMg0SyleB9OFP95LVXItjHQ4nov2gMYhbjmp6ugsQM=","X-Received":"by 10.46.32.195 with SMTP id g64mr2738633lji.90.1505043495507;\n\tSun, 10 Sep 2017 04:38:15 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170910112149.21358-1-robdclark@gmail.com>","References":"<20170910112149.21358-1-robdclark@gmail.com>","From":"Rob Clark <robdclark@gmail.com>","Date":"Sun, 10 Sep 2017 07:38:14 -0400","Message-ID":"<CAF6AEGvrxsWsJY6dEUH3TWFJtZOsdZgp5=KftLepLJrQx6mCTQ@mail.gmail.com>","To":"U-Boot Mailing List <u-boot@lists.denx.de>","Cc":"Heinrich Schuchardt <xypron.glpk@gmx.de>","Subject":"Re: [U-Boot] [PATCH v2 00/21] efi_loader: enough UEFI for standard\n\tdistro boot","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]