Skip to content
Browse files
[efi] Allow user experience to be downgraded
iPXE does not currently provide EFI_PXE_BASE_CODE_PROTOCOL: this
causes failures when chainloading bootloaders such as shim.efi which
assume that this protocol will be present.

Provide the ability to work around these problems via the build
configuration option EFI_DOWNGRADE_UX.  If this option is enabled,
then we will not install our usual EFI_LOAD_FILE_PROTOCOL
implementation, thereby allowing the platform firmware to install its
own EFI_PXE_BASE_CODE_PROTOCOL implementation on top of our

A somewhat major side-effect of this workaround is that almost all
iPXE features will be disabled.

This configuration option will be removed in future when support for

Requested-by: Laszlo Ersek <>
Requested-by: Gerd Hoffmann <>
Signed-off-by: Michael Brown <>
  • Loading branch information
mcb30 committed Jul 22, 2015
1 parent 88a5f56 commit a15c0d7e868a881d4416ad20eddad1854ff95005
Showing 2 changed files with 35 additions and 0 deletions.
@@ -167,6 +167,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#undef GDBSERIAL /* Remote GDB debugging over serial */
#undef GDBUDP /* Remote GDB debugging over UDP
* (both may be set) */
//#define EFI_DOWNGRADE_UX /* Downgrade UEFI user experience */

#include <config/named.h>
#include NAMED_CONFIG(general.h)
@@ -34,13 +34,47 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/efi/efi_utils.h>
#include <ipxe/efi/efi_snp.h>
#include <usr/autoboot.h>
#include <config/general.h>

/** List of SNP devices */
static LIST_HEAD ( efi_snp_devices );

/** Network devices are currently claimed for use by iPXE */
static int efi_snp_claimed;

/* Downgrade user experience if configured to do so
* The default UEFI user experience for network boot is somewhat
* excremental: only TFTP is available as a download protocol, and if
* anything goes wrong the user will be shown just a dot on an
* otherwise blank screen. (Some programmer was clearly determined to
* win a bet that they could outshine Apple at producing uninformative
* error messages.)
* For comparison, the default iPXE user experience provides the
* option to use protocols designed more recently than 1980 (such as
* HTTP and iSCSI), and if anything goes wrong the the user will be
* shown one of over 1200 different error messages, complete with a
* link to a wiki page describing that specific error.
* We default to upgrading the user experience to match that available
* in a "legacy" BIOS environment, by installing our own instance of
* Note that unfortunately we can't sensibly provide the choice of
* both options to the user in the same build, because the UEFI boot
* menu ignores the multitude of ways in which a network device handle
* can be described and opaquely labels both menu entries as just "EFI
* Network".
static EFI_GUID dummy_load_file_protocol_guid = {
0x6f6c7323, 0x2077, 0x7523,
{ 0x6e, 0x68, 0x65, 0x6c, 0x70, 0x66, 0x75, 0x6c }
#define efi_load_file_protocol_guid dummy_load_file_protocol_guid

* Set EFI SNP mode state

0 comments on commit a15c0d7

Please sign in to comment.