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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C1642EB64DA for ; Fri, 7 Jul 2023 05:17:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9DF02860BB; Fri, 7 Jul 2023 07:17:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="U0cqECBJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CAF548470A; Fri, 7 Jul 2023 07:17:32 +0200 (CEST) Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (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 0563C86154 for ; Fri, 7 Jul 2023 07:17:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1b89b0c73d7so1881005ad.1 for ; Thu, 06 Jul 2023 22:17:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688707048; x=1691299048; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=q8DbOMaYVImysDM5dkjeZ9A+OaWosNgWLANf+jBuKhs=; b=U0cqECBJvn/cxmJlaNgHOiW7PVLbIhkR8jFyXUUukwghmSwRzc5QgnOtG7rYsZpFsJ IvaSpmtHhDAQXg1hKnQ+necHHZj2kGSPMTJVO4mghE4Ehj00A4TKuceJONbb0zCFfk5p 3nLYzKUWTzgfwTPefrcntt7lLAHBxiOzuXO067nstEhvNh1Auf7UvFbAY8FtRj9S/YZP +3esq+YHBMD17ilNWwpzVaQ2+lj05YyJGQZvJUF7oXYU1akejL2uV5WzuVtVGdVqT0sY NQrj9WOALTnzVwzfBbFmCLpbVGAqPzNwXE7rqVanmiCYT9aFHq1XmNf9yAQUBlPjnawn nCag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688707048; x=1691299048; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=q8DbOMaYVImysDM5dkjeZ9A+OaWosNgWLANf+jBuKhs=; b=l9PAGDWv7Lr/Pze6Z4aCcpRr2ZMT1h8Y19iZljjp6SzMEM7XwaIyQtRq+/pBz4TZ9D /MWK2D/qOYKdL3tdQbS6JqlsWb7eH8PdiUTOM7daN4MtMNMCy3n3ZF35VcN2sl3Teg6A 6C0j/RsPhZ1fiOxLqFByDEwaVJ4slieRisfQAJ8Q60RDTqjM3B/agViD4ZLyC9hJeT0W Xthu4jd1Mgrv2ha2x364HSeSqFHs7ykWUpzUDC+YVHkow7eG/95GR5cqNmdK7a3Td+9m OVJh52gKq8EwAOjVRhwtlYQ+D84Pj4ZpXKSALohUnTExEm4RAUM0x2ivu7xL6NnB8KTr 0IhQ== X-Gm-Message-State: ABy/qLblFxInI4X7EsWTME35iMPKOAop2l1pP2yH4K+u/4WeN1RGSC+r zsKqAwgcxDh3atfFolOoC0kDAw== X-Google-Smtp-Source: APBJJlGykqJQFEkmgAmUqTnlI4wTI8BD72vhmzKtsMakNkJWWIM9hbs4BcBGp7dnTWcUsLEkJ6r1qQ== X-Received: by 2002:a05:6a20:8e2a:b0:125:6443:4eb8 with SMTP id y42-20020a056a208e2a00b0012564434eb8mr4941204pzj.5.1688707048158; Thu, 06 Jul 2023 22:17:28 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:183b:6d83:5ded:d465]) by smtp.gmail.com with ESMTPSA id b18-20020aa78712000000b0066684d8115bsm2128234pfo.178.2023.07.06.22.17.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 22:17:27 -0700 (PDT) Date: Fri, 7 Jul 2023 14:17:25 +0900 From: AKASHI Takahiro To: Masahisa Kojima Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Ilias Apalodimas Subject: Re: [PATCH 0/4] introduce EFI_RAM_DISK_PROTOCOL Message-ID: Mail-Followup-To: AKASHI Takahiro , Masahisa Kojima , u-boot@lists.denx.de, Heinrich Schuchardt , Ilias Apalodimas References: <20230707040045.485790-1-masahisa.kojima@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230707040045.485790-1-masahisa.kojima@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean On Fri, Jul 07, 2023 at 01:00:40PM +0900, Masahisa Kojima wrote: > This series introduces the EFI_RAM_DISK_PROTOCOL implementation. > The major purpose of this series is a preparation for EFI HTTP(S) boot. > > Now U-Boot can download the distro installer ISO image > via wget or tftpboot commands, but U-Boot can not mount > the downloaded ISO image. > By calling EFI_RAM_DISK_PROTOCOL->register API, user can > mount the ISO image and boot the distro installer. > > Note that the installation process may not proceed > after the distro installer calls ExitBootServices() > since there is no hand-off process for the block device of > memory mapped ISO image. > > The EFI_RAM_DISK_PROTOCOL was tested with the > debian network installer[1] on qemu_arm64 platform. > The example procedure is as follows. > => tftpboot 41000000 mini.iso > => efidebug disk load 41000000 $filesize Can a disk created here be used natively on U-Boot with commands like (fs)ls or (fs)load? If so, it would be nice to mention the fact. -Takahiro Akashi > After these commands, ISO image is mounted like: > > => efidebug dh > > 000000007eec5910 (efiblk#0) > /RamDisk(0x41000000,4974afff,3d5abd30-4175-87ce-6d64-d2ade523c4bb,0x0) > Block IO > > 000000007eec6140 (efiblk#0:1) > /RamDisk(0x41000000,4974afff,3d5abd30-4175-87ce-6d64-d2ade523c4bb,0x0)/HD(1,0x01,0,0x0,0x33800) > Block IO > > 000000007eec62b0 (efiblk#0:2) > /RamDisk(0x41000000,4974afff,3d5abd30-4175-87ce-6d64-d2ade523c4bb,0x0)/HD(2,0x01,0,0x33800,0x10000) > Block IO > System Partition > Simple File System > > => dm tree > > blk 0 [ + ] efi_blk `-- efiblk#0 > partition 0 [ + ] blk_partition |-- efiblk#0:1 > partition 1 [ + ] blk_partition `-- efiblk#0:2 > > Debian can be successfully installed with this RAM disk on QEMU. > > [TODO] > - udevices created in ./lib/efi_driver/efi_block_device.c::efi_bl_bind() > are not removed when the efi_handle is removed. > So after unload the RAM disk, udevices still exist. > I plan to add a udevice removal process in ./lib/efi_driver/efi_uclass.c::efi_uc_stop(). > In addition, I also plan to add unbind() callback in struct efi_driver_ops. > > > [1] https://deb.debian.org/debian/dists/bookworm/main/installer-arm64/current/images/netboot/mini.iso > > Masahisa Kojima (4): > efi_loader: add RAM disk device path > efi_loader: add EFI_RAM_DISK_PROTOCOL implementation > cmd: efidebug: add RAM disk mount command > efi_selftest: add EFI_RAM_DISK_PROTOCOL selftest > > cmd/efidebug.c | 117 ++++++ > include/efi_api.h | 32 ++ > include/efi_loader.h | 4 + > lib/efi_driver/efi_uclass.c | 7 +- > lib/efi_loader/Kconfig | 6 + > lib/efi_loader/Makefile | 1 + > lib/efi_loader/efi_device_path_to_text.c | 14 + > lib/efi_loader/efi_ram_disk.c | 334 +++++++++++++++ > lib/efi_loader/efi_setup.c | 6 + > lib/efi_selftest/Makefile | 1 + > lib/efi_selftest/efi_selftest_ram_disk.c | 511 +++++++++++++++++++++++ > lib/uuid.c | 4 + > 12 files changed, 1035 insertions(+), 2 deletions(-) > create mode 100644 lib/efi_loader/efi_ram_disk.c > create mode 100644 lib/efi_selftest/efi_selftest_ram_disk.c > > > base-commit: e2e2aea5733f0d23cd9593bbefe5c803c552dcb9 > -- > 2.34.1 >