From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 547B5C07E95 for ; Fri, 2 Jul 2021 19:06:46 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 84F4961421 for ; Fri, 2 Jul 2021 19:06:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 84F4961421 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A5B73829C3; Fri, 2 Jul 2021 21:06:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="jUaS2H7q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 55614829BE; Fri, 2 Jul 2021 21:06:37 +0200 (CEST) Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DF2958290A for ; Fri, 2 Jul 2021 21:06:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x231.google.com with SMTP id h9so12471305oih.4 for ; Fri, 02 Jul 2021 12:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XkLWtcX9GufNDABvYmYML0wanOrwBNz8WnZelHaXxII=; b=jUaS2H7qJZpqxAwWmmfhMcMIYI07EY4ed0vL5QG2R+cvWCb8bWVskFjmbWayZKArQ6 +GL53lYJt0k2RXtyVB6sksjtWwv5BTg/vzXpVvKEg50PKdUSsWaSrwikhgnrf8XTFbGa VUk7tUIR7PLsnDNKjivTZSz4xnqoOg0wFAaPs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XkLWtcX9GufNDABvYmYML0wanOrwBNz8WnZelHaXxII=; b=r3vm7laaqeCkWXySKwW6qQLxb2VeWb174qY49oh3aS0klWSu2OEj0UdUhHQI7u/xg2 jSMlNUkMkOjUGV/5lwqrCFEqz8/LFPxfrv/3Z3lOF3sjQzqx6VHnacCNYdP+V/AQuW4g 2oCbkfv4sGWdUhrC6hSgBeZqcjTcKyrw5kgzUuXeXw6gpKb+lQutL5gpohe+t9Dx8aSo gM8/u5gDbGVTp13wY3ZIe9hhN6n2NdVVpkn6QnN6JWyTuOlOgw5KTZtenvbwHj884vkT B0GXsr9tAQBOLqPnczh4xHM49/gxSuEBGumNFOUc/0bwj00TItYOvVBEP4yklq+a04Ks 26zQ== X-Gm-Message-State: AOAM533YTd8xRWcf/SjAOAsWhJW9pQXkZbOWaUHnZHIovLZiIwvrDmps WOb8/e5ENAqwN5f2uwwW33sjCBrqSPtGWeIf X-Google-Smtp-Source: ABdhPJwvMgj/x65VnltW4GFIynKeOtv2Z7tlT4P1iJUtxz0S21Gs1NB+blsJsXpARUMXZFDCF7Wx5w== X-Received: by 2002:aca:c387:: with SMTP id t129mr792641oif.165.1625252791965; Fri, 02 Jul 2021 12:06:31 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id v8sm772625oth.69.2021.07.02.12.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 12:06:31 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Mark Kettenis , Heinrich Schuchardt , Simon Glass , Alexander Graf , Masahiro Yamada Subject: [PATCH v2 0/9] efi: Various tidy-ups and drop the default Date: Fri, 2 Jul 2021 12:36:11 -0600 Message-Id: <20210702183620.1542680-1-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean It has come to light that EFI_LOADER adds an extraordinary amount of code to U-Boot. For example, with nokia_rx51 the size delta is about 90KB. About 170 boards explicitly disable the option, but is is clear that many more could, thus saving image size and boot time. The current situation is affecting U-Boot's image as a svelt bootloader. EFI_LOADER is required by EBBR, a new boot standard which aims to bring in UEFI protocols to U-Boot. But EBRR is not required for booting. U-Boot already provides support for FIT, the 'bootm' command and a suitable hand-off to Linux. EBRR has made the decision to create a parallel infrastructure, e.g. does not use FIT, nor U-Boot's signing infrastructure. EBBR should be truly optional, enabled only by boards that use it. Most don't use it but it is enabled anyway. The default boot path should be one that makes use of the existing U-Boot support. To try to retify this situation, this series adds a new Kconfig option for EBBR so that the naming is more explicit. Then EFI_LOADER is updated to depend on it. The final patch makes EBBR optional. For now, only sandbox enables EBBR. Other boards can be added as needed, presumably by distributions that require it. Another approach would be to add 'CONFIG_EBBR=y' to the .config before building, in the build system. That might be more friendly to U-Boot users. This series also fixes a minor issue noticed during testing. Changes in v2: - Update commit message - Update commit message to be clearer - Drop 'struct blk_desc' - Move all header inclusions to the top - Split out new patch to make EFI_LOADER depend on DM and OF_CONTROL - Note the approximate size of this feature in the help - Split out new patch to create an option for EBBR Simon Glass (9): configs: Resync with savedefconfig Makefile: Drop include/asm directory as well as symlink disk: Tidy up #ifdefs in part_efi Use LIB_UUID with ACPIGEN and FS_BTRFS Allow efi_loader header to be included always lib: Create a new Kconfig option for charset conversion Make EFI_LOADER depend on DM and OF_CONTROL Add an option for EBBR efi: Make EBBR optional Makefile | 2 +- common/Kconfig.boot | 16 ++ configs/am335x_igep003x_defconfig | 1 - configs/am335x_pdu001_defconfig | 1 - configs/am64x_evm_a53_defconfig | 31 ++- configs/apalis-imx8_defconfig | 1 - configs/apalis-imx8x_defconfig | 1 - configs/aristainetos2c_defconfig | 1 - configs/aristainetos2ccslb_defconfig | 1 - ...edev_cc_v1_0_ultrazedev_som_v1_0_defconfig | 1 - configs/bcm7260_defconfig | 1 - configs/bcm7445_defconfig | 1 - configs/bcm963158_ram_defconfig | 1 - configs/bcm968580xref_ram_defconfig | 1 - configs/bitmain_antminer_s9_defconfig | 1 - configs/bk4r1_defconfig | 1 - configs/brppt1_mmc_defconfig | 1 - configs/brppt1_nand_defconfig | 1 - configs/brppt1_spi_defconfig | 1 - configs/brppt2_defconfig | 1 - configs/brsmarc1_defconfig | 1 - configs/brxre1_defconfig | 1 - configs/cgtqmx8_defconfig | 1 - configs/chromebook_coral_defconfig | 1 - configs/chromebook_link_defconfig | 1 - configs/colibri-imx8x_defconfig | 1 - configs/colibri_vf_defconfig | 1 - configs/controlcenterdc_defconfig | 1 - configs/crs305-1g-4s-bit_defconfig | 1 - configs/crs305-1g-4s_defconfig | 1 - configs/crs326-24g-2s-bit_defconfig | 1 - configs/crs326-24g-2s_defconfig | 1 - configs/crs328-4c-20s-4s-bit_defconfig | 1 - configs/crs328-4c-20s-4s_defconfig | 1 - configs/deneb_defconfig | 1 - configs/draco_defconfig | 2 +- configs/dragonboard820c_defconfig | 1 - configs/efi-x86_app_defconfig | 1 - configs/etamin_defconfig | 2 +- configs/evb-ast2600_defconfig | 1 - configs/evb-px30_defconfig | 1 - configs/evb-rk3308_defconfig | 1 - configs/evb-rk3568_defconfig | 2 +- configs/firefly-px30_defconfig | 1 - configs/ge_bx50v3_defconfig | 1 - configs/giedi_defconfig | 1 - configs/grpeach_defconfig | 1 - configs/imx8mm-cl-iot-gate_defconfig | 8 - configs/imx8qm_mek_defconfig | 1 - configs/imx8qm_rom7720_a1_4G_defconfig | 1 - configs/imx8qxp_mek_defconfig | 1 - configs/j7200_evm_r5_defconfig | 15 +- configs/j721e_evm_r5_defconfig | 13 +- configs/kontron_sl28_defconfig | 2 - configs/kp_imx53_defconfig | 1 - configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1028aqds_tfa_defconfig | 1 - configs/ls1028aqds_tfa_lpuart_defconfig | 1 - configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1028ardb_tfa_defconfig | 1 - configs/ls1043aqds_defconfig | 1 - configs/ls1043aqds_lpuart_defconfig | 1 - configs/ls1043aqds_nand_defconfig | 1 - configs/ls1043aqds_nor_ddr3_defconfig | 1 - configs/ls1043aqds_qspi_defconfig | 1 - configs/ls1043aqds_sdcard_ifc_defconfig | 1 - configs/ls1043aqds_sdcard_qspi_defconfig | 1 - configs/ls1043aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1043aqds_tfa_defconfig | 1 - configs/ls1043ardb_SECURE_BOOT_defconfig | 1 - configs/ls1043ardb_defconfig | 1 - configs/ls1043ardb_nand_SECURE_BOOT_defconfig | 1 - configs/ls1043ardb_nand_defconfig | 1 - .../ls1043ardb_sdcard_SECURE_BOOT_defconfig | 1 - configs/ls1043ardb_sdcard_defconfig | 1 - configs/ls1043ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1043ardb_tfa_defconfig | 1 - configs/ls1046aqds_SECURE_BOOT_defconfig | 1 - configs/ls1046aqds_defconfig | 1 - configs/ls1046aqds_lpuart_defconfig | 1 - configs/ls1046aqds_nand_defconfig | 1 - configs/ls1046aqds_qspi_defconfig | 1 - configs/ls1046aqds_sdcard_ifc_defconfig | 1 - configs/ls1046aqds_sdcard_qspi_defconfig | 1 - configs/ls1046aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1046aqds_tfa_defconfig | 1 - configs/ls1046ardb_emmc_defconfig | 1 - configs/ls1046ardb_qspi_SECURE_BOOT_defconfig | 1 - configs/ls1046ardb_qspi_defconfig | 1 - configs/ls1046ardb_qspi_spl_defconfig | 1 - .../ls1046ardb_sdcard_SECURE_BOOT_defconfig | 1 - configs/ls1046ardb_sdcard_defconfig | 1 - configs/ls1046ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1046ardb_tfa_defconfig | 1 - configs/ls1088aqds_qspi_SECURE_BOOT_defconfig | 1 - configs/ls1088aqds_qspi_defconfig | 1 - configs/ls1088aqds_tfa_defconfig | 1 - configs/ls1088ardb_qspi_SECURE_BOOT_defconfig | 1 - configs/ls1088ardb_qspi_defconfig | 1 - configs/ls1088ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1088ardb_tfa_defconfig | 1 - configs/ls2080aqds_SECURE_BOOT_defconfig | 1 - configs/ls2080aqds_defconfig | 1 - configs/ls2080aqds_nand_defconfig | 1 - configs/ls2080aqds_qspi_defconfig | 1 - configs/ls2080aqds_sdcard_defconfig | 1 - configs/ls2080ardb_SECURE_BOOT_defconfig | 1 - configs/ls2080ardb_defconfig | 1 - configs/ls2080ardb_nand_defconfig | 1 - configs/ls2081ardb_defconfig | 1 - configs/ls2088aqds_tfa_defconfig | 1 - configs/ls2088ardb_qspi_SECURE_BOOT_defconfig | 1 - configs/ls2088ardb_qspi_defconfig | 1 - configs/ls2088ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/ls2088ardb_tfa_defconfig | 1 - configs/lx2160aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/lx2160aqds_tfa_defconfig | 1 - configs/lx2160ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/lx2160ardb_tfa_defconfig | 1 - configs/lx2160ardb_tfa_stmm_defconfig | 4 - configs/lx2162aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/lx2162aqds_tfa_defconfig | 1 - .../lx2162aqds_tfa_verified_boot_defconfig | 1 - configs/mt7623n_bpir2_defconfig | 1 - configs/mt7629_rfb_defconfig | 1 - configs/mt8183_pumpkin_defconfig | 1 - configs/mt8516_pumpkin_defconfig | 1 - configs/mvebu_puzzle-m801-88f8040_defconfig | 1 - configs/mx6memcal_defconfig | 1 - configs/octeontx2_95xx_defconfig | 1 - configs/octeontx2_96xx_defconfig | 1 - configs/octeontx_81xx_defconfig | 1 - configs/octeontx_83xx_defconfig | 1 - configs/omap4_sdp4430_defconfig | 1 - configs/opos6uldev_defconfig | 1 - configs/pcm052_defconfig | 1 - configs/phycore-am335x-r2-regor_defconfig | 1 - configs/phycore-am335x-r2-wega_defconfig | 1 - configs/pxm2_defconfig | 2 +- configs/qemu-riscv32_defconfig | 2 - configs/qemu-riscv32_smode_defconfig | 2 - configs/qemu-riscv64_defconfig | 2 - configs/qemu-riscv64_smode_defconfig | 2 - configs/qemu-x86_64_defconfig | 2 - configs/qemu-x86_defconfig | 2 - configs/qemu_arm64_defconfig | 2 - configs/qemu_arm_defconfig | 2 - configs/r8a779a0_falcon_defconfig | 3 +- configs/rastaban_defconfig | 2 +- configs/roc-cc-rk3308_defconfig | 1 - configs/rock-pi-n10-rk3399pro_defconfig | 1 - configs/rock-pi-n8-rk3288_defconfig | 1 - configs/rut_defconfig | 2 +- configs/sama5d27_wlsom1_ek_mmc_defconfig | 1 - .../sama5d27_wlsom1_ek_qspiflash_defconfig | 1 - configs/sama5d2_icp_mmc_defconfig | 1 - configs/sama7g5ek_mmc1_defconfig | 1 - configs/sama7g5ek_mmc_defconfig | 1 - configs/sandbox64_defconfig | 9 - configs/sandbox_defconfig | 9 - configs/sandbox_flattree_defconfig | 2 - configs/sandbox_noinst_defconfig | 2 - configs/sandbox_spl_defconfig | 2 - configs/sipeed_maix_bitm_defconfig | 1 - configs/sipeed_maix_smode_defconfig | 1 - configs/socfpga_de1_soc_defconfig | 1 - configs/somlabs_visionsom_6ull_defconfig | 1 - configs/stemmy_defconfig | 1 - configs/stm32mp15_basic_defconfig | 3 - configs/stm32mp15_trusted_defconfig | 3 - configs/tbs2910_defconfig | 1 - configs/thuban_defconfig | 2 +- configs/tools-only_defconfig | 1 - configs/vf610twr_defconfig | 1 - configs/vf610twr_nand_defconfig | 1 - configs/xenguest_arm64_defconfig | 1 - configs/xilinx_versal_mini_defconfig | 1 - configs/xilinx_versal_mini_emmc0_defconfig | 1 - configs/xilinx_versal_mini_emmc1_defconfig | 1 - configs/xilinx_versal_virt_defconfig | 2 - configs/xilinx_zynqmp_mini_defconfig | 1 - configs/xilinx_zynqmp_mini_emmc0_defconfig | 1 - configs/xilinx_zynqmp_mini_emmc1_defconfig | 1 - configs/xilinx_zynqmp_mini_nand_defconfig | 1 - .../xilinx_zynqmp_mini_nand_single_defconfig | 1 - configs/xilinx_zynqmp_mini_qspi_defconfig | 1 - configs/xilinx_zynqmp_r5_defconfig | 1 - configs/xilinx_zynqmp_virt_defconfig | 9 - configs/zynq_cse_nand_defconfig | 1 - configs/zynq_cse_nor_defconfig | 1 - configs/zynq_cse_qspi_defconfig | 1 - disk/part_efi.c | 11 +- drivers/core/Kconfig | 1 + fs/btrfs/Kconfig | 1 + include/efi_loader.h | 187 +++++++++--------- lib/Kconfig | 8 + lib/Makefile | 2 +- lib/efi_loader/Kconfig | 5 +- 198 files changed, 160 insertions(+), 378 deletions(-) -- 2.32.0.93.g670b81a890-goog