]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Generalise block device boot to support arbitrary EFI handles
authorMichael Brown <mcb30@ipxe.org>
Mon, 4 Mar 2024 14:21:59 +0000 (14:21 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 4 Mar 2024 15:25:25 +0000 (15:25 +0000)
commit37edfea72be8d202d2590c89e9b8416f3c615216
treec214704d3d4dd0844e48aa04f1f327e2b487160b
parenteb720d2224c3d0b311f526c922c7388819d97778
[efi] Generalise block device boot to support arbitrary EFI handles

SAN devices created by iPXE are visible to the firmware, and may be
accessed using the firmware's standard block I/O device interface
(e.g. INT 13 for BIOS, or EFI_BLOCK_IO_PROTOCOL for UEFI).  The iPXE
code to perform a SAN boot acts as a client of this standard block I/O
device interface, even when the underlying block I/O is being
performed by iPXE itself.

We rely on this separation to allow the "sanboot" command to be used
to boot from a local disk: since the code to perform a SAN boot does
not need direct access to an underlying iPXE SAN device, it may be
used to boot from any device providing the firmware's standard block
I/O device interface.

Clean up the EFI SAN boot code to require only a drive number and an
EFI_BLOCK_IO_PROTOCOL handle, in preparation for adding support for
booting from a local disk under UEFI.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_block.c