david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/include
Michael Brown 3376fa520b [efi] Implement the EFI_PXE_BASE_CODE_PROTOCOL
Many UEFI NBPs expect to find an EFI_PXE_BASE_CODE_PROTOCOL installed
in addition to the EFI_SIMPLE_NETWORK_PROTOCOL.  Most NBPs use the
EFI_PXE_BASE_CODE_PROTOCOL only to retrieve the cached DHCP packets.

This implementation has been tested with grub.efi, shim.efi,
syslinux.efi, and wdsmgfw.efi.  Some methods (such as Discover() and
Arp()) are not used by any known NBP and so have not (yet) been
implemented.

Usage notes for the tested bootstraps are:

  - grub.efi uses EFI_PXE_BASE_CODE_PROTOCOL only to retrieve the
    cached DHCP packet, and uses no other methods.

  - shim.efi uses EFI_PXE_BASE_CODE_PROTOCOL to retrieve the cached
    DHCP packet and to retrieve the next NBP via the Mtftp() method.
    If shim.efi was downloaded via HTTP (or other non-TFTP protocol)
    then shim.efi will blindly call Mtftp() with an HTTP URI as the
    filename: this allows the next NBP (e.g. grubx64.efi) to also be
    transparently retrieved by HTTP.

    shim.efi can also use the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL to
    retrieve files previously loaded by "imgfetch" or similar commands
    in iPXE.  The current implementation of shim.efi will use the
    EFI_SIMPLE_FILE_SYSTEM_PROTOCOL only if it does not find an
    EFI_PXE_BASE_CODE_PROTOCOL; this patch therefore prevents this
    usage of our EFI_SIMPLE_FILE_SYSTEM_PROTOCOL.  This logic could be
    trivially reversed in shim.efi if needed.

  - syslinux.efi uses EFI_PXE_BASE_CODE_PROTOCOL only to retrieve the
    cached DHCP packet.  Versions 6.03 and earlier have a bug which
    may cause syslinux.efi to attach to the wrong NIC if there are
    multiple NICs in the system (or if the UEFI firmware supports
    IPv6).

  - wdsmgfw.efi (ab)uses EFI_PXE_BASE_CODE_PROTOCOL to retrieve the
    cached DHCP packets, and to send and retrieve UDP packets via the
    UdpWrite() and UdpRead() methods.  (This was presumably done in
    order to minimise the amount of benefit obtainable by switching to
    UEFI, by replicating all of the design mistakes present in the
    original PXE specification.)

The EFI_DOWNGRADE_UX configuration option remains available for now,
until this implementation has received more widespread testing.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-09-02 13:45:12 +01:00
..
hci [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 16:35:29 +00:00
ipxe [efi] Implement the EFI_PXE_BASE_CODE_PROTOCOL 2015-09-02 13:45:12 +01:00
readline [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 16:35:29 +00:00
sys [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
usr [test] Allow self-tests to report exit status when running under Linux 2015-08-21 15:46:28 +01:00
valgrind [malloc] Move valgrind headers out of arch/x86 2015-03-03 14:25:51 +00:00
xen [xen] Import selected public headers 2014-07-29 15:20:49 +01:00
alloca.h alloca() can be useful in some (limited) circumstances. 2007-01-11 23:19:31 +00:00
assert.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
byteswap.h [libc] Rewrite byte-swapping code 2015-03-02 16:35:37 +00:00
coff.h Initial revision 2005-03-08 18:53:11 +00:00
compiler.h [build] Fix the REQUIRE_SYMBOL mechanism 2015-03-05 00:59:38 +00:00
cpu.h Initial revision 2005-03-08 18:53:11 +00:00
ctype.h [libc] Rewrite unrelicensable portions of ctype.h 2015-03-02 16:35:37 +00:00
curses.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 16:35:29 +00:00
elf.h [elf] Rewrite ELF header 2015-03-02 19:42:48 +00:00
endian.h [libc] Rewrite byte-swapping code 2015-03-02 16:35:37 +00:00
errno.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
etherboot.h [console] Move putchar() and getchar() declarations to stdio.h 2012-03-26 14:43:52 +01:00
fs.h Initial revision 2005-03-08 18:53:11 +00:00
getopt.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
i82365.h [legal] Add FILE_LICENCE macro to some GPL-v2 files 2010-12-03 23:23:35 +00:00
libgen.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
linux_api.h [linux] Add support for accessing PCI configuration space via /proc/bus/pci 2013-07-13 12:44:45 +02:00
mii.h [mii] Synchronise constants with current Linux include/linux/mii.h 2012-04-18 16:32:57 +01:00
nic.h [build] Fix the REQUIRE_SYMBOL mechanism 2015-03-05 00:59:38 +00:00
old_tcp.h Moved old tcp.h to old_tcp.h, to avoid name clash with new (uIP-based) 2006-03-23 20:34:08 +00:00
pc_kbd.h Initial revision 2005-03-08 18:53:11 +00:00
pcmcia-opts.h Initial revision 2005-03-08 18:53:11 +00:00
pcmcia.h Dead code removal. 2007-07-14 15:42:26 +01:00
stdarg.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
stddef.h [libc] Rewrite unrelicensable portions of stddef.h 2015-03-02 16:35:37 +00:00
stdint.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 16:35:29 +00:00
stdio.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
stdlib.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 16:35:29 +00:00
string.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
strings.h [libc] Add ffs(), ffsl(), and ffsll() 2015-03-16 15:40:53 +00:00
sys_info.h Initial revision 2005-03-08 18:53:11 +00:00
syslog.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
time.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
unistd.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 14:17:31 +00:00
wchar.h [legal] Relicense files under GPL2_OR_LATER_OR_UBDL 2015-03-02 16:35:29 +00:00