public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: u-boot@lists.denx.de, Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>
Subject: Re: [PATCH 0/4] introduce EFI_RAM_DISK_PROTOCOL
Date: Fri, 7 Jul 2023 14:17:25 +0900	[thread overview]
Message-ID: <ZKef5RAtGShhpoK2@laputa> (raw)
In-Reply-To: <20230707040045.485790-1-masahisa.kojima@linaro.org>

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
> 

  parent reply	other threads:[~2023-07-07  5:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  4:00 [PATCH 0/4] introduce EFI_RAM_DISK_PROTOCOL Masahisa Kojima
2023-07-07  4:00 ` [PATCH 1/4] efi_loader: add RAM disk device path Masahisa Kojima
2023-07-07  4:00 ` [PATCH 2/4] efi_loader: add EFI_RAM_DISK_PROTOCOL implementation Masahisa Kojima
2023-07-07  4:00 ` [PATCH 3/4] cmd: efidebug: add RAM disk mount command Masahisa Kojima
2023-07-07  4:00 ` [PATCH 4/4] efi_selftest: add EFI_RAM_DISK_PROTOCOL selftest Masahisa Kojima
2023-07-07  5:17 ` AKASHI Takahiro [this message]
2023-07-07  6:29 ` [PATCH 0/4] introduce EFI_RAM_DISK_PROTOCOL Heinrich Schuchardt
2023-07-07  7:16   ` AKASHI Takahiro
2023-07-07  8:19     ` Masahisa Kojima
2023-07-07  9:12       ` AKASHI Takahiro
2023-07-10  2:13         ` Masahisa Kojima
2023-07-10  2:28           ` AKASHI Takahiro
2023-07-11  6:23             ` Masahisa Kojima
2023-07-11 19:13               ` Simon Glass
2023-07-12  6:41                 ` Heinrich Schuchardt
2023-07-12 14:00                   ` Simon Glass
2023-07-07  8:10   ` Masahisa Kojima

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZKef5RAtGShhpoK2@laputa \
    --to=takahiro.akashi@linaro.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=masahisa.kojima@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox