[gigaboot] Delete gnu-efi and stop doing relocations at runtime

With a carefully hand-crafted set of compiler and linker flags, it is
possible to build EFI images that do not need any relocations (for
x86-64 at least). This does forbid static initialization of addresses
though, which is not too big of a problem. The build will fail if an
image has relocations.

The entry point to our EFI images is now efi_main, but requires the
MS x64 calling convention. Prefix with EFIABI to use this convention.

Change-Id: I0e6fb38d6eb67aa79a9e5e5f3a1d0063e151355f
diff --git a/Makefile b/Makefile
index bf81490..56c903b 100644
--- a/Makefile
+++ b/Makefile
@@ -7,27 +7,20 @@
 EFI_TOOLCHAIN	:=
 EFI_CC		:= $(EFI_TOOLCHAIN)gcc
 EFI_LD		:= $(EFI_TOOLCHAIN)ld
+EFI_READELF	:= $(EFI_TOOLCHAIN)readelf
 EFI_OBJCOPY	:= $(EFI_TOOLCHAIN)objcopy
 EFI_AR		:= $(EFI_TOOLCHAIN)ar
 
-EFI_PATH	:= third_party/gnu-efi
-EFI_LIB_PATHS	:= $(EFI_PATH)/$(ARCH)/gnuefi out
+EFI_LINKSCRIPT	:= build/efi-x86-64.lds
 
-EFI_CRT0	:= $(EFI_PATH)/$(ARCH)/gnuefi/crt0-efi-$(ARCH).o
-EFI_LINKSCRIPT	:= $(EFI_PATH)/gnuefi/elf_$(ARCH)_efi.lds
-
-EFI_CFLAGS	:= -fpic -fshort-wchar -fno-stack-protector -mno-red-zone
-EFI_CFLAGS	+= -Wall
-EFI_CFLAGS	+= -std=c99
+EFI_CFLAGS	:= -fPIE -fshort-wchar -fno-stack-protector -mno-red-zone
+EFI_CFLAGS	+= -Wall -std=c99
 EFI_CFLAGS	+= -ffreestanding -nostdinc -Iinclude -Isrc -Ithird_party/lk/include
-EFI_CFLAGS	+= $(patsubst %,-I%,$(EFI_INC_PATHS))
-EFI_CFLAGS	+= -ggdb
 
-EFI_LDFLAGS	:= -nostdlib -znocombreloc -T $(EFI_LINKSCRIPT)
-EFI_LDFLAGS	+= -shared -Bsymbolic
-EFI_LDFLAGS	+= $(patsubst %,-L%,$(EFI_LIB_PATHS))
+EFI_LDFLAGS	:= -nostdlib -T $(EFI_LINKSCRIPT) -pie
+EFI_LDFLAGS	+= -Lout
 
-EFI_LIBS	:= -lutils -lgnuefi
+EFI_LIBS	:= -lutils
 
 what_to_build::	all
 
@@ -90,17 +83,14 @@
 
 -include $(DEPS)
 
-# ensure gnu-efi gets built
-$(EFI_CRT0):
-	@echo building: gnu-efi
-	$(QUIET)$(MAKE) -C $(EFI_PATH)
-
 QEMU_OPTS := -cpu qemu64
 QEMU_OPTS += -bios third_party/ovmf/OVMF.fd
 QEMU_OPTS += -drive file=out/disk.img,format=raw,if=ide
 QEMU_OPTS += -serial stdio
 QEMU_OPTS += -m 256M
-QEMU_OPTS += -usbdevice host:0b95:772b
+ifneq ($(USBDEV),)
+    QEMU_OPTS += -usbdevice host:$(USBDEV)
+endif
 
 qemu-e1000: QEMU_OPTS += -netdev type=tap,ifname=qemu,script=no,id=net0 -net nic,model=e1000,netdev=net0
 qemu-e1000: all
@@ -121,4 +111,3 @@
 	rm -rf out
 
 all-clean: clean
-	make -C third_party/gnu-efi clean
diff --git a/README.txt b/README.txt
index 351a5bd..029bed8 100644
--- a/README.txt
+++ b/README.txt
@@ -5,23 +5,15 @@
 firmware for the purpose of exploring UEFI development and bootloader
 development.
 
+Since UEFI images are in PE32+ file format, we require that our binaries be
+position independent executables with no relocations. For the most part this
+does not require any extra effort on x86-64, but it does mean that you cannot
+statically initialize any variables that hold an address. (These addresses may
+be assigned at runtime however.)
 
 External Software Included
 --------------------------
 
-Local Path:   third_party/gnu-efi/...
-Description:  headers and tooling to build UEFI binaries with gcc, etc
-Project:      https://sourceforge.net/projects/gnu-efi/
-Source:       git://git.code.sf.net/p/gnu-efi/code
-Version:      6605c16fc8b1fd3b2085364902d1fa73aa7fad76 (post-3.0.4)
-License:      BSD-ish, see gnu-efi/README.*
-
-Local Path:   third_party/edk2/...
-Description:  ax88772b UEFI driver, as well as headers for UEFI from Tianocore EDK II
-Project:      http://www.tianocore.org/edk2/
-Source:       https://github.com/tianocore/edk2
-License:      BSD-ish, see headers
-
 Local Path:   third_party/ovmf/...
 Description:  UEFI Firmware Suitable for use in Qemu
 Distribution: http://www.tianocore.org/ovmf/
diff --git a/build/build.mk b/build/build.mk
index ff9abb2..c06a54c 100644
--- a/build/build.mk
+++ b/build/build.mk
@@ -8,14 +8,9 @@
 
 QUIET	?= @
 
-EFI_SECTIONS	:= .text .sdata .data .dynamic .dynsym
-EFI_SECTIONS	+= .rel .rela .reloc .eh_frame
+EFI_SECTIONS	:= .text .data .reloc
 EFI_SECTIONS	:= $(patsubst %,-j %,$(EFI_SECTIONS))
 
-DBG_SECTIONS	:= .debug_info .debug_abbrev .debug_loc .debug_aranges
-DBG_SECTIONS	+= .debug_line .debug_macinfo .debug_str
-DBG_SECTIONS	:= $(EFI_SECTIONS) $(patsubst %,-j %,$(DBG_SECTIONS))
-
 ifneq ($(VERBOSE),)
 $(info CFLAGS   := $(EFI_CFLAGS))
 $(info LDFLAGS  := $(EFI_LDFLAGS))
@@ -33,25 +28,23 @@
 	$(QUIET)$(EFI_OBJCOPY) --target=efi-app-$(ARCH) $(EFI_SECTIONS) $< $@
 	$(QUIET)if [ "`nm $< | grep ' U '`" != "" ]; then echo "error: $<: undefined symbols"; nm $< | grep ' U '; rm $<; exit 1; fi
 
-out/%.dbg: out/%.so
-	@mkdir -p $(dir $@)
-	@echo building: $@
-	$(QUIET)$(EFI_OBJCOPY) --target=efi-app-$(ARCH) $(DBG_SECTIONS) $< $@
-
-
 # _efi_app <basename> <obj-files> <dep-files>
 define _efi_app
-ALL	+= out/$1.efi out/$1.dbg
+ALL	+= out/$1.efi
 APPS	+= out/$1.efi
 DEPS	+= $3
 out/$1.so: $2 $(EFI_CRT0) out/libutils.a
 	@mkdir -p $$(dir $$@)
 	@echo linking: $$@
-	$(QUIET)$(EFI_LD) -o $$@ $(EFI_LDFLAGS) $(EFI_CRT0) $2 $(EFI_LIBS)
+	$(QUIET)$(EFI_LD) -o $$@ $(EFI_LDFLAGS) $2 $(EFI_LIBS)
+	@if ! $(EFI_READELF) -r $$@ | grep -q 'no relocations'; then \
+	    echo "error: $$@ has relocations"; \
+	    $(EFI_READELF) -r $$@; \
+	    rm $$@; \
+	    exit 1;\
+	fi
 endef
 
 efi_app = $(eval $(call _efi_app,$(strip $1),\
 $(patsubst %.c,out/%.o,$2),\
 $(patsubst %.c,out/%.d,$2)))
-
-
diff --git a/build/efi-x86-64.lds b/build/efi-x86-64.lds
new file mode 100644
index 0000000..5c0d8f9
--- /dev/null
+++ b/build/efi-x86-64.lds
@@ -0,0 +1,47 @@
+OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
+OUTPUT_ARCH(i386:x86-64)
+ENTRY(efi_main)
+SECTIONS
+{
+    . = 0x2000;
+    . = ALIGN(4096);
+    .text :
+    {
+       *(.text)
+       *(.text.*)
+       . = ALIGN(16);
+    }
+
+    . = ALIGN(4096);
+    .data :
+    {
+        *(.rodata*)
+        *(.got.plt)
+        *(.got)
+        *(.data*)
+        *(.sdata)
+        /* TODO: figure out how to move .bss in such a way that the PE32+ loader
+         * doesn't complain.
+         */
+        *(.sbss)
+        *(.scommon)
+        *(.dynbss)
+        *(.bss)
+        *(COMMON)
+        *(.rel.local)
+    }
+
+    . = ALIGN(4096);
+
+    /* A .reloc section is required to flag the final PE32+ file as relocatable.
+     * Here we hardcode one block with one entry to keep the PE32+ loader happy.
+     */
+    _a = .;
+    . = ALIGN(4096);
+    .reloc :
+    {
+        LONG(. - _a);
+        LONG(10);
+        SHORT(0);
+    }
+}
diff --git a/lib/utils.c b/lib/utils.c
index 4dc2cd8..05316d6 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -12,47 +12,6 @@
 #include <printf.h>
 #include <utils.h>
 
-#define ERR_ENTRY(x) { #x, L"" #x }
-typedef struct {
-    const char* str;
-    const char16_t* w_str;
-} err_entry_t;
-
-err_entry_t efi_error_labels[] = {
-    ERR_ENTRY(EFI_SUCCESS),
-    ERR_ENTRY(EFI_LOAD_ERROR),
-    ERR_ENTRY(EFI_INVALID_PARAMETER),
-    ERR_ENTRY(EFI_UNSUPPORTED),
-    ERR_ENTRY(EFI_BAD_BUFFER_SIZE),
-    ERR_ENTRY(EFI_BUFFER_TOO_SMALL),
-    ERR_ENTRY(EFI_NOT_READY),
-    ERR_ENTRY(EFI_DEVICE_ERROR),
-    ERR_ENTRY(EFI_WRITE_PROTECTED),
-    ERR_ENTRY(EFI_OUT_OF_RESOURCES),
-    ERR_ENTRY(EFI_VOLUME_CORRUPTED),
-    ERR_ENTRY(EFI_VOLUME_FULL),
-    ERR_ENTRY(EFI_NO_MEDIA),
-    ERR_ENTRY(EFI_MEDIA_CHANGED),
-    ERR_ENTRY(EFI_NOT_FOUND),
-    ERR_ENTRY(EFI_ACCESS_DENIED),
-    ERR_ENTRY(EFI_NO_RESPONSE),
-    ERR_ENTRY(EFI_NO_MAPPING),
-    ERR_ENTRY(EFI_TIMEOUT),
-    ERR_ENTRY(EFI_NOT_STARTED),
-    ERR_ENTRY(EFI_ALREADY_STARTED),
-    ERR_ENTRY(EFI_ABORTED),
-    ERR_ENTRY(EFI_ICMP_ERROR),
-    ERR_ENTRY(EFI_TFTP_ERROR),
-    ERR_ENTRY(EFI_PROTOCOL_ERROR),
-    ERR_ENTRY(EFI_INCOMPATIBLE_VERSION),
-    ERR_ENTRY(EFI_SECURITY_VIOLATION),
-    ERR_ENTRY(EFI_CRC_ERROR),
-    ERR_ENTRY(EFI_END_OF_MEDIA),
-    ERR_ENTRY(EFI_END_OF_FILE),
-    ERR_ENTRY(EFI_INVALID_LANGUAGE),
-    ERR_ENTRY(EFI_COMPROMISED_DATA),
-};
-
 efi_system_table* gSys;
 efi_handle gImg;
 efi_boot_services* gBS;
@@ -127,9 +86,46 @@
 
 const char *efi_strerror(efi_status status)
 {
-    size_t i = (~EFI_ERROR_MASK & status);
-    if (i < sizeof(efi_error_labels)/sizeof(efi_error_labels[0])) {
-        return efi_error_labels[i].str;
+    switch (status) {
+#define ERR_ENTRY(x) \
+    case x: {        \
+        return #x;   \
+    }
+        ERR_ENTRY(EFI_SUCCESS);
+        ERR_ENTRY(EFI_LOAD_ERROR);
+        ERR_ENTRY(EFI_INVALID_PARAMETER);
+        ERR_ENTRY(EFI_UNSUPPORTED);
+        ERR_ENTRY(EFI_BAD_BUFFER_SIZE);
+        ERR_ENTRY(EFI_BUFFER_TOO_SMALL);
+        ERR_ENTRY(EFI_NOT_READY);
+        ERR_ENTRY(EFI_DEVICE_ERROR);
+        ERR_ENTRY(EFI_WRITE_PROTECTED);
+        ERR_ENTRY(EFI_OUT_OF_RESOURCES);
+        ERR_ENTRY(EFI_VOLUME_CORRUPTED);
+        ERR_ENTRY(EFI_VOLUME_FULL);
+        ERR_ENTRY(EFI_NO_MEDIA);
+        ERR_ENTRY(EFI_MEDIA_CHANGED);
+        ERR_ENTRY(EFI_NOT_FOUND);
+        ERR_ENTRY(EFI_ACCESS_DENIED);
+        ERR_ENTRY(EFI_NO_RESPONSE);
+        ERR_ENTRY(EFI_NO_MAPPING);
+        ERR_ENTRY(EFI_TIMEOUT);
+        ERR_ENTRY(EFI_NOT_STARTED);
+        ERR_ENTRY(EFI_ALREADY_STARTED);
+        ERR_ENTRY(EFI_ABORTED);
+        ERR_ENTRY(EFI_ICMP_ERROR);
+        ERR_ENTRY(EFI_TFTP_ERROR);
+        ERR_ENTRY(EFI_PROTOCOL_ERROR);
+        ERR_ENTRY(EFI_INCOMPATIBLE_VERSION);
+        ERR_ENTRY(EFI_SECURITY_VIOLATION);
+        ERR_ENTRY(EFI_CRC_ERROR);
+        ERR_ENTRY(EFI_END_OF_MEDIA);
+        ERR_ENTRY(EFI_END_OF_FILE);
+        ERR_ENTRY(EFI_INVALID_LANGUAGE);
+        ERR_ENTRY(EFI_COMPROMISED_DATA);
+        ERR_ENTRY(EFI_IP_ADDRESS_CONFLICT);
+        ERR_ENTRY(EFI_HTTP_ERROR);
+#undef ERR_ENTRY
     }
 
     return "<Unknown error>";
@@ -137,9 +133,46 @@
 
 const char16_t* efi_wstrerror(efi_status status)
 {
-    size_t i = (~EFI_ERROR_MASK & status);
-    if (i < sizeof(efi_error_labels)/sizeof(efi_error_labels[0])) {
-        return efi_error_labels[i].w_str;
+    switch (status) {
+#define ERR_ENTRY(x)     \
+    case x: {            \
+        return L"" #x;   \
+    }
+        ERR_ENTRY(EFI_SUCCESS);
+        ERR_ENTRY(EFI_LOAD_ERROR);
+        ERR_ENTRY(EFI_INVALID_PARAMETER);
+        ERR_ENTRY(EFI_UNSUPPORTED);
+        ERR_ENTRY(EFI_BAD_BUFFER_SIZE);
+        ERR_ENTRY(EFI_BUFFER_TOO_SMALL);
+        ERR_ENTRY(EFI_NOT_READY);
+        ERR_ENTRY(EFI_DEVICE_ERROR);
+        ERR_ENTRY(EFI_WRITE_PROTECTED);
+        ERR_ENTRY(EFI_OUT_OF_RESOURCES);
+        ERR_ENTRY(EFI_VOLUME_CORRUPTED);
+        ERR_ENTRY(EFI_VOLUME_FULL);
+        ERR_ENTRY(EFI_NO_MEDIA);
+        ERR_ENTRY(EFI_MEDIA_CHANGED);
+        ERR_ENTRY(EFI_NOT_FOUND);
+        ERR_ENTRY(EFI_ACCESS_DENIED);
+        ERR_ENTRY(EFI_NO_RESPONSE);
+        ERR_ENTRY(EFI_NO_MAPPING);
+        ERR_ENTRY(EFI_TIMEOUT);
+        ERR_ENTRY(EFI_NOT_STARTED);
+        ERR_ENTRY(EFI_ALREADY_STARTED);
+        ERR_ENTRY(EFI_ABORTED);
+        ERR_ENTRY(EFI_ICMP_ERROR);
+        ERR_ENTRY(EFI_TFTP_ERROR);
+        ERR_ENTRY(EFI_PROTOCOL_ERROR);
+        ERR_ENTRY(EFI_INCOMPATIBLE_VERSION);
+        ERR_ENTRY(EFI_SECURITY_VIOLATION);
+        ERR_ENTRY(EFI_CRC_ERROR);
+        ERR_ENTRY(EFI_END_OF_MEDIA);
+        ERR_ENTRY(EFI_END_OF_FILE);
+        ERR_ENTRY(EFI_INVALID_LANGUAGE);
+        ERR_ENTRY(EFI_COMPROMISED_DATA);
+        ERR_ENTRY(EFI_IP_ADDRESS_CONFLICT);
+        ERR_ENTRY(EFI_HTTP_ERROR);
+#undef ERR_ENTRY
     }
 
     return L"<Unknown error>";
diff --git a/src/fileio.c b/src/fileio.c
index 3e39970..41acad2 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -10,7 +10,7 @@
 #include <stdio.h>
 #include <utils.h>
 
-efi_status efi_main(efi_handle img, efi_system_table* sys) {
+EFIAPI efi_status efi_main(efi_handle img, efi_system_table* sys) {
     efi_loaded_image_protocol* loaded;
     efi_status r;
 
diff --git a/src/hello.c b/src/hello.c
index 45c62bb..3daa682 100644
--- a/src/hello.c
+++ b/src/hello.c
@@ -4,7 +4,7 @@
 
 #include <efi/types.h>
 
-efi_status efi_main(efi_handle img, efi_system_table* sys) {
+EFIAPI efi_status efi_main(efi_handle img, efi_system_table* sys) {
     efi_simple_text_output_protocol* ConOut = sys->ConOut;
     ConOut->OutputString(ConOut, L"Hello, EFI World!\r\n");
     return EFI_SUCCESS;
diff --git a/src/magenta.c b/src/magenta.c
index e4e1b0a..972a88e 100644
--- a/src/magenta.c
+++ b/src/magenta.c
@@ -40,14 +40,17 @@
 #define E820_NVS 4
 #define E820_UNUSABLE 5
 
-const char* e820name[] = {
-    "IGNORE",
-    "RAM",
-    "RESERVED",
-    "ACPI",
-    "NVS",
-    "UNUSABLE",
-};
+static inline const char* e820name(int e820) {
+    switch (e820) {
+    case E820_IGNORE:   return "IGNORE";
+    case E820_RAM:      return "RAM";
+    case E820_RESERVED: return "RESERVED";
+    case E820_ACPI:     return "ACPI";
+    case E820_NVS:      return "NVS";
+    case E820_UNUSABLE: return "UNUSABLE";
+    }
+    return "";
+}
 
 struct e820entry {
     uint64_t addr;
@@ -341,7 +344,7 @@
 
     for (i = 0; i < n; i++) {
         struct e820entry* e = e820table + i;
-        printf("%016lx %016lx %s\n", e->addr, e->size, e820name[e->type]);
+        printf("%016lx %016lx %s\n", e->addr, e->size, e820name(e->type));
     }
 
     r = sys->BootServices->ExitBootServices(img, key);
diff --git a/src/osboot.c b/src/osboot.c
index 5811276..70a0b83 100644
--- a/src/osboot.c
+++ b/src/osboot.c
@@ -282,7 +282,7 @@
     }
 }
 
-efi_status efi_main(efi_handle img, efi_system_table* sys) {
+EFIAPI efi_status efi_main(efi_handle img, efi_system_table* sys) {
     efi_boot_services* bs = sys->BootServices;
 
     InitGoodies(img, sys);
diff --git a/src/showmem.c b/src/showmem.c
index d260ad8..7000293 100644
--- a/src/showmem.c
+++ b/src/showmem.c
@@ -75,7 +75,7 @@
 
 #include <utils.h>
 
-efi_status efi_main(efi_handle img, efi_system_table* sys) {
+EFIAPI efi_status efi_main(efi_handle img, efi_system_table* sys) {
     InitGoodies(img, sys);
     dump_memmap(sys);
     WaitAnyKey();
diff --git a/src/usbtest.c b/src/usbtest.c
index fddd734..47b419b 100644
--- a/src/usbtest.c
+++ b/src/usbtest.c
@@ -71,14 +71,7 @@
     return EFI_SUCCESS;
 }
 
-static efi_driver_binding_protocol MyDriver = {
-    .Supported = MyDriverSupported,
-    .Start = MyDriverStart,
-    .Stop = MyDriverStop,
-    .Version = 32,
-    .ImageHandle = NULL,
-    .DriverBindingHandle = NULL,
-};
+static efi_driver_binding_protocol MyDriver;
 
 void InstallMyDriver(efi_handle img, efi_system_table* sys) {
     efi_boot_services* bs = sys->BootServices;
@@ -86,6 +79,10 @@
     size_t count, i;
     efi_status r;
 
+    MyDriver.Supported = MyDriverSupported;
+    MyDriver.Start = MyDriverStart;
+    MyDriver.Stop = MyDriverStop;
+    MyDriver.Version = 32;
     MyDriver.ImageHandle = img;
     MyDriver.DriverBindingHandle = img;
     r = bs->InstallProtocolInterface(&img, &DriverBindingProtocol,
@@ -126,7 +123,7 @@
         printf("UninstallProtocol failed %lx\n", r);
 }
 
-efi_status efi_main(efi_handle img, efi_system_table* sys) {
+EFIAPI efi_status efi_main(efi_handle img, efi_system_table* sys) {
     InitGoodies(img, sys);
 
     printf("Hello, EFI World\n");
diff --git a/third_party/edk2/IndustryStandard/Usb.h b/third_party/edk2/IndustryStandard/Usb.h
deleted file mode 100644
index c27ea15..0000000
--- a/third_party/edk2/IndustryStandard/Usb.h
+++ /dev/null
@@ -1,386 +0,0 @@
-/** @file

-  Support for USB 2.0 standard.

-

-  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>

-  This program and the accompanying materials

-  are licensed and made available under the terms and conditions of the BSD License

-  which accompanies this distribution.  The full text of the license may be found at

-  http://opensource.org/licenses/bsd-license.php

-

-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

-

-**/

-

-#ifndef __USB_H__

-#define __USB_H__

-

-//

-// Subset of Class and Subclass definitions from USB Specs

-//

-

-//

-// Usb mass storage class code

-//

-#define USB_MASS_STORE_CLASS    0x08

-

-//

-// Usb mass storage subclass code, specify the command set used.

-//

-#define USB_MASS_STORE_RBC      0x01 ///< Reduced Block Commands

-#define USB_MASS_STORE_8020I    0x02 ///< SFF-8020i, typically a CD/DVD device

-#define USB_MASS_STORE_QIC      0x03 ///< Typically a tape device

-#define USB_MASS_STORE_UFI      0x04 ///< Typically a floppy disk driver device

-#define USB_MASS_STORE_8070I    0x05 ///< SFF-8070i, typically a floppy disk driver device.

-#define USB_MASS_STORE_SCSI     0x06 ///< SCSI transparent command set

-

-//

-// Usb mass storage protocol code, specify the transport protocol

-//

-#define USB_MASS_STORE_CBI0     0x00 ///< CBI protocol with command completion interrupt

-#define USB_MASS_STORE_CBI1     0x01 ///< CBI protocol without command completion interrupt

-#define USB_MASS_STORE_BOT      0x50 ///< Bulk-Only Transport

-

-//

-// Standard device request and request type

-// USB 2.0 spec, Section 9.4

-//

-#define USB_DEV_GET_STATUS                  0x00

-#define USB_DEV_GET_STATUS_REQ_TYPE_D       0x80 // Receiver : Device

-#define USB_DEV_GET_STATUS_REQ_TYPE_I       0x81 // Receiver : Interface

-#define USB_DEV_GET_STATUS_REQ_TYPE_E       0x82 // Receiver : Endpoint

-

-#define USB_DEV_CLEAR_FEATURE               0x01

-#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_D    0x00 // Receiver : Device

-#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_I    0x01 // Receiver : Interface

-#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_E    0x02 // Receiver : Endpoint

-

-#define USB_DEV_SET_FEATURE                 0x03

-#define USB_DEV_SET_FEATURE_REQ_TYPE_D      0x00 // Receiver : Device

-#define USB_DEV_SET_FEATURE_REQ_TYPE_I      0x01 // Receiver : Interface

-#define USB_DEV_SET_FEATURE_REQ_TYPE_E      0x02 // Receiver : Endpoint

-

-#define USB_DEV_SET_ADDRESS                 0x05

-#define USB_DEV_SET_ADDRESS_REQ_TYPE        0x00

-

-#define USB_DEV_GET_DESCRIPTOR              0x06

-#define USB_DEV_GET_DESCRIPTOR_REQ_TYPE     0x80

-

-#define USB_DEV_SET_DESCRIPTOR              0x07

-#define USB_DEV_SET_DESCRIPTOR_REQ_TYPE     0x00

-

-#define USB_DEV_GET_CONFIGURATION           0x08

-#define USB_DEV_GET_CONFIGURATION_REQ_TYPE  0x80

-

-#define USB_DEV_SET_CONFIGURATION           0x09

-#define USB_DEV_SET_CONFIGURATION_REQ_TYPE  0x00

-

-#define USB_DEV_GET_INTERFACE               0x0A

-#define USB_DEV_GET_INTERFACE_REQ_TYPE      0x81

-

-#define USB_DEV_SET_INTERFACE               0x0B

-#define USB_DEV_SET_INTERFACE_REQ_TYPE      0x01

-

-#define USB_DEV_SYNCH_FRAME                 0x0C

-#define USB_DEV_SYNCH_FRAME_REQ_TYPE        0x82

-

-

-//

-// USB standard descriptors and reqeust

-//

-#pragma pack(1)

-

-///

-/// Format of Setup Data for USB Device Requests

-/// USB 2.0 spec, Section 9.3

-///

-typedef struct {

-  UINT8           RequestType;

-  UINT8           Request;

-  UINT16          Value;

-  UINT16          Index;

-  UINT16          Length;

-} USB_DEVICE_REQUEST;

-

-///

-/// Standard Device Descriptor

-/// USB 2.0 spec, Section 9.6.1

-///

-typedef struct {

-  UINT8           Length;

-  UINT8           DescriptorType;

-  UINT16          BcdUSB;

-  UINT8           DeviceClass;

-  UINT8           DeviceSubClass;

-  UINT8           DeviceProtocol;

-  UINT8           MaxPacketSize0;

-  UINT16          IdVendor;

-  UINT16          IdProduct;

-  UINT16          BcdDevice;

-  UINT8           StrManufacturer;

-  UINT8           StrProduct;

-  UINT8           StrSerialNumber;

-  UINT8           NumConfigurations;

-} USB_DEVICE_DESCRIPTOR;

-

-///

-/// Standard Configuration Descriptor

-/// USB 2.0 spec, Section 9.6.3

-///

-typedef struct {

-  UINT8           Length;

-  UINT8           DescriptorType;

-  UINT16          TotalLength;

-  UINT8           NumInterfaces;

-  UINT8           ConfigurationValue;

-  UINT8           Configuration;

-  UINT8           Attributes;

-  UINT8           MaxPower;

-} USB_CONFIG_DESCRIPTOR;

-

-///

-/// Standard Interface Descriptor

-/// USB 2.0 spec, Section 9.6.5

-///

-typedef struct {

-  UINT8           Length;

-  UINT8           DescriptorType;

-  UINT8           InterfaceNumber;

-  UINT8           AlternateSetting;

-  UINT8           NumEndpoints;

-  UINT8           InterfaceClass;

-  UINT8           InterfaceSubClass;

-  UINT8           InterfaceProtocol;

-  UINT8           Interface;

-} USB_INTERFACE_DESCRIPTOR;

-

-///

-/// Standard Endpoint Descriptor

-/// USB 2.0 spec, Section 9.6.6

-///

-typedef struct {

-  UINT8           Length;

-  UINT8           DescriptorType;

-  UINT8           EndpointAddress;

-  UINT8           Attributes;

-  UINT16          MaxPacketSize;

-  UINT8           Interval;

-} USB_ENDPOINT_DESCRIPTOR;

-

-///

-/// UNICODE String Descriptor

-/// USB 2.0 spec, Section 9.6.7

-///

-typedef struct {

-  UINT8           Length;

-  UINT8           DescriptorType;

-  CHAR16          String[1];

-} EFI_USB_STRING_DESCRIPTOR;

-

-#pragma pack()

-

-

-typedef enum {

-  //

-  // USB request type

-  //

-  USB_REQ_TYPE_STANDARD   = (0x00 << 5),

-  USB_REQ_TYPE_CLASS      = (0x01 << 5),

-  USB_REQ_TYPE_VENDOR     = (0x02 << 5),

-

-  //

-  // Standard control transfer request type, or the value

-  // to fill in EFI_USB_DEVICE_REQUEST.Request

-  //

-  USB_REQ_GET_STATUS      = 0x00,

-  USB_REQ_CLEAR_FEATURE   = 0x01,

-  USB_REQ_SET_FEATURE     = 0x03,

-  USB_REQ_SET_ADDRESS     = 0x05,

-  USB_REQ_GET_DESCRIPTOR  = 0x06,

-  USB_REQ_SET_DESCRIPTOR  = 0x07,

-  USB_REQ_GET_CONFIG      = 0x08,

-  USB_REQ_SET_CONFIG      = 0x09,

-  USB_REQ_GET_INTERFACE   = 0x0A,

-  USB_REQ_SET_INTERFACE   = 0x0B,

-  USB_REQ_SYNCH_FRAME     = 0x0C,

-

-  //

-  // Usb control transfer target

-  //

-  USB_TARGET_DEVICE       = 0,

-  USB_TARGET_INTERFACE    = 0x01,

-  USB_TARGET_ENDPOINT     = 0x02,

-  USB_TARGET_OTHER        = 0x03,

-

-  //

-  // USB Descriptor types

-  //

-  USB_DESC_TYPE_DEVICE    = 0x01,

-  USB_DESC_TYPE_CONFIG    = 0x02,

-  USB_DESC_TYPE_STRING    = 0x03,

-  USB_DESC_TYPE_INTERFACE = 0x04,

-  USB_DESC_TYPE_ENDPOINT  = 0x05,

-  USB_DESC_TYPE_HID       = 0x21,

-  USB_DESC_TYPE_REPORT    = 0x22,

-

-  //

-  // Features to be cleared by CLEAR_FEATURE requests

-  //

-  USB_FEATURE_ENDPOINT_HALT = 0,

-

-  //

-  // USB endpoint types: 00: control, 01: isochronous, 10: bulk, 11: interrupt

-  //

-  USB_ENDPOINT_CONTROL    = 0x00,

-  USB_ENDPOINT_ISO        = 0x01,

-  USB_ENDPOINT_BULK       = 0x02,

-  USB_ENDPOINT_INTERRUPT  = 0x03,

-

-  USB_ENDPOINT_TYPE_MASK  = 0x03,

-  USB_ENDPOINT_DIR_IN     = 0x80,

-

-  //

-  //Use 200 ms to increase the error handling response time

-  //

-  EFI_USB_INTERRUPT_DELAY = 2000000

-} USB_TYPES_DEFINITION;

-

-

-//

-// HID constants definition, see Device Class Definition

-// for Human Interface Devices (HID) rev1.11

-//

-

-//

-// HID standard GET_DESCRIPTOR request.

-//

-#define USB_HID_GET_DESCRIPTOR_REQ_TYPE  0x81

-

-//

-// HID specific requests.

-//

-#define USB_HID_CLASS_GET_REQ_TYPE       0xa1

-#define USB_HID_CLASS_SET_REQ_TYPE       0x21

-

-//

-// HID report item format

-//

-#define HID_ITEM_FORMAT_SHORT 0

-#define HID_ITEM_FORMAT_LONG  1

-

-//

-// Special tag indicating long items

-//

-#define HID_ITEM_TAG_LONG 15

-

-//

-// HID report descriptor item type (prefix bit 2,3)

-//

-#define HID_ITEM_TYPE_MAIN      0

-#define HID_ITEM_TYPE_GLOBAL    1

-#define HID_ITEM_TYPE_LOCAL     2

-#define HID_ITEM_TYPE_RESERVED  3

-

-//

-// HID report descriptor main item tags

-//

-#define HID_MAIN_ITEM_TAG_INPUT             8

-#define HID_MAIN_ITEM_TAG_OUTPUT            9

-#define HID_MAIN_ITEM_TAG_FEATURE           11

-#define HID_MAIN_ITEM_TAG_BEGIN_COLLECTION  10

-#define HID_MAIN_ITEM_TAG_END_COLLECTION    12

-

-//

-// HID report descriptor main item contents

-//

-#define HID_MAIN_ITEM_CONSTANT      0x001

-#define HID_MAIN_ITEM_VARIABLE      0x002

-#define HID_MAIN_ITEM_RELATIVE      0x004

-#define HID_MAIN_ITEM_WRAP          0x008

-#define HID_MAIN_ITEM_NONLINEAR     0x010

-#define HID_MAIN_ITEM_NO_PREFERRED  0x020

-#define HID_MAIN_ITEM_NULL_STATE    0x040

-#define HID_MAIN_ITEM_VOLATILE      0x080

-#define HID_MAIN_ITEM_BUFFERED_BYTE 0x100

-

-//

-// HID report descriptor collection item types

-//

-#define HID_COLLECTION_PHYSICAL     0

-#define HID_COLLECTION_APPLICATION  1

-#define HID_COLLECTION_LOGICAL      2

-

-//

-// HID report descriptor global item tags

-//

-#define HID_GLOBAL_ITEM_TAG_USAGE_PAGE        0

-#define HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM   1

-#define HID_GLOBAL_ITEM_TAG_LOGICAL_MAXIMUM   2

-#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MINIMUM  3

-#define HID_GLOBAL_ITEM_TAG_PHYSICAL_MAXIMUM  4

-#define HID_GLOBAL_ITEM_TAG_UNIT_EXPONENT     5

-#define HID_GLOBAL_ITEM_TAG_UNIT              6

-#define HID_GLOBAL_ITEM_TAG_REPORT_SIZE       7

-#define HID_GLOBAL_ITEM_TAG_REPORT_ID         8

-#define HID_GLOBAL_ITEM_TAG_REPORT_COUNT      9

-#define HID_GLOBAL_ITEM_TAG_PUSH              10

-#define HID_GLOBAL_ITEM_TAG_POP               11

-

-//

-// HID report descriptor local item tags

-//

-#define HID_LOCAL_ITEM_TAG_USAGE              0

-#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM      1

-#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM      2

-#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX   3

-#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 4

-#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 5

-#define HID_LOCAL_ITEM_TAG_STRING_INDEX       7

-#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM     8

-#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM     9

-#define HID_LOCAL_ITEM_TAG_DELIMITER          10

-

-//

-// HID report types

-//

-#define HID_INPUT_REPORT    1

-#define HID_OUTPUT_REPORT   2

-#define HID_FEATURE_REPORT  3

-

-//

-// HID class protocol request

-//

-#define EFI_USB_GET_REPORT_REQUEST    0x01

-#define EFI_USB_GET_IDLE_REQUEST      0x02

-#define EFI_USB_GET_PROTOCOL_REQUEST  0x03

-#define EFI_USB_SET_REPORT_REQUEST    0x09

-#define EFI_USB_SET_IDLE_REQUEST      0x0a

-#define EFI_USB_SET_PROTOCOL_REQUEST  0x0b

-

-#pragma pack(1)

-///

-/// Descriptor header for Report/Physical Descriptors

-/// HID 1.1, section 6.2.1

-///

-typedef struct hid_class_descriptor {

-  UINT8   DescriptorType;

-  UINT16  DescriptorLength;

-} EFI_USB_HID_CLASS_DESCRIPTOR;

-

-///

-/// The HID descriptor identifies the length and type

-/// of subordinate descriptors for a device.

-/// HID 1.1, section 6.2.1

-///

-typedef struct hid_descriptor {

-  UINT8                         Length;

-  UINT8                         DescriptorType;

-  UINT16                        BcdHID;

-  UINT8                         CountryCode;

-  UINT8                         NumDescriptors;

-  EFI_USB_HID_CLASS_DESCRIPTOR  HidClassDesc[1];

-} EFI_USB_HID_DESCRIPTOR;

-

-#pragma pack()

-

-#endif

diff --git a/third_party/edk2/Protocol/UsbIo.h b/third_party/edk2/Protocol/UsbIo.h
deleted file mode 100644
index 227d286..0000000
--- a/third_party/edk2/Protocol/UsbIo.h
+++ /dev/null
@@ -1,512 +0,0 @@
-/** @file

-  EFI Usb I/O Protocol as defined in UEFI specification.

-  This protocol is used by code, typically drivers, running in the EFI 

-  boot services environment to access USB devices like USB keyboards, 

-  mice and mass storage devices. In particular, functions for managing devices 

-  on USB buses are defined here.

-  

-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>

-  This program and the accompanying materials

-  are licensed and made available under the terms and conditions of the BSD License

-  which accompanies this distribution.  The full text of the license may be found at

-  http://opensource.org/licenses/bsd-license.php

-

-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

-

-**/

-

-#ifndef __USB_IO_H__

-#define __USB_IO_H__

-

-#include <IndustryStandard/Usb.h>

-

-//

-// Global ID for the USB I/O Protocol

-//

-#define EFI_USB_IO_PROTOCOL_GUID \

-  { \

-    0x2B2F68D6, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } \

-  }

-

-typedef struct _EFI_USB_IO_PROTOCOL   EFI_USB_IO_PROTOCOL;

-

-//

-// Related Definition for EFI USB I/O protocol

-//

-

-//

-// USB standard descriptors and reqeust

-//

-typedef USB_DEVICE_REQUEST        EFI_USB_DEVICE_REQUEST;

-typedef USB_DEVICE_DESCRIPTOR     EFI_USB_DEVICE_DESCRIPTOR;

-typedef USB_CONFIG_DESCRIPTOR     EFI_USB_CONFIG_DESCRIPTOR;

-typedef USB_INTERFACE_DESCRIPTOR  EFI_USB_INTERFACE_DESCRIPTOR;

-typedef USB_ENDPOINT_DESCRIPTOR   EFI_USB_ENDPOINT_DESCRIPTOR;

-

-///

-/// USB data transfer direction

-///

-typedef enum {

-  EfiUsbDataIn,

-  EfiUsbDataOut,

-  EfiUsbNoData

-} EFI_USB_DATA_DIRECTION;

-

-//

-// USB Transfer Results

-//

-#define EFI_USB_NOERROR             0x00

-#define EFI_USB_ERR_NOTEXECUTE      0x01

-#define EFI_USB_ERR_STALL           0x02

-#define EFI_USB_ERR_BUFFER          0x04

-#define EFI_USB_ERR_BABBLE          0x08

-#define EFI_USB_ERR_NAK             0x10

-#define EFI_USB_ERR_CRC             0x20

-#define EFI_USB_ERR_TIMEOUT         0x40

-#define EFI_USB_ERR_BITSTUFF        0x80

-#define EFI_USB_ERR_SYSTEM          0x100

-

-/**

-  Async USB transfer callback routine.

-

-  @param  Data                  Data received or sent via the USB Asynchronous Transfer, if the

-                                transfer completed successfully.

-  @param  DataLength            The length of Data received or sent via the Asynchronous

-                                Transfer, if transfer successfully completes.

-  @param  Context               Data passed from UsbAsyncInterruptTransfer() request.

-  @param  Status                Indicates the result of the asynchronous transfer.

-

-  @retval EFI_SUCCESS           The asynchronous USB transfer request has been successfully executed.

-  @retval EFI_DEVICE_ERROR      The asynchronous USB transfer request failed.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_ASYNC_USB_TRANSFER_CALLBACK)(

-  IN VOID         *Data,

-  IN UINTN        DataLength,

-  IN VOID         *Context,

-  IN UINT32       Status

-  );

-

-//

-// Prototype for EFI USB I/O protocol

-//

-

-

-/**

-  This function is used to manage a USB device with a control transfer pipe. A control transfer is

-  typically used to perform device initialization and configuration.

-

-  @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  Request               A pointer to the USB device request that will be sent to the USB

-                                device.

-  @param  Direction             Indicates the data direction.

-  @param  Timeout               Indicating the transfer should be completed within this time frame.

-                                The units are in milliseconds.

-  @param  Data                  A pointer to the buffer of data that will be transmitted to USB

-                                device or received from USB device.

-  @param  DataLength            The size, in bytes, of the data buffer specified by Data.

-  @param  Status                A pointer to the result of the USB transfer.

-

-  @retval EFI_SUCCESS           The control transfer has been successfully executed.

-  @retval EFI_DEVICE_ERROR      The transfer failed. The transfer status is returned in Status.

-  @retval EFI_INVALID_PARAMETE  One or more parameters are invalid.

-  @retval EFI_OUT_OF_RESOURCES  The request could not be completed due to a lack of resources.

-  @retval EFI_TIMEOUT           The control transfer fails due to timeout.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_CONTROL_TRANSFER)(

-  IN EFI_USB_IO_PROTOCOL                        *This,

-  IN EFI_USB_DEVICE_REQUEST                     *Request,

-  IN EFI_USB_DATA_DIRECTION                     Direction,

-  IN UINT32                                     Timeout,

-  IN OUT VOID                                   *Data OPTIONAL,

-  IN UINTN                                      DataLength  OPTIONAL,

-  OUT UINT32                                    *Status

-  );

-

-/**

-  This function is used to manage a USB device with the bulk transfer pipe. Bulk Transfers are

-  typically used to transfer large amounts of data to/from USB devices.

-

-  @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  DeviceEndpoint        The destination USB device endpoint to which the 

-                                device request is being sent. DeviceEndpoint must 

-                                be between 0x01 and 0x0F or between 0x81 and 0x8F, 

-                                otherwise EFI_INVALID_PARAMETER is returned. If 

-                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER 

-                                is returned. The MSB of this parameter indicates 

-                                the endpoint direction. The number "1" stands for 

-                                an IN endpoint, and "0" stands for an OUT endpoint.

-  @param  Data                  A pointer to the buffer of data that will be transmitted to USB

-                                device or received from USB device.

-  @param  DataLength            The size, in bytes, of the data buffer specified by Data.

-                                On input, the size, in bytes, of the data buffer specified by Data.

-                                On output, the number of bytes that were actually transferred.

-  @param  Timeout               Indicating the transfer should be completed within this time frame.

-                                The units are in milliseconds. If Timeout is 0, then the 

-                                caller must wait for the function to be completed until 

-                                EFI_SUCCESS or EFI_DEVICE_ERROR is returned.

-  @param  Status                This parameter indicates the USB transfer status.

-

-  @retval EFI_SUCCESS           The bulk transfer has been successfully executed.

-  @retval EFI_DEVICE_ERROR      The transfer failed. The transfer status is returned in Status.

-  @retval EFI_INVALID_PARAMETE  One or more parameters are invalid.

-  @retval EFI_OUT_OF_RESOURCES  The request could not be submitted due to a lack of resources.

-  @retval EFI_TIMEOUT           The control transfer fails due to timeout.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_BULK_TRANSFER)(

-  IN EFI_USB_IO_PROTOCOL            *This,

-  IN UINT8                          DeviceEndpoint,

-  IN OUT VOID                       *Data,

-  IN OUT UINTN                      *DataLength,

-  IN UINTN                          Timeout,

-  OUT UINT32                        *Status

-  );

-

-/**

-  This function is used to manage a USB device with an interrupt transfer pipe. An Asynchronous

-  Interrupt Transfer is typically used to query a device's status at a fixed rate. For example,

-  keyboard, mouse, and hub devices use this type of transfer to query their interrupt endpoints at

-  a fixed rate.

-

-  @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  DeviceEndpoint        The destination USB device endpoint to which the 

-                                device request is being sent. DeviceEndpoint must 

-                                be between 0x01 and 0x0F or between 0x81 and 0x8F, 

-                                otherwise EFI_INVALID_PARAMETER is returned. If 

-                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER 

-                                is returned. The MSB of this parameter indicates 

-                                the endpoint direction. The number "1" stands for 

-                                an IN endpoint, and "0" stands for an OUT endpoint.

-  @param  IsNewTransfer         If TRUE, a new transfer will be submitted to USB controller. If

-                                FALSE, the interrupt transfer is deleted from the device's interrupt

-                                transfer queue.

-  @param  PollingInterval       Indicates the periodic rate, in milliseconds, that the transfer is to be

-                                executed.This parameter is required when IsNewTransfer is TRUE. The 

-                                value must be between 1 to 255, otherwise EFI_INVALID_PARAMETER is returned. 

-                                The units are in milliseconds.

-  @param  DataLength            Specifies the length, in bytes, of the data to be received from the

-                                USB device. This parameter is only required when IsNewTransfer is TRUE.

-  @param  InterruptCallback     The Callback function. This function is called if the asynchronous

-                                interrupt transfer is completed. This parameter is required 

-                                when IsNewTransfer is TRUE.

-  @param  Context               Data passed to the InterruptCallback function. This is an optional 

-                                parameter and may be NULL.

-

-  @retval EFI_SUCCESS           The asynchronous USB transfer request transfer has been successfully executed.

-  @retval EFI_DEVICE_ERROR      The asynchronous USB transfer request failed.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER)(

-  IN EFI_USB_IO_PROTOCOL                                 *This,

-  IN UINT8                                               DeviceEndpoint,

-  IN BOOLEAN                                             IsNewTransfer,

-  IN UINTN                                               PollingInterval    OPTIONAL,

-  IN UINTN                                               DataLength         OPTIONAL,

-  IN EFI_ASYNC_USB_TRANSFER_CALLBACK                     InterruptCallBack  OPTIONAL,

-  IN VOID                                                *Context OPTIONAL

-  );

-

-/**

-  This function is used to manage a USB device with an interrupt transfer pipe.

-

-  @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  DeviceEndpoint        The destination USB device endpoint to which the 

-                                device request is being sent. DeviceEndpoint must 

-                                be between 0x01 and 0x0F or between 0x81 and 0x8F, 

-                                otherwise EFI_INVALID_PARAMETER is returned. If 

-                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER 

-                                is returned. The MSB of this parameter indicates 

-                                the endpoint direction. The number "1" stands for 

-                                an IN endpoint, and "0" stands for an OUT endpoint.

-  @param  Data                  A pointer to the buffer of data that will be transmitted to USB

-                                device or received from USB device.

-  @param  DataLength            On input, then size, in bytes, of the buffer Data. On output, the

-                                amount of data actually transferred.

-  @param  Timeout               The time out, in seconds, for this transfer. If Timeout is 0, 

-                                then the caller must wait for the function to be completed 

-                                until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. If the 

-                                transfer is not completed in this time frame, then EFI_TIMEOUT is returned.

-  @param  Status                This parameter indicates the USB transfer status.

-

-  @retval EFI_SUCCESS           The sync interrupt transfer has been successfully executed.

-  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.

-  @retval EFI_DEVICE_ERROR      The sync interrupt transfer request failed.

-  @retval EFI_OUT_OF_RESOURCES  The request could not be submitted due to a lack of resources.

-  @retval EFI_TIMEOUT           The transfer fails due to timeout.

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_SYNC_INTERRUPT_TRANSFER)(

-  IN EFI_USB_IO_PROTOCOL            *This,

-  IN     UINT8                      DeviceEndpoint,

-  IN OUT VOID                       *Data,

-  IN OUT UINTN                      *DataLength,

-  IN     UINTN                      Timeout,

-  OUT    UINT32                     *Status

-  );

-

-/**

-  This function is used to manage a USB device with an isochronous transfer pipe. An Isochronous

-  transfer is typically used to transfer streaming data.

-

-  @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  DeviceEndpoint        The destination USB device endpoint to which the 

-                                device request is being sent. DeviceEndpoint must 

-                                be between 0x01 and 0x0F or between 0x81 and 0x8F, 

-                                otherwise EFI_INVALID_PARAMETER is returned. If 

-                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER 

-                                is returned. The MSB of this parameter indicates 

-                                the endpoint direction. The number "1" stands for 

-                                an IN endpoint, and "0" stands for an OUT endpoint.

-  @param  Data                  A pointer to the buffer of data that will be transmitted to USB

-                                device or received from USB device.

-  @param  DataLength            The size, in bytes, of the data buffer specified by Data.

-  @param  Status                This parameter indicates the USB transfer status.

-

-  @retval EFI_SUCCESS           The isochronous transfer has been successfully executed.

-  @retval EFI_INVALID_PARAMETER The parameter DeviceEndpoint is not valid.

-  @retval EFI_DEVICE_ERROR      The transfer failed due to the reason other than timeout, The error status

-                                is returned in Status.

-  @retval EFI_OUT_OF_RESOURCES  The request could not be submitted due to a lack of resources.

-  @retval EFI_TIMEOUT           The transfer fails due to timeout.

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_ISOCHRONOUS_TRANSFER)(

-  IN EFI_USB_IO_PROTOCOL            *This,

-  IN     UINT8                      DeviceEndpoint,

-  IN OUT VOID                       *Data,

-  IN     UINTN                      DataLength,

-  OUT    UINT32                     *Status

-  );

-

-/**

-  This function is used to manage a USB device with an isochronous transfer pipe. An Isochronous

-  transfer is typically used to transfer streaming data.

-

-  @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  DeviceEndpoint        The destination USB device endpoint to which the 

-                                device request is being sent. DeviceEndpoint must 

-                                be between 0x01 and 0x0F or between 0x81 and 0x8F, 

-                                otherwise EFI_INVALID_PARAMETER is returned. If 

-                                the endpoint is not a BULK endpoint, EFI_INVALID_PARAMETER 

-                                is returned. The MSB of this parameter indicates 

-                                the endpoint direction. The number "1" stands for 

-                                an IN endpoint, and "0" stands for an OUT endpoint.

-  @param  Data                  A pointer to the buffer of data that will be transmitted to USB

-                                device or received from USB device.

-  @param  DataLength            The size, in bytes, of the data buffer specified by Data.

-                                This is an optional parameter and may be NULL.

-  @param  IsochronousCallback   The IsochronousCallback() function.This function is 

-                                called if the requested isochronous transfer is completed.

-  @param  Context               Data passed to the IsochronousCallback() function.

-

-  @retval EFI_SUCCESS           The asynchronous isochronous transfer has been successfully submitted

-                                to the system.

-  @retval EFI_INVALID_PARAMETER The parameter DeviceEndpoint is not valid.

-  @retval EFI_OUT_OF_RESOURCES  The request could not be submitted due to a lack of resources.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER)(

-  IN EFI_USB_IO_PROTOCOL              *This,

-  IN UINT8                            DeviceEndpoint,

-  IN OUT VOID                         *Data,

-  IN     UINTN                        DataLength,

-  IN EFI_ASYNC_USB_TRANSFER_CALLBACK  IsochronousCallBack,

-  IN VOID                             *Context OPTIONAL

-  );

-

-/**

-  Resets and reconfigures the USB controller. This function will work for all USB devices except

-  USB Hub Controllers.

-

-  @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.

-

-  @retval EFI_SUCCESS           The USB controller was reset.

-  @retval EFI_INVALID_PARAMETER If the controller specified by This is a USB hub.

-  @retval EFI_DEVICE_ERROR      An error occurred during the reconfiguration process.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_PORT_RESET)(

-  IN EFI_USB_IO_PROTOCOL    *This

-  );

-

-/**

-  Retrieves the USB Device Descriptor.

-

-  @param  This                  A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  DeviceDescriptor      A pointer to the caller allocated USB Device Descriptor.

-

-  @retval EFI_SUCCESS           The device descriptor was retrieved successfully.

-  @retval EFI_INVALID_PARAMETER DeviceDescriptor is NULL.

-  @retval EFI_NOT_FOUND         The device descriptor was not found. The device may not be configured.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_GET_DEVICE_DESCRIPTOR)(

-  IN EFI_USB_IO_PROTOCOL            *This,

-  OUT EFI_USB_DEVICE_DESCRIPTOR     *DeviceDescriptor

-  );

-

-/**

-  Retrieves the USB Device Descriptor.

-

-  @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  ConfigurationDescriptor A pointer to the caller allocated USB Active Configuration

-                                  Descriptor.

-  @retval EFI_SUCCESS             The active configuration descriptor was retrieved successfully.

-  @retval EFI_INVALID_PARAMETER   ConfigurationDescriptor is NULL.

-  @retval EFI_NOT_FOUND           An active configuration descriptor cannot be found. The device may not

-                                  be configured.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_GET_CONFIG_DESCRIPTOR)(

-  IN EFI_USB_IO_PROTOCOL            *This,

-  OUT EFI_USB_CONFIG_DESCRIPTOR     *ConfigurationDescriptor

-  );

-

-/**

-  Retrieves the Interface Descriptor for a USB Device Controller. As stated earlier, an interface

-  within a USB device is equivalently to a USB Controller within the current configuration.

-

-  @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  InterfaceDescriptor     A pointer to the caller allocated USB Interface Descriptor within

-                                  the configuration setting.

-  @retval EFI_SUCCESS             The interface descriptor retrieved successfully.

-  @retval EFI_INVALID_PARAMETER   InterfaceDescriptor is NULL.

-  @retval EFI_NOT_FOUND           The interface descriptor cannot be found. The device may not be

-                                  correctly configured.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_GET_INTERFACE_DESCRIPTOR)(

-  IN EFI_USB_IO_PROTOCOL            *This,

-  OUT EFI_USB_INTERFACE_DESCRIPTOR  *InterfaceDescriptor

-  );

-

-/**

-  Retrieves an Endpoint Descriptor within a USB Controller.

-

-  @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  EndpointIndex           Indicates which endpoint descriptor to retrieve.

-  @param  EndpointDescriptor      A pointer to the caller allocated USB Endpoint Descriptor of

-                                  a USB controller.

-

-  @retval EFI_SUCCESS             The endpoint descriptor was retrieved successfully.

-  @retval EFI_INVALID_PARAMETER   One or more parameters are invalid.

-  @retval EFI_NOT_FOUND           The endpoint descriptor cannot be found. The device may not be

-                                  correctly configured.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR)(

-  IN EFI_USB_IO_PROTOCOL            *This,

-  IN  UINT8                         EndpointIndex,

-  OUT EFI_USB_ENDPOINT_DESCRIPTOR   *EndpointDescriptor

-  );

-

-/**

-  Retrieves a string stored in a USB Device.

-

-  @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  LangID                  The Language ID for the string being retrieved.

-  @param  StringID                The ID of the string being retrieved.

-  @param  String                  A pointer to a buffer allocated by this function with

-                                  AllocatePool() to store the string.If this function 

-                                  returns EFI_SUCCESS, it stores the string the caller 

-                                  wants to get. The caller should release the string 

-                                  buffer with FreePool() after the string is not used any more.

-

-  @retval EFI_SUCCESS             The string was retrieved successfully.

-  @retval EFI_NOT_FOUND           The string specified by LangID and StringID was not found.

-  @retval EFI_OUT_OF_RESOURCES    There are not enough resources to allocate the return buffer String.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_GET_STRING_DESCRIPTOR)(

-  IN EFI_USB_IO_PROTOCOL            *This,

-  IN  UINT16                        LangID,

-  IN  UINT8                         StringID,

-  OUT CHAR16                        **String

-  );

-

-/**

-  Retrieves all the language ID codes that the USB device supports.

-

-  @param  This                    A pointer to the EFI_USB_IO_PROTOCOL instance.

-  @param  LangIDTable             Language ID for the string the caller wants to get.

-                                  This is a 16-bit ID defined by Microsoft. This 

-                                  buffer pointer is allocated and maintained by 

-                                  the USB Bus Driver, the caller should not modify 

-                                  its contents.

-  @param  TableSize               The size, in bytes, of the table LangIDTable.

-

-  @retval EFI_SUCCESS             The support languages were retrieved successfully.

-

-**/

-typedef

-EFI_STATUS

-(EFIAPI *EFI_USB_IO_GET_SUPPORTED_LANGUAGE)(

-  IN EFI_USB_IO_PROTOCOL            *This,

-  OUT UINT16                        **LangIDTable,

-  OUT UINT16                        *TableSize

-  );

-

-///

-/// The EFI_USB_IO_PROTOCOL provides four basic transfers types described 

-/// in the USB 1.1 Specification. These include control transfer, interrupt 

-/// transfer, bulk transfer and isochronous transfer. The EFI_USB_IO_PROTOCOL 

-/// also provides some basic USB device/controller management and configuration 

-/// interfaces. A USB device driver uses the services of this protocol to manage USB devices.  

-///

-struct _EFI_USB_IO_PROTOCOL {

-  //

-  // IO transfer

-  //

-  EFI_USB_IO_CONTROL_TRANSFER           UsbControlTransfer;

-  EFI_USB_IO_BULK_TRANSFER              UsbBulkTransfer;

-  EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER   UsbAsyncInterruptTransfer;

-  EFI_USB_IO_SYNC_INTERRUPT_TRANSFER    UsbSyncInterruptTransfer;

-  EFI_USB_IO_ISOCHRONOUS_TRANSFER       UsbIsochronousTransfer;

-  EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER UsbAsyncIsochronousTransfer;

-

-  //

-  // Common device request

-  //

-  EFI_USB_IO_GET_DEVICE_DESCRIPTOR      UsbGetDeviceDescriptor;

-  EFI_USB_IO_GET_CONFIG_DESCRIPTOR      UsbGetConfigDescriptor;

-  EFI_USB_IO_GET_INTERFACE_DESCRIPTOR   UsbGetInterfaceDescriptor;

-  EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR    UsbGetEndpointDescriptor;

-  EFI_USB_IO_GET_STRING_DESCRIPTOR      UsbGetStringDescriptor;

-  EFI_USB_IO_GET_SUPPORTED_LANGUAGE     UsbGetSupportedLanguages;

-

-  //

-  // Reset controller's parent port

-  //

-  EFI_USB_IO_PORT_RESET                 UsbPortReset;

-};

-

-extern EFI_GUID gEfiUsbIoProtocolGuid;

-

-#endif

diff --git a/third_party/gnu-efi/.gitignore b/third_party/gnu-efi/.gitignore
deleted file mode 100644
index 970b638..0000000
--- a/third_party/gnu-efi/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-*.efi
-*.efi.debug
-*.o
-*.a
-*.tar.*
-*.tar
diff --git a/third_party/gnu-efi/ChangeLog b/third_party/gnu-efi/ChangeLog
deleted file mode 100644
index b30ba25..0000000
--- a/third_party/gnu-efi/ChangeLog
+++ /dev/null
@@ -1,1324 +0,0 @@
-    Updated Changelog
-
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 37d7bee82a627999563069b090866076e055a871
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Thu May 14 12:38:39 2015 -0400
-
-    Added some missing error code descriptions
-    
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit dae0b4b0b0d522caecf09123db2cf0250c37a169
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Thu May 14 12:20:51 2015 -0400
-
-    Turns out we actually need setjmp in one of gnu-efi's prominent
-    users, and it seems to make more sense to put it here than in
-    the application.
-    
-    All of these are derived from the Tiano code, but I re-wrote the
-    x86_64 one because we use the ELF psABI calling conventions instead
-    of the MS ABI calling conventions.  Which is to say you probably
-    shouldn't setjmp()/longjmp() between functions with EFIAPI (aka
-    __attribute__((ms_abi))) and those without.
-    
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit b5a8e93cec396381a6d2beee022abbf50100f2fd
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri Apr 10 08:49:50 2015 -0400
-
-    Bump version to 3.0.2
-    
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 01c9f11ed5ad55661e8fc8a3eee35c578564754b
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri Apr 10 08:46:40 2015 -0400
-
-    Fix ARM32 and AARCH64 builds
-    Without these added into SUBDIRS the initplat.c compilation will fail.
-    
-    Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
-    Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit dada63fd3de148c6f8551d253355c113547cd5a0
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Mar 23 10:41:43 2015 -0400
-
-    [PATCH] _SPrint: fix NULL termination
-    
-    maxlen is the maximum string length not the buffer size.
-    
-    Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit ce7098fb52e5fd4d16038964d029eb759f28eaaf
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Thu Feb 19 11:22:45 2015 -0500
-
-    Enable out-of-tree building
-    
-    This patch enables building gnu-efi outside of the source tree.
-    That in turn enables building for multiple architectures in parallel.
-    
-    The build directory is controlled by the OBJDIR make variable.  It
-    defaults to the value of ARCH, and can be overridden from the command
-    line.
-    
-    This patch also cleans up some doubled slashes between INSTALLROOT
-    and PREFIX.
-    
-    Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit f64cef26270bfbe04f038da33f95ae3f14c071bc
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Tue Jan 6 15:49:50 2015 -0500
-
-    Since we're keeping this in git, it'd be nice not to see a bunch
-    of make targets in 'status'
-    
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 322efb6b21ed0a5e42e8f124fd22bf0f8dbf01ae
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Jan 5 13:20:43 2015 -0500
-
-    version number changed from VERSION = 3.0u to VERSION = 3.0.1
-    
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 09027207f7c18af6caa45a744fc15c90b2a829db
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Jan 5 13:13:22 2015 -0500
-
-    From: Pete Batard <pete@akeo.ie>
-    Date: Wed, 10 Dec 2014 21:08:34 +0000
-    Subject: [PATCH] fixes for MSVC compilation
-    
-    These fixes are needed to address the following error and warnings when compiling the library part
-    using Visual Studio 2013 Community Edition (as in https://github.com/pbatard/uefi-simple):
-    * "lib\x86_64\math.c(49): error C4235: nonstandard extension used : '_asm' keyword not supported
-      on this architecture"
-    * "lib\print.c(98): error C2059: syntax error : '('" due to placement of EFIAPI macro
-    * "lib\cmdline.c(94): warning C4090: 'function' : different 'const' qualifiers"
-    * "lib\smbios.c(25): warning C4068: unknown pragma"
-    * Also update macro definitions in "inc\<arch>\efibind.h" for MSVC
-    
-    Signed-off-by: Pete Batard <pete@akeo.ie>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 15805ff38b83a72c2c7c96a24bd642ee1176d819
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Tue Nov 25 14:23:21 2014 -0500
-
-    Add README.git file. Instructions on how to archive.
-    
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit b868aa75669723b7e32f46524822e17e388fe2ba
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Tue Nov 25 13:26:45 2014 -0500
-
-    This patch makes generating releases from git a very simple process; you
-    simply edit the makefile's "VERSION" line to the new version, commit
-    that as its own commit, and do: "make test-archive".  That'll make a
-    file in the current directory gnu-efi-$VERSION.tar.bz2 , with its top
-    level directory gnu-efi-$VERSION/ and the source tree under that.
-    
-    Once you've tested that and you're sure it's what you want to release,
-    you do "make archive", which will tag a release in git and generate a
-    final tarball from it.  You then push to the archive, being sure to
-    include the tag:
-    
-    git push origin master:master --tags
-    
-    And upload the archive wherever it's supposed to go.
-    
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 530d68ba191850edafc6da22cb2df55bec0c5fa5
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Tue Nov 25 10:09:50 2014 -0500
-
-    The gnu-efi-3.0 toplevel subdirectory is really annoying. Kill it.
-    
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 00bd66ef46b59a1623a293491a8b2c65a6d61975
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Nov 24 14:33:09 2014 -0500
-
-    FreeBSD's binutils doesn't have "-j <glob>" support, so we need to
-    include non-globbed versions of .rel/.rela individually.
-    
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-    Signed-off-by: Bill Paul <wpaul@windriver.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 56eb64d3c06854b9b68d61e3c2d3bdf6ff2a9853
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Nov 24 14:27:14 2014 -0500
-
-    Right now we wind up trying to build gnuefi/.o from a source file that's
-    an empty string.  This is caused by the macros trying to generate
-    install rules, but there's no real reason to have all that anyway.  So
-    just have some static install rules that are simpler and don't generate
-    stuff on the fly.
-    
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 65e28a90a7be9e990b360286cea31e63319217fb
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Nov 24 12:17:45 2014 -0500
-
-    Add current OsIndications values.
-    
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com
-
-commit be231055ce14d17610f0d7b6133a87b99a22662b
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Nov 24 12:15:34 2014 -0500
-
-    Add the QueryVariableInfo() API.
-    
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 60efb7a2939b65a01e95aa8b535f1b756d984fba
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Nov 24 12:13:23 2014 -0500
-
-    Add the capsule API.
-    
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit ef08b655d1f8dfbd9a0f3a86d5685b24695ef12f
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Nov 17 16:05:42 2014 -0500
-
-    Fix Table Header misspelling. Change from EFI_TABLE_HEARDER to
-    EFI_TABLE_HEADER.
-    
-    Signed-Off-By: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 370cce41da3fff41ba38feb1262002aff2d85ffd
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Thu Nov 6 14:41:40 2014 -0500
-
-    If CROSS_COMPILE is set, ignore the ARCH value supplied on the
-    command line and use the target machine of the cross compiler.
-    
-    Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit d32fb845433ff6fb38e81ae0d9273454e7d18197
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Thu Nov 6 14:30:03 2014 -0500
-
-    Allow reuse of this file beyond GPL compatible software,
-    update the license of crt0-efi-aarch64.S to dual 2-clause BSD/GPLv2+.
-    
-    Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit aa1df67f48f3c035fa8891e1bb311ec21500d6d9
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Tue Oct 21 11:08:47 2014 -0400
-
-    Add the missing Variable attributes
-    
-    From: Jeremy Compostella <jeremy.compostella@intel.com>
-    Date: Mon, 13 Oct 2014 17:50:50 +0200
-    Subject: [PATCH] Add the missing Variable attributes
-    
-    Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 5706dff09364cbbec37f47e2fe1350747f631d74
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Tue Aug 26 10:54:22 2014 -0400
-
-    From: David Decotigny <decot@googlers.com>
-    Date: Mon, 25 Aug 2014 13:28:49 -0700
-    Subject: [PATCH] document that binutils >= 2.24 needed.
-    
-    commit ac983081 "Add support for non-PE/COFF capable objcopy" depends
-    on objcopy accepting wildcards for the section names. This feature is
-    available only with binutils >= 2.24 (binutils 2e62b7218 "PR
-    binutils/15033").
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 6c10e225bc759d69af520a551b9d7b37f3ae0a82
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Aug 25 08:51:23 2014 -0400
-
-    From: David Decotigny <decot@googlers.com>
-    Date: Thu, 31 Jul 2014 18:19:16 -0700
-    Subject: [PATCH 5/5] allow to use external stdarg.h
-    
-    in cases we use gnu-efi together with other libs that define stdarg.h,
-    break the tie by telling gnu-efi to use that stdarg.h .
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 16d65c0669258c8044e3549b2d9eb0cf0eb08f5a
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Tue Aug 19 12:07:00 2014 -0400
-
-    From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Date: Mon, 11 Aug 2014 15:39:16 +0200
-    Subject: [PATCH] Add support for 32-bit ARM
-    
-    This adds support for 32-bit ARM using an approach similar to the one used for
-    64-bit ARM (AArch64), i.e., it does not rely on an objcopy that is aware of EFI
-    or PE/COFF, but lays out the entire PE/COFF header using the assembler.
-    
-    In the 32-bit ARM case (which does not have a division instruction), some code
-    has been imported from the Linux kernel to perform the division operations in
-    software.
-    
-    Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit b28143d4fb4f6969dc0c87c853d3527d889951d7
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri Aug 8 15:54:19 2014 -0400
-
-    Updated Changelog
-    
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 1525190354f5faac33015e17c9ba7ea2bb2be35b
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri Aug 8 15:35:09 2014 -0400
-
-    From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Date: Fri, 8 Aug 2014 18:16:59 +0200
-    Subject: [PATCH 4/4] Add support for 64-bit ARM (AArch64)
-    
-    This adds support for 64-bit ARM (AArch64) environments. Since there is no
-    EFI-capable objcopy for this platform, this contains a manually laid out
-    PE/COFF header using the assembler.
-    
-    In addition, it includes the relocation bits, some string functions that GCC
-    assumes are available and other glue to hold it all together.
-    
-    This can be cross built using
-    
-        make CROSS_COMPILE=aarch64-linux-gnu-
-    
-    Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit ac983081525f9483941517dfb53cf8d0163d49c0
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri Aug 8 15:32:26 2014 -0400
-
-    From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Date: Fri, 8 Aug 2014 17:53:42 +0200
-    Subject: [PATCH 3/4] Add support for non-PE/COFF capable objcopy
-    
-    Introduce HAVE_EFI_OBJCOPY and set it if objcopy for $ARCH support PE/COOF and
-    EFI, i.e., it supports --target efi-[app|bsdrv|rtdrv] options. Use it to decide
-    whether to invoke objcopy with those options or use the linker to populate the
-    PE/COFF header.
-    
-    Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit fb063f0f65543b3e2bf55a39d5aa70b17a98c65e
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri Aug 8 15:26:38 2014 -0400
-
-    From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Date: Fri, 8 Aug 2014 17:37:36 +0200
-    Subject: [PATCH 2/4] Add support for cross compilation
-    
-    This changes the logic that defines ARCH (and HOSTARCH) to take CROSS_COMPILE
-    into account. Also, $prefix is not assigned, so that the default will be what
-    is on the path rather than hardcoded in /usr/bin.
-    
-    This results in the build doing the right thing if CROSS_COMPILE is set in the
-    environment and no ARCH or prefix options are passed to make, aligning it with
-    most other CROSS_COMPILE compatible projects.
-    
-    Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 7a98d83fc32de6cf0b1ce5e12dfe80690f29fb3f
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri Aug 8 15:25:03 2014 -0400
-
-    From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Date: Fri, 8 Aug 2014 16:50:45 +0200
-    Subject: [PATCH 1/4] Restrict GNU_EFI_USE_MS_ABI GCC version test to x86_64
-    
-    The version test only applies to x86_64 builds, so no need to do it
-    for other archs.
-    
-    Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit f42974dd9a7d0ea690d293f88396abd289f0014c
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri Aug 8 15:21:16 2014 -0400
-
-    From: David Decotigny <decot@googlers.com>
-    Date: Thu, 31 Jul 2014 13:42:23 -0700
-    Subject: [PATCH 4/4] Use Shell protocols to retrieve argc/argv, when
-     available.
-    
-    New header files efishellintf.h efishellparm.h are coming from EDK
-    II, initial location and license at top of files. Only modifications:
-     - efishellintf.h: s/EFI_FILE_PROTOCOL/EFI_FILE/ + expand BITx macros (1<<x)
-     - efishellparm.h: typedef VOID *SHELL_FILE_HANDLE to avoid including
-       ShellBase.h
-     - both: removed extern EFI_GUID variable decls
-    
-    This also adds apps/t8.c, a simple demo.
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit a61fa058e9a87f966de3342b8c95fdbdcb007827
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri Aug 8 15:17:32 2014 -0400
-
-    From: David Decotigny <decot@googlers.com>
-    Date: Thu, 31 Jul 2014 13:41:52 -0700
-    Subject: [PATCH 3/4] document format of LoadedImage::LoadOptions data
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 2f440200c855154f929d28971b2fd702ea7a207a
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri Aug 8 15:15:59 2014 -0400
-
-    From: David Decotigny <decot@googlers.com>
-    Date: Thu, 31 Jul 2014 13:39:37 -0700
-    Subject: [PATCH 2/4] Use OpenProtocol instead of HandleProtocol
-    
-    UEFI 2.x recommends OpenProtocol instead of HandleProtocol.
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 7f173da1e54f8cfe4c7c7c091ab6585af07b25ce
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri Aug 8 15:14:26 2014 -0400
-
-    From: David Decotigny <decot@googlers.com>
-    Date: Thu, 31 Jul 2014 13:30:07 -0700
-    Subject: [PATCH 1/4] move cmdline parser to its own file
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 0ad8fb87cbc59f58675b18253ad802ba51f1d132
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Wed Jul 30 15:06:36 2014 -0400
-
-    From: David Decotigny <decot@googlers.com>
-    Date: Mon, 28 Jul 2014 21:28:50 -0700
-    Subject: [PATCH 3/3] make cmdline parsing a 1st class citizen
-    
-    Refactor ParseCmdline and apps/Alloc+FreePages to factorize
-    boilerplate and move the new parser to the main API.
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit ff7ec964f2c0de0cfc4b52cfdd356003450f28bf
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Wed Jul 30 15:05:28 2014 -0400
-
-    From: David Decotigny <decot@googlers.com>
-    Date: Mon, 28 Jul 2014 21:00:52 -0700
-    Subject: [PATCH 2/3] Avoid buffer overflow while parsing the cmdline args
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 8d86ee202a9bb553375f56ae1d2944818112b68b
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Wed Jul 30 15:04:44 2014 -0400
-
-    From: David Decotigny <decot@googlers.com>
-    Date: Mon, 28 Jul 2014 21:01:35 -0700
-    Subject: [PATCH 1/3] Fix cmdline parser
-    
-    The cmdline parser would not return the correct number of args, would
-    allocate one too many. Also make it clear from the declaration that we
-    expect a suitably lare argv.
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 1ec094bfaf46a610a740dadc0150bf457dd72345
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Wed Jul 23 09:54:25 2014 -0400
-
-    From: Julian Klode <julian.klode@gmail.com>
-    Date: Mon, 21 Jul 2014 14:26:23 -0400
-    Subject: [PATCH] inc/efistdarg.h: Use gcc builtins instead of stdarg.h or broken stubs
-    
-    We cannot use stdarg.h, as this breaks applications compiling
-    with -nostdinc because those will not find the header.
-    We also cannot use the stubs, as they just produce broken code,
-    as seen in the gummiboot 45-1 Debian release.
-    
-    Signed-off-by: Julian Klode <julian.klode@gmail.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 6caab22f23434f41f42cfe7591d9a7ae66de9f0a
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Thu Jun 19 10:39:23 2014 -0400
-
-    From: Laszlo Ersek <lersek@redhat.com>
-    Date: Mon, 2 Jun 2014 23:26:48 +0200
-    Subject: [PATCH] always observe EFIAPI calling convention when calling
-     STO.SetAttribute
-    
-    We have to consider the following cases wrt. the PRINT_STATE.Output and
-    PRINT_STATE.SetAttr EFIAPI function pointers, especially when building for
-    x86_64 with gcc:
-    
-    (1) The compiler is new enough, and EFIAPI actually ensures the Microsoft
-        calling convention. In this case everything happens to work fine even
-        if we forget uefi_call_wrapper(), because the wrapper would expand to
-        a normal C function call anyway.
-    
-    (2) Otherwise (ie. gcc is old), EFIAPI expands to nothing, and we must
-        take into account the called function's origin:
-    
-      (2a) If the callee that is declared EFIAPI is *defined* inside gnu-efi,
-           then EFIAPI means nothing for the callee too, so caller and callee
-           only understand each other if the caller intentionally omits
-           uefi_call_wrapper().
-    
-      (2b) If the callee that is declared EFIAPI is defined by the platform
-           UEFI implementation, then the caller *must* use
-           uefi_call_wrapper().
-    
-    The PRINT_STATE.Output EFIAPI function pointer is dereferenced correctly:
-    the PFLUSH() distinguishes cases (2a) from (2b) by using IsLocalPrint().
-    
-    However use of the PRINT_STATE.SetAttr EFIAPI function pointer is not
-    always correct:
-    
-    - The PSETATTR() helper function always relies on the wrapper (case (2b)).
-      This is correct, because PRINT_STATE.SetAttr always points to a
-      platform-provided function.
-    
-    - The DbgPrint() function contains two incorrect calls: they mistakenly
-      assume case (2a) (or case (1)), even though the pointer always points to
-      a platform function, implying (2b). (The error is masked in case (1).)
-      Fix them.
-    
-    Signed-off-by: Laszlo Ersek <lersek@redhat.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit ecfd1ded9a799c3a572d4eb7fbb52582fe4d3390
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Tue Jun 10 12:59:09 2014 -0400
-
-    Add VPoolPrint Function
-    
-    Equivalent to PoolPrint but using a va_list parameter
-    
-    Signed-off-by: Sylvain Chouleur <sylvain.chouleur@intel.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit f16d93f3b9e314336a387a3885c7fd2f176c41d3
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Fri May 16 11:33:51 2014 -0400
-
-    Revert "The prototype of DbgPrint() is incorrect, at the end of "inc/efidebug.h"."
-    A problem was found compiling on GCC 4.8.
-    
-    This reverts commit 644898eabc06c8efaa3aa54f84cdd468960a2f6c.
-
-commit 644898eabc06c8efaa3aa54f84cdd468960a2f6c
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Wed May 14 09:09:47 2014 -0400
-
-    The prototype of DbgPrint() is incorrect, at the end of "inc/efidebug.h".
-    Consequently, when your program calls DbgPrint() via the DEBUG() macro,
-    it fails to set up the stack correctly (it does not pass the arguments
-    through the ellipsis (...) according to the EFIAPI calling convention).
-    However, va_start() inside DbgPrint() *assumes* that stack.
-    
-    Signed-off-by: Laszlo Ersek <lersek@redhat.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 8921ba2fc5f6163bdad3b5902c5d9d638415dde0
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Apr 14 18:49:23 2014 -0400
-
-    Cleaned up compile warnings.
-    
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 42cca551dbf1c0be9e02e8d3d3c417ce35749638
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Apr 14 14:04:11 2014 -0400
-
-    Module lib/ParseCmdLine.c has errors, it incorrectly mixes "char" and "CHAR16"
-    and uses a pointer to argv[] like it's argv[]. The compiler only issues
-    warnings though. Here is a patch to remove compiler warnings and make the
-    code behave.
-    
-    Signed-off-by: Bernard Burette <bub75@users.sf.net>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 4e8460f1aedd2724de876be5b154eb5752bfada5
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Apr 14 13:53:03 2014 -0400
-
-    Here is a very small patch to remove a compiler warning when processing lib/smbios.c.
-    
-    Signed-off-by: Bernard Burette <bub75@users.sf.net>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 6a0875ca2fcb67e7d1a1e2d15f3bcc645329dc75
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Apr 14 13:45:16 2014 -0400
-
-    Here is a very small patch to remove compiler warning in function
-    "LibLocateHandleByDiskSignature()" because the "Start" variable is
-    give a value which is not used.
-    
-    Signed-off-by: Bernard Burette <bub75@users.sf.net>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit d5f35dfb8008ba65bcc641559accd9bc13386ef9
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Apr 14 13:40:29 2014 -0400
-
-    Here is a very small patch to remove *~ files in include diretory.
-    
-    Signed-off-by: Bernard Burette <bub75@users.sf.net>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 1a04669a7bb022984c9b54a0f73d7d67a2540fb7
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Apr 14 12:45:57 2014 -0400
-
-    Here is a patch for "DevicePathToStr()" to display device path according to UEFI 2 specification.
-    The path is in the two files inc/efidevp.h and lib/dpath.c.
-    
-    It also add the Sata device path and removes the "/?" path for unknown device paths.
-    
-    Signed-off-by: Bernard Burette <bub75@users.sf.net>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit 3c62e78556aea01e9798380cd46794c6ca09d4bd
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Tue Apr 1 10:26:44 2014 -0400
-
-       Removed GPL code setjmp_ia32.S, setjmp_ia64.S, setjmp_x86_64.S
-       Not used anymore.
-    
-       Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-commit f9baa4f622cf34576d73e00d4a774a31f0f81fd7
-Author: Nigel Croxon <nigel.croxon@hp.com>
-Date:   Mon Mar 31 08:37:56 2014 -0400
-
-    Remove incumbent GPL 'debian' subdiretory.
-    Update ChangeLog
-    
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-
-Changelog format change from here and above to 'git log' style.
-
-2014-04-01 Nigel Croxon <nigel.croxon@hp.com>
-
-   Removed GPL code setjmp_ia32.S, setjmp_ia64.S, setjmp_x86_64.S
-   Not used anymore.
-
-   Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2014-03-17 Nigel Croxon <nigel.croxon@hp.com>
-
-   Add support for the simple pointer and absolute pointer protocols
-       
-    Signed-off-by: John Cronin <johncronin@users.sf.net>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2014-03-14 Nigel Croxon <nigel.croxon@hp.com>
-
-    Trying to recurse into subdirectories of object files may lead
-    to an error if the directory doesn't exist. Even when cleaning.
-	    
-    Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2014-03-14 Nigel Croxon <nigel.croxon@hp.com>
-
-    Make install used to copy files unconditionnally to their
-    destination. However, if the destination is used by another
-    Makefile, it will always see modified files. "install" target
-    now only updates the files when they need to.
-
-    Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2014-02-13 Nigel Croxon <nigel.croxon@hp.com>
-
-    Patch GNU-EFI to remove the ELILO code
-        
-    Signed-off-by: Jerry Hoemann <jerry.hoemann@hp.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2014-02-13 Nigel Croxon <nigel.croxon@hp.com>
-
-    Initialize Status before calling GrowBuffer()
-    Status must be initialized before calling GrowBuffer() as it may
-    otherwise be uninitialized or set to EFI_BUFFER_TOO_SMALL by
-    other functions.
-
-    Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2014-01-23 Nigel Croxon <nigel.croxon@hp.com>
-
-    These changes allow manually overridden SRCDIR (current source
-    directory) and TOPDIR (top of source tree) to separate the
-    build directory from the source tree.
-	        
-    Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2014-01-16 Nigel Croxon <nigel.croxon@hp.com>
-    compilation: fix uninitialized variables warning
-        
-    Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2014-01-13 Nigel Croxon <nigel.croxon@hp.com>
-   Implement VSPrint function, prints a formatted unicode string to a buffer.
-       
-    Signed-off-by: Jeremy Compostella <jeremy.compostella@gmail.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2014-01-10 Nigel Croxon <nigel.croxon@hp.com>
-    Created lib/argify.c and inc/argify.h containing the function argify.
-    It contains verbatim copy of the comment at beginning of file from
-    elilo.
-    There was no COPYING file in the elilo source that the comment refers to.
-
-    Signed-off-by: Jerry Hoemann <jerry.hoemann@hp.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2014-01-08 Nigel Croxon <nigel.croxon@hp.com>
-    The information needed is not really the host architecture as given by
-    the kernel arch. The information actually needed is the default target
-    of gcc.
-	        
-    Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2013-10-11 Nigel Croxon <nigel.croxon@hp.com>
-    Added support for SetVariable to store volatile variable,
-    and SetNVVariable to store non volatile variable.
-	    
-    Signed-off-by: Sylvain Chouleur <sylvain.chouleur@gmail.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2013-10-07 Nigel Croxon <nigel.croxon@hp.com>
-
-    Atoi needs to have consistent declaration/definition.
-    
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2013-10-07 Nigel Croxon <nigel.croxon@hp.com>
-    if you have a function that takes const arguments and then
-    e.g. tries to copy StrCmp, gcc will give you warnings about those
-    calls, and the warnings are right.  These clutter up other things
-    you might miss that you should be more concered about.
-
-    You could work around it through vigorous typecasting
-    to non-const types, but why should you have to? All of these
-    functions are regorously defined as not changing their input
-    - it is const, and should be marked as such.
-
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-
-2013-10-02 Nigel Croxon <nigel.croxon@hp.com>
-
-    Added two simple applications to allocate/free memory at EFI.
-    Used to test/find memory fragmentation issues linux.
-	    
-    Signed-off-by: Jerry Hoemann <jerry.hoemann@hp.com>
-    Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
-
-2013-06-25 Nigel Croxon <nigel.croxon@hp.com>
-    Sample boot service driver.
-        
-    Signed-off-by: David Decotigny <decot@googlers.com>
-
-2013-06-25 Nigel Croxon <nigel.croxon@hp.com>
-Date:   Tue Jun 25 08:47:03 2013 -0400
-
-    Be more pedantic when linking, don't allow duplicate symbols,
-    abort upon first error. Also make sure linker script comes 
-    last for apps.
-
-    Signed-off-by: David Decotigny <decot@googlers.com>
-
-2013-06-25 Nigel Croxon <nigel.croxon@hp.com>
-    Fix compilation on x86_64 without HAVE_USE_MS_ABI
-    make -C apps would fail on tcc.c because uefi_call_wrapper()
-    doesn't deal correctly with efi_callO-type invocation.
-
-    Signed-off-by: David Decotigny <decot@googlers.com>
-
-2013-06-12 Nigel Croxon <nigel.croxon@hp.com>
-    Fix typo when disabling mno-mmx
-        
-    Signed-Off-By: Nigel Croxon <nigel.croxon@hp.com>
-
-2013-06-12 Nigel Croxon <nigel.croxon@hp.com>
-    Disable MMX and SSE
-    
-    GCC 4.8.0 adds some optimizations that will use movups/movaps (and use
-    %xmm* registers) when they're faster, and of course that won't work at
-    all since UEFI firmwares aren't guaranteed to initialize the mmx/sse
-    instructions.
-    
-    This will be even more annoying, since most UEFI firmwares don't
-    initialize the #DE or #UD trap handlers, and your backtrace will be a
-    random path through uninitialized memory, occasionally including
-    whatever address the IDT has for #UD, but also addresses like "0x4" and
-    "0x507" that you don't normally expect to see in your call path.
-    
-    Signed-off-by: Peter Jones <pjones@redhat.com>
-
-    Author: Nigel Croxon <nigel.croxon@hp.com>
-    Date:   Wed Jun 12 10:29:40 2013 -0400
-
-    bug in make 3.82 expand to odd values
-    
-    Some Makefiles tickle a bug in make 3.82 that cause libefi.a
-    and libgnuefi.a dependencies to expand to the odd values:
-    
-    libefi.a: boxdraw.o) smbios.o) ...
-    libgnuefi.a(reloc_x86_64.o:
-    
-    The patch replaces libgnuefi.a($(OBJS)) & libefi.a($(OBJS))
-    with an equivalent expansion that should work with any make
-    that supports $(patsubst).
-
-    Author: Nigel Croxon <nigel.croxon@hp.com>
-    Date:   Wed Jun 12 09:53:01 2013 -0400
-
-    support .text.* sections on x86_64
-    
-    Group them in .text. Also add vague linkage sections in .text.
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-
-    Author: Nigel Croxon <nigel.croxon@hp.com>
-    Date:   Wed Jun 12 09:51:36 2013 -0400
-
-    cleanup and fix Make.defaults
-    
-    Reorder variables in Make.defaults so that they are grouped by
-    functions. Also fixed ifeq (x,y) to have required syntax and make it
-    work for ARCH amd64->x86_64 renaming on BSD. Also provides top-level
-    Makefile with a "mkvars" target that displays effective variables.
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-
-    Author: Nigel Croxon <nigel.croxon@hp.com>
-    Date:   Wed Jun 12 09:47:16 2013 -0400
-
-    automatically determine number of uefi_call_wrapper() args on x86_64
-    
-    Instead of asking developers to explicitly pass the number of
-    parameters to the functions that get called, we determine them
-    automatically at preprocessing time. This should result in more
-    robust code.
-    
-    Argument va_num is now ignored in x86_64 code, both with and
-    without HAVE_USE_MS_ABI.
-    
-    Credits to the macro magic given in the comments.
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-
-    Author: Nigel Croxon <nigel.croxon@hp.com>
-    Date:   Wed Jun 12 09:38:10 2013 -0400
-
-    fix parameter-passing corruption on x86_64 for >= 5 args
-    
-    On x86_64 without HAVE_USE_MS_ABI support, uefi_call_wrapper() is a
-    variadic function. Parameters >=5 are copied to the stack and, when
-    passed small immediate values (and possibly other parameters), gcc
-    would emit a movl instruction before calling uefi_call_wrapper(). As a
-    result, only the lower 32b of these stack values are significant, the
-    upper 32b potentially contain garbage. Considering that
-    uefi_call_wrapper() assumes these arguments are clean 64b values
-    before calling the efi_callX() trampolines, the latter may be passed
-    garbage. This makes calling functions like
-    EFI_PCI_IO_PROTOCOL.Mem.Read()/Write() or BS->OpenProtocol() quite
-    unreliable.
-    
-    This patch fixes this by turning uefi_call_wrapper() into a macro that
-    allows to expose the efi_callX() trampoline signatures to the callers,
-    so that gcc can know upfront that it has to pass all arguments to
-    efi_callX() as clean 64b values (eg. movq for immediates). The
-    _cast64_efi_callX macros are just here to avoid a gcc warning, they do
-    nothing otherwise.
-    
-    Signed-off-by: David Decotigny <decot@googlers.com>
-
-    Author: noxorc <nigel.croxon@hp.com>
-    Date:   Wed May 15 15:26:16 2013 -0400
-
-    - Removes the ElfW() macro usage from reloc_ia32.c and reloc_x86_64.c. These
-    macros only exist in link.h on Linux. On FreeBSD, the equivalent macro is
-    __ElfN(). But the macro usage is redundant. You're only going to compile the
-    ia32 file for IA32 binaries and the x86_64 file for X64 binaries. If you had
-    just one file built for both cases, then using the macro might make more
-    sense.
-    
-    - Removes the "#define foo_t efi_foo_t" macros from reloc_ia32.c and
-    reloc_x86_64.c.
-    
-    - Modifies inc/x86_64/efibind.h and inc/ia32/efibind.h to use the new
-    definitions for uint64_t, int64_t and int8_t. The 64-bit types are now defined
-    as:
-    
-            typedef int __attribute__((__mode__(__DI__)))           int64_t;
-            typedef unsigned int __attribute__((__mode__(__DI__)))  uint64_t;
-    
-    This removes the conflict between the host types dragged in by elf.h and the
-    type definitions in efibind.h that made the #define foo_t efi_foo_t" hack
-    necessary. Also, int8_t is now defined as signed char instead of just char
-    (assuming char == signed char is apparently not good enough).
-    
-    - Also modifies these files to use stdint.h instead of stdint-gcc.h. It's
-    unclear if this is completely correct, but stdint-gcc.h is not present with
-    all GCC installs, and if you use -std=c99 or later you will force this case to
-    be hit. This also can break clang, which doesn't have a stdint-gcc.h at all.
-    
-    - Removes the #include of <link.h> from reloc_ia32.c and reloc_x86_64.c (since
-    with the previous changes it's not needed anymore).
-    
-    - Places the #include of <elf.h> after #include <efi>/#include <efilib.h> so
-    that we know the types will always be defined properly, in case you build on a
-    system where <elf.h> doesn't automatically pull in the right header files to
-    define all the needed types. (This actually happens on VxWorks. It's harmless
-    elsewhere. If you don't care about VxWorks, you can leave this out.)
-    
-    - Modifies setjmp_ia32.S and setjmp_x86_64.S so to change "function" to
-    @function. The clang compiler doesn't like the former. Clang and GCC both like
-    the latter.
-    
-    - Modifles Make.defaults so that if ARCH is detected as "amd64," it's changed
-    to "x86_64." It happens that uname -m on 64-bit FreeBSD reports the former
-    rather than the latter, which breaks the build. This may also be the case on
-    some other OSes. There's a way to force uname(1) to return x86_64 as the
-    machine type, but this way is a little friendlier.
-    
-    - Creates gnuefi/elf_ia32_fbsd_efi.lds which specifies the object file type as
-    elf-ia32-freebsd. This is required for building on FreeBSD/i386, not just
-    FreeBSD/amd64.
-    
-    - Modifies apps/Makefile to always use
-    $(TOPDIR)/gnuefi/elf_$(ARCH)_fbsd_efi.lds when building on either 32-bit or
-    64-bit FreeBSD instead of just for the x86_64 case.
-    
-    - Changed LDFLAGS in Make.defaults to include --no-undefined. This will cause
-    linking to fail if there are any unsatisfied symbols when creating foo.so
-    during any of the app builds, as opposed to just silently succeeding and
-    producing an unusable binary.
-    
-    - Changed CFLAGS to include -ffreestanding -fno-stack-protector -fno-stack-
-    check. This prevents clang from inserting a call to memset() when compiling
-    the RtZeroMem() and RtSetMem() routines in lib/runtime/efirtlib.c and guards
-    against the native compiler in some Linux distros from adding in stack
-    checking code which relies on libc help that isn't present in the EFI runtime
-    environment.
-    
-    This does the following:
-    
-    - Cleans up the ia32 and x86-64 relocation code a bit (tries to break the
-    dependency between the host ELF headers and the EFI runtime environment)
-    - Avoids the dependency on stdint-gcc.h which may not always be available
-    - Allows GNU EFI to build out of the box on both FreeBSD/i386 and
-    FreeBSD/amd64
-    - Allows GNU EFI to build out of the box with either GCC or clang on
-    FreeBSD/i386 and FreeBSD/amd64 9.0 and later.
-    - Makes things a little easier to port to VxWorks
-    - Avoids creating un-runable binaries with unresolved symbol definitions
-    (which can be very confusing to debug)
-
-    Author: noxorc <nigel.croxon@hp.com>
-    Date:   Wed May 8 16:29:45 2013 -0400
-
-    Add the definitions for TCP, UDP and IP, for both IPv4 and IPv6.
-
-
-2013-05-02 Nigel Croxon <nigel.croxon@hp.com>
-	* Chnage from Matt Fleming <matt.fleming@intel.com>
-	  - Preparation for adding the networking protocol definitions.
-	    Add the service binding protocol.
-
-2013-02-21 Nigel Croxon <nigel.croxon@hp.com>
-	* Change from Peter Jones <pjones@redhat.com>
-	  - Previously we were incorrectly passing 3 functions with
-            the System V ABI to UEFI functions as EFI ABI functions.
-            Mark them as EFIAPI so the compiler will (in our new
-            GNU_EFI_USE_MS_ABI world) use the correct ABI.
-          - These need to be EFIAPI functions because in some cases
-            they call ST->ConOut->OutputString(), which is an EFIAPI
-            function. (Which means that previously in cases that 
-            needed "cdecl", these didn't work right.)
-          - If the compiler version is new enough, and GNU_EFI_USE_MS_ABI
-            is defined, use the function attribute ms_abi on everything
-            defined with "EFIAPI".  Such calls will no longer go through
-            efi_call*, and as such will be properly type-checked.
-          - Honor PREFIX and LIBDIR correctly when passed in during the build.
-          - Add machine type defines for i386, arm/thumb, ia64, ebc, x86_64.
-          - __STDC_VERSION__ never actually gets defined unless there's a
-            --std=... line.  So we were accidentally defining lots of c99
-            types ourself. Since it's 2012, use --std=c11 where appropriate,
-            and if it's defined and we're using gcc, actually include gcc's
-            stdint definitions.
-          - New test application added: route80h. This is a test program
-            for PciIo.  It routes ioport 80h on ICH10 to PCI. This is also
-            useful on a very limited set of hardware to enable use of
-            a port 80h debug card.
-          - New test applcation added: modelist. This lists video modes
-            the GOP driver is showing us.
-	* Change from Finnbarr Murphy
-          - https://sourceforge.net/p/gnu-efi/feature-requests/2/
-            Please add the following status codes to <efierr.h>
-            EFI_INCOMPATIBLE_VERSION 25
-            EFI_SECURITY_VIOLATION 26 
-            EFI_CRC_ERROR 27 
-            EFI_END_OF_MEDIA 28 
-            EFI_END_OF_FILE 31 
-            EFI_INVALID_LANGUAGE 32 
-            EFI_COMPROMISED_DATA 33
-	* Change from SourceForge.net Bug report
-          - https://sourceforge.net/p/gnu-efi/bugs/5/
-            BufferSize is a UINT64 *. The file shipped with GNU EFI is from
-            1998 whereas the latest one is from 2004. I suspect Intel changed
-            the API in order handle 64-bit systems.
-        * Change from Felipe Contreras <felipe.contreras@gmail.com>
-          - The current code seems to screw the stack at certain points.
-            Multiple people have complained that gummiboot hangs right away,
-            which is in part the fault of gummiboot, but happens only
-            because the stack gets screwed. x86_64 EFI already aligns the
-            stack, so there's no need for so much code to find a proper
-            alignment, we always need to shift by 8 anyway.
-        * Change from A. Steinmetz
-          - https://sourceforge.net/p/gnu-efi/patches/1/
-            The patch prepares for elilo to support uefi pxe over ipv6
-            See uefi spec 2.3.1 errata c page 963 as reference.
-            Verfied on an ASUS Sabertooth X79 BIOS Rev. 2104 system which
-            is able to do an IPv6 UEFI PXE boot.
-	* Release 3.0t
-
-2012-09-21 Nigel Croxon <nigel.croxon@hp.com>
-	* Change from Peter Jones <pjones@redhat.com>
-	  - EFI Block I/O protocol versions 2 and 3 provide more information
-	    regarding physical disk layout, including alingment offset at the
-	    beginning of the disk ("LowestAlignedLba"), logical block size
-	    ("LogicalBlocksPerPhysicalBlock"), and optimal block transfer size
-	    ("OptimalTransferLengthGranularity").
-	* Release 3.0r
-
-2012-04-30 Nigel Croxon <nigel.croxon@hp.com>
-	* Change from Matt Fleming <matt.fleming@intel.com>
-	  -  The .reloc section is now 4096-byte boundary for x86_64.
-	     Without this patch the .reloc section will not adhere to
-	     the alignment value in the FileAlignment field (512 bytes by
-	     default) of the PE/COFF header. This results in a signed
-	     executable failing to boot in a secure boot environment.
-	* Release 3.0q
-
-2011-12-12 Nigel Croxon <nigel.croxon@hp.com>
-        * Changes from Fenghua Yu <fenghua.yu@intel.com>
-          - This fixes redefined types compilation failure for tcc.c on x86_64 machines.
-        * Release 3.0p
-
-2011-11-15 Nigel Croxon <nigel.croxon@hp.com>
-        * Changes from Darren Hart <dvhart@linux.intel.com>
-          - Conditionally assign toolchain binaries to allow overriding them.
-          - Force a dependency on lib for gnuefi.
-        * Release 3.0n
-
-2011-08-23 Nigel Croxon <nigel.croxon@hp.com>
-        * Changes from Peter Jones <pjones@redhat.com>
-          - Add guarantee 16-byte stack alignment on x86_64.
-          - Add routine to make callbacks work.
-          - Add apps/tcc.efi to test calling convention.
-        * Release 3.0m
-
-2011-07-22 Nigel Croxon <nigel.croxon@hp.com>
-	* Changed Makefiles from GPL to BSD.
-	* Changes from Peter Jones <pjones@redhat.com>
-	  - Add ifdefs for ia64 to mirror ia32 and x86-64 so that
-	    one can build with GCC.
-	  - Add headers for PciIo.
-	  - Add the UEFI 2.x bits for EFI_BOOT_SERVICES
-	  - Add an ignore for .note.GNU-stack section in X86-64 linker maps.
-        * Release 3.0l
-
-2011-04-07  Nigel Croxon <nigel.croxon@hp.com>
-        * Change license from GPL to BSD.
-        * Release 3.0j
-
-2009-09-12  Julien BLACHE <jb@jblache.org>
-	* Add support for FreeBSD.
-	* Release 3.0i
-
-2009-09-11  Julien BLACHE <jb@jblache.org>
-	* Fix elf_ia32_efi.lds linker script to be compatible with the new
-          linker behaviour. Patch from the RedHat bugzilla 492183.
-
-2009-06-18  Nigel Croxon <nigel.croxon@hp.com>
-        * Release 3.0h
-
-2008-11-06  Nigel Croxon <nigel.croxon@hp.com>
-        * Fix to not having any relocations at all. 
-
-2008-09-18  Nigel Croxon <nigel.croxon@hp.com>
-        * Use LIBDIR in makefiles
-        * Add setjmp/longjmp
-        * Fixes incorrect section attribute in crt0-efi-ia32.S
-        * Adds value EfiResetShutdown to enum EFI_RESET_TYPE
-        * Fixes a RAW warning in reloc_ia64.S
-        * Adds the USB HCI device path structure in the headers
-          patches were supplied by Peter Jones @ RedHat
-
-2008-02-22  Nigel Croxon <nigel.croxon@hp.com>
-	* Added '-mno-red-zone' to x68_64 compiles.
-	  Patch provided by Mats Andersson.
-
-2008-01-23  Nigel Croxon <nigel.croxon@hp.com>
-        * release 3.0e to support x86_64
-          EFI calling convention, the stack should be aligned in 16 bytes
-          to make it possible to use SSE2 in EFI boot services.
-          This patch fixes this issue. Patch provided by Huang Ying from Intel.
-
-2007-05-11 Nigel Croxon <nigel.croxon@hp.com>
-        * release 3.0d to support x86_64 from Chandramouli Narayanan
-          from Intel and based on 3.0c-1
-
-2006-03-21  Stephane Eranian <eranian@hpl.hp.com>
-	* merged patch to support gcc-4.1 submitted by
-	  Raymund Will from Novell/SuSE
-
-2006-03-20  Stephane Eranian <eranian@hpl.hp.com>
-	* updated ia-64 and ia-32 linker scripts to
-	  match latest gcc. The new gcc may put functions in
-	  .text* sections. patch submitted by H.J. Lu from Intel.
-
-2004-11-19  Stephane Eranian <eranian@hpl.hp.com>
-	* added patch to ignore .eh_frame section for IA-32. Patch
-	  submitted by Jim Wilson
-
-2004-09-23  Stephane Eranian <eranian@hpl.hp.com>
-	* added patch to discard unwind sections, newer toolchains
-	  complained about them. Patch submitted by Jesse Barnes from SGI.
-
-2003-09-29  Stephane Eranian <eranian@hpl.hp.com>
-	* updated elf_ia64_efi.lds to reflect new data sections 
-	  created by gcc-3.3. Patch provided by Andreas Schwab from Suse.
-
-2003-06-20  Stephane Eranian <eranian@hpl.hp.com>
-	* updated elf_ia64_efi.lds and elf_ia32_efi.lds to include
-	  new types data sections produced by recent version of gcc-3.x
-
-2002-02-22  Stephane Eranian <eranian@hpl.hp.com>
-	* release 3.0a
-	* modified both IA-64 and IA-32 loader scripts to add support for the
-	  new .rodata sections names (such as rodata.str2.8). Required
-	  for new versions of gcc3.x.
-
-2001-06-20  Stephane Eranian <eranian@hpl.hp.com>
-	* release 3.0
-	* split gnu-efi package in two different packages: the libary+include+crt and the bootloader.
-	* removed W2U() hack and related files to get from wide-char to unicode. 
-	* Use -fshort-wchar option for unicode.
-	* restructured Makefiles now install under INSTALLROOT.
-
-2001-04-06  Stephane Eranian <eranian@hpl.hp.com>
-
-	* incorporated patches from David and Michael Johnston at Intel
-	  to get the package to compile for IA-32 linux target.
-
-	* Fixed ELILO to compile for Ia-32 (does not execute yet, though):
-	  Makefile and start_kernel() function.
-
-2001-04-06  Andreas Schwab <schwab@suse.de>
-
-	* Fixed config.c  to
-	  get the timeout directive to do something. implemented the global
-	  root= directive.
-
-	* Fix the efi_main() to deal with the -C option properly
-
-2001-04-05  Stephane Eranian <eranian@hpl.hp.com>
-
-	* update efi library to latest EFI toolkit 1.02 as distributed
-	  by Intel. Fixed header + library files to compile with GCC
-
-	* merged ELI and LILO (as of gnu-efi-1.1) together, mostly
-	  taking the config file feature of ELI.
-
-	* renamed LILO to ELILO to make the distinction
-
-	* restructured code to make it easier to understand and maintain
-
-	* fixed FPSWA driver checking and loading: we try all possible
-	  files and let the driver itself figure out if it is the most
-	  recent.
-	* added support for compression (gzip) but keep support for plain
-	  ELF image. ELILO autodetects the format
-
-	* change the way the kernel is invoked. Now we call it in 
-	  physical memory mode. This breaks the dependency between the
-	  kernel code and the loader. No more lilo_start.c madness.
-
-	* changed the way the boot_params are passed. We don't use the 
-	  ZERO_PAGE_ADDR trick anymore. Instead we use EFI runtime memory.
-	  The address of the structure is passed to the kernel in r28
-	  by our convention.
-
-	* released as gnu-efi-2.0
-
-2001-04-03  David Mosberger  <davidm@hpl.hp.com>
-
-	* gnuefi/reloc_ia32.c (_relocate): Change return type from "void"
-	to "int".  Return error status if relocation fails for some
-	reason.
-
-	* gnuefi/elf_ia32_efi.lds: Drop unneeded ".rel.reloc" section.
-
-	* gnuefi/crt0-efi-ia32.S (_start): Exit if _relocate() returns with
-	non-zero exit status.
-
-	* inc/ia32/efibind.h [__GNUC__]: Force 8-byte alignment for 64-bit
-	types as that is what EFI appears to be expecting, despite the
-	"#pragma pack()" at the beginning of the file!
-
-2001-03-29  David Mosberger  <davidm@hpl.hp.com>
-
-	* gnuefi/reloc_ia32.c: Add a couple of defines to work around
-	libc/efilib collision on uint64_t et al.
-	(_relocate): Use ELF32_R_TYPE() instead of ELFW(R_TYPE)().
-
-	* gnuefi/crt0-efi-ia32.S (dummy): Add a dummy relocation entry.
-
-2001-03-29  David Mosberger  <davidm@hpl.hp.com>
-
-        * gnuefi/reloc_ia32.c: Add a couple of defines to work around
-        libc/efilib collision on uint64_t et al.
-        (_relocate): Use ELF32_R_TYPE() instead of ELFW(R_TYPE)().
-
-        * gnuefi/crt0-efi-ia32.S (dummy): Add a dummy relocation entry.
-
-2000-10-26  David Mosberger  <davidm@hpl.hp.com>
- 
- 	* gnuefi/elf_ia64_efi.lds: Mention .rela.sdata.
- 
- 	* Make.defaults (CFLAGS): Remove -nostdinc flags so we can pick
- 	up the C compiler's stdarg.h.
- 
- 	* inc/stdarg.h: Remove this file.  It's not correct for gcc (nor
- 	most other optimizing compilers).
-
-2000-10-10  Stephane Eranian <eranian@hpl.hp.com>
-
-	* cleaned up the error message and printing of those.
-	* added support to load the FPSWA from a file in case support is not
-	  present in the firmware already
-	* fixed split_args() to do the right thing when you have leading spaces
-	  before kernel name
-	* changed the argify() function to rely on \0 instead of LoadOptionSize
-	  as the field seems to be broken with current firmware
-	* bumped version to 1.0
-
-2000-10-04  David Mosberger  <davidm@hpl.hp.com>
- 
-	* gnuefi/reloc_ia64.S: Reserve space for up to 750 function descriptors.
-
-	* gnuefi/elf_ia64_efi.lds: Add .sdata section for small data and
-	put __gp in the "middle" of it.
-
-	* gnuefi/crt0-efi-ia64.S (_start): Use movl/add to load
-	gp-relative addresses that could be out of the range of the addl
-	offset.
-	* gnuefi/reloc_ia64.S (_relocate): Ditto.
-
-	* apps/Makefile: Remove standard rules and include Make.rules instead.
-	* lilo/Makefile: Ditto.
-
-	* Make.rules: New file.
-
-2000-08-04  Stephane Eranian <eranian@hpl.hp.com>
-	* released version 0.9
-	* incorporated ACPI changes for Asuza by NEC < kouchi@hpc.bs1.fc.nec.co.jp>
-	* added support for initrd (-i option) original ELI code from Bill Nottingham <notting@redhat.com>)
-	* lots of cleanups 
-	* got rid of #ifdef LILO_DEBUG and uses macro instead
-	* fix a few extra memory leaks in create_boot_params()
-	* added exit capability just before starting the kernel
-
-2000-06-22  David Mosberger  <davidm@hpl.hp.com>
-
-	* gnuefi/elf_ia64_efi.lds: Add .srodata, .ctors, .IA64.unwind,
-	.IA64.unwind_info to .data section and .rela.ctors to .rela
-	section.
-
-2000-04-03  David Mosberger  <davidm@hpl.hp.com>
-
-	* lilo/lilo.c (LILO_VERSION): Up version number to 0.9.
-
-	* gnuefi/elf_ia64_efi.lds: Include .IA_64.unwind and
-	.IA_64.unwind_info in .data segment to avoid EFI load error
-	"ImageAddress: pointer outside of image" error due to the .dynsym
-	relocations against these sections.
-
-	* ChangeLog: Moved from lilo/ChangeLogs.
-
-	* gnuefi/reloc_ia64.S: fixed typo: .space directive had constant
-	100 hardcoded instead of using MAX_FUNCTION_DESCRIPTORS
-	macro. Duh.
-
-2000-03-17 Stephane Eranian <eranian@hpl.hp.com>
-
-	* Released 0.8
-	* replace the  getopt.c with new version free with better license
-	* created a documentation file
-	* fix a couple of memory leaks
-	* code cleanups
-	* created a separate directory for lilo in the gnu-efi package.
-	* added support for the BOOT_IMAGE argument to kernel
-	* default is to build natively now
-
diff --git a/third_party/gnu-efi/Make.defaults b/third_party/gnu-efi/Make.defaults
deleted file mode 100644
index a4f1608..0000000
--- a/third_party/gnu-efi/Make.defaults
+++ /dev/null
@@ -1,161 +0,0 @@
-# -*- makefile -*-
-# Copyright (c) 1999-2007 Hewlett-Packard Development Company, L.P.
-#	Contributed by David Mosberger <davidm@hpl.hp.com>
-#	Contributed by Stephane Eranian <eranian@hpl.hp.com>
-#
-#    All rights reserved.
-#
-#    Redistribution and use in source and binary forms, with or without
-#    modification, are permitted provided that the following conditions
-#    are met:
-#
-#    * Redistributions of source code must retain the above copyright
-#      notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-#      copyright notice, this list of conditions and the following
-#      disclaimer in the documentation and/or other materials
-#      provided with the distribution.
-#    * Neither the name of Hewlett-Packard Co. nor the names of its
-#      contributors may be used to endorse or promote products derived
-#      from this software without specific prior written permission.
-#
-#    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-#    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-#    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-#    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-#    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-#    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-#    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-#    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-#    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-#    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-#    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-#    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-#    SUCH DAMAGE.
-#
-
-TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
-
-#
-# Variables below overridable from command-line:
-#   make VARNAME=value ...
-#
-
-#
-# Where to install the package. GNU-EFI will create and access
-# lib and include under the root
-#
-INSTALLROOT  := /
-PREFIX       := /usr/local
-LIBDIR 	     := $(PREFIX)/lib
-INSTALL	     := install
-
-# Compilation tools
-HOSTCC       := $(prefix)gcc
-CC           := $(prefix)$(CROSS_COMPILE)gcc
-AS           := $(prefix)$(CROSS_COMPILE)as
-LD           := $(prefix)$(CROSS_COMPILE)ld
-AR           := $(prefix)$(CROSS_COMPILE)ar
-RANLIB       := $(prefix)$(CROSS_COMPILE)ranlib
-OBJCOPY      := $(prefix)$(CROSS_COMPILE)objcopy
-
-
-# Host/target identification
-OS           := $(shell uname -s)
-HOSTARCH     := $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed s,i[3456789]86,ia32,)
-ARCH         := $(HOSTARCH)
-
-# Get ARCH from the compiler if cross compiling 
-ifneq ($(CROSS_COMPILE),)
-  override ARCH := $(shell $(CC) -dumpmachine | cut -f1 -d-| sed s,i[3456789]86,ia32,)
-endif
-
-# FreeBSD (and possibly others) reports amd64 instead of x86_64
-ifeq ($(ARCH),amd64)
-  override ARCH := x86_64
-endif
-
-#
-# Where to build the package
-#
-OBJDIR       := $(TOPDIR)/$(ARCH)
-
-#
-# Variables below derived from variables above
-#
-
-# Arch-specific compilation flags
-CPPFLAGS += -DCONFIG_$(ARCH)
-
-ifeq ($(ARCH),ia64)
-  CFLAGS += -mfixed-range=f32-f127
-endif
-
-ifeq ($(ARCH),ia32)
-  CFLAGS += -mno-mmx -mno-sse
-  ifeq ($(HOSTARCH),x86_64)
-    ARCH3264 = -m32
-  endif
-endif
-
-ifeq ($(ARCH),x86_64)
-  GCCVERSION   := $(shell $(CC) -dumpversion | cut -f1 -d.)
-  GCCMINOR     := $(shell $(CC) -dumpversion | cut -f2 -d.)
-
-  # Rely on GCC MS ABI support?
-  GCCNEWENOUGH := $(shell ( [ $(GCCVERSION) -gt "4" ]           \
-                            || ( [ $(GCCVERSION) -eq "4" ]      \
-                                 && [ $(GCCMINOR) -ge "7" ] ) ) \
-                          && echo 1)
-  ifeq ($(GCCNEWENOUGH),1)
-    CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
-  endif
-
-  CFLAGS += -mno-red-zone -mno-mmx -mno-sse
-  ifeq ($(HOSTARCH),ia32)
-    ARCH3264 = -m64
-  endif
-endif
-
-#
-# Set HAVE_EFI_OBJCOPY if objcopy understands --target efi-[app|bsdrv|rtdrv],
-# otherwise we need to compose the PE/COFF header using the assembler
-#
-ifneq ($(ARCH),aarch64)
-ifneq ($(ARCH),arm)
-export HAVE_EFI_OBJCOPY=y
-endif
-endif
-
-ifneq ($(ARCH),arm)
-export LIBGCC=$(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
-endif
-
-ifeq ($(ARCH),arm)
-CFLAGS += -marm
-endif
-
-# Generic compilation flags
-INCDIR  += -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) \
-           -I$(TOPDIR)/inc/protocol
-
-# Only enable -fpic for non MinGW compilers (unneeded on MinGW)
-GCCMACHINE := $(shell $(CC) -dumpmachine)
-ifneq (mingw32,$(findstring mingw32, $(GCCMACHINE)))
-  CFLAGS += -fpic
-endif
-
-ifeq (FreeBSD, $(findstring FreeBSD, $(OS)))
-CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
-           -fshort-wchar -fno-strict-aliasing \
-           -ffreestanding -fno-stack-protector
-else
-CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
-           -fshort-wchar -fno-strict-aliasing \
-           -fno-merge-constants -ffreestanding -fno-stack-protector \
-           -fno-stack-check
-endif
-
-ASFLAGS += $(ARCH3264)
-LDFLAGS	+= -nostdlib --warn-common --no-undefined --fatal-warnings \
-	   --build-id=sha1
diff --git a/third_party/gnu-efi/Make.rules b/third_party/gnu-efi/Make.rules
deleted file mode 100644
index 5b1c286..0000000
--- a/third_party/gnu-efi/Make.rules
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-#  Copyright (C) 1999-2007 Hewlett-Packard Co.
-#	Contributed by David Mosberger <davidm@hpl.hp.com>
-#	Contributed by Stephane Eranian <eranian@hpl.hp.com>
-#
-#    All rights reserved.
-#
-#    Redistribution and use in source and binary forms, with or without
-#    modification, are permitted provided that the following conditions
-#    are met:
-#
-#    * Redistributions of source code must retain the above copyright
-#      notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-#      copyright notice, this list of conditions and the following
-#      disclaimer in the documentation and/or other materials
-#      provided with the distribution.
-#    * Neither the name of Hewlett-Packard Co. nor the names of its
-#      contributors may be used to endorse or promote products derived
-#      from this software without specific prior written permission.
-#
-#    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-#    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-#    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-#    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-#    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-#    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-#    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-#    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-#    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-#    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-#    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-#    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-#    SUCH DAMAGE.
-#
-
-%.efi: %.so
-	$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
-		    -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \
-		    -j .reloc $(FORMAT) $*.so $@
-
-%.efi.debug: %.so
-	$(OBJCOPY) -j .debug_info -j .debug_abbrev -j .debug_aranges \
-		-j .debug_line -j .debug_str -j .debug_ranges \
-		-j .note.gnu.build-id \
-		$(FORMAT) $*.so $@
-
-%.so: %.o
-	$(LD) $(LDFLAGS) $^ -o $@ $(LOADLIBES)
-
-%.o: %.c
-	$(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
-%.S: %.c
-	$(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -S $< -o $@
-
-%.E: %.c
-	$(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -E $< -o $@
diff --git a/third_party/gnu-efi/Makefile b/third_party/gnu-efi/Makefile
deleted file mode 100644
index 0f754bc..0000000
--- a/third_party/gnu-efi/Makefile
+++ /dev/null
@@ -1,127 +0,0 @@
-#
-#  Copyright (C) 1999-2007 Hewlett-Packard Co.
-#	Contributed by David Mosberger <davidm@hpl.hp.com>
-#	Contributed by Stephane Eranian <eranian@hpl.hp.com>
-#
-#    All rights reserved.
-#
-#    Redistribution and use in source and binary forms, with or without
-#    modification, are permitted provided that the following conditions
-#    are met:
-#
-#    * Redistributions of source code must retain the above copyright
-#      notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-#      copyright notice, this list of conditions and the following
-#      disclaimer in the documentation and/or other materials
-#      provided with the distribution.
-#    * Neither the name of Hewlett-Packard Co. nor the names of its
-#      contributors may be used to endorse or promote products derived
-#      from this software without specific prior written permission.
-#
-#    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-#    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-#    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-#    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-#    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-#    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-#    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-#    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-#    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-#    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-#    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-#    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-#    SUCH DAMAGE.
-#
-
-VERSION = 3.0.4
-
-SRCDIR = $(shell pwd)
-
-VPATH = $(SRCDIR)
-
-include $(SRCDIR)/Make.defaults
-
-SUBDIRS = gnuefi
-
-all:	check_gcc $(SUBDIRS)
-
-mkvars:
-	@echo AR=$(AR)
-	@echo ARCH=$(ARCH)
-	@echo ARCH3264=$(ARCH3264)
-	@echo AS=$(AS)
-	@echo ASFLAGS=$(ASFLAGS)
-	@echo CC=$(CC)
-	@echo CFLAGS=$(CFLAGS)
-	@echo CPPFLAGS=$(CPPFLAGS)
-	@echo GCCMINOR=$(GCCMINOR)
-	@echo GCCNEWENOUGH=$(GCCNEWENOUGH)
-	@echo GCCVERSION=$(GCCVERSION)
-	@echo HOSTARCH=$(HOSTARCH)
-	@echo INCDIR=$(INCDIR)
-	@echo INSTALL=$(INSTALL)
-	@echo INSTALLROOT=$(INSTALLROOT)
-	@echo LD=$(LD)
-	@echo LDFLAGS=$(LDFLAGS)
-	@echo LIBDIR=$(LIBDIR)
-	@echo OBJCOPY=$(OBJCOPY)
-	@echo OS=$(OS)
-	@echo prefix=$(prefix)
-	@echo PREFIX=$(PREFIX)
-	@echo RANLIB=$(RANLIB)
-	@echo SRCDIR=$(SRCDIR)
-	@echo TOPDIR=$(TOPDIR)
-
-$(SUBDIRS):
-	mkdir -p $(OBJDIR)/$@
-	$(MAKE) -C $(OBJDIR)/$@ -f $(SRCDIR)/$@/Makefile SRCDIR=$(SRCDIR)/$@ ARCH=$(ARCH)
-
-clean:
-	rm -f *~
-	@for d in $(SUBDIRS); do \
-		if [ -d $(OBJDIR)/$$d ]; then \
-			$(MAKE) -C $(OBJDIR)/$$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d clean; \
-		fi; \
-	done
-
-install:
-	@for d in $(SUBDIRS); do \
-		mkdir -p $(OBJDIR)/$$d; \
-		$(MAKE) -C $(OBJDIR)/$$d -f $(SRCDIR)/$$d/Makefile SRCDIR=$(SRCDIR)/$$d install; done
-
-.PHONY:	$(SUBDIRS) clean depend
-
-#
-# on both platforms you must use gcc 3.0 or higher 
-#
-check_gcc:
-ifeq ($(GCC_VERSION),2)
-	@echo "you need to use a version of gcc >= 3.0, you are using `$(CC) --version`"
-	@exit 1
-endif
-
-include $(SRCDIR)/Make.rules
-
-test-archive:
-	@rm -rf /tmp/gnu-efi-$(VERSION) /tmp/gnu-efi-$(VERSION)-tmp
-	@mkdir -p /tmp/gnu-efi-$(VERSION)-tmp
-	@git archive --format=tar $(shell git branch | awk '/^*/ { print $$2 }') | ( cd /tmp/gnu-efi-$(VERSION)-tmp/ ; tar x )
-	@git diff | ( cd /tmp/gnu-efi-$(VERSION)-tmp/ ; patch -s -p1 -b -z .gitdiff )
-	@mv /tmp/gnu-efi-$(VERSION)-tmp/ /tmp/gnu-efi-$(VERSION)/
-	@dir=$$PWD; cd /tmp; tar -c --bzip2 -f $$dir/gnu-efi-$(VERSION).tar.bz2 gnu-efi-$(VERSION)
-	@rm -rf /tmp/gnu-efi-$(VERSION)
-	@echo "The archive is in gnu-efi-$(VERSION).tar.bz2"
-
-tag:
-	git tag $(VERSION) refs/heads/master
-
-archive: tag
-	@rm -rf /tmp/gnu-efi-$(VERSION) /tmp/gnu-efi-$(VERSION)-tmp
-	@mkdir -p /tmp/gnu-efi-$(VERSION)-tmp
-	@git archive --format=tar $(VERSION) | ( cd /tmp/gnu-efi-$(VERSION)-tmp/ ; tar x )
-	@mv /tmp/gnu-efi-$(VERSION)-tmp/ /tmp/gnu-efi-$(VERSION)/
-	@dir=$$PWD; cd /tmp; tar -c --bzip2 -f $$dir/gnu-efi-$(VERSION).tar.bz2 gnu-efi-$(VERSION)
-	@rm -rf /tmp/gnu-efi-$(VERSION)
-	@echo "The archive is in gnu-efi-$(VERSION).tar.bz2"
-
diff --git a/third_party/gnu-efi/README.efilib b/third_party/gnu-efi/README.efilib
deleted file mode 100644
index bb857ec..0000000
--- a/third_party/gnu-efi/README.efilib
+++ /dev/null
@@ -1,30 +0,0 @@
-
-The files in the "lib" and "inc" subdirectories are using the EFI Application 
-Toolkit distributed by Intel at http://developer.intel.com/technology/efi
-
-This code is covered by the following agreement:
-
-Copyright (c) 1998-2000 Intel Corporation
-
-Redistribution and use in source and binary forms, with or without modification, are permitted
-provided that the following conditions are met:
-
-Redistributions of source code must retain the above copyright notice, this list of conditions and
-the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright notice, this list of conditions
-and the following disclaimer in the documentation and/or other materials provided with the
-distribution.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE. THE EFI SPECIFICATION AND ALL OTHER INFORMATION
-ON THIS WEB SITE ARE PROVIDED "AS IS" WITH NO WARRANTIES, AND ARE SUBJECT
-TO CHANGE WITHOUT NOTICE.
diff --git a/third_party/gnu-efi/README.elilo b/third_party/gnu-efi/README.elilo
deleted file mode 100644
index 96a8172..0000000
--- a/third_party/gnu-efi/README.elilo
+++ /dev/null
@@ -1,19 +0,0 @@
-
-             IMPORTANT information related to the gnu-efi package
-             ----------------------------------------------------
-                                June 2001
-
-As of version 3.0, the gnu-efi package is now split in two different packages:
-
-	-> gnu-efi-X.y: contains the EFI library, include files and crt0.
-
-	-> elilo-X.y  : contains the ELILO bootloader. 
-	
-Note that X.y don't need to match for both packages. However elilo-3.x
-requires at least gnu-efi-3.0. EFI support for x86_64 is provided in
-gnu-efi-3.0d.
-
-Both packages can be downloaded from:
-
-	http://www.sf.net/projects/gnu-efi
-	http://www.sf.net/projects/elilo
diff --git a/third_party/gnu-efi/README.git b/third_party/gnu-efi/README.git
deleted file mode 100644
index c719b20..0000000
--- a/third_party/gnu-efi/README.git
+++ /dev/null
@@ -1,21 +0,0 @@
-README.git
-
-Generating releases from git a very simple process;
-
-1) Edit the file "Makefile".  Changing the "VERSION" line to the new version.
-2) Do a "git commit" just for the version number change.
-3) Then do a "make test-archive".
-That will make a file in the current directory gnu-efi-$VERSION.tar.bz2 ,
-with its top level directory gnu-efi-$VERSION/ and the source tree under that.
-    
-Once you've tested that and you're sure it's what you want to release,
-4) Do "make archive", which will tag a release in git and generate a
-final tarball from it.
-
-You then push to the archive, being sure to include the tag:
-5) "git push origin master:master --tags"
-
-And upload the archive wherever it's supposed to go.
-    
-
-
diff --git a/third_party/gnu-efi/README.gnuefi b/third_party/gnu-efi/README.gnuefi
deleted file mode 100644
index a7feec0..0000000
--- a/third_party/gnu-efi/README.gnuefi
+++ /dev/null
@@ -1,399 +0,0 @@
-	-------------------------------------------------
-	Building EFI Applications Using the GNU Toolchain
-	-------------------------------------------------
-
-		David Mosberger <davidm@hpl.hp.com>
-
-			23 September 1999
-
-
-		Copyright (c) 1999-2007 Hewlett-Packard Co.
-		Copyright (c) 2006-2010 Intel Co.
-
-Last update: 04/09/2007
-
-* Introduction
-
-This document has two parts: the first part describes how to develop
-EFI applications for IA-64,x86 and x86_64 using the GNU toolchain and the EFI
-development environment contained in this directory.  The second part
-describes some of the more subtle aspects of how this development
-environment works.
-
-
-
-* Part 1: Developing EFI Applications
-
-
-** Prerequisites:
-
- To develop x86 and x86_64 EFI applications, the following tools are needed:
-
-	- gcc-3.0 or newer (gcc 2.7.2 is NOT sufficient!)
-	  As of gnu-efi-3.0b, the Redhat 8.0 toolchain is known to work,
-	  but the Redhat 9.0 toolchain is not currently supported.
-
-	- A version of "objcopy" that supports EFI applications.  To
-	  check if your version includes EFI support, issue the
-	  command:
-
-		objcopy --help
-
-	  Verify that the line "supported targets" contains the string
-	  "efi-app-ia32" and "efi-app-x86_64" and that the "-j" option
-	  accepts wildcards. The binutils release binutils-2.24
-	  supports Intel64 EFI and accepts wildcard section names.
-
-	- For debugging purposes, it's useful to have a version of
-	  "objdump" that supports EFI applications as well.  This
-	  allows inspect and disassemble EFI binaries.
-
- To develop IA-64 EFI applications, the following tools are needed:
-
-	- A version of gcc newer than July 30th 1999 (older versions
-	  had problems with generating position independent code).
-	  As of gnu-efi-3.0b, gcc-3.1 is known to work well.
-
-	- A version of "objcopy" that supports EFI applications.  To
-	  check if your version includes EFI support, issue the
-	  command:
-
-		objcopy --help
-
-	  Verify that the line "supported targets" contains the string
-	  "efi-app-ia64" and that the "-j" option accepts wildcards.
-
-	- For debugging purposes, it's useful to have a version of
-	  "objdump" that supports EFI applications as well.  This
-	  allows inspect and disassemble EFI binaries.
-
-
-** Directory Structure
-
-This EFI development environment contains the following
-subdirectories:
-
- inc:   This directory contains the EFI-related include files.  The
-	files are taken from Intel's EFI source distribution, except
-	that various fixes were applied to make it compile with the
-	GNU toolchain.
-
- lib:   This directory contains the source code for Intel's EFI library.
-	Again, the files are taken from Intel's EFI source
-	distribution, with changes to make them compile with the GNU
-	toolchain.
-
- gnuefi: This directory contains the glue necessary to convert ELF64
-	binaries to EFI binaries.  Various runtime code bits, such as
-	a self-relocator are included as well.  This code has been
-	contributed by the Hewlett-Packard Company and is distributed
-	under the GNU GPL.
-
- apps:	This directory contains a few simple EFI test apps.
-
-** Setup
-
-It is necessary to edit the Makefile in the directory containing this
-README file before EFI applications can be built.  Specifically, you
-should verify that macros CC, AS, LD, AR, RANLIB, and OBJCOPY point to
-the appropriate compiler, assembler, linker, ar, and ranlib binaries,
-respectively.
-
-If you're working in a cross-development environment, be sure to set
-macro ARCH to the desired target architecture ("ia32" for x86, "x86_64" for
-x86_64 and "ia64" for IA-64).  For convenience, this can also be done from
-the make command line (e.g., "make ARCH=ia64").
-
-
-** Building
-
-To build the sample EFI applications provided in subdirectory "apps",
-simply invoke "make" in the toplevel directory (the directory
-containing this README file).  This should build lib/libefi.a and
-gnuefi/libgnuefi.a first and then all the EFI applications such as a
-apps/t6.efi.
-
-
-** Running
-
-Just copy the EFI application (e.g., apps/t6.efi) to the EFI
-filesystem, boot EFI, and then select "Invoke EFI application" to run
-the application you want to test.  Alternatively, you can invoke the
-Intel-provided "nshell" application and then invoke your test binary
-via the command line interface that "nshell" provides.
-
-
-** Writing Your Own EFI Application
-
-Suppose you have your own EFI application in a file called
-"apps/myefiapp.c".  To get this application built by the GNU EFI build
-environment, simply add "myefiapp.efi" to macro TARGETS in
-apps/Makefile.  Once this is done, invoke "make" in the top level
-directory.  This should result in EFI application apps/myefiapp.efi,
-ready for execution.
-
-The GNU EFI build environment allows to write EFI applications as
-described in Intel's EFI documentation, except for two differences:
-
- - The EFI application's entry point is always called "efi_main".  The
-   declaration of this routine is:
-
-    EFI_STATUS efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab);
-
- - UNICODE string literals must be written as W2U(L"Sample String")
-   instead of just L"Sample String".  The W2U() macro is defined in
-   <efilib.h>.  This header file also declares the function W2UCpy()
-   which allows to convert a wide string into a UNICODE string and
-   store the result in a programmer-supplied buffer.
-
- - Calls to EFI services should be made via uefi_call_wrapper(). This
-   ensures appropriate parameter passing for the architecture.
-
-
-* Part 2: Inner Workings
-
-WARNING: This part contains all the gory detail of how the GNU EFI
-toolchain works.  Normal users do not have to worry about such
-details.  Reading this part incurs a definite risk of inducing severe
-headaches or other maladies.
-
-The basic idea behind the GNU EFI build environment is to use the GNU
-toolchain to build a normal ELF binary that, at the end, is converted
-to an EFI binary.  EFI binaries are really just PE32+ binaries.  PE
-stands for "Portable Executable" and is the object file format
-Microsoft is using on its Windows platforms.  PE is basically the COFF
-object file format with an MS-DOS2.0 compatible header slapped on in
-front of it.  The "32" in PE32+ stands for 32 bits, meaning that PE32
-is a 32-bit object file format.  The plus in "PE32+" indicates that
-this format has been hacked to allow loading a 4GB binary anywhere in
-a 64-bit address space (unlike ELF64, however, this is not a full
-64-bit object file format because the entire binary cannot span more
-than 4GB of address space).  EFI binaries are plain PE32+ binaries
-except that the "subsystem id" differs from normal Windows binaries.
-There are two flavors of EFI binaries: "applications" and "drivers"
-and each has there own subsystem id and are identical otherwise.  At
-present, the GNU EFI build environment supports the building of EFI
-applications only, though it would be trivial to generate drivers, as
-the only difference is the subsystem id.  For more details on PE32+,
-see the spec at
-
-	http://msdn.microsoft.com/library/specs/msdn_pecoff.htm.
-
-In theory, converting a suitable ELF64 binary to PE32+ is easy and
-could be accomplished with the "objcopy" utility by specifying option
---target=efi-app-ia32 (x86) or --target=efi-app-ia64 (IA-64).  But
-life never is that easy, so here some complicating factors:
-
- (1) COFF sections are very different from ELF sections.
-
-	ELF binaries distinguish between program headers and sections.
-	The program headers describe the memory segments that need to
-	be loaded/initialized, whereas the sections describe what
-	constitutes those segments.  In COFF (and therefore PE32+) no
-	such distinction is made.  Thus, COFF sections need to be page
-	aligned and have a size that is a multiple of the page size
-	(4KB for EFI), whereas ELF allows sections at arbitrary
-	addresses and with arbitrary sizes.
-
- (2) EFI binaries should be relocatable.
-
-	Since EFI binaries are executed in physical mode, EFI cannot
-	guarantee that a given binary can be loaded at its preferred
-	address.  EFI does _try_ to load a binary at it's preferred
-	address, but if it can't do so, it will load it at another
-	address and then relocate the binary using the contents of the
-	.reloc section.
-
- (3) On IA-64, the EFI entry point needs to point to a function
-     descriptor, not to the code address of the entry point.
-
- (4) The EFI specification assumes that wide characters use UNICODE
-     encoding.
-
-	ANSI C does not specify the size or encoding that a wide
-	character uses.  These choices are "implementation defined".
-	On most UNIX systems, the GNU toolchain uses a wchar_t that is
-	4 bytes in size.  The encoding used for such characters is
-	(mostly) UCS4.
-
-In the following sections, we address how the GNU EFI build
-environment addresses each of these issues.
-
-
-** (1) Accommodating COFF Sections
-
-In order to satisfy the COFF constraint of page-sized and page-aligned
-sections, the GNU EFI build environment uses the special linker script
-in gnuefi/elf_$(ARCH)_efi.lds where $(ARCH) is the target architecture
-("ia32" for x86, "x86_64" for x86_64 and "ia64" for IA-64).
-This script is set up to create only eight COFF section, each page aligned
-and page sized.These eight sections are used to group together the much
-greater number of sections that are typically present in ELF object files.
-Specifically:
-
- .hash
-	Collects the ELF .hash info (this section _must_ be the first
-	section in order to build a shared object file; the section is
-	not actually loaded or used at runtime).
-
- .text
-	Collects all sections containing executable code.
-
- .data
-	Collects read-only and read-write data, literal string data,
-	global offset tables, the uninitialized data segment (bss) and
-	various other sections containing data.
-
-	The reason read-only data is placed here instead of the in
-	.text is to make it possible to disassemble the .text section
-	without getting garbage due to read-only data.  Besides, since
-	EFI binaries execute in physical mode, differences in page
-	protection do not matter.
-
-	The reason the uninitialized data is placed in this section is
-	that the EFI loader appears to be unable to handle sections
-	that are allocated but not loaded from the binary.
-
- .dynamic, .dynsym, .rela, .rel, .reloc
-	These sections contains the dynamic information necessary to
-	self-relocate the binary (see below).
-
-A couple of more points worth noting about the linker script:
-
- o On IA-64, the global pointer symbol (__gp) needs to be placed such
-   that the _entire_ EFI binary can be addressed using the signed
-   22-bit offset that the "addl" instruction affords.  Specifically,
-   this means that __gp should be placed at ImageBase + 0x200000.
-   Strictly speaking, only a couple of symbols need to be addressable
-   in this fashion, so with some care it should be possible to build
-   binaries much larger than 4MB.  To get a list of symbols that need
-   to be addressable in this fashion, grep the assembly files in
-   directory gnuefi for the string "@gprel".
-
- o The link address (ImageBase) of the binary is (arbitrarily) set to
-   zero.  This could be set to something larger to increase the chance
-   of EFI being able to load the binary without requiring relocation.
-   However, a start address of 0 makes debugging a wee bit easier
-   (great for those of us who can add, but not subtract... ;-).
-
- o The relocation related sections (.dynamic, .rel, .rela, .reloc)
-   cannot be placed inside .data because some tools in the GNU
-   toolchain rely on the existence of these sections.
-
- o Some sections in the ELF binary intentionally get dropped when
-   building the EFI binary.  Particularly noteworthy are the dynamic
-   relocation sections for the .plabel and .reloc sections.  It would
-   be _wrong_ to include these sections in the EFI binary because it
-   would result in .reloc and .plabel being relocated twice (once by
-   the EFI loader and once by the self-relocator; see below for a
-   description of the latter).  Specifically, only the sections
-   mentioned with the -j option in the final "objcopy" command are
-   retained in the EFI binary (see Make.rules).
-
-
-** (2) Building Relocatable Binaries
-
-ELF binaries are normally linked for a fixed load address and are thus
-not relocatable.  The only kind of ELF object that is relocatable are
-shared objects ("shared libraries").  However, even those objects are
-usually not completely position independent and therefore require
-runtime relocation by the dynamic loader.  For example, IA-64 binaries
-normally require relocation of the global offset table.
-
-The approach to building relocatable binaries in the GNU EFI build
-environment is to:
-
- (a) build an ELF shared object
-
- (b) link it together with a self-relocator that takes care of
-     applying the dynamic relocations that may be present in the
-     ELF shared object
-
- (c) convert the resulting image to an EFI binary
-
-The self-relocator is of course architecture dependent.  The x86
-version can be found in gnuefi/reloc_ia32.c, the x86_64 version
-can be found in gnuefi/reloc_x86_64.c and the IA-64 version can be
-found in gnuefi/reloc_ia64.S.
-
-The self-relocator operates as follows: the startup code invokes it
-right after EFI has handed off control to the EFI binary at symbol
-"_start".  Upon activation, the self-relocator searches the .dynamic
-section (whose starting address is given by symbol _DYNAMIC) for the
-dynamic relocation information, which can be found in the DT_REL,
-DT_RELSZ, and DT_RELENT entries of the dynamic table (DT_RELA,
-DT_RELASZ, and DT_RELAENT in the case of rela relocations, as is the
-case for IA-64).  The dynamic relocation information points to the ELF
-relocation table.  Once this table is found, the self-relocator walks
-through it, applying each relocation one by one.  Since the EFI
-binaries are fully resolved shared objects, only a subset of all
-possible relocations need to be supported.  Specifically, on x86 only
-the R_386_RELATIVE relocation is needed.  On IA-64, the relocations
-R_IA64_DIR64LSB, R_IA64_REL64LSB, and R_IA64_FPTR64LSB are needed.
-Note that the R_IA64_FPTR64LSB relocation requires access to the
-dynamic symbol table.  This is why the .dynsym section is included in
-the EFI binary.  Another complication is that this relocation requires
-memory to hold the function descriptors (aka "procedure labels" or
-"plabels").  Each function descriptor uses 16 bytes of memory.  The
-IA-64 self-relocator currently reserves a static memory area that can
-hold 100 of these descriptors.  If the self-relocator runs out of
-space, it causes the EFI binary to fail with error code 5
-(EFI_BUFFER_TOO_SMALL).  When this happens, the manifest constant
-MAX_FUNCTION_DESCRIPTORS in gnuefi/reloc_ia64.S should be increased
-and the application recompiled.  An easy way to count the number of
-function descriptors required by an EFI application is to run the
-command:
-
-  objdump --dynamic-reloc example.so | fgrep FPTR64 | wc -l
-
-assuming "example" is the name of the desired EFI application.
-
-
-** (3) Creating the Function Descriptor for the IA-64 EFI Binaries
-
-As mentioned above, the IA-64 PE32+ format assumes that the entry
-point of the binary is a function descriptor.  A function descriptors
-consists of two double words: the first one is the code entry point
-and the second is the global pointer that should be loaded before
-calling the entry point.  Since the ELF toolchain doesn't know how to
-generate a function descriptor for the entry point, the startup code
-in gnuefi/crt0-efi-ia64.S crafts one manually by with the code:
-
-	        .section .plabel, "a"
-	_start_plabel:
-	        data8   _start
-	        data8   __gp
-
-this places the procedure label for entry point _start in a section
-called ".plabel".  Now, the only problem is that _start and __gp need
-to be relocated _before_ EFI hands control over to the EFI binary.
-Fortunately, PE32+ defines a section called ".reloc" that can achieve
-this.  Thus, in addition to manually crafting the function descriptor,
-the startup code also crafts a ".reloc" section that has will cause
-the EFI loader to relocate the function descriptor before handing over
-control to the EFI binary (again, see the PECOFF spec mentioned above
-for details).
-
-A final question may be why .plabel and .reloc need to go in their own
-COFF sections.  The answer is simply: we need to be able to discard
-the relocation entries that are generated for these sections.  By
-placing them in these sections, the relocations end up in sections
-".rela.plabel" and ".rela.reloc" which makes it easy to filter them
-out in the filter script.  Also, the ".reloc" section needs to be in
-its own section so that the objcopy program can recognize it and can
-create the correct directory entries in the PE32+ binary.
-
-
-** (4) Convenient and Portable Generation of UNICODE String Literals
-
-As of gnu-efi-3.0, we make use (and somewhat abuse) the gcc option
-that forces wide characters (WCHAR_T) to use short integers (2 bytes) 
-instead of integers (4 bytes). This way we match the Unicode character
-size. By abuse, we mean that we rely on the fact that the regular ASCII
-characters are encoded the same way between (short) wide characters 
-and Unicode and basically only use the first byte. This allows us
-to just use them interchangeably.
-
-The gcc option to force short wide characters is : -fshort-wchar
-
-			* * * The End * * *
diff --git a/third_party/gnu-efi/apps/AllocPages.c b/third_party/gnu-efi/apps/AllocPages.c
deleted file mode 100644
index 77a082e..0000000
--- a/third_party/gnu-efi/apps/AllocPages.c
+++ /dev/null
@@ -1,184 +0,0 @@
-
-/*
- * Copyright (C) 2013 Jerry Hoemann <jerry.hoemann@hp.com>
- *
- *
- * Application to allocate memory at EFI.  Syntax of command
- * mimics the EFI Boot Service "AllocatePages."
- *
- * See UEFI spec 2.3, Section 6.2.
- *
- *
-
-
-
-
-FS1:\> memmap
-Type      Start            End              #pages             Attributes
-BS_Code   0000000000000000-0000000000000FFF 0000000000000001 000000000000000F
-Available 0000000000001000-000000000008DFFF 000000000000008D 000000000000000F
-Reserved  000000000008E000-000000000008FFFF 0000000000000002 000000000000000F
-Available 0000000000090000-000000000009FFFF 0000000000000010 000000000000000F
-Available 0000000000100000-000000000FFFFFFF 000000000000FF00 000000000000000F
-BS_Code   0000000010000000-0000000010061FFF 0000000000000062 000000000000000F
-Available 0000000010062000-000000005CDFFFFF 000000000004CD9E 000000000000000F
-ACPI_NVS  000000005CE00000-000000005DDFFFFF 0000000000001000 000000000000000F
-BS_Data   000000005DE00000-000000005DFFFFFF 0000000000000200 000000000000000F
-Available 000000005E000000-000000005EF1CFFF 0000000000000F1D 000000000000000F
-BS_Data   000000005EF1D000-00000000709FBFFF 0000000000011ADF 000000000000000F
-Available 00000000709FC000-00000000710E3FFF 00000000000006E8 000000000000000F
-LoaderCode 00000000710E4000-00000000711FEFFF 000000000000011B 000000000000000F
-Available 00000000711FF000-0000000071901FFF 0000000000000703 000000000000000F
-BS_Code   0000000071902000-00000000721FEFFF 00000000000008FD 000000000000000F
-
-
-Example to allocat 5 pages type BootCode at address 20000000 (hex)
-
-
-FS1:\> AllocPages.efi 2 3 5 20000000
-AllocatePage: __AllocType__ __MemType__ __NumPages__ [__Addr__]
-__AllocType__ {0,1,2} -- Any, MaxAddr, Addr
-__MemType__   {0..13}, Reserved ==0, LCode==1, LData==2, BSCode==3, BSData==4, ...
-__NumPages__  {0..F000000}
-[__Addr__]     0... 3FFFFFFFFFFF
-All numbers in hex no leading 0x
-
-AllocatPage(2,3,5,20000000)
-
-
-Example to allocat 5 pages type BootCode at address 30000000 (hex)
-
-
-FS1:\> AllocPages.efi 2 3 5 30000000
-AllocatePage: __AllocType__ __MemType__ __NumPages__ [__Addr__]
-__AllocType__ {0,1,2} -- Any, MaxAddr, Addr
-__MemType__   {0..13}, Reserved ==0, LCode==1, LData==2, BSCode==3, BSData==4, ...
-__NumPages__  {0..F000000}
-[__Addr__]     0... 3FFFFFFFFFFF
-All numbers in hex no leading 0x
-
-
-
-FS1:\> memmap
-Type      Start            End              #pages             Attributes
-BS_Code   0000000000000000-0000000000000FFF 0000000000000001 000000000000000F
-Available 0000000000001000-000000000008DFFF 000000000000008D 000000000000000F
-Reserved  000000000008E000-000000000008FFFF 0000000000000002 000000000000000F
-Available 0000000000090000-000000000009FFFF 0000000000000010 000000000000000F
-Available 0000000000100000-000000000FFFFFFF 000000000000FF00 000000000000000F
-BS_Code   0000000010000000-0000000010061FFF 0000000000000062 000000000000000F
-Available 0000000010062000-000000001FFFFFFF 000000000000FF9E 000000000000000F
-BS_Code   0000000020000000-0000000020004FFF 0000000000000005 000000000000000F
-Available 0000000020005000-000000002FFFFFFF 000000000000FFFB 000000000000000F
-BS_Code   0000000030000000-0000000030004FFF 0000000000000005 000000000000000F
-Available 0000000030005000-000000005CDFFFFF 000000000002CDFB 000000000000000F
-ACPI_NVS  000000005CE00000-000000005DDFFFFF 0000000000001000 000000000000000F
-BS_Data   000000005DE00000-000000005DFFFFFF 0000000000000200 000000000000000F
-Available 000000005E000000-000000005EF1CFFF 0000000000000F1D 000000000000000F
-BS_Data   000000005EF1D000-00000000709FBFFF 0000000000011ADF 000000000000000F
-Available 00000000709FC000-00000000710E3FFF 00000000000006E8 000000000000000F
-LoaderCode 00000000710E4000-00000000711FEFFF 000000000000011B 000000000000000F
-Available 00000000711FF000-0000000071901FFF 0000000000000703 000000000000000F
-BS_Code   0000000071902000-00000000721FEFFF 00000000000008FD 000000000000000F
-
-
-
-
-
- */
-
-#include <efi.h>
-#include <efilib.h>
-
-
-#define MAX_NUM_PAGES 0x000000000F000000
-#define MAX_ADDR ((1ULL << 46) - 1)
-
-
-#ifdef DEBUG
-#undef DEBUG
-#endif
-#define DEBUG 0
-
-
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
-
-	EFI_STATUS efi_status;
-	CHAR16 **argv;
-	INTN argc;
-	INTN err = 0;
-#if DEBUG
-	INTN c = 0;
-#endif
-	INTN AllocType = -1;
-	INTN MemType = -1;
-	INTN NumPages = -1;
-	UINTN Addr = 0;
-
-	InitializeLib(image, systab);
-
-	Print(L"AllocatePage: __AllocType__ __MemType__ __NumPages__ [__Addr__]\n");
-	Print(L"__AllocType__ {0,1,2} -- Any, MaxAddr, Addr\n"); 
-	Print(L"__MemType__   {0..13}, Reserved ==0, LCode==1, LData==2, BSCode==3, BSData==4, ...\n");
-	Print(L"__NumPages__  {0..%x}\n", MAX_NUM_PAGES);
-	Print(L"[__Addr__]     0... %llx\n", MAX_ADDR);
-	Print(L"All numbers in hex no leading 0x\n");
-	Print(L"\n");
-
-#if DEBUG
-	Print(L"Now get argc/argv\n");
-#endif
-	argc = GetShellArgcArgv(image, &argv);
-#if DEBUG
-	Print(L"argc = %d\n", argc);
-#endif
-
-#if DEBUG
-	for (c = 0;  c < argc;  c++ ) {
-		Print(L"argv[%d] = <%s>\n", c, argv[c]);
-	}
-#endif
-	if ( (argc < 4) || (argc > 5) ) {
-		Print(L"Wrong argument count\n");
-		return EFI_SUCCESS;
-	}
-
-	AllocType = xtoi(argv[1]);
-	MemType   = xtoi(argv[2]);
-	NumPages  = xtoi(argv[3]);
-	if ( argc == 5 ) Addr = xtoi(argv[4]);
-
-	if ( (AllocType < 0) || (AllocType > 2)) {
-		Print(L"Invalid AllocType\n");
-		err++;
-	}
-	if ( (MemType < 0) || (MemType > 13) ) {
-		Print(L"Invalid MemType\n");
-		err++;
-	}
-	if ( (NumPages < 0) || (NumPages > MAX_NUM_PAGES) ) {
-		Print(L"Inavlid NumPages\n");
-		err++;
-	}
-	if ( Addr > MAX_ADDR ) {
-		Print(L"Inavlid Address\n");
-		err++;
-	}
-	if ( err ) {
-		return EFI_INVALID_PARAMETER;
-	}
-
-	Print(L"AllocatPage(%d,%d,%d,%lx)\n", AllocType, MemType, NumPages, Addr);
-
-	efi_status = uefi_call_wrapper(BS->AllocatePages, 4, AllocType, MemType, NumPages, &Addr);
-
-	if ( EFI_ERROR(efi_status) ) {
-		Print(L"Allocate Pages Failed: %d\n", efi_status);
-		return efi_status;
-	}
-
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/FreePages.c b/third_party/gnu-efi/apps/FreePages.c
deleted file mode 100644
index bbf2f52..0000000
--- a/third_party/gnu-efi/apps/FreePages.c
+++ /dev/null
@@ -1,145 +0,0 @@
-
-
-/*
- * Copyright (C) 2013 Jerry Hoemann <jerry.hoemann@hp.com>
- *
- * Application to allocate memory at EFI.  Syntax of command
- * mimics the EFI Boot Service "FreePages."
- *
- * See UEFI spec 2.3, Section 6.2.
- *
-
-Example freeing a 5 page BS_Code setment at address: 0000000020000000 (hex)
-
-
-FS1:\> memmap
-Type      Start            End              #pages             Attributes
-BS_Code   0000000000000000-0000000000000FFF 0000000000000001 000000000000000F
-Available 0000000000001000-000000000008DFFF 000000000000008D 000000000000000F
-Reserved  000000000008E000-000000000008FFFF 0000000000000002 000000000000000F
-Available 0000000000090000-000000000009FFFF 0000000000000010 000000000000000F
-Available 0000000000100000-000000000FFFFFFF 000000000000FF00 000000000000000F
-BS_Code   0000000010000000-0000000010061FFF 0000000000000062 000000000000000F
-Available 0000000010062000-000000001FFFFFFF 000000000000FF9E 000000000000000F
-BS_Code   0000000020000000-0000000020004FFF 0000000000000005 000000000000000F
-Available 0000000020005000-000000005DDFFFFF 000000000003DDFB 000000000000000F
-BS_Data   000000005DE00000-000000005DFFFFFF 0000000000000200 000000000000000F
-Available 000000005E000000-000000006DE7CFFF 000000000000FE7D 000000000000000F
-ACPI_NVS  000000006DE7D000-000000006EE7CFFF 0000000000001000 000000000000000F
-BS_Data   000000006EE7D000-00000000709FBFFF 0000000000001B7F 000000000000000F
-Available 00000000709FC000-00000000710E3FFF 00000000000006E8 000000000000000F
-
-
-FS1:\> FreePages 0000000020000000 5
-FreePages: __PhysAddr__ __PgCnt__
-__PhysAddr__   0... 3FFFFFFFFFFF
-__PgCnt__     [0..F000000]
-All numbers hex w/ no leading 0x
-
-FreePages(20000000,5)
-
-
-
-FS1:\> memmap
-Type      Start            End              #pages             Attributes
-BS_Code   0000000000000000-0000000000000FFF 0000000000000001 000000000000000F
-Available 0000000000001000-000000000008DFFF 000000000000008D 000000000000000F
-Reserved  000000000008E000-000000000008FFFF 0000000000000002 000000000000000F
-Available 0000000000090000-000000000009FFFF 0000000000000010 000000000000000F
-Available 0000000000100000-000000000FFFFFFF 000000000000FF00 000000000000000F
-BS_Code   0000000010000000-0000000010061FFF 0000000000000062 000000000000000F
-Available 0000000010062000-000000005DDFFFFF 000000000004DD9E 000000000000000F
-BS_Data   000000005DE00000-000000005DFFFFFF 0000000000000200 000000000000000F
-Available 000000005E000000-000000006DE7CFFF 000000000000FE7D 000000000000000F
-ACPI_NVS  000000006DE7D000-000000006EE7CFFF 0000000000001000 000000000000000F
-BS_Data   000000006EE7D000-00000000709FBFFF 0000000000001B7F 000000000000000F
-Available 00000000709FC000-00000000710E3FFF 00000000000006E8 000000000000000F
-
-
- */
-
-#include <efi.h>
-#include <efilib.h>
-
-/*
- * FreePages:  __PhysAddr__ __PgCnt__
- *
- */
-
-#define MAX_NUM_PAGES 0x000000000F000000
-
-#define MAX_ADDR ((1ULL << 46) - 1)
-
-#ifdef DEBUG
-#undef DEBUG
-#endif
-#define DEBUG 0
-
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
-
-	EFI_STATUS efi_status;
-	CHAR16 **argv;
-	INTN argc = 0;
-#if DEBUG
-	INTN c = 0;
-#endif
-	INTN err = 0;
-
-	INTN PgCnt = -1;
-	UINTN PhysAddr = 0;
-
-	InitializeLib(image, systab);
-
-	Print(L"FreePages: __PhysAddr__ __PgCnt__\n");
-	Print(L"__PhysAddr__   0... %llx\n", MAX_ADDR);
-	Print(L"__PgCnt__     [0..%lx]\n", MAX_NUM_PAGES);
-	Print(L"All numbers hex w/ no leading 0x\n");
-	Print(L"\n");
-
-#if DEBUG
-	Print(L"Now parse argc/argv\n");
-#endif
-	argc = GetShellArgcArgv(image, &argv);
-#if DEBUG
-	Print(L"argc = %d\n", argc);
-#endif
-
-#if DEBUG
-	for (c = 0;  c < argc;  c++ ) {
-		Print(L"argv[%d] = <%s>\n", c, argv[c]);
-	}
-#endif
-	if (argc != 3) {
-		Print(L"Invalid argument count\n");
-		return EFI_SUCCESS;
-	}
-
-	PhysAddr = xtoi(argv[1]);
-	PgCnt	 = xtoi(argv[2]);
-
-	if ( (PgCnt < 0) || (PgCnt > MAX_NUM_PAGES) ) {
-		Print(L"Inavlid PgCnt\n");
-		err++;
-	}
-	if ( PhysAddr > MAX_ADDR ) {
-		Print(L"Inavlid Address\n");
-		err++;
-	}
-	if ( err ) {
-		return EFI_SUCCESS;
-	}
-
-	Print(L"FreePages(%lx,%d)\n", PhysAddr, PgCnt);
-
-	efi_status = uefi_call_wrapper(BS->FreePages, 2, PhysAddr, PgCnt);
-
-	if ( EFI_ERROR(efi_status) ) {
-		Print(L"Free Pages Failed: %d\n", efi_status);
-		return efi_status;
-	}
-
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/Makefile b/third_party/gnu-efi/apps/Makefile
deleted file mode 100644
index cfae62d..0000000
--- a/third_party/gnu-efi/apps/Makefile
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-#  Copyright (C) 1999-2001 Hewlett-Packard Co.
-#	Contributed by David Mosberger <davidm@hpl.hp.com>
-#	Contributed by Stephane Eranian <eranian@hpl.hp.com>
-#
-#    All rights reserved.
-#
-#    Redistribution and use in source and binary forms, with or without
-#    modification, are permitted provided that the following conditions
-#    are met:
-#
-#    * Redistributions of source code must retain the above copyright
-#      notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-#      copyright notice, this list of conditions and the following
-#      disclaimer in the documentation and/or other materials
-#      provided with the distribution.
-#    * Neither the name of Hewlett-Packard Co. nor the names of its
-#      contributors may be used to endorse or promote products derived
-#      from this software without specific prior written permission.
-#
-#    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-#    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-#    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-#    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-#    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-#    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-#    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-#    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-#    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-#    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-#    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-#    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-#    SUCH DAMAGE.
-#
-
-SRCDIR = .
-
-VPATH = $(SRCDIR)
-
-include $(SRCDIR)/../Make.defaults
-
-TOPDIR = $(SRCDIR)/..
-
-CDIR=$(TOPDIR)/..
-LINUX_HEADERS	= /usr/src/sys/build
-CPPFLAGS	+= -D__KERNEL__ -I$(LINUX_HEADERS)/include
-CRTOBJS		= ../gnuefi/crt0-efi-$(ARCH).o
-
-LDSCRIPT	= $(TOPDIR)/gnuefi/elf_$(ARCH)_efi.lds
-ifneq (,$(findstring FreeBSD,$(OS)))
-LDSCRIPT	= $(TOPDIR)/gnuefi/elf_$(ARCH)_fbsd_efi.lds
-endif
-
-LDFLAGS		+= -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
-
-LOADLIBES	+= -lefi -lgnuefi
-LOADLIBES	+= $(LIBGCC)
-LOADLIBES	+= -T $(LDSCRIPT)
-
-TARGET_APPS = t.efi t2.efi t3.efi t4.efi t5.efi t6.efi \
-	      printenv.efi t7.efi t8.efi tcc.efi modelist.efi \
-	      route80h.efi drv0_use.efi AllocPages.efi \
-	      FreePages.efi setjmp.efi debughook.efi debughook.efi.debug
-TARGET_BSDRIVERS = drv0.efi
-TARGET_RTDRIVERS =
-
-ifneq ($(HAVE_EFI_OBJCOPY),)
-
-FORMAT		:= --target efi-app-$(ARCH)
-$(TARGET_BSDRIVERS): FORMAT=--target efi-bsdrv-$(ARCH)
-$(TARGET_RTDRIVERS): FORMAT=--target efi-rtdrv-$(ARCH)
-
-else
-
-SUBSYSTEM	:= 0xa
-$(TARGET_BSDRIVERS): SUBSYSTEM = 0xb
-$(TARGET_RTDRIVERS): SUBSYSTEM = 0xc
-
-FORMAT		:= -O binary
-LDFLAGS		+= --defsym=EFI_SUBSYSTEM=$(SUBSYSTEM)
-
-endif
-
-TARGETS = $(TARGET_APPS) $(TARGET_BSDRIVERS) $(TARGET_RTDRIVERS)
-
-all:	$(TARGETS)
-
-clean:
-	rm -f $(TARGETS) *~ *.o *.so
-
-.PHONY: install
-
-include $(SRCDIR)/../Make.rules
diff --git a/third_party/gnu-efi/apps/debughook.c b/third_party/gnu-efi/apps/debughook.c
deleted file mode 100644
index fb6cdad..0000000
--- a/third_party/gnu-efi/apps/debughook.c
+++ /dev/null
@@ -1,92 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-GetVariableAttr(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner,
-		  UINT32 *attributes)
-{
-	EFI_STATUS efi_status;
-
-	*len = 0;
-
-	efi_status = uefi_call_wrapper(RT->GetVariable, 5, var, &owner,
-				       NULL, len, NULL);
-	if (efi_status != EFI_BUFFER_TOO_SMALL)
-		return efi_status;
-
-	*data = AllocateZeroPool(*len);
-	if (!*data)
-		return EFI_OUT_OF_RESOURCES;
-
-	efi_status = uefi_call_wrapper(RT->GetVariable, 5, var, &owner,
-				       attributes, len, *data);
-
-	if (efi_status != EFI_SUCCESS) {
-		FreePool(*data);
-		*data = NULL;
-	}
-	return efi_status;
-}
-
-EFI_STATUS
-GetVariable(CHAR16 *var, UINT8 **data, UINTN *len, EFI_GUID owner)
-{
-	return GetVariableAttr(var, data, len, owner, NULL);
-}
-
-EFI_GUID DUMMY_GUID =
-{0x55aad538, 0x8f82, 0x4e2a, {0xa4,0xf0,0xbe, 0x59, 0x13, 0xb6, 0x5f, 0x1e}};
-
-static void
-__attribute__((__optimize__("0")))
-DebugHook(void)
-{
-	EFI_GUID guid = DUMMY_GUID;
-	UINT8 *data = NULL;
-	UINTN dataSize = 0;
-	EFI_STATUS efi_status;
-	register volatile UINTN x = 0;
-	extern char _text, _data;
-
-	if (x)
-		return;
-
-	efi_status = GetVariable(L"DUMMY_DEBUG", &data, &dataSize, guid);
-	if (EFI_ERROR(efi_status)) {
-		return;
-	}
-
-	Print(L"add-symbol-file /usr/lib/debug/boot/efi/debughook.debug "
-	      L"0x%08x -s .data 0x%08x\n", &_text, &_data);
-
-	Print(L"Pausing for debugger attachment.\n");
-	Print(L"To disable this, remove the EFI variable DUMMY_DEBUG-%g .\n",
-	      &guid);
-	x = 1;
-	while (x++) {
-		/* Make this so it can't /totally/ DoS us. */
-#if defined(__x86_64__) || defined(__i386__) || defined(__i686__)
-		if (x > 4294967294)
-			break;
-		__asm__ __volatile__("pause");
-#elif defined(__aarch64__)
-		if (x > 1000)
-			break;
-		__asm__ __volatile__("wfi");
-#else
-		if (x > 12000)
-			break;
-		uefi_call_wrapper(BS->Stall, 1, 5000);
-#endif
-	}
-	x = 1;
-}
-
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
-	InitializeLib(image, systab);
-	DebugHook();
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/drv0.c b/third_party/gnu-efi/apps/drv0.c
deleted file mode 100644
index 3e376bb..0000000
--- a/third_party/gnu-efi/apps/drv0.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright (C) 2013 David Decotigny <decot@googlers.com>
- *
- * Sample EFI shell session, together with drv0_use.efi:
- *
- *  # Loading first instance:
- *
- *    fs0:\> load drv0.efi
- *    Driver instance loaded successfully.
- *    load: Image fs0:\drv0.efi loaded at 2FD7C000 - Success
- *
- *  # Testing 1st instance:
- *
- *    fs0:\> drv0_use.efi
- *    Playing with driver instance 0...
- *    Hello Sample UEFI Driver!
- *    Hello was called 1 time(s).
- *
- *    fs0:\> drv0_use.efi
- *    Playing with driver instance 0...
- *    Hello Sample UEFI Driver!
- *    Hello was called 2 time(s).
- *
- *  # Loading another instance:
- *
- *    fs0:\> load drv0.efi
- *    Driver instance loaded successfully.
- *    load: Image fs0:\drv0.efi loaded at 2FD6D000 - Success
- *
- *  # Using both instances:
- *
- *    fs0:\> drv0_use.efi
- *    Playing with driver instance 0...
- *    Hello Sample UEFI Driver!
- *    Hello was called 3 time(s).
- *    Playing with driver instance 1...
- *    Hello Sample UEFI Driver!
- *    Hello was called 1 time(s).
- *
- *    fs0:\> drv0_use.efi
- *    Playing with driver instance 0...
- *    Hello Sample UEFI Driver!
- *    Hello was called 4 time(s).
- *    Playing with driver instance 1...
- *    Hello Sample UEFI Driver!
- *    Hello was called 2 time(s).
- *
- *  # Removing 1st instance:
- *
- *    fs0:\> dh
- *    Handle dump
- *      1: Image(DxeCore)
- *    [...]
- *     79: Image(\/drv0.efi) ImageDevPath (..A,0x800,0x17F7DF)/\/drv0.efi)
- *     7A: Image(\/drv0.efi) ImageDevPath (..A,0x800,0x17F7DF)/\/drv0.efi)
- *
- *    fs0:\> unload 79
- *     79: Image(\/drv0.efi) ImageDevPath (..A,0x800,0x17F7DF)/\/drv0.efi)
- *    Unload driver image (y/n)? y
- *    Driver instance unloaded.
- *    unload: Success
- *
- *  # Only 2nd instance remaining:
- *
- *    fs0:\> drv0_use.efi
- *    Playing with driver instance 0...
- *    Hello Sample UEFI Driver!
- *    Hello was called 3 time(s).
- *
- *  # Removing 2nd/last instance:
- *
- *    fs0:\> dh
- *    Handle dump
- *      1: Image(DxeCore)
- *    [...]
- *     79: Image(\/drv0.efi) ImageDevPath (..A,0x800,0x17F7DF)/\/drv0.efi)
- *
- *    fs0:\> unload 79
- *     79: Image(\/drv0.efi) ImageDevPath (..A,0x800,0x17F7DF)/\/drv0.efi)
- *    Unload driver image (y/n)? y
- *    Driver instance unloaded.
- *    unload: Success
- *
- *  # Expect error: no other drv0 instance left
- *
- *    fs0:\> drv0_use.efi
- *    Error looking up handles for proto: 14
- */
-
-#include <efi.h>
-#include <efilib.h>
-#include "drv0.h"
-
-
-static const EFI_GUID GnuEfiAppsDrv0ProtocolGuid
-  = GNU_EFI_APPS_DRV0_PROTOCOL_GUID;
-
-static struct {
-  GNU_EFI_APPS_DRV0_PROTOCOL Proto;
-  UINTN Counter;
-} InternalGnuEfiAppsDrv0ProtocolData;
-
-
-static
-EFI_STATUS
-EFI_FUNCTION
-Drv0SayHello(
-    IN const CHAR16 *HelloWho
-    )
-{
-  if (! HelloWho)
-    return EFI_INVALID_PARAMETER;
-
-  Print(L"Hello %s!\n", HelloWho);
-  InternalGnuEfiAppsDrv0ProtocolData.Counter ++;
-  return EFI_SUCCESS;
-}
-
-
-static
-EFI_STATUS
-EFI_FUNCTION
-Drv0GetNumberOfHello(
-    OUT UINTN *NumberOfHello
-    )
-{
-  if (! NumberOfHello)
-    return EFI_INVALID_PARAMETER;
-
-  *NumberOfHello = InternalGnuEfiAppsDrv0ProtocolData.Counter;
-  return EFI_SUCCESS;
-}
-
-
-static
-EFI_STATUS
-EFI_FUNCTION
-Drv0Unload(IN EFI_HANDLE ImageHandle)
-{
-  LibUninstallProtocolInterfaces(ImageHandle,
-                                 &GnuEfiAppsDrv0ProtocolGuid,
-                                 &InternalGnuEfiAppsDrv0ProtocolData.Proto,
-                                 NULL);
-  Print(L"Driver instance unloaded.\n", ImageHandle);
-  return EFI_SUCCESS;
-}
-
-
-EFI_STATUS
-efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SysTab)
-{
-  EFI_STATUS Status;
-  EFI_LOADED_IMAGE *LoadedImage = NULL;
-
-  InitializeLib(ImageHandle, SysTab);
-
-  /* Initialize global protocol definition + data */
-  InternalGnuEfiAppsDrv0ProtocolData.Proto.SayHello
-      = (GNU_EFI_APPS_DRV0_SAY_HELLO) Drv0SayHello;
-  InternalGnuEfiAppsDrv0ProtocolData.Proto.GetNumberOfHello
-      = (GNU_EFI_APPS_DRV0_GET_NUMBER_OF_HELLO) Drv0GetNumberOfHello;
-  InternalGnuEfiAppsDrv0ProtocolData.Counter = 0;
-
-  /* Grab handle to this image: we'll attach our proto instance to it */
-  Status = uefi_call_wrapper(BS->OpenProtocol, 6,
-                             ImageHandle, &LoadedImageProtocol,
-                             NULL, ImageHandle,
-                             NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
-  if (EFI_ERROR(Status)) {
-    Print(L"Could not open loaded image protocol: %d\n", Status);
-    return Status;
-  }
-
-  /* Attach our proto to the current driver image */
-  Status = LibInstallProtocolInterfaces(
-      &ImageHandle, &GnuEfiAppsDrv0ProtocolGuid,
-      &InternalGnuEfiAppsDrv0ProtocolData.Proto, NULL);
-  if (EFI_ERROR(Status)) {
-    Print(L"Error registering driver instance: %d\n", Status);
-    return Status;
-  }
-
-  /* Register Unload callback, used to unregister current protocol
-   * instance from system */
-  LoadedImage->Unload = (EFI_IMAGE_UNLOAD)Drv0Unload;
-
-  Print(L"Driver instance loaded successfully.\n");
-  return EFI_SUCCESS;  /* at this point, this instance stays resident
-                        * until image is unloaded, eg. with shell's unload,
-                        * ExitBootServices() */
-}
diff --git a/third_party/gnu-efi/apps/drv0.h b/third_party/gnu-efi/apps/drv0.h
deleted file mode 100644
index 26d2ffd..0000000
--- a/third_party/gnu-efi/apps/drv0.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef _GNU_EFI_APPS_DRV0_H_
-#define _GNU_EFI_APPS_DRV0_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* UEFI naming conventions */
-#define GNU_EFI_APPS_DRV0_PROTOCOL_GUID \
-{ 0xe4dcafd0, 0x586c, 0x4b3d, {0x86, 0xe7, 0x28, 0xde, 0x7f, 0xcc, 0x04, 0xb8} }
-
-INTERFACE_DECL(_GNU_EFI_APPS_DRV0_PROTOCOL);
-
-typedef
-EFI_STATUS
-(EFIAPI *GNU_EFI_APPS_DRV0_SAY_HELLO) (
-    IN struct _GNU_EFI_APPS_DRV0_PROTOCOL *This,
-    IN const CHAR16 *HelloWho
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *GNU_EFI_APPS_DRV0_GET_NUMBER_OF_HELLO) (
-    IN struct _GNU_EFI_APPS_DRV0_PROTOCOL *This,
-    OUT UINTN *NumberOfHello
-    );
-
-typedef struct _GNU_EFI_APPS_DRV0_PROTOCOL {
-  GNU_EFI_APPS_DRV0_SAY_HELLO           SayHello;
-  GNU_EFI_APPS_DRV0_GET_NUMBER_OF_HELLO GetNumberOfHello;
-} GNU_EFI_APPS_DRV0_PROTOCOL;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/third_party/gnu-efi/apps/drv0_use.c b/third_party/gnu-efi/apps/drv0_use.c
deleted file mode 100644
index 8a06d91..0000000
--- a/third_party/gnu-efi/apps/drv0_use.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2013 David Decotigny <decot@googlers.com>
- *
- * See drv0.c for an example session.
- */
-
-#include <efi.h>
-#include <efilib.h>
-#include "drv0.h"
-
-
-static EFI_GUID GnuEfiAppsDrv0ProtocolGuid
-  = GNU_EFI_APPS_DRV0_PROTOCOL_GUID;
-
-
-static
-EFI_STATUS
-PlayWithGnuEfiAppsDrv0Protocol(IN EFI_HANDLE DrvHandle) {
-  EFI_STATUS Status;
-  GNU_EFI_APPS_DRV0_PROTOCOL *drv = NULL;
-  UINTN NumberOfHello = 0;
-
-  Status = uefi_call_wrapper(BS->OpenProtocol, 6,
-                             DrvHandle,
-                             &GnuEfiAppsDrv0ProtocolGuid,
-                             NULL,
-                             DrvHandle,
-                             NULL,
-                             EFI_OPEN_PROTOCOL_GET_PROTOCOL);
-  if (EFI_ERROR(Status)) {
-    Print(L"Cannot open proto: %d\n", Status);
-    return Status;
-  }
-
-  Status = uefi_call_wrapper(drv->SayHello, 2, drv, L"Sample UEFI Driver");
-  if (EFI_ERROR(Status)) {
-    Print(L"Cannot call SayHello: %d\n", Status);
-  }
-
-  Status = uefi_call_wrapper(drv->GetNumberOfHello, 2, drv, &NumberOfHello);
-  if (EFI_ERROR(Status)) {
-    Print(L"Cannot call GetNumberOfHello: %d\n", Status);
-  } else {
-    Print(L"Hello was called %d time(s).\n", NumberOfHello);
-  }
-
-  return EFI_SUCCESS;
-}
-
-
-EFI_STATUS
-efi_main (EFI_HANDLE Image, EFI_SYSTEM_TABLE *SysTab)
-{
-  EFI_STATUS Status;
-  EFI_HANDLE *Handles = NULL;
-  UINTN i, NoHandles = 0;
-
-  InitializeLib(Image, SysTab);
-
-  Status = LibLocateHandle(ByProtocol, &GnuEfiAppsDrv0ProtocolGuid,
-                           NULL, &NoHandles, &Handles);
-  if (EFI_ERROR(Status)) {
-    Print(L"Error looking up handles for proto: %d\n", Status);
-    return Status;
-  }
-
-  for (i = 0 ; i < NoHandles ; ++i)
-  {
-    Print(L"Playing with driver instance %d...\n", i);
-    Status = PlayWithGnuEfiAppsDrv0Protocol(Handles[i]);
-    if (EFI_ERROR(Status))
-      Print(L"Error playing with instance %d, skipping\n", i);
-  }
-
-  if (Handles)
-    FreePool(Handles);
-
-  return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/modelist.c b/third_party/gnu-efi/apps/modelist.c
deleted file mode 100644
index 8d816d1..0000000
--- a/third_party/gnu-efi/apps/modelist.c
+++ /dev/null
@@ -1,114 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-extern EFI_GUID GraphicsOutputProtocol;
-
-static int memcmp(const void *s1, const void *s2, UINTN n)
-{
-	const unsigned char *c1 = s1, *c2 = s2;
-	int d = 0;
-
-	if (!s1 && !s2)
-		return 0;
-	if (s1 && !s2)
-		return 1;
-	if (!s1 && s2)
-		return -1;
-
-	while (n--) {
-		d = (int)*c1++ - (int)*c2++;
-		if (d)
-			break;
-	}
-	return d;
-}
-
-static void
-print_modes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
-{
-	int i, imax;
-	EFI_STATUS rc;
-
-	imax = gop->Mode->MaxMode;
-
-	Print(L"GOP reports MaxMode %d\n", imax);
-	for (i = 0; i < imax; i++) {
-		EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *info;
-		UINTN SizeOfInfo;
-		rc = uefi_call_wrapper(gop->QueryMode, 4, gop, i, &SizeOfInfo,
-					&info);
-		if (EFI_ERROR(rc) && rc == EFI_NOT_STARTED) {
-			rc = uefi_call_wrapper(gop->SetMode, 2, gop,
-				gop->Mode->Mode);
-			rc = uefi_call_wrapper(gop->QueryMode, 4, gop, i,
-				&SizeOfInfo, &info);
-		}
-
-		if (EFI_ERROR(rc)) {
-			CHAR16 Buffer[64];
-			StatusToString(Buffer, rc);
-			Print(L"%d: Bad response from QueryMode: %s (%d)\n",
-				i, Buffer, rc);
-			continue;
-		}
-		Print(L"%c%d: %dx%d ", memcmp(info,gop->Mode->Info,sizeof(*info)) == 0 ? '*' : ' ', i,
-			info->HorizontalResolution,
-			info->VerticalResolution);
-		switch(info->PixelFormat) {
-			case PixelRedGreenBlueReserved8BitPerColor:
-				Print(L"RGBR");
-				break;
-			case PixelBlueGreenRedReserved8BitPerColor:
-				Print(L"BGRR");
-				break;
-			case PixelBitMask:
-				Print(L"R:%08x G:%08x B:%08x X:%08x",
-					info->PixelInformation.RedMask,
-					info->PixelInformation.GreenMask,
-					info->PixelInformation.BlueMask,
-					info->PixelInformation.ReservedMask);
-				break;
-			case PixelBltOnly:
-				Print(L"(blt only)");
-				break;
-			default:
-				Print(L"(Invalid pixel format)");
-				break;
-		}
-		Print(L" pitch %d\n", info->PixelsPerScanLine);
-	}
-}
-
-static EFI_STATUS
-SetWatchdog(UINTN seconds)
-{
-	EFI_STATUS rc;
-	rc = uefi_call_wrapper(BS->SetWatchdogTimer, 4, seconds, 0x1ffff,
-				0, NULL);
-	if (EFI_ERROR(rc)) {
-		CHAR16 Buffer[64];
-		StatusToString(Buffer, rc);
-		Print(L"Bad response from QueryMode: %s (%d)\n", Buffer, rc);
-	}
-	return rc;
-}
-
-EFI_STATUS
-efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab)
-{
-	EFI_STATUS rc;
-	EFI_GRAPHICS_OUTPUT_PROTOCOL *gop;
-
-	InitializeLib(image_handle, systab);
-
-	SetWatchdog(10);
-
-	rc = LibLocateProtocol(&GraphicsOutputProtocol, (void **)&gop);
-	if (EFI_ERROR(rc))
-		return rc;
-
-	print_modes(gop);
-
-	SetWatchdog(0);
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/printenv.c b/third_party/gnu-efi/apps/printenv.c
deleted file mode 100644
index 6341e40..0000000
--- a/third_party/gnu-efi/apps/printenv.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
-	EFI_STATUS status;
-	CHAR16 name[256], *val, fmt[20];
-	EFI_GUID vendor;
-	UINTN size;
-
-	InitializeLib(image, systab);
-
-	name[0] = 0;
-	vendor = NullGuid;
-
-	Print(L"GUID                                Variable Name        Value\n");
-	Print(L"=================================== ==================== ========\n");
-
-	StrCpy(fmt, L"%.-35g %.-20s %s\n");
-	while (1) {
-		size = sizeof(name);
-		status = uefi_call_wrapper(RT->GetNextVariableName, 3, &size, name, &vendor);
-		if (status != EFI_SUCCESS)
-			break;
-
-		val = LibGetVariable(name, &vendor);
-		Print(fmt, &vendor, name, val);
-		FreePool(val);
-	}
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/route80h.c b/third_party/gnu-efi/apps/route80h.c
deleted file mode 100644
index b0b142f..0000000
--- a/third_party/gnu-efi/apps/route80h.c
+++ /dev/null
@@ -1,145 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-/* this example program changes the Reserved Page Route (RPR) bit on ICH10's General
- * Control And Status Register (GCS) from LPC to PCI.  In practical terms, it routes
- * outb to port 80h to the PCI bus. */
-
-#define GCS_OFFSET_ADDR 0x3410
-#define GCS_RPR_SHIFT 2
-#define GCS_RPR_PCI 1
-#define GCS_RPR_LPC 0
-
-#define VENDOR_ID_INTEL 0x8086
-#define DEVICE_ID_LPCIF 0x3a16
-#define DEVICE_ID_COUGARPOINT_LPCIF 0x1c56
-
-static EFI_HANDLE ImageHandle;
-
-typedef struct {
-	uint16_t vendor_id;	/* 00-01 */
-	uint16_t device_id;	/* 02-03 */
-	char pad[0xEB];		/* 04-EF */
-	uint32_t rcba;		/* F0-F3 */
-	uint32_t reserved[3];	/* F4-FF */
-} lpcif_t;
-
-static inline void set_bit(volatile uint32_t *flag, int bit, int value)
-{
-	uint32_t val = *flag;
-	Print(L"current value is 0x%2x\n", val);
-
-	if (value) {
-		val |= (1 << bit);
-	} else {
-		val &= ~(1 << bit);
-	}
-	Print(L"setting value to 0x%2x\n", val);
-	*flag = val;
-	val = *flag;
-	Print(L"new value is 0x%2x\n", val);
-}
-
-static inline int configspace_matches_ids(void *config, uint32_t vendor_id,
-				uint32_t device_id)
-{
-	uint32_t *cfg = config;
-	if (cfg[0] == vendor_id && cfg[1] == device_id)
-		return 1;
-	return 0;
-}
-
-static int is_device(EFI_PCI_IO *pciio, uint16_t vendor_id, uint16_t device_id)
-{
-	lpcif_t lpcif;
-	EFI_STATUS rc;
-
-	rc = uefi_call_wrapper(pciio->Pci.Read, 5, pciio, EfiPciIoWidthUint16, 0, 2, &lpcif);
-	if (EFI_ERROR(rc))
-		return 0;
-
-	if (vendor_id == lpcif.vendor_id && device_id == lpcif.device_id)
-		return 1;
-	return 0;
-}
-
-static EFI_STATUS find_pci_device(uint16_t vendor_id, uint16_t device_id,
-				EFI_PCI_IO **pciio)
-{
-	EFI_STATUS rc;
-	EFI_HANDLE *Handles;
-	UINTN NoHandles, i;
-
-	if (!pciio)
-		return EFI_INVALID_PARAMETER;
-
-	rc = LibLocateHandle(ByProtocol, &PciIoProtocol, NULL, &NoHandles,
-			     &Handles);
-	if (EFI_ERROR(rc))
-		return rc;
-
-	for (i = 0; i < NoHandles; i++) {
-		void *pciio_tmp = NULL;
-		rc = uefi_call_wrapper(BS->OpenProtocol, 6, Handles[i],
-				    &PciIoProtocol, &pciio_tmp, ImageHandle,
-				    NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
-		if (EFI_ERROR(rc))
-			continue;
-		*pciio = pciio_tmp;
-		if (!is_device(*pciio, vendor_id, device_id)) {
-			*pciio = NULL;
-			continue;
-		}
-
-		return EFI_SUCCESS;
-	}
-	return EFI_NOT_FOUND;
-}
-
-EFI_STATUS
-efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab)
-{
-	InitializeLib(image_handle, systab);
-	EFI_PCI_IO *pciio = NULL;
-	lpcif_t lpcif;
-	EFI_STATUS rc;
-	struct {
-		uint16_t vendor;
-		uint16_t device;
-	} devices[] = {
-		{ VENDOR_ID_INTEL, DEVICE_ID_LPCIF },
-		{ VENDOR_ID_INTEL, DEVICE_ID_COUGARPOINT_LPCIF },
-		{ 0, 0 }
-	};
-	int i;
-
-	ImageHandle = image_handle;
-	for (i = 0; devices[i].vendor != 0; i++) {
-		rc = find_pci_device(devices[i].vendor, devices[i].device, &pciio);
-		if (EFI_ERROR(rc))
-			continue;
-	}
-
-	if (rc == EFI_NOT_FOUND) {
-		Print(L"Device not found.\n");
-		return rc;
-	} else if (EFI_ERROR(rc)) {
-		return rc;
-	}
-
-	rc = uefi_call_wrapper(pciio->Pci.Read, 5, pciio, EfiPciIoWidthUint32,
-		EFI_FIELD_OFFSET(lpcif_t, rcba), 1, &lpcif.rcba);
-	if (EFI_ERROR(rc))
-		return rc;
-	if (!(lpcif.rcba & 1)) {
-		Print(L"rcrb is not mapped, cannot route port 80h\n");
-		return EFI_UNSUPPORTED;
-	}
-	lpcif.rcba &= ~1UL;
-
-	Print(L"rcba: 0x%8x\n", lpcif.rcba, lpcif.rcba);
-	set_bit((uint32_t *)(uint64_t)(lpcif.rcba + GCS_OFFSET_ADDR),
-		     GCS_RPR_SHIFT, GCS_RPR_PCI);
-
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/setjmp.c b/third_party/gnu-efi/apps/setjmp.c
deleted file mode 100644
index bd70c11..0000000
--- a/third_party/gnu-efi/apps/setjmp.c
+++ /dev/null
@@ -1,31 +0,0 @@
-
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main(
-	EFI_HANDLE image_handle,
-	EFI_SYSTEM_TABLE *systab
-)
-{
-	jmp_buf env;
-	int rc;
-
-	InitializeLib(image_handle, systab);
-	rc = setjmp(&env);
-	Print(L"setjmp() = %d\n", rc);
-
-	if (rc == 3) {
-		Print(L"3 worked\n");
-		longjmp(&env, 0);
-		return 0;
-	}
-
-	if (rc == 1) {
-		Print(L"0 got to be one yay\n");
-		return 0;
-	}
-
-	longjmp(&env, 3);
-	return 0;
-}
diff --git a/third_party/gnu-efi/apps/t.c b/third_party/gnu-efi/apps/t.c
deleted file mode 100644
index c7e3d57..0000000
--- a/third_party/gnu-efi/apps/t.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-static CHAR16 *
-a2u (char *str)
-{
-	static CHAR16 mem[2048];
-	int i;
-
-	for (i = 0; str[i]; ++i)
-		mem[i] = (CHAR16) str[i];
-	mem[i] = 0;
-	return mem;
-}
-
-EFI_STATUS
-efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *systab)
-{
-	SIMPLE_TEXT_OUTPUT_INTERFACE *conout;
-
-	InitializeLib(image_handle, systab);
-	conout = systab->ConOut;
-	uefi_call_wrapper(conout->OutputString, 2, conout, (CHAR16 *)L"Hello World!\n\r");
-	uefi_call_wrapper(conout->OutputString, 2, conout, a2u("Hello World!\n\r"));
-
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/t2.c b/third_party/gnu-efi/apps/t2.c
deleted file mode 100644
index 6a09c42..0000000
--- a/third_party/gnu-efi/apps/t2.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
-	SIMPLE_TEXT_OUTPUT_INTERFACE *conout;
-
-        InitializeLib(image, systab);
-	conout = systab->ConOut;
-	uefi_call_wrapper(conout->OutputString, 2, conout, L"Hello World!\n\r");
-
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/t3.c b/third_party/gnu-efi/apps/t3.c
deleted file mode 100644
index 623830a..0000000
--- a/third_party/gnu-efi/apps/t3.c
+++ /dev/null
@@ -1,95 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main(
-	EFI_HANDLE image_handle,
-	EFI_SYSTEM_TABLE *systab
-)
-{
-	EFI_GUID loaded_image_protocol = LOADED_IMAGE_PROTOCOL;
-	EFI_STATUS efi_status;
-	EFI_LOADED_IMAGE *li;
-	UINTN pat = PoolAllocationType;
-	VOID *void_li_p;
-
-	InitializeLib(image_handle, systab);
-	PoolAllocationType = 2; /* klooj */
-
-	Print(L"Hello World! (0xd=0x%x, 13=%d)\n", 13, 13);
-
-	Print(L"before InitializeLib(): PoolAllocationType=%d\n",
-		pat);
-
-	Print(L" after InitializeLib(): PoolAllocationType=%d\n",
-		PoolAllocationType);
-
-	/*
-	 * Locate loaded_image_handle instance.
-	 */
-
-	Print(L"BS->HandleProtocol()  ");
-
-	efi_status = uefi_call_wrapper(
-		BS->HandleProtocol,
-		3,
-		image_handle,
-		&loaded_image_protocol,
-		&void_li_p);
-	li = void_li_p;
-
-	Print(L"%xh (%r)\n", efi_status, efi_status);
-
-	if (efi_status != EFI_SUCCESS) {
-		return efi_status;
-	}
-
-	Print(L"  li: %xh\n", li);
-
-	if (!li) {
-		return EFI_UNSUPPORTED;
-	}
-
-	Print(L"  li->Revision:        %xh\n", li->Revision);
-	Print(L"  li->ParentHandle:    %xh\n", li->ParentHandle);
-	Print(L"  li->SystemTable:     %xh\n", li->SystemTable);
-	Print(L"  li->DeviceHandle:    %xh\n", li->DeviceHandle);
-	Print(L"  li->FilePath:        %xh\n", li->FilePath);
-	Print(L"  li->Reserved:        %xh\n", li->Reserved);
-	Print(L"  li->LoadOptionsSize: %xh\n", li->LoadOptionsSize);
-	Print(L"  li->LoadOptions:     %xh\n", li->LoadOptions);
-	Print(L"  li->ImageBase:       %xh\n", li->ImageBase);
-	Print(L"  li->ImageSize:       %xh\n", li->ImageSize);
-	Print(L"  li->ImageCodeType:   %xh\n", li->ImageCodeType);
-	Print(L"  li->ImageDataType:   %xh\n", li->ImageDataType);
-	Print(L"  li->Unload:          %xh\n", li->Unload);
-
-#if 0
-typedef struct {
-    UINT32                          Revision;
-    EFI_HANDLE                      ParentHandle;
-    struct _EFI_SYSTEM_TABLE        *SystemTable;
-
-    // Source location of image
-    EFI_HANDLE                      DeviceHandle;
-    EFI_DEVICE_PATH                 *FilePath;
-    VOID                            *Reserved;
-
-    // Images load options
-    UINT32                          LoadOptionsSize;
-    VOID                            *LoadOptions;
-
-    // Location of where image was loaded
-    VOID                            *ImageBase;
-    UINT64                          ImageSize;
-    EFI_MEMORY_TYPE                 ImageCodeType;
-    EFI_MEMORY_TYPE                 ImageDataType;
-
-    // If the driver image supports a dynamic unload request
-    EFI_IMAGE_UNLOAD                Unload;
-
-} EFI_LOADED_IMAGE;
-#endif
-
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/t4.c b/third_party/gnu-efi/apps/t4.c
deleted file mode 100644
index b8487ec..0000000
--- a/third_party/gnu-efi/apps/t4.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE *image, EFI_SYSTEM_TABLE *systab)
-{
-	UINTN index;
-
-        InitializeLib(image, systab);
-	uefi_call_wrapper(systab->ConOut->OutputString, 2, systab->ConOut, L"Hello application started\r\n");
-	uefi_call_wrapper(systab->ConOut->OutputString, 2, systab->ConOut, L"\r\n\r\n\r\nHit any key to exit\r\n");
-	uefi_call_wrapper(systab->BootServices->WaitForEvent, 3, 1, &systab->ConIn->WaitForKey, &index);
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/t5.c b/third_party/gnu-efi/apps/t5.c
deleted file mode 100644
index 7c868d2..0000000
--- a/third_party/gnu-efi/apps/t5.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
-	InitializeLib(image, systab);
-	Print(L"HelloLib application started\n");
-	Print(L"\n\n\nHit any key to exit this image\n");
-	WaitForSingleEvent(ST->ConIn->WaitForKey, 0);
-	uefi_call_wrapper(ST->ConOut->OutputString, 2, ST->ConOut, L"\n\n");
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/t6.c b/third_party/gnu-efi/apps/t6.c
deleted file mode 100644
index f95ea66..0000000
--- a/third_party/gnu-efi/apps/t6.c
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-typedef EFI_STATUS (*foo_t)(EFI_HANDLE, EFI_GUID *, VOID **);
-typedef struct {
-	unsigned long addr;
-	unsigned long gp;
-} fdesc_t;
-
-EFI_LOADED_IMAGE my_loaded;
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
-	EFI_LOADED_IMAGE *loaded_image = NULL;
-#if 0
-	EFI_DEVICE_PATH *dev_path;
-#endif
-	EFI_STATUS status;
-
-	InitializeLib(image, systab);
-	status = uefi_call_wrapper(systab->BootServices->HandleProtocol,
-				3,
-				image, 
-				&LoadedImageProtocol, 
-				(void **) &loaded_image);
-	if (EFI_ERROR(status)) {
-		Print(L"handleprotocol: %r\n", status);
-	}
-
-#if 0
-	BS->HandleProtocol(loaded_image->DeviceHandle, &DevicePathProtocol, (void **) &dev_path);
-
-	Print(L"Image device      : %s\n", DevicePathToStr(dev_path));
-	Print(L"Image file        : %s\n", DevicePathToStr(loaded_image->FilePath));
-#endif
-	Print(L"Image base        : %lx\n", loaded_image->ImageBase);
-	Print(L"Image size        : %lx\n", loaded_image->ImageSize);
-	Print(L"Load options size : %lx\n", loaded_image->LoadOptionsSize);
-	Print(L"Load options      : %s\n", loaded_image->LoadOptions);
-
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/t7.c b/third_party/gnu-efi/apps/t7.c
deleted file mode 100644
index f02aaee..0000000
--- a/third_party/gnu-efi/apps/t7.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
-	EFI_INPUT_KEY efi_input_key;
-	EFI_STATUS efi_status;
-
-	InitializeLib(image, systab);
-
-	Print(L"HelloLib application started\n");
-
-	Print(L"\n\n\nHit any key to exit this image\n");
-	WaitForSingleEvent(ST->ConIn->WaitForKey, 0);
-
-	uefi_call_wrapper(ST->ConOut->OutputString, 2, ST->ConOut, L"\n\n");
-
-	efi_status = uefi_call_wrapper(ST->ConIn->ReadKeyStroke, 2, ST->ConIn, &efi_input_key);
-
-	Print(L"ScanCode: %xh  UnicodeChar: %xh CallRtStatus: %x\n",
-		efi_input_key.ScanCode, efi_input_key.UnicodeChar, efi_status);
-
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/t8.c b/third_party/gnu-efi/apps/t8.c
deleted file mode 100644
index 10f8811..0000000
--- a/third_party/gnu-efi/apps/t8.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
-{
-  INTN Argc, i;
-  CHAR16 **Argv;
-
-  InitializeLib(ImageHandle, SystemTable);
-  Argc = GetShellArgcArgv(ImageHandle, &Argv);
-
-  Print(L"Hello World, started with Argc=%d\n", Argc);
-  for (i = 0 ; i < Argc ; ++i)
-    Print(L"  Argv[%d] = '%s'\n", i, Argv[i]);
-
-  Print(L"Bye.\n");
-  return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/apps/tcc.c b/third_party/gnu-efi/apps/tcc.c
deleted file mode 100644
index 2d84a99..0000000
--- a/third_party/gnu-efi/apps/tcc.c
+++ /dev/null
@@ -1,442 +0,0 @@
-/*
- * Test if our calling convention gymnastics actually work
- */
-
-#include <efi.h>
-#include <efilib.h>
-
-#ifdef __x86_64__
-#include <x86_64/pe.h>
-#include <x86_64/efibind.h>
-#endif
-
-#if 0
-	asm volatile("out %0,%1" : : "a" ((uint8_t)a), "dN" (0x80));
-
-extern void dump_stack(void);
-asm(	".globl	dump_stack\n"
-	"dump_stack:\n"
-	"	movq %rsp, %rdi\n"
-	"	jmp *dump_stack_helper@GOTPCREL(%rip)\n"
-	".size	dump_stack, .-dump_stack");
-
-void dump_stack_helper(uint64_t rsp_val)
-{
-	uint64_t *rsp = (uint64_t *)rsp_val;
-	int x;
-
-	Print(L"%%rsp: 0x%08x%08x stack:\r\n",
-					(rsp_val & 0xffffffff00000000) >>32,
-					 rsp_val & 0xffffffff);
-	for (x = 0; x < 8; x++) {
-		Print(L"%08x: ", ((uint64_t)rsp) & 0xffffffff);
-		Print(L"%016x ", *rsp++);
-		Print(L"%016x ", *rsp++);
-		Print(L"%016x ", *rsp++);
-		Print(L"%016x\r\n", *rsp++);
-	}
-}
-#endif
-
-EFI_STATUS EFI_FUNCTION test_failure_callback(void)
-{
-	return EFI_UNSUPPORTED;
-}
-
-EFI_STATUS test_failure(void)
-{
-	return uefi_call_wrapper(test_failure_callback, 0);
-}
-
-EFI_STATUS EFI_FUNCTION test_call0_callback(void)
-{
-	return EFI_SUCCESS;
-}
-
-EFI_STATUS test_call0(void)
-{
-	return uefi_call_wrapper(test_call0_callback, 0);
-}
-
-EFI_STATUS EFI_FUNCTION test_call1_callback(UINT32 a)
-{
-	if (a != 0x12345678) {
-		return EFI_LOAD_ERROR;
-	}
-	return EFI_SUCCESS;
-}
-
-EFI_STATUS test_call1(void)
-{
-	return uefi_call_wrapper(test_call1_callback, 1,0x12345678);
-}
-
-EFI_STATUS EFI_FUNCTION test_call2_callback(UINT32 a, UINT32 b)
-{
-	if (a != 0x12345678) {
-		return EFI_LOAD_ERROR;
-	}
-	if (b != 0x23456789) {
-		return EFI_INVALID_PARAMETER;
-	}
-	return EFI_SUCCESS;
-}
-
-EFI_STATUS test_call2(void)
-{
-	return uefi_call_wrapper(test_call2_callback, 2,
-		0x12345678, 0x23456789);
-}
-
-EFI_STATUS EFI_FUNCTION test_call3_callback(UINT32 a, UINT32 b,
-	UINT32 c)
-{
-	if (a != 0x12345678)
-		return EFI_LOAD_ERROR;
-	if (b != 0x23456789)
-		return EFI_INVALID_PARAMETER;
-	if (c != 0x3456789a)
-		return EFI_UNSUPPORTED;
-	return EFI_SUCCESS;
-}
-
-EFI_STATUS test_call3(void)
-{
-	return uefi_call_wrapper(test_call3_callback, 3,
-		0x12345678, 0x23456789, 0x3456789a);
-}
-
-EFI_STATUS EFI_FUNCTION test_call4_callback(UINT32 a, UINT32 b,
-	UINT32 c, UINT32 d)
-{
-	if (a != 0x12345678)
-		return EFI_LOAD_ERROR;
-	if (b != 0x23456789)
-		return EFI_INVALID_PARAMETER;
-	if (c != 0x3456789a)
-		return EFI_UNSUPPORTED;
-	if (d != 0x456789ab)
-		return EFI_BAD_BUFFER_SIZE;
-
-	return EFI_SUCCESS;
-}
-
-EFI_STATUS test_call4(void)
-{
-	return uefi_call_wrapper(test_call4_callback, 4,
-		0x12345678, 0x23456789, 0x3456789a, 0x456789ab);
-}
-
-EFI_STATUS EFI_FUNCTION test_call5_callback(UINT32 a, UINT32 b,
-	UINT32 c, UINT32 d, UINT32 e)
-{
-	if (a != 0x12345678)
-		return EFI_LOAD_ERROR;
-	if (b != 0x23456789)
-		return EFI_INVALID_PARAMETER;
-	if (c != 0x3456789a)
-		return EFI_UNSUPPORTED;
-	if (d != 0x456789ab)
-		return EFI_BAD_BUFFER_SIZE;
-	if (e != 0x56789abc)
-		return EFI_BUFFER_TOO_SMALL;
-
-	return EFI_SUCCESS;
-}
-
-EFI_STATUS test_call5(void)
-{
-	return uefi_call_wrapper(test_call5_callback, 5,
-		0x12345678, 0x23456789, 0x3456789a, 0x456789ab, 0x56789abc);
-}
-
-EFI_STATUS EFI_FUNCTION test_call6_callback(UINT32 a, UINT32 b,
-	UINT32 c, UINT32 d, UINT32 e, UINT32 f)
-{
-	if (a != 0x12345678)
-		return EFI_LOAD_ERROR;
-	if (b != 0x23456789)
-		return EFI_INVALID_PARAMETER;
-	if (c != 0x3456789a)
-		return EFI_UNSUPPORTED;
-	if (d != 0x456789ab)
-		return EFI_BAD_BUFFER_SIZE;
-	if (e != 0x56789abc)
-		return EFI_BUFFER_TOO_SMALL;
-	if (f != 0x6789abcd)
-		return EFI_NOT_READY;
-
-	return EFI_SUCCESS;
-}
-
-EFI_STATUS test_call6(void)
-{
-	return uefi_call_wrapper(test_call6_callback, 6,
-		0x12345678, 0x23456789, 0x3456789a, 0x456789ab, 0x56789abc,
-		0x6789abcd);
-}
-
-EFI_STATUS EFI_FUNCTION test_call7_callback(UINT32 a, UINT32 b,
-	UINT32 c, UINT32 d, UINT32 e, UINT32 f, UINT32 g)
-{
-	if (a != 0x12345678)
-		return EFI_LOAD_ERROR;
-	if (b != 0x23456789)
-		return EFI_INVALID_PARAMETER;
-	if (c != 0x3456789a)
-		return EFI_UNSUPPORTED;
-	if (d != 0x456789ab)
-		return EFI_BAD_BUFFER_SIZE;
-	if (e != 0x56789abc)
-		return EFI_BUFFER_TOO_SMALL;
-	if (f != 0x6789abcd)
-		return EFI_NOT_READY;
-	if (g != 0x789abcde)
-		return EFI_DEVICE_ERROR;
-
-	return EFI_SUCCESS;
-}
-
-EFI_STATUS test_call7(void)
-{
-	return uefi_call_wrapper(test_call7_callback, 7,
-		0x12345678, 0x23456789, 0x3456789a, 0x456789ab,
-		0x56789abc, 0x6789abcd, 0x789abcde);
-}
-
-EFI_STATUS EFI_FUNCTION test_call8_callback(UINT32 a, UINT32 b,
-	UINT32 c, UINT32 d, UINT32 e, UINT32 f, UINT32 g, UINT32 h)
-{
-	if (a != 0x12345678)
-		return EFI_LOAD_ERROR;
-	if (b != 0x23456789)
-		return EFI_INVALID_PARAMETER;
-	if (c != 0x3456789a)
-		return EFI_UNSUPPORTED;
-	if (d != 0x456789ab)
-		return EFI_BAD_BUFFER_SIZE;
-	if (e != 0x56789abc)
-		return EFI_BUFFER_TOO_SMALL;
-	if (f != 0x6789abcd)
-		return EFI_NOT_READY;
-	if (g != 0x789abcde)
-		return EFI_DEVICE_ERROR;
-	if (h != 0x89abcdef)
-		return EFI_WRITE_PROTECTED;
-
-	return EFI_SUCCESS;
-}
-
-EFI_STATUS test_call8(void)
-{
-	return uefi_call_wrapper(test_call8_callback, 8,
-		0x12345678,
-		0x23456789,
-		0x3456789a,
-		0x456789ab,
-		0x56789abc,
-		0x6789abcd,
-		0x789abcde,
-		0x89abcdef);
-}
-
-EFI_STATUS EFI_FUNCTION test_call9_callback(UINT32 a, UINT32 b,
-	UINT32 c, UINT32 d, UINT32 e, UINT32 f, UINT32 g, UINT32 h, UINT32 i)
-{
-	if (a != 0x12345678)
-		return EFI_LOAD_ERROR;
-	if (b != 0x23456789)
-		return EFI_INVALID_PARAMETER;
-	if (c != 0x3456789a)
-		return EFI_UNSUPPORTED;
-	if (d != 0x456789ab)
-		return EFI_BAD_BUFFER_SIZE;
-	if (e != 0x56789abc)
-		return EFI_BUFFER_TOO_SMALL;
-	if (f != 0x6789abcd)
-		return EFI_NOT_READY;
-	if (g != 0x789abcde)
-		return EFI_DEVICE_ERROR;
-	if (h != 0x89abcdef)
-		return EFI_WRITE_PROTECTED;
-	if (i != 0x9abcdef0)
-		return EFI_OUT_OF_RESOURCES;
-
-	return EFI_SUCCESS;
-}
-
-EFI_STATUS test_call9(void)
-{
-	return uefi_call_wrapper(test_call9_callback, 9,
-		0x12345678,
-		0x23456789,
-		0x3456789a,
-		0x456789ab,
-		0x56789abc,
-		0x6789abcd,
-		0x789abcde,
-		0x89abcdef,
-		0x9abcdef0);
-}
-
-extern EFI_STATUS test_call10(void);
-EFI_STATUS EFI_FUNCTION test_call10_callback(UINT32 a, UINT32 b,
-	UINT32 c, UINT32 d, UINT32 e, UINT32 f, UINT32 g, UINT32 h, UINT32 i,
-	UINT32 j)
-{
-	if (a != 0x12345678)
-		return EFI_LOAD_ERROR;
-	if (b != 0x23456789)
-		return EFI_INVALID_PARAMETER;
-	if (c != 0x3456789a)
-		return EFI_UNSUPPORTED;
-	if (d != 0x456789ab)
-		return EFI_BAD_BUFFER_SIZE;
-	if (e != 0x56789abc)
-		return EFI_BUFFER_TOO_SMALL;
-	if (f != 0x6789abcd)
-		return EFI_NOT_READY;
-	if (g != 0x789abcde)
-		return EFI_DEVICE_ERROR;
-	if (h != 0x89abcdef)
-		return EFI_WRITE_PROTECTED;
-	if (i != 0x9abcdef0)
-		return EFI_OUT_OF_RESOURCES;
-	if (j != 0xabcdef01)
-		return EFI_VOLUME_CORRUPTED;
-
-	return EFI_SUCCESS;
-}
-
-EFI_STATUS test_call10(void)
-{
-	return uefi_call_wrapper(test_call10_callback, 10,
-		0x12345678,
-		0x23456789,
-		0x3456789a,
-		0x456789ab,
-		0x56789abc,
-		0x6789abcd,
-		0x789abcde,
-		0x89abcdef,
-		0x9abcdef0,
-		0xabcdef01);
-}
-
-EFI_STATUS
-efi_main (EFI_HANDLE *image, EFI_SYSTEM_TABLE *systab)
-{
-	EFI_STATUS rc = EFI_SUCCESS;
-
-	InitializeLib(image, systab);
-	PoolAllocationType = 2; /* klooj */
-
-#ifndef __x86_64__
-	uefi_call_wrapper(systab->ConOut->OutputString, 2, systab->ConOut,
-		L"This test is only valid on x86_64\n");
-	return EFI_UNSUPPORTED;
-#endif
-
-	__asm__ volatile("out %0,%1" : : "a" ((uint8_t)0x14), "dN" (0x80));
-
-	Print(L"Hello\r\n");
-	rc = test_failure();
-	if (EFI_ERROR(rc)) {
-		Print(L"Returning Failure works\n");
-	} else {
-		Print(L"Returning failure doesn't work.\r\n");
-		Print(L"%%rax was 0x%016x, should have been 0x%016x\n",
-			rc, EFI_UNSUPPORTED);
-		return EFI_INVALID_PARAMETER;
-	}
-
-	rc = test_call0();
-	if (!EFI_ERROR(rc)) {
-		Print(L"0 args works just fine here.\r\n");
-	} else {
-		Print(L"0 args failed: 0x%016x\n", rc);
-		return rc;
-	}
-
-	rc = test_call1();
-	if (!EFI_ERROR(rc)) {
-		Print(L"1 arg works just fine here.\r\n");
-	} else {
-		Print(L"1 arg failed: 0x%016x\n", rc);
-		return rc;
-	}
-
-	rc = test_call2();
-	if (!EFI_ERROR(rc)) {
-		Print(L"2 args works just fine here.\r\n");
-	} else {
-		Print(L"2 args failed: 0x%016x\n", rc);
-		return rc;
-	}
-
-	rc = test_call3();
-	if (!EFI_ERROR(rc)) {
-		Print(L"3 args works just fine here.\r\n");
-	} else {
-		Print(L"3 args failed: 0x%016x\n", rc);
-		return rc;
-	}
-
-	rc = test_call4();
-	if (!EFI_ERROR(rc)) {
-		Print(L"4 args works just fine here.\r\n");
-	} else {
-		Print(L"4 args failed: 0x%016x\n", rc);
-		return rc;
-	}
-
-	rc = test_call5();
-	if (!EFI_ERROR(rc)) {
-		Print(L"5 args works just fine here.\r\n");
-	} else {
-		Print(L"5 args failed: 0x%016x\n", rc);
-		return rc;
-	}
-
-	rc = test_call6();
-	if (!EFI_ERROR(rc)) {
-		Print(L"6 args works just fine here.\r\n");
-	} else {
-		Print(L"6 args failed: 0x%016x\n", rc);
-		return rc;
-	}
-
-	rc = test_call7();
-	if (!EFI_ERROR(rc)) {
-		Print(L"7 args works just fine here.\r\n");
-	} else {
-		Print(L"7 args failed: 0x%016x\n", rc);
-		return rc;
-	}
-
-	rc = test_call8();
-	if (!EFI_ERROR(rc)) {
-		Print(L"8 args works just fine here.\r\n");
-	} else {
-		Print(L"8 args failed: 0x%016x\n", rc);
-		return rc;
-	}
-
-	rc = test_call9();
-	if (!EFI_ERROR(rc)) {
-		Print(L"9 args works just fine here.\r\n");
-	} else {
-		Print(L"9 args failed: 0x%016x\n", rc);
-		return rc;
-	}
-
-	rc = test_call10();
-	if (!EFI_ERROR(rc)) {
-		Print(L"10 args works just fine here.\r\n");
-	} else {
-		Print(L"10 args failed: 0x%016x\n", rc);
-		return rc;
-	}
-
-	return rc;
-}
diff --git a/third_party/gnu-efi/apps/tpause.c b/third_party/gnu-efi/apps/tpause.c
deleted file mode 100644
index 51c86df..0000000
--- a/third_party/gnu-efi/apps/tpause.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <efi.h>
-#include <efilib.h>
-
-EFI_STATUS
-efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
-{
-	Print(L"Press `q' to quit, any other key to continue:\n");
-	
-}
diff --git a/third_party/gnu-efi/apps/trivial.S b/third_party/gnu-efi/apps/trivial.S
deleted file mode 100644
index 40bc68f..0000000
--- a/third_party/gnu-efi/apps/trivial.S
+++ /dev/null
@@ -1,43 +0,0 @@
-	.text
-	.align 4
-
-	.globl _start
-_start:
-#if 0
-        pushl %ebp
-        movl %esp,%ebp
-        pushl %ebx		# save ebx
-        movl 12(%ebp),%eax	# eax <- systab
-	movl 24(%eax),%ebx	# ebx <- systab->FirmwareVendor
-	pushl %ebx
-        movl 44(%eax),%ebx	# ebx <- systab->ConOut
-        pushl %ebx
-        movl 4(%ebx),%eax	# eax <- conout->OutputString
-        call *%eax
-        movl -4(%ebp),%ebx	# restore ebx
-        leave
-        ret
-
-#else
-
-        pushl %ebp
-        movl %esp,%ebp
-        pushl %ebx
-	call 0f
-0:	popl %eax
-	addl $hello-0b,%eax
-	pushl %eax
-        movl 12(%ebp),%eax	# eax <- systab
-        movl 44(%eax),%ebx	# ebx <- systab->ConOut
-        pushl %ebx
-        movl 4(%ebx),%eax	# eax <- conout->OutputString
-        call *%eax
-        movl -4(%ebp),%ebx
-        leave
-        ret
-
-	.section .rodata
-	.align 2
-hello:	.byte 'h',0,'e',0,'l',0,'l',0,'o',0,'\n',0,'\r',0,0,0
-
-#endif
diff --git a/third_party/gnu-efi/gnuefi/Makefile b/third_party/gnu-efi/gnuefi/Makefile
deleted file mode 100644
index 2a61699..0000000
--- a/third_party/gnu-efi/gnuefi/Makefile
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-#  Copyright (C) 1999-2001 Hewlett-Packard Co.
-#	Contributed by David Mosberger <davidm@hpl.hp.com>
-#	Contributed by Stephane Eranian <eranian@hpl.hp.com>
-#
-#    All rights reserved.
-#
-#    Redistribution and use in source and binary forms, with or without
-#    modification, are permitted provided that the following conditions
-#    are met:
-#
-#    * Redistributions of source code must retain the above copyright
-#      notice, this list of conditions and the following disclaimer.
-#    * Redistributions in binary form must reproduce the above
-#      copyright notice, this list of conditions and the following
-#      disclaimer in the documentation and/or other materials
-#      provided with the distribution.
-#    * Neither the name of Hewlett-Packard Co. nor the names of its
-#      contributors may be used to endorse or promote products derived
-#      from this software without specific prior written permission.
-#
-#    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-#    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-#    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-#    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-#    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-#    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-#    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-#    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-#    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-#    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-#    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-#    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-#    SUCH DAMAGE.
-#
-
-SRCDIR = .
-
-VPATH = $(SRCDIR)
-
-include $(SRCDIR)/../Make.defaults
-
-TOPDIR = $(SRCDIR)/..
-
-CDIR=$(TOPDIR)/..
-FILES	= reloc_$(ARCH)  
-
-OBJS	= $(FILES:%=%.o)
-
-# on aarch64, avoid jump tables before all relocations have been processed
-reloc_aarch64.o: CFLAGS += -fno-jump-tables
-
-TARGETS	= crt0-efi-$(ARCH).o libgnuefi.a
-
-all:	$(TARGETS)
-
-libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS))
-
-clean:
-	rm -f $(TARGETS) *~ *.o $(OBJS)
-
-install:
-	mkdir -p $(INSTALLROOT)$(LIBDIR)
-	$(INSTALL) -m 644 $(TARGETS) $(INSTALLROOT)$(LIBDIR)
-ifneq (,$(findstring FreeBSD,$(OS)))
- ifeq ($(ARCH),x86_64)
-	$(INSTALL) -m 644 $(SRCDIR)/elf_$(ARCH)_fbsd_efi.lds $(INSTALLROOT)$(LIBDIR)
- else
-	$(INSTALL) -m 644 $(SRCDIR)/elf_$(ARCH)_efi.lds $(INSTALLROOT)$(LIBDIR)
- endif
-else
-	$(INSTALL) -m 644 $(SRCDIR)/elf_$(ARCH)_efi.lds $(INSTALLROOT)$(LIBDIR)
-endif
-
-include $(SRCDIR)/../Make.rules
diff --git a/third_party/gnu-efi/gnuefi/crt0-efi-aarch64.S b/third_party/gnu-efi/gnuefi/crt0-efi-aarch64.S
deleted file mode 100644
index 7a9e5c2..0000000
--- a/third_party/gnu-efi/gnuefi/crt0-efi-aarch64.S
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * crt0-efi-aarch64.S - PE/COFF header for AArch64 EFI applications
- *
- * Copright (C) 2014 Linaro Ltd. <ard.biesheuvel@linaro.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice and this list of conditions, without modification.
- * 2. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License as published by the Free Software Foundation;
- * either version 2 of the License, or (at your option) any later version.
- */
-
-	.section	.text.head
-
-	/*
-	 * Magic "MZ" signature for PE/COFF
-	 */
-	.globl	ImageBase
-ImageBase:
-	.ascii	"MZ"
-	.skip	58				// 'MZ' + pad + offset == 64
-	.long	pe_header - ImageBase		// Offset to the PE header.
-pe_header:
-	.ascii	"PE"
-	.short 	0
-coff_header:
-	.short	0xaa64				// AArch64
-	.short	2				// nr_sections
-	.long	0 				// TimeDateStamp
-	.long	0				// PointerToSymbolTable
-	.long	1				// NumberOfSymbols
-	.short	section_table - optional_header	// SizeOfOptionalHeader
-	.short	0x206				// Characteristics.
-						// IMAGE_FILE_DEBUG_STRIPPED |
-						// IMAGE_FILE_EXECUTABLE_IMAGE |
-						// IMAGE_FILE_LINE_NUMS_STRIPPED
-optional_header:
-	.short	0x20b				// PE32+ format
-	.byte	0x02				// MajorLinkerVersion
-	.byte	0x14				// MinorLinkerVersion
-	.long	_edata - _start			// SizeOfCode
-	.long	0				// SizeOfInitializedData
-	.long	0				// SizeOfUninitializedData
-	.long	_start - ImageBase		// AddressOfEntryPoint
-	.long	_start - ImageBase		// BaseOfCode
-
-extra_header_fields:
-	.quad	0				// ImageBase
-	.long	0x20				// SectionAlignment
-	.long	0x8				// FileAlignment
-	.short	0				// MajorOperatingSystemVersion
-	.short	0				// MinorOperatingSystemVersion
-	.short	0				// MajorImageVersion
-	.short	0				// MinorImageVersion
-	.short	0				// MajorSubsystemVersion
-	.short	0				// MinorSubsystemVersion
-	.long	0				// Win32VersionValue
-
-	.long	_edata - ImageBase		// SizeOfImage
-
-	// Everything before the kernel image is considered part of the header
-	.long	_start - ImageBase		// SizeOfHeaders
-	.long	0				// CheckSum
-	.short	EFI_SUBSYSTEM			// Subsystem
-	.short	0				// DllCharacteristics
-	.quad	0				// SizeOfStackReserve
-	.quad	0				// SizeOfStackCommit
-	.quad	0				// SizeOfHeapReserve
-	.quad	0				// SizeOfHeapCommit
-	.long	0				// LoaderFlags
-	.long	0x6				// NumberOfRvaAndSizes
-
-	.quad	0				// ExportTable
-	.quad	0				// ImportTable
-	.quad	0				// ResourceTable
-	.quad	0				// ExceptionTable
-	.quad	0				// CertificationTable
-	.quad	0				// BaseRelocationTable
-
-	// Section table
-section_table:
-
-	/*
-	 * The EFI application loader requires a relocation section
-	 * because EFI applications must be relocatable.  This is a
-	 * dummy section as far as we are concerned.
-	 */
-	.ascii	".reloc"
-	.byte	0
-	.byte	0			// end of 0 padding of section name
-	.long	0
-	.long	0
-	.long	0			// SizeOfRawData
-	.long	0			// PointerToRawData
-	.long	0			// PointerToRelocations
-	.long	0			// PointerToLineNumbers
-	.short	0			// NumberOfRelocations
-	.short	0			// NumberOfLineNumbers
-	.long	0x42100040		// Characteristics (section flags)
-
-
-	.ascii	".text"
-	.byte	0
-	.byte	0
-	.byte	0        		// end of 0 padding of section name
-	.long	_edata - _start		// VirtualSize
-	.long	_start - ImageBase	// VirtualAddress
-	.long	_edata - _start		// SizeOfRawData
-	.long	_start - ImageBase	// PointerToRawData
-
-	.long	0		// PointerToRelocations (0 for executables)
-	.long	0		// PointerToLineNumbers (0 for executables)
-	.short	0		// NumberOfRelocations  (0 for executables)
-	.short	0		// NumberOfLineNumbers  (0 for executables)
-	.long	0xe0500020	// Characteristics (section flags)
-
-_start:
-	stp		x29, x30, [sp, #-32]!
-	mov		x29, sp
-
-	stp		x0, x1, [sp, #16]
-	mov		x2, x0
-	mov		x3, x1
-	adr		x0, ImageBase
-	adrp		x1, _DYNAMIC
-	add		x1, x1, #:lo12:_DYNAMIC
-	bl		_relocate
-	cbnz		x0, 0f
-
-	ldp		x0, x1, [sp, #16]
-	bl		efi_main
-
-0:	ldp		x29, x30, [sp], #32
-	ret
diff --git a/third_party/gnu-efi/gnuefi/crt0-efi-arm.S b/third_party/gnu-efi/gnuefi/crt0-efi-arm.S
deleted file mode 100644
index c5bb6d4..0000000
--- a/third_party/gnu-efi/gnuefi/crt0-efi-arm.S
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * crt0-efi-arm.S - PE/COFF header for ARM EFI applications
- *
- * Copright (C) 2014 Linaro Ltd. <ard.biesheuvel@linaro.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice and this list of conditions, without modification.
- * 2. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License as published by the Free Software Foundation;
- * either version 2 of the License, or (at your option) any later version.
- */
-
-	.section	.text.head
-
-	/*
-	 * Magic "MZ" signature for PE/COFF
-	 */
-	.globl	ImageBase
-ImageBase:
-	.ascii	"MZ"
-	.skip	58				// 'MZ' + pad + offset == 64
-	.long	pe_header - ImageBase		// Offset to the PE header.
-pe_header:
-	.ascii	"PE"
-	.short 	0
-coff_header:
-	.short	0x1c2				// Mixed ARM/Thumb
-	.short	2				// nr_sections
-	.long	0 				// TimeDateStamp
-	.long	0				// PointerToSymbolTable
-	.long	1				// NumberOfSymbols
-	.short	section_table - optional_header	// SizeOfOptionalHeader
-	.short	0x306				// Characteristics.
-						// IMAGE_FILE_32BIT_MACHINE |
-						// IMAGE_FILE_DEBUG_STRIPPED |
-						// IMAGE_FILE_EXECUTABLE_IMAGE |
-						// IMAGE_FILE_LINE_NUMS_STRIPPED
-optional_header:
-	.short	0x10b				// PE32+ format
-	.byte	0x02				// MajorLinkerVersion
-	.byte	0x14				// MinorLinkerVersion
-	.long	_edata - _start			// SizeOfCode
-	.long	0				// SizeOfInitializedData
-	.long	0				// SizeOfUninitializedData
-	.long	_start - ImageBase		// AddressOfEntryPoint
-	.long	_start - ImageBase		// BaseOfCode
-	.long	0				// BaseOfData
-
-extra_header_fields:
-	.long	0				// ImageBase
-	.long	0x20				// SectionAlignment
-	.long	0x8				// FileAlignment
-	.short	0				// MajorOperatingSystemVersion
-	.short	0				// MinorOperatingSystemVersion
-	.short	0				// MajorImageVersion
-	.short	0				// MinorImageVersion
-	.short	0				// MajorSubsystemVersion
-	.short	0				// MinorSubsystemVersion
-	.long	0				// Win32VersionValue
-
-	.long	_edata - ImageBase		// SizeOfImage
-
-	// Everything before the kernel image is considered part of the header
-	.long	_start - ImageBase		// SizeOfHeaders
-	.long	0				// CheckSum
-	.short	EFI_SUBSYSTEM			// Subsystem
-	.short	0				// DllCharacteristics
-	.long	0				// SizeOfStackReserve
-	.long	0				// SizeOfStackCommit
-	.long	0				// SizeOfHeapReserve
-	.long	0				// SizeOfHeapCommit
-	.long	0				// LoaderFlags
-	.long	0x6				// NumberOfRvaAndSizes
-
-	.quad	0				// ExportTable
-	.quad	0				// ImportTable
-	.quad	0				// ResourceTable
-	.quad	0				// ExceptionTable
-	.quad	0				// CertificationTable
-	.quad	0				// BaseRelocationTable
-
-	// Section table
-section_table:
-
-	/*
-	 * The EFI application loader requires a relocation section
-	 * because EFI applications must be relocatable.  This is a
-	 * dummy section as far as we are concerned.
-	 */
-	.ascii	".reloc"
-	.byte	0
-	.byte	0			// end of 0 padding of section name
-	.long	0
-	.long	0
-	.long	0			// SizeOfRawData
-	.long	0			// PointerToRawData
-	.long	0			// PointerToRelocations
-	.long	0			// PointerToLineNumbers
-	.short	0			// NumberOfRelocations
-	.short	0			// NumberOfLineNumbers
-	.long	0x42100040		// Characteristics (section flags)
-
-
-	.ascii	".text"
-	.byte	0
-	.byte	0
-	.byte	0        		// end of 0 padding of section name
-	.long	_edata - _start		// VirtualSize
-	.long	_start - ImageBase	// VirtualAddress
-	.long	_edata - _start		// SizeOfRawData
-	.long	_start - ImageBase	// PointerToRawData
-
-	.long	0		// PointerToRelocations (0 for executables)
-	.long	0		// PointerToLineNumbers (0 for executables)
-	.short	0		// NumberOfRelocations  (0 for executables)
-	.short	0		// NumberOfLineNumbers  (0 for executables)
-	.long	0xe0500020	// Characteristics (section flags)
-
-_start:
-	stmfd		sp!, {r0-r2, lr}
-
-	mov		r2, r0
-	mov		r3, r1
-	adr		r1, .L_DYNAMIC
-	ldr		r0, [r1]
-	add		r1, r0, r1
-	adr		r0, ImageBase
-	bl		_relocate
-	teq		r0, #0
-	bne		0f
-
-	ldmfd		sp, {r0-r1}
-	bl		efi_main
-
-0:	add		sp, sp, #12
-	ldr		pc, [sp], #4
-
-.L_DYNAMIC:
-	.word		_DYNAMIC - .
diff --git a/third_party/gnu-efi/gnuefi/crt0-efi-ia32.S b/third_party/gnu-efi/gnuefi/crt0-efi-ia32.S
deleted file mode 100644
index f9d5191..0000000
--- a/third_party/gnu-efi/gnuefi/crt0-efi-ia32.S
+++ /dev/null
@@ -1,76 +0,0 @@
-/* crt0-efi-ia32.S - x86 EFI startup code.
-   Copyright (C) 1999 Hewlett-Packard Co.
-	Contributed by David Mosberger <davidm@hpl.hp.com>.
-
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials
-      provided with the distribution.
-    * Neither the name of Hewlett-Packard Co. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-    SUCH DAMAGE.
-*/
-
-	.text
-	.align 4
-
-	.globl _start
-_start:
-	pushl %ebp
-	movl %esp,%ebp
-
-	pushl 12(%ebp)			# copy "image" argument
-	pushl  8(%ebp)			# copy "systab" argument
-
-	call 0f
-0:	popl %eax
-	movl %eax,%ebx
-
-	addl $ImageBase-0b,%eax		# %eax = ldbase
-	addl $_DYNAMIC-0b,%ebx		# %ebx = _DYNAMIC
-
-	pushl %ebx			# pass _DYNAMIC as second argument
-	pushl %eax			# pass ldbase as first argument
-	call _relocate
-	popl %ebx
-	popl %ebx
- 	testl %eax,%eax
- 	jne .exit
-  
-  	call efi_main			# call app with "image" and "systab" argument
-
-.exit:	leave
-  	ret
- 
- 	// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
- 
- 	.data
-dummy:	.long	0
-
-#define IMAGE_REL_ABSOLUTE	0
- 	.section .reloc
- 	.long	dummy					// Page RVA
- 	.long	10					// Block Size (2*4+2)
- 	.word	(IMAGE_REL_ABSOLUTE<<12) +  0		// reloc for dummy
diff --git a/third_party/gnu-efi/gnuefi/crt0-efi-ia64.S b/third_party/gnu-efi/gnuefi/crt0-efi-ia64.S
deleted file mode 100644
index 40c3c83..0000000
--- a/third_party/gnu-efi/gnuefi/crt0-efi-ia64.S
+++ /dev/null
@@ -1,87 +0,0 @@
-/* crt0-efi-ia64.S - IA-64 EFI startup code.
-   Copyright (C) 1999 Hewlett-Packard Co.
-	Contributed by David Mosberger <davidm@hpl.hp.com>.
-
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials
-      provided with the distribution.
-    * Neither the name of Hewlett-Packard Co. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-    SUCH DAMAGE.
-*/
-	.text
-	.psr abi64
-	.psr lsb
-	.lsb
-
-	.proc _start
-_start:
-	alloc loc0=ar.pfs,2,2,2,0
-	mov loc1=rp
-	movl out0=@gprel(ImageBase)	// out0 <- ImageBase (ldbase)
-	;;
-	add out0=out0,gp
-	movl out1=@gprel(_DYNAMIC)	// out1 <- _DYNAMIC
-	;;		// avoid WAW on CFM
-	add out1=out1,gp
-	br.call.sptk.few rp=_relocate
-.Lret0:	
-	cmp.ne p6,p0=r0,r8		// r8 == EFI_SUCCESS?
-(p6)	br.cond.sptk.few .exit		// no ->
-
-.Lret1:
-
-	mov out0=in0			// image handle
-	mov out1=in1			// systab
-	br.call.sptk.few rp=efi_main
-.Lret2:
-.exit:
-	mov ar.pfs=loc0
-	mov rp=loc1
-	;;
-	br.ret.sptk.few rp
-
-	.endp _start
-
-
-	// PE32+ wants a PLABEL, not the code address of the entry point:
-
-	.align 16
-	.global _start_plabel
-	.section .plabel, "a"
-_start_plabel:
-	data8	_start
-	data8	__gp
-
-	// hand-craft a .reloc section for the plabel:
-
-#define IMAGE_REL_BASED_DIR64	10
-
-	.section .reloc, "a"
-	data4	_start_plabel				// Page RVA
-	data4	12					// Block Size (2*4+2*2)
-	data2	(IMAGE_REL_BASED_DIR64<<12) +  0	// reloc for plabel's entry point
-	data2	(IMAGE_REL_BASED_DIR64<<12) +  8	// reloc for plabel's global pointer
diff --git a/third_party/gnu-efi/gnuefi/crt0-efi-x86_64.S b/third_party/gnu-efi/gnuefi/crt0-efi-x86_64.S
deleted file mode 100644
index 6839150..0000000
--- a/third_party/gnu-efi/gnuefi/crt0-efi-x86_64.S
+++ /dev/null
@@ -1,76 +0,0 @@
-/* crt0-efi-x86_64.S - x86_64 EFI startup code.
-   Copyright (C) 1999 Hewlett-Packard Co.
-	Contributed by David Mosberger <davidm@hpl.hp.com>.
-   Copyright (C) 2005 Intel Co.
-	Contributed by Fenghua Yu <fenghua.yu@intel.com>.
-
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials
-      provided with the distribution.
-    * Neither the name of Hewlett-Packard Co. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-    SUCH DAMAGE.
-*/
-	.text
-	.align 4
-
-	.globl _start
-_start:
-	subq $8, %rsp
-	pushq %rcx
-	pushq %rdx
-
-0:
-	lea ImageBase(%rip), %rdi
-	lea _DYNAMIC(%rip), %rsi
-
-	popq %rcx
-	popq %rdx
-	pushq %rcx
-	pushq %rdx
-	call _relocate
-
-	popq %rdi
-	popq %rsi
-
-	call efi_main
-	addq $8, %rsp
-
-.exit:	
-  	ret
-
- 	// hand-craft a dummy .reloc section so EFI knows it's a relocatable executable:
- 
- 	.data
-dummy:	.long	0
-
-#define IMAGE_REL_ABSOLUTE	0
- 	.section .reloc, "a"
-label1:
-	.long	dummy-label1				// Page RVA
- 	.long	10					// Block Size (2*4+2)
-	.word	(IMAGE_REL_ABSOLUTE<<12) +  0		// reloc for dummy
-
diff --git a/third_party/gnu-efi/gnuefi/elf_aarch64_efi.lds b/third_party/gnu-efi/gnuefi/elf_aarch64_efi.lds
deleted file mode 100644
index 85f1582..0000000
--- a/third_party/gnu-efi/gnuefi/elf_aarch64_efi.lds
+++ /dev/null
@@ -1,62 +0,0 @@
-OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
-OUTPUT_ARCH(aarch64)
-ENTRY(_start)
-SECTIONS
-{
-  .text 0x0 : {
-    _text = .;
-    *(.text.head)
-    *(.text)
-    *(.text.*)
-    *(.gnu.linkonce.t.*)
-    *(.srodata)
-    *(.rodata*)
-    . = ALIGN(16);
-  }
-  _etext = .;
-  _text_size = . - _text;
-  .dynamic  : { *(.dynamic) }
-  .data :
-  {
-   _data = .;
-   *(.sdata)
-   *(.data)
-   *(.data1)
-   *(.data.*)
-   *(.got.plt)
-   *(.got)
-
-   /* the EFI loader doesn't seem to like a .bss section, so we stick
-      it all into .data: */
-   . = ALIGN(16);
-   _bss = .;
-   *(.sbss)
-   *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-   . = ALIGN(16);
-   _bss_end = .;
-  }
-
-  .rela.dyn : { *(.rela.dyn) }
-  .rela.plt : { *(.rela.plt) }
-  .rela.got : { *(.rela.got) }
-  .rela.data : { *(.rela.data) *(.rela.data*) }
-  _edata = .;
-  _data_size = . - _etext;
-
-  . = ALIGN(4096);
-  .dynsym   : { *(.dynsym) }
-  . = ALIGN(4096);
-  .dynstr   : { *(.dynstr) }
-  . = ALIGN(4096);
-  .note.gnu.build-id : { *(.note.gnu.build-id) }
-  /DISCARD/ :
-  {
-    *(.rel.reloc)
-    *(.eh_frame)
-    *(.note.GNU-stack)
-  }
-  .comment 0 : { *(.comment) }
-}
diff --git a/third_party/gnu-efi/gnuefi/elf_arm_efi.lds b/third_party/gnu-efi/gnuefi/elf_arm_efi.lds
deleted file mode 100644
index 665bbdb..0000000
--- a/third_party/gnu-efi/gnuefi/elf_arm_efi.lds
+++ /dev/null
@@ -1,63 +0,0 @@
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-  .text 0x0 : {
-    _text = .;
-    *(.text.head)
-    *(.text)
-    *(.text.*)
-    *(.gnu.linkonce.t.*)
-    *(.srodata)
-    *(.rodata*)
-    . = ALIGN(16);
-  }
-  _etext = .;
-  _text_size = . - _text;
-  .dynamic  : { *(.dynamic) }
-  .data :
-  {
-   _data = .;
-   *(.sdata)
-   *(.data)
-   *(.data1)
-   *(.data.*)
-   *(.got.plt)
-   *(.got)
-
-   /* the EFI loader doesn't seem to like a .bss section, so we stick
-      it all into .data: */
-   . = ALIGN(16);
-   _bss = .;
-   *(.sbss)
-   *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(.bss.*)
-   *(COMMON)
-   . = ALIGN(16);
-   _bss_end = .;
-  }
-
-  .rel.dyn : { *(.rel.dyn) }
-  .rel.plt : { *(.rel.plt) }
-  .rel.got : { *(.rel.got) }
-  .rel.data : { *(.rel.data) *(.rel.data*) }
-  _edata = .;
-  _data_size = . - _etext;
-
-  . = ALIGN(4096);
-  .dynsym   : { *(.dynsym) }
-  . = ALIGN(4096);
-  .dynstr   : { *(.dynstr) }
-  . = ALIGN(4096);
-  .note.gnu.build-id : { *(.note.gnu.build-id) }
-  /DISCARD/ :
-  {
-    *(.rel.reloc)
-    *(.eh_frame)
-    *(.note.GNU-stack)
-  }
-  .comment 0 : { *(.comment) }
-}
diff --git a/third_party/gnu-efi/gnuefi/elf_ia32_efi.lds b/third_party/gnu-efi/gnuefi/elf_ia32_efi.lds
deleted file mode 100644
index 6cc4ce1..0000000
--- a/third_party/gnu-efi/gnuefi/elf_ia32_efi.lds
+++ /dev/null
@@ -1,84 +0,0 @@
-OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
-OUTPUT_ARCH(i386)
-ENTRY(_start)
-SECTIONS
-{
-  . = 0;
-  ImageBase = .;
-  .hash : { *(.hash) }	/* this MUST come first! */
-  . = ALIGN(4096);
-  .text :
-  {
-   _text = .;
-   *(.text)
-   *(.text.*)
-   *(.gnu.linkonce.t.*)
-   . = ALIGN(16);
-  }
-  _etext = .;
-  _text_size = . - _text;
-  . = ALIGN(4096);
-  .sdata :
-  {
-   _data = .;
-   *(.got.plt)
-   *(.got)
-   *(.srodata)
-   *(.sdata)
-   *(.sbss)
-   *(.scommon)
-  }
-  . = ALIGN(4096);
-  .data :
-  {
-   *(.rodata*)
-   *(.data)
-   *(.data1)
-   *(.data.*)
-   *(.sdata)
-   *(.got.plt)
-   *(.got)
-   /* the EFI loader doesn't seem to like a .bss section, so we stick
-      it all into .data: */
-   *(.sbss)
-   *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-  }
-  .note.gnu.build-id : { *(.note.gnu.build-id) }
-
-  . = ALIGN(4096);
-  .dynamic  : { *(.dynamic) }
-  . = ALIGN(4096);
-  .rel :
-  {
-    *(.rel.data)
-    *(.rel.data.*)
-    *(.rel.got)
-    *(.rel.stab)
-    *(.data.rel.ro.local)
-    *(.data.rel.local)
-    *(.data.rel.ro)
-    *(.data.rel*)
-  }
-  _edata = .;
-  _data_size = . - _etext;
-  . = ALIGN(4096);
-  .reloc :		/* This is the PECOFF .reloc section! */
-  {
-    *(.reloc)
-  }
-  . = ALIGN(4096);
-  .dynsym   : { *(.dynsym) }
-  . = ALIGN(4096);
-  .dynstr   : { *(.dynstr) }
-  . = ALIGN(4096);
-  /DISCARD/ :
-  {
-    *(.rel.reloc)
-    *(.eh_frame)
-    *(.note.GNU-stack)
-  }
-  .comment 0 : { *(.comment) }
-}
diff --git a/third_party/gnu-efi/gnuefi/elf_ia32_fbsd_efi.lds b/third_party/gnu-efi/gnuefi/elf_ia32_fbsd_efi.lds
deleted file mode 100644
index 77d6fad..0000000
--- a/third_party/gnu-efi/gnuefi/elf_ia32_fbsd_efi.lds
+++ /dev/null
@@ -1,84 +0,0 @@
-OUTPUT_FORMAT("elf32-i386-freebsd", "elf32-i386-freebsd", "elf32-i386-freebsd")
-OUTPUT_ARCH(i386)
-ENTRY(_start)
-SECTIONS
-{
-  . = 0;
-  ImageBase = .;
-  .hash : { *(.hash) }	/* this MUST come first! */
-  . = ALIGN(4096);
-  .text :
-  {
-   _text = .;
-   *(.text)
-   *(.text.*)
-   *(.gnu.linkonce.t.*)
-   . = ALIGN(16);
-  }
-  _etext = .;
-  _text_size = . - _text;
-  . = ALIGN(4096);
-  .sdata :
-  {
-   _data = .;
-   *(.got.plt)
-   *(.got)
-   *(.srodata)
-   *(.sdata)
-   *(.sbss)
-   *(.scommon)
-  }
-  . = ALIGN(4096);
-  .data :
-  {
-   *(.rodata*)
-   *(.data)
-   *(.data1)
-   *(.data.*)
-   *(.sdata)
-   *(.got.plt)
-   *(.got)
-   /* the EFI loader doesn't seem to like a .bss section, so we stick
-      it all into .data: */
-   *(.sbss)
-   *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-  }
-  .note.gnu.build-id : { *(.note.gnu.build-id) }
-
-  . = ALIGN(4096);
-  .dynamic  : { *(.dynamic) }
-  . = ALIGN(4096);
-  .rel :
-  {
-    *(.rel.data)
-    *(.rel.data.*)
-    *(.rel.got)
-    *(.rel.stab)
-    *(.data.rel.ro.local)
-    *(.data.rel.local)
-    *(.data.rel.ro)
-    *(.data.rel*)
-  }
-  _edata = .;
-  _data_size = . - _etext;
-  . = ALIGN(4096);
-  .reloc :		/* This is the PECOFF .reloc section! */
-  {
-    *(.reloc)
-  }
-  . = ALIGN(4096);
-  .dynsym   : { *(.dynsym) }
-  . = ALIGN(4096);
-  .dynstr   : { *(.dynstr) }
-  . = ALIGN(4096);
-  /DISCARD/ :
-  {
-    *(.rel.reloc)
-    *(.eh_frame)
-    *(.note.GNU-stack)
-  }
-  .comment 0 : { *(.comment) }
-}
diff --git a/third_party/gnu-efi/gnuefi/elf_ia64_efi.lds b/third_party/gnu-efi/gnuefi/elf_ia64_efi.lds
deleted file mode 100644
index baca962..0000000
--- a/third_party/gnu-efi/gnuefi/elf_ia64_efi.lds
+++ /dev/null
@@ -1,79 +0,0 @@
-OUTPUT_FORMAT("elf64-ia64-little")
-OUTPUT_ARCH(ia64)
-ENTRY(_start_plabel)
-SECTIONS
-{
-  . = 0;
-  ImageBase = .;
-  .hash : { *(.hash) }	/* this MUST come first! */
-  . = ALIGN(4096);
-  .text :
-  {
-   _text = .;
-   *(.text)
-   *(.text.*)
-   *(.gnu.linkonce.t.*)
-   . = ALIGN(16);
-  }
-  _etext = .;
-  _text_size = . - _text;
-  . = ALIGN(4096);
-  __gp = ALIGN (8) + 0x200000;
-  .sdata :
-  {
-   _data = .;
-   *(.got.plt)
-   *(.got)
-   *(.srodata)
-   *(.sdata)
-   *(.sbss)
-   *(.scommon)
-  }
-  . = ALIGN(4096);
-  .data :
-  {
-   *(.rodata*)
-   *(.ctors)
-   *(.data*)
-   *(.gnu.linkonce.d*)
-   *(.plabel)	/* data whose relocs we want to ignore */
-   /* the EFI loader doesn't seem to like a .bss section, so we stick
-      it all into .data: */
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-  }
-  .note.gnu.build-id : { *(.note.gnu.build-id) }
-
-  . = ALIGN(4096);
-  .dynamic  : { *(.dynamic) }
-  . = ALIGN(4096);
-  .rela :
-  {
-    *(.rela.text)
-    *(.rela.data*)
-    *(.rela.sdata)
-    *(.rela.got)
-    *(.rela.gnu.linkonce.d*)
-    *(.rela.stab)
-    *(.rela.ctors)
-  }
-  _edata = .;
-  _data_size = . - _etext;
-  . = ALIGN(4096);
-  .reloc :		/* This is the PECOFF .reloc section! */
-  {
-    *(.reloc)
-  }
-  . = ALIGN(4096);
-  .dynsym   : { *(.dynsym) }
-  . = ALIGN(4096);
-  .dynstr   : { *(.dynstr) }
-  /DISCARD/ :
-  {
-    *(.rela.plabel)
-    *(.rela.reloc)
-    *(.IA_64.unwind*)
-    *(.IA64.unwind*)
-  }
-}
diff --git a/third_party/gnu-efi/gnuefi/elf_x86_64_efi.lds b/third_party/gnu-efi/gnuefi/elf_x86_64_efi.lds
deleted file mode 100644
index 942d1f3..0000000
--- a/third_party/gnu-efi/gnuefi/elf_x86_64_efi.lds
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Same as elf_x86_64_fbsd_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
-OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
-OUTPUT_ARCH(i386:x86-64)
-ENTRY(_start)
-SECTIONS
-{
-  . = 0;
-  ImageBase = .;
-  .hash : { *(.hash) }	/* this MUST come first! */
-  . = ALIGN(4096);
-  .eh_frame : 
-  { 
-    *(.eh_frame)
-  }
-  . = ALIGN(4096);
-  .text :
-  {
-   _text = .;
-   *(.text)
-   *(.text.*)
-   *(.gnu.linkonce.t.*)
-   . = ALIGN(16);
-  }
-  _etext = .;
-  _text_size = . - _text;
-  . = ALIGN(4096);
-  .reloc :
-  {
-   *(.reloc)
-  }
-  . = ALIGN(4096);
-  .data :
-  {
-   _data = .;
-   *(.rodata*)
-   *(.got.plt)
-   *(.got)
-   *(.data*)
-   *(.sdata)
-   /* the EFI loader doesn't seem to like a .bss section, so we stick
-      it all into .data: */
-   *(.sbss)
-   *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-   *(.rel.local)
-  }
-  .note.gnu.build-id : { *(.note.gnu.build-id) }
-
-  _edata = .;
-  _data_size = . - _etext;
-  . = ALIGN(4096);
-  .dynamic  : { *(.dynamic) }
-  . = ALIGN(4096);
-  .rela :
-  {
-    *(.rela.data*)
-    *(.rela.got)
-    *(.rela.stab)
-  }
-  . = ALIGN(4096);
-  .dynsym   : { *(.dynsym) }
-  . = ALIGN(4096);
-  .dynstr   : { *(.dynstr) }
-  . = ALIGN(4096);
-  .ignored.reloc :
-  {
-    *(.rela.reloc)
-    *(.eh_frame)
-    *(.note.GNU-stack)
-  }
-  .comment 0 : { *(.comment) }
-}
diff --git a/third_party/gnu-efi/gnuefi/elf_x86_64_fbsd_efi.lds b/third_party/gnu-efi/gnuefi/elf_x86_64_fbsd_efi.lds
deleted file mode 100644
index 6fd2031..0000000
--- a/third_party/gnu-efi/gnuefi/elf_x86_64_fbsd_efi.lds
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Same as elf_x86_64_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
-OUTPUT_FORMAT("elf64-x86-64-freebsd", "elf64-x86-64-freebsd", "elf64-x86-64-freebsd")
-OUTPUT_ARCH(i386:x86-64)
-ENTRY(_start)
-SECTIONS
-{
-  . = 0;
-  ImageBase = .;
-  .hash : { *(.hash) }	/* this MUST come first! */
-  . = ALIGN(4096);
-  .eh_frame : 
-  { 
-    *(.eh_frame)
-  }
-  . = ALIGN(4096);
-  .text :
-  {
-   _text = .;
-   *(.text)
-   . = ALIGN(16);
-  }
-  _etext = .;
-  _text_size = . - _text;
-  .reloc :
-  {
-   *(.reloc)
-  }
-  . = ALIGN(4096);
-  .data :
-  {
-   _data = .;
-   *(.rodata*)
-   *(.got.plt)
-   *(.got)
-   *(.data*)
-   *(.sdata)
-   /* the EFI loader doesn't seem to like a .bss section, so we stick
-      it all into .data: */
-   *(.sbss)
-   *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-   *(.rel.local)
-  }
-  .note.gnu.build-id : { *(.note.gnu.build-id) }
-
-  . = ALIGN(4096);
-  .dynamic  : { *(.dynamic) }
-  . = ALIGN(4096);
-  .rela :
-  {
-    *(.rela.data*)
-    *(.rela.got)
-    *(.rela.stab)
-  }
-  _edata = .;
-  _data_size = . - _etext;
-  . = ALIGN(4096);
-  .dynsym   : { *(.dynsym) }
-  . = ALIGN(4096);
-  .dynstr   : { *(.dynstr) }
-  . = ALIGN(4096);
-  .ignored.reloc :
-  {
-    *(.rela.reloc)
-  }
-}
diff --git a/third_party/gnu-efi/gnuefi/reloc_aarch64.c b/third_party/gnu-efi/gnuefi/reloc_aarch64.c
deleted file mode 100644
index 0867279..0000000
--- a/third_party/gnu-efi/gnuefi/reloc_aarch64.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* reloc_aarch64.c - position independent x86 ELF shared object relocator
-   Copyright (C) 2014 Linaro Ltd. <ard.biesheuvel@linaro.org>
-   Copyright (C) 1999 Hewlett-Packard Co.
-	Contributed by David Mosberger <davidm@hpl.hp.com>.
-
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials
-      provided with the distribution.
-    * Neither the name of Hewlett-Packard Co. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-    SUCH DAMAGE.
-*/
-
-#include <efi.h>
-#include <efilib.h>
-
-#include <elf.h>
-
-EFI_STATUS _relocate (long ldbase, Elf64_Dyn *dyn,
-		      EFI_HANDLE image EFI_UNUSED,
-		      EFI_SYSTEM_TABLE *systab EFI_UNUSED)
-{
-	long relsz = 0, relent = 0;
-	Elf64_Rela *rel = 0;
-	unsigned long *addr;
-	int i;
-
-	for (i = 0; dyn[i].d_tag != DT_NULL; ++i) {
-		switch (dyn[i].d_tag) {
-			case DT_RELA:
-				rel = (Elf64_Rela*)
-					((unsigned long)dyn[i].d_un.d_ptr
-					 + ldbase);
-				break;
-
-			case DT_RELASZ:
-				relsz = dyn[i].d_un.d_val;
-				break;
-
-			case DT_RELAENT:
-				relent = dyn[i].d_un.d_val;
-				break;
-
-			default:
-				break;
-		}
-	}
-
-	if (!rel && relent == 0)
-		return EFI_SUCCESS;
-
-	if (!rel || relent == 0)
-		return EFI_LOAD_ERROR;
-
-	while (relsz > 0) {
-		/* apply the relocs */
-		switch (ELF64_R_TYPE (rel->r_info)) {
-			case R_AARCH64_NONE:
-				break;
-
-			case R_AARCH64_RELATIVE:
-				addr = (unsigned long *)
-					(ldbase + rel->r_offset);
-				*addr = ldbase + rel->r_addend;
-				break;
-
-			default:
-				break;
-		}
-		rel = (Elf64_Rela*) ((char *) rel + relent);
-		relsz -= relent;
-	}
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/gnuefi/reloc_arm.c b/third_party/gnu-efi/gnuefi/reloc_arm.c
deleted file mode 100644
index 7585066..0000000
--- a/third_party/gnu-efi/gnuefi/reloc_arm.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* reloc_arm.c - position independent x86 ELF shared object relocator
-   Copyright (C) 2014 Linaro Ltd. <ard.biesheuvel@linaro.org>
-   Copyright (C) 1999 Hewlett-Packard Co.
-	Contributed by David Mosberger <davidm@hpl.hp.com>.
-
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials
-      provided with the distribution.
-    * Neither the name of Hewlett-Packard Co. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-    SUCH DAMAGE.
-*/
-
-#include <efi.h>
-#include <efilib.h>
-
-#include <elf.h>
-
-EFI_STATUS _relocate (long ldbase, Elf32_Dyn *dyn,
-		      EFI_HANDLE image EFI_UNUSED,
-		      EFI_SYSTEM_TABLE *systab EFI_UNUSED)
-{
-	long relsz = 0, relent = 0;
-	Elf32_Rel *rel = 0;
-	unsigned long *addr;
-	int i;
-
-	for (i = 0; dyn[i].d_tag != DT_NULL; ++i) {
-		switch (dyn[i].d_tag) {
-			case DT_REL:
-				rel = (Elf32_Rel*)
-					((unsigned long)dyn[i].d_un.d_ptr
-					 + ldbase);
-				break;
-
-			case DT_RELSZ:
-				relsz = dyn[i].d_un.d_val;
-				break;
-
-			case DT_RELENT:
-				relent = dyn[i].d_un.d_val;
-				break;
-
-			default:
-				break;
-		}
-	}
-
-	if (!rel && relent == 0)
-		return EFI_SUCCESS;
-
-	if (!rel || relent == 0)
-		return EFI_LOAD_ERROR;
-
-	while (relsz > 0) {
-		/* apply the relocs */
-		switch (ELF32_R_TYPE (rel->r_info)) {
-			case R_ARM_NONE:
-				break;
-
-			case R_ARM_RELATIVE:
-				addr = (unsigned long *)
-					(ldbase + rel->r_offset);
-				*addr += ldbase;
-				break;
-
-			default:
-				break;
-		}
-		rel = (Elf32_Rel*) ((char *) rel + relent);
-		relsz -= relent;
-	}
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/gnuefi/reloc_ia32.c b/third_party/gnu-efi/gnuefi/reloc_ia32.c
deleted file mode 100644
index da9d8a7..0000000
--- a/third_party/gnu-efi/gnuefi/reloc_ia32.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* reloc_ia32.c - position independent x86 ELF shared object relocator
-   Copyright (C) 1999 Hewlett-Packard Co.
-	Contributed by David Mosberger <davidm@hpl.hp.com>.
-
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials
-      provided with the distribution.
-    * Neither the name of Hewlett-Packard Co. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-    SUCH DAMAGE.
-*/
-
-#include <efi.h>
-#include <efilib.h>
-
-#include <elf.h>
-
-EFI_STATUS _relocate (long ldbase, Elf32_Dyn *dyn,
-		      EFI_HANDLE image EFI_UNUSED,
-		      EFI_SYSTEM_TABLE *systab EFI_UNUSED)
-{
-	long relsz = 0, relent = 0;
-	Elf32_Rel *rel = 0;
-	unsigned long *addr;
-	int i;
-
-	for (i = 0; dyn[i].d_tag != DT_NULL; ++i) {
-		switch (dyn[i].d_tag) {
-			case DT_REL:
-				rel = (Elf32_Rel*)
-					((unsigned long)dyn[i].d_un.d_ptr
-					 + ldbase);
-				break;
-
-			case DT_RELSZ:
-				relsz = dyn[i].d_un.d_val;
-				break;
-
-			case DT_RELENT:
-				relent = dyn[i].d_un.d_val;
-				break;
-
-			case DT_RELA:
-				break;
-
-			default:
-				break;
-		}
-	}
-
-        if (!rel && relent == 0)
-                return EFI_SUCCESS;
-
-	if (!rel || relent == 0)
-		return EFI_LOAD_ERROR;
-
-	while (relsz > 0) {
-		/* apply the relocs */
-		switch (ELF32_R_TYPE (rel->r_info)) {
-			case R_386_NONE:
-				break;
-
-			case R_386_RELATIVE:
-				addr = (unsigned long *)
-					(ldbase + rel->r_offset);
-				*addr += ldbase;
-				break;
-
-			default:
-				break;
-		}
-		rel = (Elf32_Rel*) ((char *) rel + relent);
-		relsz -= relent;
-	}
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/gnuefi/reloc_ia64.S b/third_party/gnu-efi/gnuefi/reloc_ia64.S
deleted file mode 100644
index 40203bf..0000000
--- a/third_party/gnu-efi/gnuefi/reloc_ia64.S
+++ /dev/null
@@ -1,227 +0,0 @@
-/* reloc_ia64.S - position independent IA-64 ELF shared object relocator
-   Copyright (C) 1999 Hewlett-Packard Co.
-	Contributed by David Mosberger <davidm@hpl.hp.com>.
-
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials
-      provided with the distribution.
-    * Neither the name of Hewlett-Packard Co. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-    SUCH DAMAGE.
-*/
-
-/*
- * This is written in assembly because the entire code needs to be position
- * independent.  Note that the compiler does not generate code that's position
- * independent by itself because it relies on the global offset table being
- * relocated.
- */
-	.text
-	.psr abi64
-	.psr lsb
-	.lsb
-
-/*
- * This constant determines how many R_IA64_FPTR64LSB relocations we
- * can deal with.  If you get EFI_BUFFER_TOO_SMALL errors, you may
- * need to increase this number.
- */
-#define MAX_FUNCTION_DESCRIPTORS	750
-
-#define ST_VALUE_OFF	8		/* offset of st_value in elf sym */
-
-#define EFI_SUCCESS		0
-#define EFI_LOAD_ERROR		1
-#define EFI_BUFFER_TOO_SMALL	5
-
-#define DT_NULL		0		/* Marks end of dynamic section */
-#define DT_RELA		7		/* Address of Rela relocs */
-#define DT_RELASZ	8		/* Total size of Rela relocs */
-#define DT_RELAENT	9		/* Size of one Rela reloc */
-#define DT_SYMTAB	6		/* Address of symbol table */
-#define DT_SYMENT	11		/* Size of one symbol table entry */
-
-#define R_IA64_NONE		0
-#define R_IA64_REL64MSB		0x6e
-#define R_IA64_REL64LSB		0x6f
-#define R_IA64_DIR64MSB		0x26
-#define R_IA64_DIR64LSB		0x27
-#define R_IA64_FPTR64MSB	0x46
-#define R_IA64_FPTR64LSB	0x47
-
-#define	ldbase	in0	/* load address (address of .text) */
-#define	dyn	in1	/* address of _DYNAMIC */
-
-#define d_tag	r16
-#define d_val	r17
-#define rela	r18
-#define relasz	r19
-#define relaent	r20
-#define addr	r21
-#define r_info	r22
-#define r_offset r23
-#define r_addend r24
-#define r_type	r25
-#define r_sym	r25	/* alias of r_type ! */
-#define fptr	r26
-#define fptr_limit r27
-#define symtab	f8
-#define syment	f9
-#define ftmp	f10
-
-#define	target	r16
-#define val	r17
-
-#define NLOC	0
-
-#define Pnull		p6
-#define Prela		p7
-#define Prelasz		p8
-#define Prelaent	p9
-#define Psymtab		p10
-#define Psyment		p11
-
-#define Pnone		p6
-#define Prel		p7
-#define Pfptr		p8
-
-#define Pmore		p6
-
-#define Poom		p6	/* out-of-memory */
-
-	.global _relocate
-	.proc _relocate
-_relocate:
-	alloc r2=ar.pfs,2,0,0,0
-	movl	fptr = @gprel(fptr_mem_base)
-	;;
-	add	fptr = fptr, gp
-	movl	fptr_limit = @gprel(fptr_mem_limit)
-	;;
-	add	fptr_limit = fptr_limit, gp
-
-search_dynamic:
-	ld8	d_tag = [dyn],8
-	;;
-	ld8	d_val = [dyn],8
-	cmp.eq	Pnull,p0 = DT_NULL,d_tag
-(Pnull)	br.cond.sptk.few apply_relocs
-	cmp.eq	Prela,p0 = DT_RELA,d_tag
-	cmp.eq	Prelasz,p0 = DT_RELASZ,d_tag
-	cmp.eq	Psymtab,p0 = DT_SYMTAB,d_tag
-	cmp.eq	Psyment,p0 = DT_SYMENT,d_tag
-	cmp.eq	Prelaent,p0 = DT_RELAENT,d_tag
-	;;
-(Prela)	add rela = d_val, ldbase
-(Prelasz) mov relasz = d_val
-(Prelaent) mov relaent = d_val
-(Psymtab) add val = d_val, ldbase
-	;;
-(Psyment) setf.sig syment = d_val
-	;;
-(Psymtab) setf.sig symtab = val
-	br.sptk.few search_dynamic
-
-apply_loop:
-	ld8	r_offset = [rela]
-	add	addr = 8,rela
-	sub	relasz = relasz,relaent
-	;;
-
-	ld8	r_info = [addr],8
-	;;
-	ld8	r_addend = [addr]
-	add	target = ldbase, r_offset
-
-	add	rela = rela,relaent
-	extr.u	r_type = r_info, 0, 32
-	;;
-	cmp.eq	Pnone,p0 = R_IA64_NONE,r_type
-	cmp.eq	Prel,p0 = R_IA64_REL64LSB,r_type
-	cmp.eq	Pfptr,p0 = R_IA64_FPTR64LSB,r_type
-(Prel)	br.cond.sptk.few apply_REL64
-	;;
-	cmp.eq	Prel,p0 = R_IA64_DIR64LSB,r_type // treat DIR64 just like REL64
-
-(Pnone)	br.cond.sptk.few apply_relocs
-(Prel)	br.cond.sptk.few apply_REL64
-(Pfptr)	br.cond.sptk.few apply_FPTR64
-
-	mov	r8 = EFI_LOAD_ERROR
-	br.ret.sptk.few rp
-
-apply_relocs:
-	cmp.ltu	Pmore,p0=0,relasz
-(Pmore)	br.cond.sptk.few apply_loop
-
-	mov	r8 = EFI_SUCCESS
-	br.ret.sptk.few rp
-
-apply_REL64:
-	ld8 val = [target]
-	;;
-	add val = val,ldbase
-	;;
-	st8 [target] = val
-	br.cond.sptk.few apply_relocs
-
-	// FPTR relocs are a bit more interesting: we need to lookup
-	// the symbol's value in symtab, allocate 16 bytes of memory,
-	// store the value in [target] in the first and the gp in the
-	// second dword.
-apply_FPTR64:
-	st8	[target] = fptr
-	extr.u	r_sym = r_info,32,32
-	add	target = 8,fptr
-	;;
-
-	setf.sig ftmp = r_sym
-	mov	r8=EFI_BUFFER_TOO_SMALL
-	;;
-	cmp.geu	Poom,p0 = fptr,fptr_limit
-
-	xma.lu	ftmp = ftmp,syment,symtab
-(Poom)	br.ret.sptk.few rp
-	;;
-	getf.sig addr = ftmp
-	st8	[target] = gp
-	;;
-	add	addr = ST_VALUE_OFF, addr
-	;;
-	ld8	val = [addr]
-	;;
-	add	val = val,ldbase
-	;;
-	st8	[fptr] = val,16
-	br.cond.sptk.few apply_relocs
-
-	.endp _relocate
-
-	.data
-	.align 16
-fptr_mem_base:
-	.space  MAX_FUNCTION_DESCRIPTORS*16
-fptr_mem_limit:
diff --git a/third_party/gnu-efi/gnuefi/reloc_x86_64.c b/third_party/gnu-efi/gnuefi/reloc_x86_64.c
deleted file mode 100644
index 04b75b2..0000000
--- a/third_party/gnu-efi/gnuefi/reloc_x86_64.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* reloc_x86_64.c - position independent x86_64 ELF shared object relocator
-   Copyright (C) 1999 Hewlett-Packard Co.
-	Contributed by David Mosberger <davidm@hpl.hp.com>.
-   Copyright (C) 2005 Intel Co.
-	Contributed by Fenghua Yu <fenghua.yu@intel.com>.
-
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above
-      copyright notice, this list of conditions and the following
-      disclaimer in the documentation and/or other materials
-      provided with the distribution.
-    * Neither the name of Hewlett-Packard Co. nor the names of its
-      contributors may be used to endorse or promote products derived
-      from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-    BE LIABLE FOR ANYDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
-    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
-    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-    SUCH DAMAGE.
-*/
-
-#include <efi.h>
-#include <efilib.h>
-
-#include <elf.h>
-
-EFI_STATUS _relocate (long ldbase, Elf64_Dyn *dyn,
-		      EFI_HANDLE image EFI_UNUSED,
-		      EFI_SYSTEM_TABLE *systab EFI_UNUSED)
-{
-	long relsz = 0, relent = 0;
-	Elf64_Rel *rel = 0;
-	unsigned long *addr;
-	int i;
-
-	for (i = 0; dyn[i].d_tag != DT_NULL; ++i) {
-		switch (dyn[i].d_tag) {
-			case DT_RELA:
-				rel = (Elf64_Rel*)
-					((unsigned long)dyn[i].d_un.d_ptr
-					 + ldbase);
-				break;
-
-			case DT_RELASZ:
-				relsz = dyn[i].d_un.d_val;
-				break;
-
-			case DT_RELAENT:
-				relent = dyn[i].d_un.d_val;
-				break;
-
-			default:
-				break;
-		}
-	}
-
-        if (!rel && relent == 0)
-                return EFI_SUCCESS;
-
-	if (!rel || relent == 0)
-		return EFI_LOAD_ERROR;
-
-	while (relsz > 0) {
-		/* apply the relocs */
-		switch (ELF64_R_TYPE (rel->r_info)) {
-			case R_X86_64_NONE:
-				break;
-
-			case R_X86_64_RELATIVE:
-				addr = (unsigned long *)
-					(ldbase + rel->r_offset);
-				*addr += ldbase;
-				break;
-
-			default:
-				break;
-		}
-		rel = (Elf64_Rel*) ((char *) rel + relent);
-		relsz -= relent;
-	}
-	return EFI_SUCCESS;
-}
diff --git a/third_party/gnu-efi/inc/Makefile b/third_party/gnu-efi/inc/Makefile
deleted file mode 100644
index 273d303..0000000
--- a/third_party/gnu-efi/inc/Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-SRCDIR = .
-
-VPATH = $(SRCDIR)
-
-include $(SRCDIR)/../Make.defaults
-
-TOPDIR = $(SRCDIR)/..
-
-CDIR=$(TOPDIR)/..
-
-all:
-
-clean:
-
-install:
-	mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi
-	mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol
-	mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH)
-	$(INSTALL) -m 644 $(SRCDIR)/*.h $(INSTALLROOT)$(PREFIX)/include/efi
-	$(INSTALL) -m 644 $(SRCDIR)/protocol/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol
-	$(INSTALL) -m 644 $(SRCDIR)/$(ARCH)/*.h $(INSTALLROOT)$(PREFIX)/include/efi/$(ARCH)
-ifeq ($(ARCH),ia64)
-	mkdir -p $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64
-	$(INSTALL) -m 644 $(SRCDIR)/protocol/ia64/*.h $(INSTALLROOT)$(PREFIX)/include/efi/protocol/ia64
-endif
-
-include $(SRCDIR)/../Make.rules
diff --git a/third_party/gnu-efi/inc/aarch64/efibind.h b/third_party/gnu-efi/inc/aarch64/efibind.h
deleted file mode 100644
index ef7148d..0000000
--- a/third_party/gnu-efi/inc/aarch64/efibind.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copright (C) 2014 - 2015 Linaro Ltd.
- * Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice and this list of conditions, without modification.
- * 2. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License as published by the Free Software Foundation;
- * either version 2 of the License, or (at your option) any later version.
- */
-
-#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L )
-
-// ANSI C 1999/2000 stdint.h integer width declarations
-
-typedef unsigned long       uint64_t;
-typedef long                int64_t;
-typedef unsigned int        uint32_t;
-typedef int                 int32_t;
-typedef unsigned short      uint16_t;
-typedef short               int16_t;
-typedef unsigned char       uint8_t;
-typedef signed char         int8_t;   // unqualified 'char' is unsigned on ARM
-
-#else
-#include <stdint.h>
-#endif
-
-//
-// Basic EFI types of various widths
-//
-
-#ifndef __WCHAR_TYPE__
-# define __WCHAR_TYPE__ short
-#endif
-
-typedef uint64_t   UINT64;
-typedef int64_t    INT64;
-
-typedef uint32_t   UINT32;
-typedef int32_t    INT32;
-
-typedef uint16_t   UINT16;
-typedef int16_t    INT16;
-typedef uint8_t    UINT8;
-typedef int8_t     INT8;
-typedef __WCHAR_TYPE__ WCHAR;
-
-#undef VOID
-#define VOID    void
-
-typedef int64_t    INTN;
-typedef uint64_t   UINTN;
-
-#define EFIERR(a)           (0x8000000000000000 | a)
-#define EFI_ERROR_MASK      0x8000000000000000
-#define EFIERR_OEM(a)       (0xc000000000000000 | a)
-
-#define BAD_POINTER         0xFBFBFBFBFBFBFBFB
-#define MAX_ADDRESS         0xFFFFFFFFFFFFFFFF
-
-#define BREAKPOINT()        while (TRUE);    // Make it hang on Bios[Dbg]32
-
-//
-// Pointers must be aligned to these address to function
-//
-
-#define MIN_ALIGNMENT_SIZE  8
-
-#define ALIGN_VARIABLE(Value ,Adjustment) \
-            (UINTN)Adjustment = 0; \
-            if((UINTN)Value % MIN_ALIGNMENT_SIZE) \
-                (UINTN)Adjustment = MIN_ALIGNMENT_SIZE - ((UINTN)Value % MIN_ALIGNMENT_SIZE); \
-            Value = (UINTN)Value + (UINTN)Adjustment
-
-
-//
-// Define macros to build data structure signatures from characters.
-//
-
-#define EFI_SIGNATURE_16(A,B)             ((A) | (B<<8))
-#define EFI_SIGNATURE_32(A,B,C,D)         (EFI_SIGNATURE_16(A,B)     | (EFI_SIGNATURE_16(C,D)     << 16))
-#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32))
-
-//
-// EFIAPI - prototype calling convention for EFI function pointers
-// BOOTSERVICE - prototype for implementation of a boot service interface
-// RUNTIMESERVICE - prototype for implementation of a runtime service interface
-// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service
-// RUNTIME_CODE - pragma macro for declaring runtime code
-//
-
-#ifndef EFIAPI          // Forces EFI calling conventions reguardless of compiler options
-#define EFIAPI          // Substitute expresion to force C calling convention
-#endif
-
-#define BOOTSERVICE
-#define RUNTIMESERVICE
-#define RUNTIMEFUNCTION
-
-
-#define RUNTIME_CODE(a)         alloc_text("rtcode", a)
-#define BEGIN_RUNTIME_DATA()    data_seg("rtdata")
-#define END_RUNTIME_DATA()      data_seg("")
-
-#define VOLATILE                volatile
-
-#define MEMORY_FENCE            __sync_synchronize
-
-//
-// When build similiar to FW, then link everything together as
-// one big module.
-//
-
-#define EFI_DRIVER_ENTRY_POINT(InitFunction)    \
-    UINTN                                       \
-    InitializeDriver (                          \
-        VOID    *ImageHandle,                   \
-        VOID    *SystemTable                    \
-        )                                       \
-    {                                           \
-        return InitFunction(ImageHandle,        \
-                SystemTable);                   \
-    }                                           \
-                                                \
-    EFI_STATUS efi_main(                        \
-        EFI_HANDLE image,                       \
-        EFI_SYSTEM_TABLE *systab                \
-        ) __attribute__((weak,                  \
-                alias ("InitializeDriver")));
-
-#define LOAD_INTERNAL_DRIVER(_if, type, name, entry)    \
-        (_if)->LoadInternal(type, name, entry)
-
-
-//
-// Some compilers don't support the forward reference construct:
-//  typedef struct XXXXX
-//
-// The following macro provide a workaround for such cases.
-
-#define INTERFACE_DECL(x) struct x
-
-#define uefi_call_wrapper(func, va_num, ...) func(__VA_ARGS__)
-#define EFI_FUNCTION
diff --git a/third_party/gnu-efi/inc/aarch64/efilibplat.h b/third_party/gnu-efi/inc/aarch64/efilibplat.h
deleted file mode 100644
index 70a0786..0000000
--- a/third_party/gnu-efi/inc/aarch64/efilibplat.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efilibplat.h
-
-Abstract:
-
-    EFI to compile bindings
-
-
-
-
-Revision History
-
---*/
-
-VOID
-InitializeLibPlatform (
-    IN EFI_HANDLE           ImageHandle,
-    IN EFI_SYSTEM_TABLE     *SystemTable
-    );
-
diff --git a/third_party/gnu-efi/inc/aarch64/efisetjmp_arch.h b/third_party/gnu-efi/inc/aarch64/efisetjmp_arch.h
deleted file mode 100644
index abd7a0e..0000000
--- a/third_party/gnu-efi/inc/aarch64/efisetjmp_arch.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef GNU_EFI_AARCH64_SETJMP_H
-#define GNU_EFI_AARCH64_SETJMP_H
-
-#define JMPBUF_ALIGN 8
-
-typedef struct {
-	/* GP regs */
-	UINT64	X19;
-	UINT64	X20;
-	UINT64	X21;
-	UINT64	X22;
-	UINT64	X23;
-	UINT64	X24;
-	UINT64	X25;
-	UINT64	X26;
-	UINT64	X27;
-	UINT64	X28;
-	UINT64	FP;
-	UINT64	LR;
-	UINT64	IP0;
-
-	/* FP regs */
-	UINT64	D8;
-	UINT64	D9;
-	UINT64	D10;
-	UINT64	D11;
-	UINT64	D12;
-	UINT64	D13;
-	UINT64	D14;
-	UINT64	D15;
-} ALIGN(JMPBUF_ALIGN) jmp_buf;
-
-#endif /* GNU_EFI_AARCH64_SETJMP_H */
diff --git a/third_party/gnu-efi/inc/arm/efibind.h b/third_party/gnu-efi/inc/arm/efibind.h
deleted file mode 100644
index 0978079..0000000
--- a/third_party/gnu-efi/inc/arm/efibind.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copright (C) 2014 - 2015 Linaro Ltd.
- * Author: Ard Biesheuvel <ard.biesheuvel@linaro.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice and this list of conditions, without modification.
- * 2. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License as published by the Free Software Foundation;
- * either version 2 of the License, or (at your option) any later version.
- */
-
-#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L )
-
-// ANSI C 1999/2000 stdint.h integer width declarations
-
-typedef unsigned long long  uint64_t;
-typedef long long           int64_t;
-typedef unsigned int        uint32_t;
-typedef int                 int32_t;
-typedef unsigned short      uint16_t;
-typedef short               int16_t;
-typedef unsigned char       uint8_t;
-typedef signed char         int8_t;   // unqualified 'char' is unsigned on ARM
-
-#else
-#include <stdint.h>
-#endif
-
-/*
- * This prevents GCC from emitting GOT based relocations, and use R_ARM_REL32
- * relative relocations instead, which are more suitable for static binaries.
- */
-#ifdef __GNUC__
-#pragma GCC visibility push (hidden)
-#endif
-
-//
-// Basic EFI types of various widths
-//
-
-#ifndef __WCHAR_TYPE__
-# define __WCHAR_TYPE__ short
-#endif
-
-typedef uint64_t   UINT64;
-typedef int64_t    INT64;
-
-typedef uint32_t   UINT32;
-typedef int32_t    INT32;
-
-typedef uint16_t   UINT16;
-typedef int16_t    INT16;
-typedef uint8_t    UINT8;
-typedef int8_t     INT8;
-typedef __WCHAR_TYPE__ WCHAR;
-
-#undef VOID
-#define VOID    void
-
-typedef int32_t    INTN;
-typedef uint32_t   UINTN;
-
-#define EFIERR(a)           (0x80000000 | a)
-#define EFI_ERROR_MASK      0x80000000
-#define EFIERR_OEM(a)       (0xc0000000 | a)
-
-#define BAD_POINTER         0xFBFBFBFB
-#define MAX_ADDRESS         0xFFFFFFFF
-
-#define BREAKPOINT()        while (TRUE);
-
-//
-// Pointers must be aligned to these address to function
-//
-
-#define MIN_ALIGNMENT_SIZE  4
-
-#define ALIGN_VARIABLE(Value ,Adjustment) \
-            (UINTN)Adjustment = 0; \
-            if((UINTN)Value % MIN_ALIGNMENT_SIZE) \
-                (UINTN)Adjustment = MIN_ALIGNMENT_SIZE - ((UINTN)Value % MIN_ALIGNMENT_SIZE); \
-            Value = (UINTN)Value + (UINTN)Adjustment
-
-
-//
-// Define macros to build data structure signatures from characters.
-//
-
-#define EFI_SIGNATURE_16(A,B)             ((A) | (B<<8))
-#define EFI_SIGNATURE_32(A,B,C,D)         (EFI_SIGNATURE_16(A,B)     | (EFI_SIGNATURE_16(C,D)     << 16))
-#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32))
-
-//
-// EFIAPI - prototype calling convention for EFI function pointers
-// BOOTSERVICE - prototype for implementation of a boot service interface
-// RUNTIMESERVICE - prototype for implementation of a runtime service interface
-// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service
-// RUNTIME_CODE - pragma macro for declaring runtime code
-//
-
-#ifndef EFIAPI          // Forces EFI calling conventions reguardless of compiler options
-#define EFIAPI          // Substitute expresion to force C calling convention
-#endif
-
-#define BOOTSERVICE
-#define RUNTIMESERVICE
-#define RUNTIMEFUNCTION
-
-
-#define RUNTIME_CODE(a)         alloc_text("rtcode", a)
-#define BEGIN_RUNTIME_DATA()    data_seg("rtdata")
-#define END_RUNTIME_DATA()      data_seg("")
-
-#define VOLATILE                volatile
-
-#define MEMORY_FENCE            __sync_synchronize
-
-//
-// When build similiar to FW, then link everything together as
-// one big module. For the MSVC toolchain, we simply tell the
-// linker what our driver init function is using /ENTRY.
-//
-#if defined(_MSC_EXTENSIONS)
-#define EFI_DRIVER_ENTRY_POINT(InitFunction) \
-    __pragma(comment(linker, "/ENTRY:" # InitFunction))
-#else
-#define EFI_DRIVER_ENTRY_POINT(InitFunction)    \
-    UINTN                                       \
-    InitializeDriver (                          \
-        VOID    *ImageHandle,                   \
-        VOID    *SystemTable                    \
-        )                                       \
-    {                                           \
-        return InitFunction(ImageHandle,        \
-                SystemTable);                   \
-    }                                           \
-                                                \
-    EFI_STATUS efi_main(                        \
-        EFI_HANDLE image,                       \
-        EFI_SYSTEM_TABLE *systab                \
-        ) __attribute__((weak,                  \
-                alias ("InitializeDriver")));
-#endif
-
-#define LOAD_INTERNAL_DRIVER(_if, type, name, entry)    \
-        (_if)->LoadInternal(type, name, entry)
-
-
-//
-// Some compilers don't support the forward reference construct:
-//  typedef struct XXXXX
-//
-// The following macro provide a workaround for such cases.
-
-#define INTERFACE_DECL(x) struct x
-
-#define uefi_call_wrapper(func, va_num, ...) func(__VA_ARGS__)
-#define EFI_FUNCTION
-
-static inline UINT64 DivU64x32(UINT64 Dividend, UINTN Divisor, UINTN *Remainder)
-{
-    /*
-     * GCC turns a division into a multiplication and shift with precalculated
-     * constants if the divisor is constant and the dividend fits into a 32 bit
-     * variable. Otherwise, it will turn this into calls into the 32-bit div
-     * library functions.
-     */
-    if (Remainder)
-        *Remainder = Dividend % Divisor;
-    Dividend = Dividend / Divisor;
-    return Dividend;
-}
diff --git a/third_party/gnu-efi/inc/arm/efilibplat.h b/third_party/gnu-efi/inc/arm/efilibplat.h
deleted file mode 100644
index 70a0786..0000000
--- a/third_party/gnu-efi/inc/arm/efilibplat.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efilibplat.h
-
-Abstract:
-
-    EFI to compile bindings
-
-
-
-
-Revision History
-
---*/
-
-VOID
-InitializeLibPlatform (
-    IN EFI_HANDLE           ImageHandle,
-    IN EFI_SYSTEM_TABLE     *SystemTable
-    );
-
diff --git a/third_party/gnu-efi/inc/arm/efisetjmp_arch.h b/third_party/gnu-efi/inc/arm/efisetjmp_arch.h
deleted file mode 100644
index 3a09ea5..0000000
--- a/third_party/gnu-efi/inc/arm/efisetjmp_arch.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef GNU_EFI_ARM_SETJMP_H
-#define GNU_EFI_ARM_SETJMP_H
-
-#define JMPBUF_ALIGN 4
-
-typedef struct {
-	UINT32 R3; // A copy of R13
-	UINT32 R4;
-	UINT32 R5;
-	UINT32 R6;
-	UINT32 R7;
-	UINT32 R8;
-	UINT32 R9;
-	UINT32 R10;
-	UINT32 R11;
-	UINT32 R12;
-	UINT32 R13;
-	UINT32 R14;
-} ALIGN(JMPBUF_ALIGN) jmp_buf;
-
-#endif /* GNU_EFI_ARM_SETJMP_H */
diff --git a/third_party/gnu-efi/inc/efi.h b/third_party/gnu-efi/inc/efi.h
deleted file mode 100644
index 97feee4..0000000
--- a/third_party/gnu-efi/inc/efi.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efi.h
-
-Abstract:
-
-    Public EFI header files
-
-
-
-Revision History
-
---*/
-
-//
-// Build flags on input
-//  EFI32
-//  EFI_DEBUG               - Enable debugging code
-//  EFI_NT_EMULATOR         - Building for running under NT
-//
-
-
-#ifndef _EFI_INCLUDE_
-#define _EFI_INCLUDE_
-
-#define EFI_FIRMWARE_VENDOR         L"INTEL"
-#define EFI_FIRMWARE_MAJOR_REVISION 12
-#define EFI_FIRMWARE_MINOR_REVISION 33
-#define EFI_FIRMWARE_REVISION ((EFI_FIRMWARE_MAJOR_REVISION <<16) | (EFI_FIRMWARE_MINOR_REVISION))
-
-#include "efibind.h"
-#include "eficompiler.h"
-#include "efidef.h"
-#include "efidevp.h"
-#include "efipciio.h"
-#include "efiprot.h"
-#include "eficon.h"
-#include "efiser.h"
-#include "efi_nii.h"
-#include "efipxebc.h"
-#include "efinet.h"
-#include "efiapi.h"
-#include "efifs.h"
-#include "efierr.h"
-#include "efiui.h"
-#include "efiip.h"
-#include "efiudp.h"
-#include "efitcp.h"
-#include "efipoint.h"
-#include "efisetjmp.h"
-
-#endif
diff --git a/third_party/gnu-efi/inc/efi_nii.h b/third_party/gnu-efi/inc/efi_nii.h
deleted file mode 100644
index ba7a5b2..0000000
--- a/third_party/gnu-efi/inc/efi_nii.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef _EFI_NII_H
-#define _EFI_NII_H
-
-/*++
-Copyright (c) 2000  Intel Corporation
-
-Module name:
-    efi_nii.h
-
-Abstract:
-
-Revision history:
-    2000-Feb-18 M(f)J   GUID updated.
-                Structure order changed for machine word alignment.
-                Added StringId[4] to structure.
-                
-    2000-Feb-14 M(f)J   Genesis.
---*/
-
-#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL \
-    { 0xE18541CD, 0xF755, 0x4f73, {0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29} }
-
-#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION 0x00010000
-
-typedef enum {
-    EfiNetworkInterfaceUndi = 1
-} EFI_NETWORK_INTERFACE_TYPE;
-
-typedef struct {
-
-    UINT64 Revision;
-    // Revision of the network interface identifier protocol interface.
-
-    UINT64 ID;
-    // Address of the first byte of the identifying structure for this
-    // network interface.  This is set to zero if there is no structure.
-    //
-    // For PXE/UNDI this is the first byte of the !PXE structure.
-
-    UINT64 ImageAddr;
-    // Address of the UNrelocated driver/ROM image.  This is set
-    // to zero if there is no driver/ROM image.
-    //
-    // For 16-bit UNDI, this is the first byte of the option ROM in
-    // upper memory.
-    //
-    // For 32/64-bit S/W UNDI, this is the first byte of the EFI ROM
-    // image.
-    //
-    // For H/W UNDI, this is set to zero.
-
-    UINT32 ImageSize;
-    // Size of the UNrelocated driver/ROM image of this network interface.
-    // This is set to zero if there is no driver/ROM image.
-
-    CHAR8 StringId[4];
-    // 4 char ASCII string to go in class identifier (option 60) in DHCP
-    // and Boot Server discover packets.
-    // For EfiNetworkInterfaceUndi this field is "UNDI".
-    // For EfiNetworkInterfaceSnp this field is "SNPN".
-
-    UINT8 Type;
-    UINT8 MajorVer;
-    UINT8 MinorVer;
-    // Information to be placed into the PXE DHCP and Discover packets.
-    // This is the network interface type and version number that will
-    // be placed into DHCP option 94 (client network interface identifier).
-    BOOLEAN Ipv6Supported;
-	UINT8   IfNum;	// interface number to be used with pxeid structure
-} EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE;
-
-extern EFI_GUID NetworkInterfaceIdentifierProtocol;
-
-#endif // _EFI_NII_H
diff --git a/third_party/gnu-efi/inc/efi_pxe.h b/third_party/gnu-efi/inc/efi_pxe.h
deleted file mode 100644
index d24251f..0000000
--- a/third_party/gnu-efi/inc/efi_pxe.h
+++ /dev/null
@@ -1,1743 +0,0 @@
-#ifndef _EFI_PXE_H
-#define _EFI_PXE_H
-
-
-/*++
-Copyright (c) Intel  1999
-
-Module name:
-    efi_pxe.h
-
-32/64-bit PXE specification:
-    alpha-4, 99-Dec-17
-
-Abstract:
-    This header file contains all of the PXE type definitions,
-    structure prototypes, global variables and constants that
-    are needed for porting PXE to EFI.
---*/
-
-#pragma pack(1)
-
-#define PXE_INTEL_ORDER         1   // Intel order
-//#define PXE_NETWORK_ORDER         1   // network order
-
-#define PXE_UINT64_SUPPORT          1   // UINT64 supported
-//#define PXE_NO_UINT64_SUPPORT     1   // UINT64 not supported
-
-#define PXE_BUSTYPE(a,b,c,d)            \
-((((PXE_UINT32)(d) & 0xFF) << 24) | \
-(((PXE_UINT32)(c) & 0xFF) << 16) |  \
-(((PXE_UINT32)(b) & 0xFF) << 8) |       \
-((PXE_UINT32)(a) & 0xFF))
-
-//
-// UNDI ROM ID and devive ID signature
-//
-#define PXE_BUSTYPE_PXE         PXE_BUSTYPE('!', 'P', 'X', 'E')
-
-//
-// BUS ROM ID signatures
-//
-#define PXE_BUSTYPE_PCI         PXE_BUSTYPE('P', 'C', 'I', 'R')
-#define PXE_BUSTYPE_PC_CARD     PXE_BUSTYPE('P', 'C', 'C', 'R')
-#define PXE_BUSTYPE_USB         PXE_BUSTYPE('U', 'S', 'B', 'R')
-#define PXE_BUSTYPE_1394        PXE_BUSTYPE('1', '3', '9', '4')
-
-#define PXE_SWAP_UINT16(n)          \
-((((PXE_UINT16)(n) & 0x00FF) << 8) |    \
-(((PXE_UINT16)(n) & 0xFF00) >> 8))
-
-#define PXE_SWAP_UINT32(n)              \
-((((PXE_UINT32)(n) & 0x000000FF) << 24) |   \
-(((PXE_UINT32)(n) & 0x0000FF00) << 8) |     \
-(((PXE_UINT32)(n) & 0x00FF0000) >> 8) |     \
-(((PXE_UINT32)(n) & 0xFF000000) >> 24))
-
-#if PXE_UINT64_SUPPORT != 0
-#define PXE_SWAP_UINT64(n)                  \
-((((PXE_UINT64)(n) & 0x00000000000000FF) << 56) |   \
-(((PXE_UINT64)(n) & 0x000000000000FF00) << 40) |    \
-(((PXE_UINT64)(n) & 0x0000000000FF0000) << 24) |    \
-(((PXE_UINT64)(n) & 0x00000000FF000000) << 8) | \
-(((PXE_UINT64)(n) & 0x000000FF00000000) >> 8) | \
-(((PXE_UINT64)(n) & 0x0000FF0000000000) >> 24) |    \
-(((PXE_UINT64)(n) & 0x00FF000000000000) >> 40) |    \
-(((PXE_UINT64)(n) & 0xFF00000000000000) >> 56))
-#endif // PXE_UINT64_SUPPORT
-
-#if PXE_NO_UINT64_SUPPORT != 0
-#define PXE_SWAP_UINT64(n)                      \
-{                                       \
-PXE_UINT32 tmp = (PXE_UINT64)(n)[1];                \
-(PXE_UINT64)(n)[1] = PXE_SWAP_UINT32((PXE_UINT64)(n)[0]);   \
-(PXE_UINT64)(n)[0] = tmp;                       \
-}
-#endif // PXE_NO_UINT64_SUPPORT
-
-#define PXE_CPBSIZE_NOT_USED            0   // zero
-#define PXE_DBSIZE_NOT_USED         0   // zero
-#define PXE_CPBADDR_NOT_USED        (PXE_UINT64)0       // zero
-#define PXE_DBADDR_NOT_USED     (PXE_UINT64)0       // zero
-
-#define PXE_CONST const
-
-#define PXE_VOLATILE volatile
-
-typedef void PXE_VOID;
-
-typedef unsigned char PXE_UINT8;
-
-typedef unsigned short PXE_UINT16;
-
-typedef unsigned PXE_UINT32;
-
-#if PXE_UINT64_SUPPORT != 0
-// typedef unsigned long PXE_UINT64;
-typedef UINT64 PXE_UINT64;
-#endif // PXE_UINT64_SUPPORT
-
-#if PXE_NO_UINT64_SUPPORT != 0
-typedef PXE_UINT32 PXE_UINT64[2];
-#endif // PXE_NO_UINT64_SUPPORT
-
-typedef unsigned PXE_UINTN;
-
-typedef PXE_UINT8 PXE_BOOL;
-
-#define PXE_FALSE               0   // zero
-#define PXE_TRUE                    (!PXE_FALSE)
-
-typedef PXE_UINT16 PXE_OPCODE;
-
-//
-// Return UNDI operational state.
-//
-#define PXE_OPCODE_GET_STATE                    0x0000
-
-//
-// Change UNDI operational state from Stopped to Started.
-//
-#define PXE_OPCODE_START                    0x0001
-
-//
-// Change UNDI operational state from Started to Stopped.
-//
-#define PXE_OPCODE_STOP                     0x0002
-
-//
-// Get UNDI initialization information.
-//
-#define PXE_OPCODE_GET_INIT_INFO                0x0003
-
-//
-// Get NIC configuration information.
-//
-#define PXE_OPCODE_GET_CONFIG_INFO              0x0004
-
-//
-// Changed UNDI operational state from Started to Initialized.
-//
-#define PXE_OPCODE_INITIALIZE                   0x0005
-
-//
-// Re-initialize the NIC H/W.
-//
-#define PXE_OPCODE_RESET                    0x0006
-
-//
-// Change the UNDI operational state from Initialized to Started.
-//
-#define PXE_OPCODE_SHUTDOWN                 0x0007
-
-//
-// Read & change state of external interrupt enables.
-//
-#define PXE_OPCODE_INTERRUPT_ENABLES                0x0008
-
-//
-// Read & change state of packet receive filters.
-//
-#define PXE_OPCODE_RECEIVE_FILTERS              0x0009
-
-//
-// Read & change station MAC address.
-//
-#define PXE_OPCODE_STATION_ADDRESS              0x000A
-
-//
-// Read traffic statistics.
-//
-#define PXE_OPCODE_STATISTICS                   0x000B
-
-//
-// Convert multicast IP address to multicast MAC address.
-//
-#define PXE_OPCODE_MCAST_IP_TO_MAC              0x000C
-
-//
-// Read or change non-volatile storage on the NIC.
-//
-#define PXE_OPCODE_NVDATA                   0x000D
-
-//
-// Get & clear interrupt status.
-//
-#define PXE_OPCODE_GET_STATUS                   0x000E
-
-//
-// Fill media header in packet for transmit.
-//
-#define PXE_OPCODE_FILL_HEADER              0x000F
-
-//
-// Transmit packet(s).
-//
-#define PXE_OPCODE_TRANSMIT                 0x0010
-
-//
-// Receive packet.
-//
-#define PXE_OPCODE_RECEIVE                  0x0011
-
-// last valid opcode:
-#define PXE_OPCODE_VALID_MAX                    0x0011
-
-//
-// Last valid PXE UNDI OpCode number.
-//
-#define PXE_OPCODE_LAST_VALID                   0x0011
-
-typedef PXE_UINT16 PXE_OPFLAGS;
-
-#define PXE_OPFLAGS_NOT_USED                    0x0000
-
-////////////////////////////////////////
-// UNDI Get State
-//
-
-// No OpFlags
-
-////////////////////////////////////////
-// UNDI Start
-//
-
-// No OpFlags
-
-////////////////////////////////////////
-// UNDI Stop
-//
-
-// No OpFlags
-
-////////////////////////////////////////
-// UNDI Get Init Info
-//
-
-// No Opflags
-
-////////////////////////////////////////
-// UNDI Get Config Info
-//
-
-// No Opflags
-
-////////////////////////////////////////
-// UNDI Initialize
-//
-
-#define PXE_OPFLAGS_INITIALIZE_CABLE_DETECT_MASK    0x0001
-#define PXE_OPFLAGS_INITIALIZE_DETECT_CABLE         0x0000
-#define PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE  0x0001
-
-////////////////////////////////////////
-// UNDI Reset
-//
-
-#define PXE_OPFLAGS_RESET_DISABLE_INTERRUPTS        0x0001
-#define PXE_OPFLAGS_RESET_DISABLE_FILTERS           0x0002
-
-////////////////////////////////////////
-// UNDI Shutdown
-//
-
-// No OpFlags
-
-////////////////////////////////////////
-// UNDI Interrupt Enables
-//
-
-//
-// Select whether to enable or disable external interrupt signals.
-// Setting both enable and disable will return PXE_STATCODE_INVALID_OPFLAGS.
-//
-#define PXE_OPFLAGS_INTERRUPT_OPMASK                0xC000
-#define PXE_OPFLAGS_INTERRUPT_ENABLE                0x8000
-#define PXE_OPFLAGS_INTERRUPT_DISABLE           0x4000
-#define PXE_OPFLAGS_INTERRUPT_READ              0x0000
-
-//
-// Enable receive interrupts.  An external interrupt will be generated
-// after a complete non-error packet has been received.
-//
-#define PXE_OPFLAGS_INTERRUPT_RECEIVE           0x0001
-
-//
-// Enable transmit interrupts.  An external interrupt will be generated
-// after a complete non-error packet has been transmitted.
-//
-#define PXE_OPFLAGS_INTERRUPT_TRANSMIT          0x0002
-
-//
-// Enable command interrupts.  An external interrupt will be generated
-// when command execution stops.
-//
-#define PXE_OPFLAGS_INTERRUPT_COMMAND           0x0004
-
-//
-// Generate software interrupt.  Setting this bit generates an external
-// interrupt, if it is supported by the hardware.
-//
-#define PXE_OPFLAGS_INTERRUPT_SOFTWARE          0x0008
-
-////////////////////////////////////////
-// UNDI Receive Filters
-//
-
-//
-// Select whether to enable or disable receive filters.
-// Setting both enable and disable will return PXE_STATCODE_INVALID_OPCODE.
-//
-#define PXE_OPFLAGS_RECEIVE_FILTER_OPMASK           0xC000
-#define PXE_OPFLAGS_RECEIVE_FILTER_ENABLE           0x8000
-#define PXE_OPFLAGS_RECEIVE_FILTER_DISABLE          0x4000
-#define PXE_OPFLAGS_RECEIVE_FILTER_READ         0x0000
-
-//
-// To reset the contents of the multicast MAC address filter list,
-// set this OpFlag:
-//
-#define PXE_OPFLAGS_RECEIVE_FILTER_RESET_MCAST_LIST 0x2000
-
-//
-// Enable unicast packet receiving.  Packets sent to the current station
-// MAC address will be received.
-//
-#define PXE_OPFLAGS_RECEIVE_FILTER_UNICAST          0x0001
-
-//
-// Enable broadcast packet receiving.  Packets sent to the broadcast 
-// MAC address will be received.
-//
-#define PXE_OPFLAGS_RECEIVE_FILTER_BROADCAST        0x0002
-
-//
-// Enable filtered multicast packet receiving.  Packets sent to any
-// of the multicast MAC addresses in the multicast MAC address filter
-// list will be received.  If the filter list is empty, no multicast
-//
-#define PXE_OPFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST   0x0004
-
-//
-// Enable promiscuous packet receiving.  All packets will be received.
-//
-#define PXE_OPFLAGS_RECEIVE_FILTER_PROMISCUOUS      0x0008
-
-//
-// Enable promiscuous multicast packet receiving.  All multicast
-// packets will be received.
-//
-#define PXE_OPFLAGS_RECEIVE_FILTER_ALL_MULTICAST        0x0010
-
-////////////////////////////////////////
-// UNDI Station Address
-//
-
-#define PXE_OPFLAGS_STATION_ADDRESS_READ            0x0000
-#define PXE_OPFLAGS_STATION_ADDRESS_RESET           0x0001
-
-////////////////////////////////////////
-// UNDI Statistics
-//
-
-#define PXE_OPFLAGS_STATISTICS_READ             0x0000
-#define PXE_OPFLAGS_STATISTICS_RESET                0x0001
-
-////////////////////////////////////////
-// UNDI MCast IP to MAC
-//
-
-//
-// Identify the type of IP address in the CPB.
-//
-#define PXE_OPFLAGS_MCAST_IP_TO_MAC_OPMASK          0x0003
-#define PXE_OPFLAGS_MCAST_IPV4_TO_MAC           0x0000
-#define PXE_OPFLAGS_MCAST_IPV6_TO_MAC           0x0001
-
-////////////////////////////////////////
-// UNDI NvData
-//
-
-//
-// Select the type of non-volatile data operation.
-//
-#define PXE_OPFLAGS_NVDATA_OPMASK               0x0001
-#define PXE_OPFLAGS_NVDATA_READ             0x0000
-#define PXE_OPFLAGS_NVDATA_WRITE                0x0001
-
-////////////////////////////////////////
-// UNDI Get Status
-//
-
-//
-// Return current interrupt status.  This will also clear any interrupts
-// that are currently set.  This can be used in a polling routine.  The
-// interrupt flags are still set and cleared even when the interrupts
-// are disabled.
-//
-#define PXE_OPFLAGS_GET_INTERRUPT_STATUS            0x0001
-
-//
-// Return list of transmitted buffers for recycling.  Transmit buffers
-// must not be changed or unallocated until they have recycled.  After
-// issuing a transmit command, wait for a transmit complete interrupt.
-// When a transmit complete interrupt is received, read the transmitted
-// buffers.  Do not plan on getting one buffer per interrupt.  Some
-// NICs and UNDIs may transmit multiple buffers per interrupt.
-//
-#define PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS         0x0002
-
-////////////////////////////////////////
-// UNDI Fill Header
-//
-
-#define PXE_OPFLAGS_FILL_HEADER_OPMASK          0x0001
-#define PXE_OPFLAGS_FILL_HEADER_FRAGMENTED          0x0001
-#define PXE_OPFLAGS_FILL_HEADER_WHOLE           0x0000
-
-////////////////////////////////////////
-// UNDI Transmit
-//
-
-//
-// S/W UNDI only.  Return after the packet has been transmitted.  A
-// transmit complete interrupt will still be generated and the transmit
-// buffer will have to be recycled.
-//
-#define PXE_OPFLAGS_SWUNDI_TRANSMIT_OPMASK          0x0001
-#define PXE_OPFLAGS_TRANSMIT_BLOCK              0x0001
-#define PXE_OPFLAGS_TRANSMIT_DONT_BLOCK         0x0000
-
-//
-//
-//
-#define PXE_OPFLAGS_TRANSMIT_OPMASK             0x0002
-#define PXE_OPFLAGS_TRANSMIT_FRAGMENTED         0x0002
-#define PXE_OPFLAGS_TRANSMIT_WHOLE              0x0000
-
-////////////////////////////////////////
-// UNDI Receive
-//
-
-// No OpFlags
-
-typedef PXE_UINT16 PXE_STATFLAGS;
-
-#define PXE_STATFLAGS_INITIALIZE                0x0000
-
-////////////////////////////////////////
-// Common StatFlags that can be returned by all commands.
-//
-
-//
-// The COMMAND_COMPLETE and COMMAND_FAILED status flags must be
-// implemented by all UNDIs.  COMMAND_QUEUED is only needed by UNDIs
-// that support command queuing.
-//
-#define PXE_STATFLAGS_STATUS_MASK               0xC000
-#define PXE_STATFLAGS_COMMAND_COMPLETE          0xC000
-#define PXE_STATFLAGS_COMMAND_FAILED                0x8000
-#define PXE_STATFLAGS_COMMAND_QUEUED                0x4000
-//#define PXE_STATFLAGS_INITIALIZE              0x0000
-
-#define PXE_STATFLAGS_DB_WRITE_TRUNCATED            0x2000
-
-////////////////////////////////////////
-// UNDI Get State
-//
-
-#define PXE_STATFLAGS_GET_STATE_MASK                0x0003
-#define PXE_STATFLAGS_GET_STATE_INITIALIZED         0x0002
-#define PXE_STATFLAGS_GET_STATE_STARTED         0x0001
-#define PXE_STATFLAGS_GET_STATE_STOPPED         0x0000
-
-////////////////////////////////////////
-// UNDI Start
-//
-
-// No additional StatFlags
-
-////////////////////////////////////////
-// UNDI Get Init Info
-//
-
-#define PXE_STATFLAGS_CABLE_DETECT_MASK          0x0001
-#define PXE_STATFLAGS_CABLE_DETECT_NOT_SUPPORTED 0x0000
-#define PXE_STATFLAGS_CABLE_DETECT_SUPPORTED     0x0001
-
-
-////////////////////////////////////////
-// UNDI Initialize
-//
-
-#define PXE_STATFLAGS_INITIALIZED_NO_MEDIA          0x0001
-
-////////////////////////////////////////
-// UNDI Reset
-//
-
-#define PXE_STATFLAGS_RESET_NO_MEDIA                0x0001
-
-////////////////////////////////////////
-// UNDI Shutdown
-//
-
-// No additional StatFlags
-
-////////////////////////////////////////
-// UNDI Interrupt Enables
-//
-
-//
-// If set, receive interrupts are enabled.
-//
-#define PXE_STATFLAGS_INTERRUPT_RECEIVE         0x0001
-
-//
-// If set, transmit interrupts are enabled.
-//
-#define PXE_STATFLAGS_INTERRUPT_TRANSMIT            0x0002
-
-//
-// If set, command interrupts are enabled.
-//
-#define PXE_STATFLAGS_INTERRUPT_COMMAND         0x0004
-
-
-////////////////////////////////////////
-// UNDI Receive Filters
-//
-
-//
-// If set, unicast packets will be received.
-//
-#define PXE_STATFLAGS_RECEIVE_FILTER_UNICAST        0x0001
-
-//
-// If set, broadcast packets will be received.
-//
-#define PXE_STATFLAGS_RECEIVE_FILTER_BROADCAST      0x0002
-
-//
-// If set, multicast packets that match up with the multicast address
-// filter list will be received.
-//
-#define PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004
-
-//
-// If set, all packets will be received.
-//
-#define PXE_STATFLAGS_RECEIVE_FILTER_PROMISCUOUS        0x0008
-
-//
-// If set, all multicast packets will be received.
-//
-#define PXE_STATFLAGS_RECEIVE_FILTER_ALL_MULTICAST  0x0010
-
-////////////////////////////////////////
-// UNDI Station Address
-//
-
-// No additional StatFlags
-
-////////////////////////////////////////
-// UNDI Statistics
-//
-
-// No additional StatFlags
-
-////////////////////////////////////////
-// UNDI MCast IP to MAC
-//
-
-// No additional StatFlags
-
-////////////////////////////////////////
-// UNDI NvData
-//
-
-// No additional StatFlags
-
-
-////////////////////////////////////////
-// UNDI Get Status
-//
-
-//
-// Use to determine if an interrupt has occurred.
-//
-#define PXE_STATFLAGS_GET_STATUS_INTERRUPT_MASK     0x000F
-#define PXE_STATFLAGS_GET_STATUS_NO_INTERRUPTS      0x0000
-
-//
-// If set, at least one receive interrupt occurred.
-//
-#define PXE_STATFLAGS_GET_STATUS_RECEIVE            0x0001
-
-//
-// If set, at least one transmit interrupt occurred.
-//
-#define PXE_STATFLAGS_GET_STATUS_TRANSMIT           0x0002
-
-//
-// If set, at least one command interrupt occurred.
-//
-#define PXE_STATFLAGS_GET_STATUS_COMMAND            0x0004
-
-//
-// If set, at least one software interrupt occurred.
-//
-#define PXE_STATFLAGS_GET_STATUS_SOFTWARE           0x0008
-
-//
-// This flag is set if the transmitted buffer queue is empty.  This flag
-// will be set if all transmitted buffer addresses get written into the DB.
-//
-#define PXE_STATFLAGS_GET_STATUS_TXBUF_QUEUE_EMPTY  0x0010
-
-//
-// This flag is set if no transmitted buffer addresses were written
-// into the DB.  (This could be because DBsize was too small.)
-//
-#define PXE_STATFLAGS_GET_STATUS_NO_TXBUFS_WRITTEN  0x0020
-
-////////////////////////////////////////
-// UNDI Fill Header
-//
-
-// No additional StatFlags
-
-////////////////////////////////////////
-// UNDI Transmit
-//
-
-// No additional StatFlags.
-
-////////////////////////////////////////
-// UNDI Receive
-//
-
-// No additional StatFlags.
-
-typedef PXE_UINT16 PXE_STATCODE;
-
-#define PXE_STATCODE_INITIALIZE             0x0000
-
-////////////////////////////////////////
-// Common StatCodes returned by all UNDI commands, UNDI protocol functions
-// and BC protocol functions.
-//
-
-#define PXE_STATCODE_SUCCESS                    0x0000
-
-#define PXE_STATCODE_INVALID_CDB                0x0001
-#define PXE_STATCODE_INVALID_CPB                0x0002
-#define PXE_STATCODE_BUSY                   	0x0003
-#define PXE_STATCODE_QUEUE_FULL             	0x0004
-#define PXE_STATCODE_ALREADY_STARTED            0x0005
-#define PXE_STATCODE_NOT_STARTED                0x0006
-#define PXE_STATCODE_NOT_SHUTDOWN               0x0007
-#define PXE_STATCODE_ALREADY_INITIALIZED        0x0008
-#define PXE_STATCODE_NOT_INITIALIZED            0x0009
-#define PXE_STATCODE_DEVICE_FAILURE             0x000A
-#define PXE_STATCODE_NVDATA_FAILURE             0x000B
-#define PXE_STATCODE_UNSUPPORTED                0x000C
-#define PXE_STATCODE_BUFFER_FULL                0x000D
-#define PXE_STATCODE_INVALID_PARAMETER		0x000E
-#define PXE_STATCODE_INVALID_UNDI		0x000F
-#define PXE_STATCODE_IPV4_NOT_SUPPORTED		0x0010
-#define PXE_STATCODE_IPV6_NOT_SUPPORTED		0x0011
-#define PXE_STATCODE_NOT_ENOUGH_MEMORY		0x0012
-#define PXE_STATCODE_NO_DATA			0x0013
-
-
-typedef PXE_UINT16 PXE_IFNUM;
-
-//
-// This interface number must be passed to the S/W UNDI Start command.
-//
-#define PXE_IFNUM_START                     0x0000
-
-//
-// This interface number is returned by the S/W UNDI Get State and
-// Start commands if information in the CDB, CPB or DB is invalid.
-//
-#define PXE_IFNUM_INVALID                   0x0000
-
-typedef PXE_UINT16 PXE_CONTROL;
-
-//
-// Setting this flag directs the UNDI to queue this command for later
-// execution if the UNDI is busy and it supports command queuing.
-// If queuing is not supported, a PXE_STATCODE_INVALID_CONTROL error
-// is returned.  If the queue is full, a PXE_STATCODE_CDB_QUEUE_FULL 
-// error is returned.
-//
-#define PXE_CONTROL_QUEUE_IF_BUSY               0x0002
-
-//
-// These two bit values are used to determine if there are more UNDI
-// CDB structures following this one.  If the link bit is set, there
-// must be a CDB structure following this one.  Execution will start
-// on the next CDB structure as soon as this one completes successfully.
-// If an error is generated by this command, execution will stop.
-//
-#define PXE_CONTROL_LINK                    0x0001
-#define PXE_CONTROL_LAST_CDB_IN_LIST                0x0000
-
-typedef PXE_UINT8 PXE_FRAME_TYPE;
-
-#define PXE_FRAME_TYPE_NONE                 0x00
-#define PXE_FRAME_TYPE_UNICAST              0x01
-#define PXE_FRAME_TYPE_BROADCAST                0x02
-#define PXE_FRAME_TYPE_MULTICAST            0x03
-#define PXE_FRAME_TYPE_PROMISCUOUS              0x04
-
-typedef PXE_UINT32 PXE_IPV4;
-
-typedef PXE_UINT32 PXE_IPV6[4];
-#define PXE_MAC_LENGTH 32
-
-typedef PXE_UINT8 PXE_MAC_ADDR[PXE_MAC_LENGTH];
-
-typedef PXE_UINT8 PXE_IFTYPE;
-typedef PXE_UINT16 PXE_MEDIA_PROTOCOL;
-
-//
-// This information is from the ARP section of RFC 1700.
-//
-//     1 Ethernet (10Mb)                                    [JBP]
-//     2 Experimental Ethernet (3Mb)                        [JBP]
-//     3 Amateur Radio AX.25                                [PXK]
-//     4 Proteon ProNET Token Ring                          [JBP]
-//     5 Chaos                                              [GXP]
-//     6 IEEE 802 Networks                                  [JBP]
-//     7 ARCNET                                             [JBP]
-//     8 Hyperchannel                                       [JBP]
-//     9 Lanstar                                             [TU]
-//    10 Autonet Short Address                             [MXB1]
-//    11 LocalTalk                                         [JKR1]
-//    12 LocalNet (IBM PCNet or SYTEK LocalNET)             [JXM]
-//    13 Ultra link                                        [RXD2]
-//    14 SMDS                                              [GXC1]
-//    15 Frame Relay                                        [AGM]
-//    16 Asynchronous Transmission Mode (ATM)              [JXB2]
-//    17 HDLC                                               [JBP]
-//    18 Fibre Channel                            [Yakov Rekhter]
-//    19 Asynchronous Transmission Mode (ATM)      [Mark Laubach]
-//    20 Serial Line                                        [JBP]
-//    21 Asynchronous Transmission Mode (ATM)              [MXB1]
-//
-
-#define PXE_IFTYPE_ETHERNET                 0x01
-#define PXE_IFTYPE_TOKENRING                    0x04
-#define PXE_IFTYPE_FIBRE_CHANNEL                0x12
-
-typedef struct s_pxe_hw_undi {
-PXE_UINT32 Signature;       // PXE_ROMID_SIGNATURE
-PXE_UINT8 Len;          // sizeof(PXE_HW_UNDI)
-PXE_UINT8 Fudge;            // makes 8-bit cksum equal zero
-PXE_UINT8 Rev;          // PXE_ROMID_REV
-PXE_UINT8 IFcnt;            // physical connector count
-PXE_UINT8 MajorVer;         // PXE_ROMID_MAJORVER
-PXE_UINT8 MinorVer;         // PXE_ROMID_MINORVER
-PXE_UINT16 reserved;        // zero, not used
-PXE_UINT32 Implementation;      // implementation flags
-// reserved             // vendor use
-// PXE_UINT32 Status;       // status port
-// PXE_UINT32 Command;      // command port
-// PXE_UINT64 CDBaddr;      // CDB address port
-} PXE_HW_UNDI;
-
-//
-// Status port bit definitions
-//
-
-//
-// UNDI operation state
-//
-#define PXE_HWSTAT_STATE_MASK                   0xC0000000
-#define PXE_HWSTAT_BUSY                     0xC0000000
-#define PXE_HWSTAT_INITIALIZED              0x80000000
-#define PXE_HWSTAT_STARTED                  0x40000000
-#define PXE_HWSTAT_STOPPED                  0x00000000
-
-//
-// If set, last command failed
-//
-#define PXE_HWSTAT_COMMAND_FAILED               0x20000000
-
-//
-// If set, identifies enabled receive filters
-//
-#define PXE_HWSTAT_PROMISCUOUS_MULTICAST_RX_ENABLED 0x00001000
-#define PXE_HWSTAT_PROMISCUOUS_RX_ENABLED           0x00000800
-#define PXE_HWSTAT_BROADCAST_RX_ENABLED         0x00000400
-#define PXE_HWSTAT_MULTICAST_RX_ENABLED         0x00000200
-#define PXE_HWSTAT_UNICAST_RX_ENABLED           0x00000100
-
-//
-// If set, identifies enabled external interrupts
-//
-#define PXE_HWSTAT_SOFTWARE_INT_ENABLED         0x00000080
-#define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED          0x00000040
-#define PXE_HWSTAT_PACKET_RX_INT_ENABLED            0x00000020
-#define PXE_HWSTAT_CMD_COMPLETE_INT_ENABLED         0x00000010
-
-//
-// If set, identifies pending interrupts
-//
-#define PXE_HWSTAT_SOFTWARE_INT_PENDING         0x00000008
-#define PXE_HWSTAT_TX_COMPLETE_INT_PENDING          0x00000004
-#define PXE_HWSTAT_PACKET_RX_INT_PENDING            0x00000002
-#define PXE_HWSTAT_CMD_COMPLETE_INT_PENDING         0x00000001
-
-//
-// Command port definitions
-//
-
-//
-// If set, CDB identified in CDBaddr port is given to UNDI.
-// If not set, other bits in this word will be processed.
-//
-#define PXE_HWCMD_ISSUE_COMMAND             0x80000000
-#define PXE_HWCMD_INTS_AND_FILTS                0x00000000
-
-//
-// Use these to enable/disable receive filters.
-//
-#define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE       0x00001000
-#define PXE_HWCMD_PROMISCUOUS_RX_ENABLE         0x00000800
-#define PXE_HWCMD_BROADCAST_RX_ENABLE           0x00000400
-#define PXE_HWCMD_MULTICAST_RX_ENABLE           0x00000200
-#define PXE_HWCMD_UNICAST_RX_ENABLE             0x00000100
-
-//
-// Use these to enable/disable external interrupts
-//
-#define PXE_HWCMD_SOFTWARE_INT_ENABLE           0x00000080
-#define PXE_HWCMD_TX_COMPLETE_INT_ENABLE            0x00000040
-#define PXE_HWCMD_PACKET_RX_INT_ENABLE          0x00000020
-#define PXE_HWCMD_CMD_COMPLETE_INT_ENABLE           0x00000010
-
-//
-// Use these to clear pending external interrupts
-//
-#define PXE_HWCMD_CLEAR_SOFTWARE_INT                0x00000008
-#define PXE_HWCMD_CLEAR_TX_COMPLETE_INT         0x00000004
-#define PXE_HWCMD_CLEAR_PACKET_RX_INT           0x00000002
-#define PXE_HWCMD_CLEAR_CMD_COMPLETE_INT            0x00000001
-
-typedef struct s_pxe_sw_undi {
-PXE_UINT32 Signature;       // PXE_ROMID_SIGNATURE
-PXE_UINT8 Len;          // sizeof(PXE_SW_UNDI)
-PXE_UINT8 Fudge;            // makes 8-bit cksum zero
-PXE_UINT8 Rev;          // PXE_ROMID_REV
-PXE_UINT8 IFcnt;            // physical connector count
-PXE_UINT8 MajorVer;         // PXE_ROMID_MAJORVER
-PXE_UINT8 MinorVer;         // PXE_ROMID_MINORVER
-PXE_UINT16 reserved1;       // zero, not used
-PXE_UINT32 Implementation;      // Implementation flags
-PXE_UINT64 EntryPoint;      // API entry point
-PXE_UINT8 reserved2[3];     // zero, not used
-PXE_UINT8 BusCnt;           // number of bustypes supported
-PXE_UINT32 BusType[1];      // list of supported bustypes
-} PXE_SW_UNDI;
-
-typedef union u_pxe_undi {
-PXE_HW_UNDI hw;
-PXE_SW_UNDI sw;
-} PXE_UNDI;
-
-//
-// Signature of !PXE structure
-//
-#define PXE_ROMID_SIGNATURE     PXE_BUSTYPE('!', 'P', 'X', 'E')
-
-//
-// !PXE structure format revision
-//
-#define PXE_ROMID_REV                       0x02
-
-//
-// UNDI command interface revision.  These are the values that get sent
-// in option 94 (Client Network Interface Identifier) in the DHCP Discover
-// and PXE Boot Server Request packets.
-//
-#define PXE_ROMID_MAJORVER                  0x03
-#define PXE_ROMID_MINORVER                  0x00
-
-//
-// Implementation flags
-//
-#define PXE_ROMID_IMP_HW_UNDI                   0x80000000
-#define PXE_ROMID_IMP_SW_VIRT_ADDR              0x40000000
-#define PXE_ROMID_IMP_64BIT_DEVICE              0x00010000
-#define PXE_ROMID_IMP_FRAG_SUPPORTED                0x00008000
-#define PXE_ROMID_IMP_CMD_LINK_SUPPORTED            0x00004000
-#define PXE_ROMID_IMP_CMD_QUEUE_SUPPORTED           0x00002000
-#define PXE_ROMID_IMP_MULTI_FRAME_SUPPORTED         0x00001000
-#define PXE_ROMID_IMP_NVDATA_SUPPORT_MASK           0x00000C00
-#define PXE_ROMID_IMP_NVDATA_BULK_WRITABLE          0x00000C00
-#define PXE_ROMID_IMP_NVDATA_SPARSE_WRITABLE        0x00000800
-#define PXE_ROMID_IMP_NVDATA_READ_ONLY          0x00000400
-#define PXE_ROMID_IMP_NVDATA_NOT_AVAILABLE          0x00000000
-#define PXE_ROMID_IMP_STATISTICS_SUPPORTED          0x00000200
-#define PXE_ROMID_IMP_STATION_ADDR_SETTABLE         0x00000100
-#define PXE_ROMID_IMP_PROMISCUOUS_MULTICAST_RX_SUPPORTED    0x00000080
-#define PXE_ROMID_IMP_PROMISCUOUS_RX_SUPPORTED      0x00000040
-#define PXE_ROMID_IMP_BROADCAST_RX_SUPPORTED        0x00000020
-#define PXE_ROMID_IMP_FILTERED_MULTICAST_RX_SUPPORTED   0x00000010
-#define PXE_ROMID_IMP_SOFTWARE_INT_SUPPORTED        0x00000008
-#define PXE_ROMID_IMP_TX_COMPLETE_INT_SUPPORTED     0x00000004
-#define PXE_ROMID_IMP_PACKET_RX_INT_SUPPORTED       0x00000002
-#define PXE_ROMID_IMP_CMD_COMPLETE_INT_SUPPORTED        0x00000001
-
- 
-typedef struct s_pxe_cdb {
-PXE_OPCODE OpCode;
-PXE_OPFLAGS OpFlags;
-PXE_UINT16 CPBsize;
-PXE_UINT16 DBsize;
-UINT64 CPBaddr;
-UINT64 DBaddr;
-PXE_STATCODE StatCode;
-PXE_STATFLAGS StatFlags;
-PXE_UINT16 IFnum;
-PXE_CONTROL Control;
-} PXE_CDB;
-
-
-typedef union u_pxe_ip_addr {
-PXE_IPV6 IPv6;
-PXE_IPV4 IPv4;
-} PXE_IP_ADDR;
-
-typedef union pxe_device {
-//
-// PCI and PC Card NICs are both identified using bus, device
-// and function numbers.  For PC Card, this may require PC
-// Card services to be loaded in the BIOS or preboot
-// environment.
-//
-struct {
-//
-// See S/W UNDI ROMID structure definition for PCI and
-// PCC BusType definitions.
-//
-PXE_UINT32 BusType;
-
-//
-// Bus, device & function numbers that locate this device.
-//
-PXE_UINT16 Bus;
-PXE_UINT8 Device;
-PXE_UINT8 Function;
-} PCI, PCC;
-
-//
-// %%TBD - More information is needed about enumerating
-// USB and 1394 devices.
-//
-struct {
-PXE_UINT32 BusType;
-PXE_UINT32 tdb;
-} USB, _1394;
-} PXE_DEVICE;
-
-// cpb and db definitions
-
-#define MAX_PCI_CONFIG_LEN 64   // # of dwords
-#define MAX_EEPROM_LEN 128       // #of dwords
-#define MAX_XMIT_BUFFERS    32  // recycling Q length for xmit_done
-#define MAX_MCAST_ADDRESS_CNT 8
-
-typedef struct s_pxe_cpb_start {
-    //
-    // PXE_VOID Delay(PXE_UINT64 microseconds);
-    //
-    // UNDI will never request a delay smaller than 10 microseconds
-    // and will always request delays in increments of 10 microseconds.
-    // The Delay() CallBack routine must delay between n and n + 10 
-    // microseconds before returning control to the UNDI.
-    //
-    // This field cannot be set to zero.
-    //
-    PXE_UINT64 Delay;
-
-    //
-    // PXE_VOID Block(PXE_UINT32 enable);
-    //
-    // UNDI may need to block multi-threaded/multi-processor access to
-    // critical code sections when programming or accessing the network
-    // device.  To this end, a blocking service is needed by the UNDI.
-    // When UNDI needs a block, it will call Block() passing a non-zero
-    // value.  When UNDI no longer needs a block, it will call Block()
-    // with a zero value.  When called, if the Block() is already enabled,
-    // do not return control to the UNDI until the previous Block() is
-    // disabled.
-    //
-    // This field cannot be set to zero.
-    //
-    PXE_UINT64 Block;
-
-    //
-    // PXE_VOID Virt2Phys(PXE_UINT64 virtual, PXE_UINT64 physical_ptr);
-    //
-    // UNDI will pass the virtual address of a buffer and the virtual
-    // address of a 64-bit physical buffer.  Convert the virtual address
-    // to a physical address and write the result to the physical address
-    // buffer.  If virtual and physical addresses are the same, just
-    // copy the virtual address to the physical address buffer.
-    //
-    // This field can be set to zero if virtual and physical addresses 
-    // are equal.
-    //
-    PXE_UINT64 Virt2Phys;
-    //
-    // PXE_VOID Mem_IO(PXE_UINT8 read_write, PXE_UINT8 len, PXE_UINT64 port, 
-    //              PXE_UINT64 buf_addr);
-    //
-    // UNDI will read or write the device io space using this call back 
-    // function. It passes the number of bytes as the len parameter and it 
-    // will be either 1,2,4 or 8.
-    //
-    // This field can not be set to zero.
-    //
-    PXE_UINT64 Mem_IO;
-} PXE_CPB_START;
-
-#define PXE_DELAY_MILLISECOND                   1000
-#define PXE_DELAY_SECOND                    1000000
-#define PXE_IO_READ                     0
-#define PXE_IO_WRITE                        1
-#define PXE_MEM_READ                        2
-#define PXE_MEM_WRITE                       4
-
-
-typedef struct s_pxe_db_get_init_info {
-    //
-    // Minimum length of locked memory buffer that must be given to
-    // the Initialize command. Giving UNDI more memory will generally
-    // give better performance.
-    //
-    // If MemoryRequired is zero, the UNDI does not need and will not
-    // use system memory to receive and transmit packets.
-    //
-    PXE_UINT32 MemoryRequired;
-
-    //
-    // Maximum frame data length for Tx/Rx excluding the media header.
-    //
-    PXE_UINT32 FrameDataLen;
-
-    //
-    // Supported link speeds are in units of mega bits.  Common ethernet
-    // values are 10, 100 and 1000.  Unused LinkSpeeds[] entries are zero
-    // filled.
-    //
-    PXE_UINT32 LinkSpeeds[4];
-
-    //
-    // Number of non-volatile storage items.
-    //
-    PXE_UINT32 NvCount;
-
-    //
-    // Width of non-volatile storage item in bytes.  0, 1, 2 or 4
-    //
-    PXE_UINT16 NvWidth;
-
-    //
-    // Media header length.  This is the typical media header length for
-    // this UNDI.  This information is needed when allocating receive
-    // and transmit buffers.
-    //
-    PXE_UINT16 MediaHeaderLen;
-
-    //
-    // Number of bytes in the NIC hardware (MAC) address.
-    //
-    PXE_UINT16 HWaddrLen;
-
-    //
-    // Maximum number of multicast MAC addresses in the multicast
-    // MAC address filter list.
-    //
-    PXE_UINT16 MCastFilterCnt;
-
-    //
-    // Default number and size of transmit and receive buffers that will 
-    // be allocated by the UNDI.  If MemoryRequired is non-zero, this 
-    // allocation will come out of the memory buffer given to the Initialize 
-    // command.  If MemoryRequired is zero, this allocation will come out of 
-    // memory on the NIC.
-    //
-    PXE_UINT16 TxBufCnt;
-    PXE_UINT16 TxBufSize;
-    PXE_UINT16 RxBufCnt;
-    PXE_UINT16 RxBufSize;
-
-    //
-    // Hardware interface types defined in the Assigned Numbers RFC
-    // and used in DHCP and ARP packets.
-    // See the PXE_IFTYPE typedef and PXE_IFTYPE_xxx macros.
-    //
-    PXE_UINT8 IFtype;
-
-    //
-    // Supported duplex.  See PXE_DUPLEX_xxxxx #defines below.
-    //
-    PXE_UINT8 Duplex;
-
-    //
-    // Supported loopback options.  See PXE_LOOPBACK_xxxxx #defines below.
-    //
-    PXE_UINT8 LoopBack;
-} PXE_DB_GET_INIT_INFO;
-
-#define PXE_MAX_TXRX_UNIT_ETHER             1500
-
-#define PXE_HWADDR_LEN_ETHER                    0x0006
-#define PXE_MAC_HEADER_LEN_ETHER                0x000E
-
-#define PXE_DUPLEX_ENABLE_FULL_SUPPORTED            1
-#define PXE_DUPLEX_FORCE_FULL_SUPPORTED         2
-
-#define PXE_LOOPBACK_INTERNAL_SUPPORTED         1
-#define PXE_LOOPBACK_EXTERNAL_SUPPORTED         2
-
-
-typedef struct s_pxe_pci_config_info {
-    //
-    // This is the flag field for the PXE_DB_GET_CONFIG_INFO union.
-    // For PCI bus devices, this field is set to PXE_BUSTYPE_PCI.
-    //
-    PXE_UINT32 BusType;
-
-    //
-    // This identifies the PCI network device that this UNDI interface
-    // is bound to.
-    //
-    PXE_UINT16 Bus;
-    PXE_UINT8 Device;
-    PXE_UINT8 Function;
-
-    //
-    // This is a copy of the PCI configuration space for this 
-    // network device.
-    //
-    union {
-        PXE_UINT8 Byte[256];
-        PXE_UINT16 Word[128];
-        PXE_UINT32 Dword[64];
-    } Config;
-} PXE_PCI_CONFIG_INFO;
-
-
-typedef struct s_pxe_pcc_config_info {
-    //
-    // This is the flag field for the PXE_DB_GET_CONFIG_INFO union.
-    // For PCC bus devices, this field is set to PXE_BUSTYPE_PCC.
-    //
-    PXE_UINT32 BusType;
-    
-    //
-    // This identifies the PCC network device that this UNDI interface
-    // is bound to.
-    //
-    PXE_UINT16 Bus;
-    PXE_UINT8 Device;
-    PXE_UINT8 Function;
-
-    //
-    // This is a copy of the PCC configuration space for this 
-    // network device.
-    //
-    union {
-        PXE_UINT8 Byte[256];
-        PXE_UINT16 Word[128];
-        PXE_UINT32 Dword[64];
-    } Config;
-} PXE_PCC_CONFIG_INFO;
-
-
-typedef struct s_pxe_usb_config_info {
-    PXE_UINT32 BusType;
-    // %%TBD What should we return here...
-} PXE_USB_CONFIG_INFO;
-
-
-typedef struct s_pxe_1394_config_info {
-    PXE_UINT32 BusType;
-    // %%TBD What should we return here...
-} PXE_1394_CONFIG_INFO;
-
-
-typedef union u_pxe_db_get_config_info {
-    PXE_PCI_CONFIG_INFO pci;
-    PXE_PCC_CONFIG_INFO pcc;
-    PXE_USB_CONFIG_INFO usb;
-    PXE_1394_CONFIG_INFO _1394;
-} PXE_DB_GET_CONFIG_INFO;
-
-
-typedef struct s_pxe_cpb_initialize {
-    //
-    // Address of first (lowest) byte of the memory buffer.  This buffer must
-    // be in contiguous physical memory and cannot be swapped out.  The UNDI
-    // will be using this for transmit and receive buffering.
-    //
-    PXE_UINT64 MemoryAddr;
-
-    //
-    // MemoryLength must be greater than or equal to MemoryRequired
-    // returned by the Get Init Info command.
-    //
-    PXE_UINT32 MemoryLength;
-
-    //
-    // Desired link speed in Mbit/sec.  Common ethernet values are 10, 100
-    // and 1000.  Setting a value of zero will auto-detect and/or use the
-    // default link speed (operation depends on UNDI/NIC functionality).
-    //
-    PXE_UINT32 LinkSpeed;
-
-    //
-    // Suggested number and size of receive and transmit buffers to
-    // allocate.  If MemoryAddr and MemoryLength are non-zero, this
-    // allocation comes out of the supplied memory buffer.  If MemoryAddr 
-    // and MemoryLength are zero, this allocation comes out of memory
-    // on the NIC.
-    //
-    // If these fields are set to zero, the UNDI will allocate buffer
-    // counts and sizes as it sees fit.
-    //
-    PXE_UINT16 TxBufCnt;
-    PXE_UINT16 TxBufSize;
-    PXE_UINT16 RxBufCnt;
-    PXE_UINT16 RxBufSize;
-
-    //
-    // The following configuration parameters are optional and must be zero 
-    // to use the default values.
-    //
-    PXE_UINT8 Duplex; 
-
-    PXE_UINT8 LoopBack;
-} PXE_CPB_INITIALIZE;
-
-
-#define PXE_DUPLEX_DEFAULT                  0x00
-#define PXE_FORCE_FULL_DUPLEX                   0x01
-#define PXE_ENABLE_FULL_DUPLEX              0x02
-
-#define LOOPBACK_NORMAL 0
-#define LOOPBACK_INTERNAL 1
-#define LOOPBACK_EXTERNAL 2
-
-
-typedef struct s_pxe_db_initialize {
-    //
-    // Actual amount of memory used from the supplied memory buffer.  This
-    // may be less that the amount of memory suppllied and may be zero if
-    // the UNDI and network device do not use external memory buffers.
-    //
-    // Memory used by the UNDI and network device is allocated from the 
-    // lowest memory buffer address.
-    //
-    PXE_UINT32 MemoryUsed;
-
-    //
-    // Actual number and size of receive and transmit buffers that were
-    // allocated.
-    //
-    PXE_UINT16 TxBufCnt;
-    PXE_UINT16 TxBufSize;
-    PXE_UINT16 RxBufCnt;
-    PXE_UINT16 RxBufSize;
-} PXE_DB_INITIALIZE;
-
-
-typedef struct s_pxe_cpb_receive_filters {
-    //
-    // List of multicast MAC addresses.  This list, if present, will
-    // replace the existing multicast MAC address filter list.
-    //
-    PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];
-} PXE_CPB_RECEIVE_FILTERS;
-
-
-typedef struct s_pxe_db_receive_filters {
-    //
-    // Filtered multicast MAC address list.
-    //
-    PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT];
-} PXE_DB_RECEIVE_FILTERS;
-
-
-typedef struct s_pxe_cpb_station_address {
-    //
-    // If supplied and supported, the current station MAC address
-    // will be changed.
-    //
-    PXE_MAC_ADDR StationAddr;
-} PXE_CPB_STATION_ADDRESS;
-
-
-typedef struct s_pxe_dpb_station_address {
-    //
-    // Current station MAC address.
-    //
-    PXE_MAC_ADDR StationAddr;
-
-    //
-    // Station broadcast MAC address.
-    //
-    PXE_MAC_ADDR BroadcastAddr;
-
-    //
-    // Permanent station MAC address.
-    //
-    PXE_MAC_ADDR PermanentAddr;
-} PXE_DB_STATION_ADDRESS;
-
-
-typedef struct s_pxe_db_statistics {
-    //
-    // Bit field identifying what statistic data is collected by the 
-    // UNDI/NIC.
-    // If bit 0x00 is set, Data[0x00] is collected.
-    // If bit 0x01 is set, Data[0x01] is collected.
-    // If bit 0x20 is set, Data[0x20] is collected.
-    // If bit 0x21 is set, Data[0x21] is collected.
-    // Etc.
-    //
-    PXE_UINT64 Supported;
-
-    //
-    // Statistic data.
-    //
-    PXE_UINT64 Data[64];
-} PXE_DB_STATISTICS;
-
-//
-// Total number of frames received.  Includes frames with errors and
-// dropped frames.
-//
-#define PXE_STATISTICS_RX_TOTAL_FRAMES          0x00
-
-//
-// Number of valid frames received and copied into receive buffers.
-//
-#define PXE_STATISTICS_RX_GOOD_FRAMES           0x01
-
-//
-// Number of frames below the minimum length for the media.
-// This would be <64 for ethernet.
-//
-#define PXE_STATISTICS_RX_UNDERSIZE_FRAMES          0x02
-
-//
-// Number of frames longer than the maxminum length for the
-// media.  This would be >1500 for ethernet.
-//
-#define PXE_STATISTICS_RX_OVERSIZE_FRAMES           0x03
-
-//
-// Valid frames that were dropped because receive buffers were full.
-//
-#define PXE_STATISTICS_RX_DROPPED_FRAMES            0x04
-
-//
-// Number of valid unicast frames received and not dropped.
-//
-#define PXE_STATISTICS_RX_UNICAST_FRAMES            0x05
-
-//
-// Number of valid broadcast frames received and not dropped.
-//
-#define PXE_STATISTICS_RX_BROADCAST_FRAMES          0x06
-
-//
-// Number of valid mutlicast frames received and not dropped.
-//
-#define PXE_STATISTICS_RX_MULTICAST_FRAMES          0x07
-
-//
-// Number of frames w/ CRC or alignment errors.
-//
-#define PXE_STATISTICS_RX_CRC_ERROR_FRAMES          0x08
-
-//
-// Total number of bytes received.  Includes frames with errors
-// and dropped frames.
-//
-#define PXE_STATISTICS_RX_TOTAL_BYTES           0x09
-
-//
-// Transmit statistics.
-//
-#define PXE_STATISTICS_TX_TOTAL_FRAMES          0x0A
-#define PXE_STATISTICS_TX_GOOD_FRAMES           0x0B
-#define PXE_STATISTICS_TX_UNDERSIZE_FRAMES          0x0C
-#define PXE_STATISTICS_TX_OVERSIZE_FRAMES           0x0D
-#define PXE_STATISTICS_TX_DROPPED_FRAMES            0x0E
-#define PXE_STATISTICS_TX_UNICAST_FRAMES            0x0F
-#define PXE_STATISTICS_TX_BROADCAST_FRAMES          0x10
-#define PXE_STATISTICS_TX_MULTICAST_FRAMES          0x11
-#define PXE_STATISTICS_TX_CRC_ERROR_FRAMES          0x12
-#define PXE_STATISTICS_TX_TOTAL_BYTES           0x13
-
-//
-// Number of collisions detection on this subnet.
-//
-#define PXE_STATISTICS_COLLISIONS               0x14
-
-//
-// Number of frames destined for unsupported protocol.
-//
-#define PXE_STATISTICS_UNSUPPORTED_PROTOCOL         0x15
-
-
-typedef struct s_pxe_cpb_mcast_ip_to_mac {
-    //
-    // Multicast IP address to be converted to multicast MAC address.
-    //
-    PXE_IP_ADDR IP;
-} PXE_CPB_MCAST_IP_TO_MAC;
-
-
-typedef struct s_pxe_db_mcast_ip_to_mac {
-    //
-    // Multicast MAC address.
-    //
-    PXE_MAC_ADDR MAC;
-} PXE_DB_MCAST_IP_TO_MAC;
-
-
-typedef struct s_pxe_cpb_nvdata_sparse {
-    //
-    // NvData item list.  Only items in this list will be updated.
-    //
-    struct {
-        //  Non-volatile storage address to be changed.
-        PXE_UINT32 Addr;
-
-        // Data item to write into above storage address.
-    
-        union {
-            PXE_UINT8 Byte;
-            PXE_UINT16 Word;
-            PXE_UINT32 Dword;
-        } Data;
-    } Item[MAX_EEPROM_LEN];
-} PXE_CPB_NVDATA_SPARSE;
-
-
-//
-// When using bulk update, the size of the CPB structure must be
-// the same size as the non-volatile NIC storage.
-//
-typedef union u_pxe_cpb_nvdata_bulk {
-    //
-    // Array of byte-wide data items.
-    //
-    PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];
-
-    //
-    // Array of word-wide data items.
-    //
-    PXE_UINT16 Word[MAX_EEPROM_LEN << 1];
-
-    //
-    // Array of dword-wide data items.
-    //
-    PXE_UINT32 Dword[MAX_EEPROM_LEN];
-} PXE_CPB_NVDATA_BULK;
-
-typedef struct s_pxe_db_nvdata {
-
-    // Arrays of data items from non-volatile storage.
-
-    union {
-        //
-        // Array of byte-wide data items.
-        //
-        PXE_UINT8 Byte[MAX_EEPROM_LEN << 2];
-
-        //
-        // Array of word-wide data items.
-        //
-        PXE_UINT16 Word[MAX_EEPROM_LEN << 1];
-
-        // Array of dword-wide data items.
-
-        PXE_UINT32 Dword[MAX_EEPROM_LEN];
-    } Data;
-} PXE_DB_NVDATA;
-
-
-typedef struct s_pxe_db_get_status {
-    //
-    // Length of next receive frame (header + data).  If this is zero,
-    // there is no next receive frame available.
-    //
-    PXE_UINT32 RxFrameLen;
-
-    //
-    // Reserved, set to zero.
-    //
-    PXE_UINT32 reserved;
-
-    //
-    //  Addresses of transmitted buffers that need to be recycled.
-    //
-    PXE_UINT64 TxBuffer[MAX_XMIT_BUFFERS];
-} PXE_DB_GET_STATUS;
-
-
-
-typedef struct s_pxe_cpb_fill_header {
-    //
-    // Source and destination MAC addresses.  These will be copied into
-    // the media header without doing byte swapping.
-    //
-    PXE_MAC_ADDR SrcAddr;
-    PXE_MAC_ADDR DestAddr;
-
-    //
-    // Address of first byte of media header.  The first byte of packet data
-    // follows the last byte of the media header.
-    //
-    PXE_UINT64 MediaHeader;
-
-    //
-    // Length of packet data in bytes (not including the media header).
-    //
-    PXE_UINT32 PacketLen;
-
-    //
-    // Protocol type.  This will be copied into the media header without
-    // doing byte swapping.  Protocol type numbers can be obtained from
-    // the Assigned Numbers RFC 1700.
-    //
-    PXE_UINT16 Protocol;
-
-    //
-    // Length of the media header in bytes.
-    //
-    PXE_UINT16 MediaHeaderLen;
-} PXE_CPB_FILL_HEADER;
-
-
-#define PXE_PROTOCOL_ETHERNET_IP                0x0800
-#define PXE_PROTOCOL_ETHERNET_ARP               0x0806
-#define MAX_XMIT_FRAGMENTS 16
-
-typedef struct s_pxe_cpb_fill_header_fragmented {
-    //
-    // Source and destination MAC addresses.  These will be copied into
-    // the media header without doing byte swapping.
-    //
-    PXE_MAC_ADDR SrcAddr;
-    PXE_MAC_ADDR DestAddr;
-
-    //
-    // Length of packet data in bytes (not including the media header).
-    //
-    PXE_UINT32 PacketLen;
-
-    //
-    // Protocol type.  This will be copied into the media header without
-    // doing byte swapping.  Protocol type numbers can be obtained from
-    // the Assigned Numbers RFC 1700.
-    //
-    PXE_MEDIA_PROTOCOL Protocol;
-
-    //
-    // Length of the media header in bytes.
-    //
-    PXE_UINT16 MediaHeaderLen;
-
-    //
-    // Number of packet fragment descriptors.
-    //
-    PXE_UINT16 FragCnt;
-
-    //
-    // Reserved, must be set to zero.
-    //
-    PXE_UINT16 reserved;
-
-    //
-    // Array of packet fragment descriptors.  The first byte of the media
-    // header is the first byte of the first fragment.
-    //
-    struct {
-        //
-        // Address of this packet fragment.
-        //
-        PXE_UINT64 FragAddr;
-
-        //
-        // Length of this packet fragment.
-        //
-        PXE_UINT32 FragLen;
-
-        //
-        // Reserved, must be set to zero.
-        //
-        PXE_UINT32 reserved;
-    } FragDesc[MAX_XMIT_FRAGMENTS];
-} PXE_CPB_FILL_HEADER_FRAGMENTED;
-
-
-
-typedef struct s_pxe_cpb_transmit {
-    //
-    // Address of first byte of frame buffer.  This is also the first byte
-    // of the media header.
-    //
-    PXE_UINT64 FrameAddr;
-
-    //
-    // Length of the data portion of the frame buffer in bytes.  Do not
-    // include the length of the media header.
-    //
-    PXE_UINT32 DataLen;
-
-    //
-    // Length of the media header in bytes.
-    //
-    PXE_UINT16 MediaheaderLen;
-
-    //
-    // Reserved, must be zero.
-    //
-    PXE_UINT16 reserved;
-} PXE_CPB_TRANSMIT;
-
-
-
-typedef struct s_pxe_cpb_transmit_fragments {
-    //
-    // Length of packet data in bytes (not including the media header).
-    //
-    PXE_UINT32 FrameLen;
-
-    //
-    // Length of the media header in bytes.
-    //
-    PXE_UINT16 MediaheaderLen;
-
-    //
-    // Number of packet fragment descriptors.
-    //
-    PXE_UINT16 FragCnt;
-
-    //
-    // Array of frame fragment descriptors.  The first byte of the first
-    // fragment is also the first byte of the media header.
-    //
-    struct {
-        //
-        // Address of this frame fragment.
-        //
-        PXE_UINT64 FragAddr;
-
-        //
-        // Length of this frame fragment.
-        //
-        PXE_UINT32 FragLen;
-
-        //
-        // Reserved, must be set to zero.
-        //
-        PXE_UINT32 reserved;
-    } FragDesc[MAX_XMIT_FRAGMENTS];
-} PXE_CPB_TRANSMIT_FRAGMENTS;
-
-
-typedef struct s_pxe_cpb_receive {
-    //
-    // Address of first byte of receive buffer.  This is also the first byte
-    // of the frame header.
-    //
-    PXE_UINT64 BufferAddr;
-
-    //
-    // Length of receive buffer.  This must be large enough to hold the
-    // received frame (media header + data).  If the length of smaller than
-    // the received frame, data will be lost.
-    //
-    PXE_UINT32 BufferLen;
-
-    //
-    // Reserved, must be set to zero.
-    //
-    PXE_UINT32 reserved;
-} PXE_CPB_RECEIVE;
-
-
-typedef struct s_pxe_db_receive {
-    //
-    // Source and destination MAC addresses from media header.
-    //
-    PXE_MAC_ADDR SrcAddr;
-    PXE_MAC_ADDR DestAddr;
-
-    //
-    // Length of received frame.  May be larger than receive buffer size.
-    // The receive buffer will not be overwritten.  This is how to tell
-    // if data was lost because the receive buffer was too small.
-    //
-    PXE_UINT32 FrameLen;
-
-    //
-    // Protocol type from media header.
-    //
-    PXE_MEDIA_PROTOCOL Protocol;
-
-    //
-    // Length of media header in received frame.
-    //
-    PXE_UINT16 MediaHeaderLen;
-
-    //
-    // Type of receive frame.
-    //
-    PXE_FRAME_TYPE Type;
-
-    //
-    // Reserved, must be zero.
-    //
-    PXE_UINT8 reserved[7];
-
-} PXE_DB_RECEIVE;
-
-#pragma pack()
-
-/* EOF - efi_pxe.h */
-#endif /* _EFI_PXE_H */
-
diff --git a/third_party/gnu-efi/inc/efiapi.h b/third_party/gnu-efi/inc/efiapi.h
deleted file mode 100644
index f62d185..0000000
--- a/third_party/gnu-efi/inc/efiapi.h
+++ /dev/null
@@ -1,936 +0,0 @@
-#ifndef _EFI_API_H
-#define _EFI_API_H
-
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efiapi.h
-
-Abstract:
-
-    Global EFI runtime & boot service interfaces
-
-
-
-
-Revision History
-
---*/
-
-//
-// EFI Specification Revision
-//
-
-#define EFI_SPECIFICATION_MAJOR_REVISION 1
-#define EFI_SPECIFICATION_MINOR_REVISION 02
-
-//
-// Declare forward referenced data structures
-//
-
-INTERFACE_DECL(_EFI_SYSTEM_TABLE);
-
-//
-// EFI Memory
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_ALLOCATE_PAGES) (
-    IN EFI_ALLOCATE_TYPE            Type,
-    IN EFI_MEMORY_TYPE              MemoryType,
-    IN UINTN                        NoPages,
-    OUT EFI_PHYSICAL_ADDRESS        *Memory
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FREE_PAGES) (
-    IN EFI_PHYSICAL_ADDRESS         Memory,
-    IN UINTN                        NoPages
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_MEMORY_MAP) (
-    IN OUT UINTN                    *MemoryMapSize,
-    IN OUT EFI_MEMORY_DESCRIPTOR    *MemoryMap,
-    OUT UINTN                       *MapKey,
-    OUT UINTN                       *DescriptorSize,
-    OUT UINT32                      *DescriptorVersion
-    );
-
-#define NextMemoryDescriptor(Ptr,Size)  ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) Ptr) + Size))
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_ALLOCATE_POOL) (
-    IN EFI_MEMORY_TYPE              PoolType,
-    IN UINTN                        Size,
-    OUT VOID                        **Buffer
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FREE_POOL) (
-    IN VOID                         *Buffer
-    );
-
-typedef 
-EFI_STATUS
-(EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP) (
-    IN UINTN                        MemoryMapSize,
-    IN UINTN                        DescriptorSize,
-    IN UINT32                       DescriptorVersion,
-    IN EFI_MEMORY_DESCRIPTOR        *VirtualMap
-    );
-
-
-#define EFI_OPTIONAL_PTR            0x00000001
-#define EFI_INTERNAL_FNC            0x00000002      // Pointer to internal runtime fnc
-#define EFI_INTERNAL_PTR            0x00000004      // Pointer to internal runtime data
-
-
-typedef 
-EFI_STATUS
-(EFIAPI *EFI_CONVERT_POINTER) (
-    IN UINTN                        DebugDisposition,
-    IN OUT VOID                     **Address
-    );
-
-
-//
-// EFI Events
-//
-
-
-
-#define EVT_TIMER                           0x80000000
-#define EVT_RUNTIME                         0x40000000
-#define EVT_RUNTIME_CONTEXT                 0x20000000
-
-#define EVT_NOTIFY_WAIT                     0x00000100
-#define EVT_NOTIFY_SIGNAL                   0x00000200
-
-#define EVT_SIGNAL_EXIT_BOOT_SERVICES       0x00000201
-#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE   0x60000202
-
-#define EVT_EFI_SIGNAL_MASK                 0x000000FF
-#define EVT_EFI_SIGNAL_MAX                  2
-
-typedef
-VOID
-(EFIAPI *EFI_EVENT_NOTIFY) (
-    IN EFI_EVENT                Event,
-    IN VOID                     *Context
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CREATE_EVENT) (
-    IN UINT32                       Type,
-    IN EFI_TPL                      NotifyTpl,
-    IN EFI_EVENT_NOTIFY             NotifyFunction,
-    IN VOID                         *NotifyContext,
-    OUT EFI_EVENT                   *Event
-    );
-
-typedef enum {
-    TimerCancel,
-    TimerPeriodic,
-    TimerRelative,
-    TimerTypeMax
-} EFI_TIMER_DELAY;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_TIMER) (
-    IN EFI_EVENT                Event,
-    IN EFI_TIMER_DELAY          Type,
-    IN UINT64                   TriggerTime
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SIGNAL_EVENT) (
-    IN EFI_EVENT                Event
-    );
-
-typedef 
-EFI_STATUS
-(EFIAPI *EFI_WAIT_FOR_EVENT) (
-    IN UINTN                    NumberOfEvents,
-    IN EFI_EVENT                *Event,
-    OUT UINTN                   *Index
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CLOSE_EVENT) (
-    IN EFI_EVENT                Event
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CHECK_EVENT) (
-    IN EFI_EVENT                Event
-    );
-
-//
-// Task priority level
-//
-
-#define TPL_APPLICATION    4
-#define TPL_CALLBACK       8
-#define TPL_NOTIFY        16 
-#define TPL_HIGH_LEVEL    31 
-
-typedef
-EFI_TPL
-(EFIAPI *EFI_RAISE_TPL) (
-    IN EFI_TPL      NewTpl
-    );
-
-typedef
-VOID
-(EFIAPI *EFI_RESTORE_TPL) (
-    IN EFI_TPL      OldTpl
-    );
-
-
-//
-// EFI platform varibles
-//
-
-#define EFI_GLOBAL_VARIABLE     \
-    { 0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} }
-
-// Variable attributes
-#define EFI_VARIABLE_NON_VOLATILE                          0x00000001
-#define EFI_VARIABLE_BOOTSERVICE_ACCESS                    0x00000002
-#define EFI_VARIABLE_RUNTIME_ACCESS                        0x00000004
-#define EFI_VARIABLE_HARDWARE_ERROR_RECORD                 0x00000008
-#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS            0x00000010
-#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020
-#define EFI_VARIABLE_APPEND_WRITE                          0x00000040
-
-// Variable size limitation
-#define EFI_MAXIMUM_VARIABLE_SIZE           1024
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_VARIABLE) (
-    IN CHAR16                       *VariableName,
-    IN EFI_GUID                     *VendorGuid,
-    OUT UINT32                      *Attributes OPTIONAL,
-    IN OUT UINTN                    *DataSize,
-    OUT VOID                        *Data
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_NEXT_VARIABLE_NAME) (
-    IN OUT UINTN                    *VariableNameSize,
-    IN OUT CHAR16                   *VariableName,
-    IN OUT EFI_GUID                 *VendorGuid
-    );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_VARIABLE) (
-    IN CHAR16                       *VariableName,
-    IN EFI_GUID                     *VendorGuid,
-    IN UINT32                       Attributes,
-    IN UINTN                        DataSize,
-    IN VOID                         *Data
-    );
-
-
-//
-// EFI Time
-//
-
-typedef struct {
-        UINT32                      Resolution;     // 1e-6 parts per million
-        UINT32                      Accuracy;       // hertz
-        BOOLEAN                     SetsToZero;     // Set clears sub-second time
-} EFI_TIME_CAPABILITIES;
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_TIME) (
-    OUT EFI_TIME                    *Time,
-    OUT EFI_TIME_CAPABILITIES       *Capabilities OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_TIME) (
-    IN EFI_TIME                     *Time
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_WAKEUP_TIME) (
-    OUT BOOLEAN                     *Enabled,
-    OUT BOOLEAN                     *Pending,
-    OUT EFI_TIME                    *Time
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_WAKEUP_TIME) (
-    IN BOOLEAN                      Enable,
-    IN EFI_TIME                     *Time OPTIONAL
-    );
-
-
-//
-// Image functions
-//
-
-
-// PE32+ Subsystem type for EFI images
-
-#if !defined(IMAGE_SUBSYSTEM_EFI_APPLICATION)
-#define IMAGE_SUBSYSTEM_EFI_APPLICATION             10
-#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER     11
-#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER          12
-#endif
-
-// PE32+ Machine type for EFI images
-
-#if !defined(EFI_IMAGE_MACHINE_IA32)
-#define EFI_IMAGE_MACHINE_IA32      0x014c
-#endif
-
-#if !defined(EFI_IMAGE_MACHINE_IA64)
-#define EFI_IMAGE_MACHINE_IA64      0x0200
-#endif
-
-// Image Entry prototype
-
-typedef 
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_ENTRY_POINT) (
-    IN EFI_HANDLE                   ImageHandle,
-    IN struct _EFI_SYSTEM_TABLE     *SystemTable
-    );
-
-typedef 
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_LOAD) (
-    IN BOOLEAN                      BootPolicy,
-    IN EFI_HANDLE                   ParentImageHandle,
-    IN EFI_DEVICE_PATH              *FilePath,
-    IN VOID                         *SourceBuffer   OPTIONAL,
-    IN UINTN                        SourceSize,
-    OUT EFI_HANDLE                  *ImageHandle
-    );
-
-typedef 
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_START) (
-    IN EFI_HANDLE                   ImageHandle,
-    OUT UINTN                       *ExitDataSize,
-    OUT CHAR16                      **ExitData  OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_EXIT) (
-    IN EFI_HANDLE                   ImageHandle,
-    IN EFI_STATUS                   ExitStatus,
-    IN UINTN                        ExitDataSize,
-    IN CHAR16                       *ExitData OPTIONAL
-    );
-
-
-// Image handle
-/*#define LOADED_IMAGE_PROTOCOL      \
-    { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
-
-#define EFI_IMAGE_INFORMATION_REVISION      0x1000
-typedef struct {
-    UINT32                          Revision;
-    EFI_HANDLE                      ParentHandle;
-    struct _EFI_SYSTEM_TABLE        *SystemTable;
-
-    // Source location of image
-    EFI_HANDLE                      DeviceHandle;
-    EFI_DEVICE_PATH                 *FilePath;
-    VOID                            *Reserved;
-
-    // Images load options
-    UINT32                          LoadOptionsSize;
-    VOID                            *LoadOptions;
-
-    // Location of where image was loaded
-    VOID                            *ImageBase;
-    UINT64                          ImageSize;
-    EFI_MEMORY_TYPE                 ImageCodeType;
-    EFI_MEMORY_TYPE                 ImageDataType;
-
-    // If the driver image supports a dynamic unload request
-    EFI_IMAGE_UNLOAD                Unload;
-
-} EFI_LOADED_IMAGE;*/
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_EXIT_BOOT_SERVICES) (
-    IN EFI_HANDLE                   ImageHandle,
-    IN UINTN                        MapKey
-    );
-
-//
-// Misc
-//
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_STALL) (
-    IN UINTN                    Microseconds
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SET_WATCHDOG_TIMER) (
-    IN UINTN                    Timeout,
-    IN UINT64                   WatchdogCode,
-    IN UINTN                    DataSize,
-    IN CHAR16                   *WatchdogData OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CONNECT_CONTROLLER) (
-    IN EFI_HANDLE               ControllerHandle,
-    IN EFI_HANDLE               *DriverImageHandle OPTIONAL,
-    IN EFI_DEVICE_PATH          *RemainingDevicePath OPTIONAL,
-    IN BOOLEAN                  Recursive
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DISCONNECT_CONTROLLER) (
-    IN EFI_HANDLE               ControllerHandle,
-    IN EFI_HANDLE               DriverImageHandle OPTIONAL,
-    IN EFI_HANDLE               ChildHandle OPTIONAL
-    );
-
-#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL  0x00000001
-#define EFI_OPEN_PROTOCOL_GET_PROTOCOL        0x00000002
-#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL       0x00000004
-#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008
-#define EFI_OPEN_PROTOCOL_BY_DRIVER           0x00000010
-#define EFI_OPEN_PROTOCOL_EXCLUSIVE           0x00000020
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_OPEN_PROTOCOL) (
-    IN EFI_HANDLE               Handle,
-    IN EFI_GUID                 *Protocol,
-    OUT VOID                    **Interface OPTIONAL,
-    IN EFI_HANDLE               AgentHandle,
-    IN EFI_HANDLE               ControllerHandle,
-    IN UINT32                   Attributes
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CLOSE_PROTOCOL) (
-    IN EFI_HANDLE               Handle,
-    IN EFI_GUID                 *Protocol,
-    IN EFI_HANDLE               AgentHandle,
-    IN EFI_HANDLE               ControllerHandle
-    );
-
-typedef struct {
-    EFI_HANDLE                  AgentHandle;
-    EFI_HANDLE                  ControllerHandle;
-    UINT32                      Attributes;
-    UINT32                      OpenCount;
-} EFI_OPEN_PROTOCOL_INFORMATION_ENTRY;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION) (
-    IN EFI_HANDLE               Handle,
-    IN EFI_GUID                 *Protocol,
-    OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
-    OUT UINTN                   *EntryCount
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PROTOCOLS_PER_HANDLE) (
-    IN EFI_HANDLE               Handle,
-    OUT EFI_GUID                ***ProtocolBuffer,
-    OUT UINTN                   *ProtocolBufferCount
-    );
-
-typedef enum {
-    AllHandles,
-    ByRegisterNotify,
-    ByProtocol
-} EFI_LOCATE_SEARCH_TYPE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOCATE_HANDLE_BUFFER) (
-    IN EFI_LOCATE_SEARCH_TYPE   SearchType,
-    IN EFI_GUID                 *Protocol OPTIONAL,
-    IN VOID                     *SearchKey OPTIONAL,
-    IN OUT UINTN                *NoHandles,
-    OUT EFI_HANDLE              **Buffer
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOCATE_PROTOCOL) (
-    IN EFI_GUID                 *Protocol,
-    IN VOID                     *Registration OPTIONAL,
-    OUT VOID                    **Interface
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
-    IN OUT EFI_HANDLE           *Handle,
-    ...
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES) (
-    IN OUT EFI_HANDLE           Handle,
-    ...
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CALCULATE_CRC32) (
-    IN VOID                     *Data,
-    IN UINTN                    DataSize,
-    OUT UINT32                  *Crc32
-    );
-
-typedef
-VOID
-(EFIAPI *EFI_COPY_MEM) (
-    IN VOID                     *Destination,
-    IN VOID                     *Source,
-    IN UINTN                    Length
-    );
-
-typedef
-VOID
-(EFIAPI *EFI_SET_MEM) (
-    IN VOID                     *Buffer,
-    IN UINTN                    Size,
-    IN UINT8                    Value
-    );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_CREATE_EVENT_EX) (
-    IN UINT32                   Type,
-    IN EFI_TPL                  NotifyTpl,
-    IN EFI_EVENT_NOTIFY         NotifyFunction OPTIONAL,
-    IN const VOID               *NotifyContext OPTIONAL,
-    IN const EFI_GUID           EventGroup OPTIONAL,
-    OUT EFI_EVENT               *Event
-    );
-
-typedef enum {
-    EfiResetCold,
-    EfiResetWarm,
-    EfiResetShutdown
-} EFI_RESET_TYPE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_RESET_SYSTEM) (
-    IN EFI_RESET_TYPE           ResetType,
-    IN EFI_STATUS               ResetStatus,
-    IN UINTN                    DataSize,
-    IN CHAR16                   *ResetData OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT) (
-    OUT UINT64                  *Count
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT) (
-    OUT UINT32                  *HighCount
-    );
-
-typedef struct {
-    UINT64                      Length;
-    union {
-        EFI_PHYSICAL_ADDRESS    DataBlock;
-       EFI_PHYSICAL_ADDRESS    ContinuationPointer;
-    } Union;
-} EFI_CAPSULE_BLOCK_DESCRIPTOR;
-
-typedef struct {
-    EFI_GUID                    CapsuleGuid;
-    UINT32                      HeaderSize;
-    UINT32                      Flags;
-    UINT32                      CapsuleImageSize;
-} EFI_CAPSULE_HEADER;
-
-#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET    0x00010000
-#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE   0x00020000
-#define CAPSULE_FLAGS_INITIATE_RESET          0x00040000
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UPDATE_CAPSULE) (
-    IN EFI_CAPSULE_HEADER       **CapsuleHeaderArray,
-    IN UINTN                    CapsuleCount,
-    IN EFI_PHYSICAL_ADDRESS     ScatterGatherList OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_QUERY_CAPSULE_CAPABILITIES) (
-    IN  EFI_CAPSULE_HEADER       **CapsuleHeaderArray,
-    IN  UINTN                    CapsuleCount,
-    OUT UINT64                   *MaximumCapsuleSize,
-    OUT EFI_RESET_TYPE           *ResetType
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_QUERY_VARIABLE_INFO) (
-    IN  UINT32                  Attributes,
-    OUT UINT64                  *MaximumVariableStorageSize,
-    OUT UINT64                  *RemainingVariableStorageSize,
-    OUT UINT64                  *MaximumVariableSize
-    );
-
-//
-// Protocol handler functions
-//
-
-typedef enum {
-    EFI_NATIVE_INTERFACE,
-    EFI_PCODE_INTERFACE
-} EFI_INTERFACE_TYPE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INSTALL_PROTOCOL_INTERFACE) (
-    IN OUT EFI_HANDLE           *Handle,
-    IN EFI_GUID                 *Protocol,
-    IN EFI_INTERFACE_TYPE       InterfaceType,
-    IN VOID                     *Interface
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_REINSTALL_PROTOCOL_INTERFACE) (
-    IN EFI_HANDLE               Handle,
-    IN EFI_GUID                 *Protocol,
-    IN VOID                     *OldInterface,
-    IN VOID                     *NewInterface
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_UNINSTALL_PROTOCOL_INTERFACE) (
-    IN EFI_HANDLE               Handle,
-    IN EFI_GUID                 *Protocol,
-    IN VOID                     *Interface
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HANDLE_PROTOCOL) (
-    IN EFI_HANDLE               Handle,
-    IN EFI_GUID                 *Protocol,
-    OUT VOID                    **Interface
-    );
-
-typedef
-EFI_STATUS 
-(EFIAPI *EFI_REGISTER_PROTOCOL_NOTIFY) (
-    IN EFI_GUID                 *Protocol,
-    IN EFI_EVENT                Event,
-    OUT VOID                    **Registration
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOCATE_HANDLE) (
-    IN EFI_LOCATE_SEARCH_TYPE   SearchType,
-    IN EFI_GUID                 *Protocol OPTIONAL,
-    IN VOID                     *SearchKey OPTIONAL,
-    IN OUT UINTN                *BufferSize,
-    OUT EFI_HANDLE              *Buffer
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOCATE_DEVICE_PATH) (
-    IN EFI_GUID                 *Protocol,
-    IN OUT EFI_DEVICE_PATH      **DevicePath,
-    OUT EFI_HANDLE              *Device
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INSTALL_CONFIGURATION_TABLE) (
-    IN EFI_GUID                 *Guid,
-    IN VOID                     *Table
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_RESERVED_SERVICE) (
-    );
-
-//
-// Standard EFI table header
-//
-
-typedef struct _EFI_TABLE_HEADER {
-    UINT64                      Signature;
-    UINT32                      Revision;
-    UINT32                      HeaderSize;
-    UINT32                      CRC32;
-    UINT32                      Reserved;
-} EFI_TABLE_HEADER;
-
-
-//
-// EFI Runtime Serivces Table
-//
-
-#define EFI_RUNTIME_SERVICES_SIGNATURE  0x56524553544e5552
-#define EFI_RUNTIME_SERVICES_REVISION   (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
-
-typedef struct  {
-    EFI_TABLE_HEADER                Hdr;
-
-    //
-    // Time services
-    //
-
-    EFI_GET_TIME                    GetTime;
-    EFI_SET_TIME                    SetTime;
-    EFI_GET_WAKEUP_TIME             GetWakeupTime;
-    EFI_SET_WAKEUP_TIME             SetWakeupTime;
-
-    //
-    // Virtual memory services
-    //
-
-    EFI_SET_VIRTUAL_ADDRESS_MAP     SetVirtualAddressMap;
-    EFI_CONVERT_POINTER             ConvertPointer;
-
-    //
-    // Variable serviers
-    //
-
-    EFI_GET_VARIABLE                GetVariable;
-    EFI_GET_NEXT_VARIABLE_NAME      GetNextVariableName;
-    EFI_SET_VARIABLE                SetVariable;
-
-    //
-    // Misc
-    //
-
-    EFI_GET_NEXT_HIGH_MONO_COUNT    GetNextHighMonotonicCount;
-    EFI_RESET_SYSTEM                ResetSystem;
-
-    EFI_UPDATE_CAPSULE              UpdateCapsule;
-    EFI_QUERY_CAPSULE_CAPABILITIES  QueryCapsuleCapabilities;
-    EFI_QUERY_VARIABLE_INFO         QueryVariableInfo;
-} EFI_RUNTIME_SERVICES;
-
-
-//
-// EFI Boot Services Table
-//
-
-#define EFI_BOOT_SERVICES_SIGNATURE     0x56524553544f4f42
-#define EFI_BOOT_SERVICES_REVISION      (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
-
-typedef struct _EFI_BOOT_SERVICES {
-
-    EFI_TABLE_HEADER                Hdr;
-
-    //
-    // Task priority functions
-    //
-
-    EFI_RAISE_TPL                   RaiseTPL;
-    EFI_RESTORE_TPL                 RestoreTPL;
-
-    //
-    // Memory functions
-    //
-
-    EFI_ALLOCATE_PAGES              AllocatePages;
-    EFI_FREE_PAGES                  FreePages;
-    EFI_GET_MEMORY_MAP              GetMemoryMap;
-    EFI_ALLOCATE_POOL               AllocatePool;
-    EFI_FREE_POOL                   FreePool;
-
-    //
-    // Event & timer functions
-    //
-
-    EFI_CREATE_EVENT                CreateEvent;
-    EFI_SET_TIMER                   SetTimer;
-    EFI_WAIT_FOR_EVENT              WaitForEvent;
-    EFI_SIGNAL_EVENT                SignalEvent;
-    EFI_CLOSE_EVENT                 CloseEvent;
-    EFI_CHECK_EVENT                 CheckEvent;
-
-    //
-    // Protocol handler functions
-    //
-
-    EFI_INSTALL_PROTOCOL_INTERFACE  InstallProtocolInterface;
-    EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
-    EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
-    EFI_HANDLE_PROTOCOL             HandleProtocol;
-    EFI_HANDLE_PROTOCOL             PCHandleProtocol;
-    EFI_REGISTER_PROTOCOL_NOTIFY    RegisterProtocolNotify;
-    EFI_LOCATE_HANDLE               LocateHandle;
-    EFI_LOCATE_DEVICE_PATH          LocateDevicePath;
-    EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
-
-    //
-    // Image functions
-    //
-
-    EFI_IMAGE_LOAD                  LoadImage;
-    EFI_IMAGE_START                 StartImage;
-    EFI_EXIT                        Exit;
-    EFI_IMAGE_UNLOAD                UnloadImage;
-    EFI_EXIT_BOOT_SERVICES          ExitBootServices;
-
-    //
-    // Misc functions
-    //
-
-    EFI_GET_NEXT_MONOTONIC_COUNT    GetNextMonotonicCount;
-    EFI_STALL                       Stall;
-    EFI_SET_WATCHDOG_TIMER          SetWatchdogTimer;
-
-    //
-    // DriverSupport Services
-    //
-
-    EFI_CONNECT_CONTROLLER          ConnectController;
-    EFI_DISCONNECT_CONTROLLER       DisconnectController;
-
-    //
-    // Open and Close Protocol Services
-    //
-    EFI_OPEN_PROTOCOL               OpenProtocol;
-    EFI_CLOSE_PROTOCOL              CloseProtocol;
-    EFI_OPEN_PROTOCOL_INFORMATION   OpenProtocolInformation;
-
-    //
-    // Library Services
-    //
-    EFI_PROTOCOLS_PER_HANDLE        ProtocolsPerHandle;
-    EFI_LOCATE_HANDLE_BUFFER        LocateHandleBuffer;
-    EFI_LOCATE_PROTOCOL             LocateProtocol;
-    EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces;
-    EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces;
-
-    //
-    // 32-bit CRC Services
-    //
-    EFI_CALCULATE_CRC32             CalculateCrc32;
-
-    //
-    // Misc Services
-    //
-    EFI_COPY_MEM                    CopyMem;
-    EFI_SET_MEM                     SetMem;
-    EFI_CREATE_EVENT_EX             CreateEventEx;
-} EFI_BOOT_SERVICES;
-
-
-//
-// EFI Configuration Table and GUID definitions
-//
-
-#define MPS_TABLE_GUID    \
-    { 0xeb9d2d2f, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define ACPI_TABLE_GUID    \
-    { 0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define ACPI_20_TABLE_GUID  \
-    { 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
-
-#define SMBIOS_TABLE_GUID    \
-    { 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define SAL_SYSTEM_TABLE_GUID    \
-    { 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-
-typedef struct _EFI_CONFIGURATION_TABLE {
-    EFI_GUID                VendorGuid;
-    VOID                    *VendorTable;
-} EFI_CONFIGURATION_TABLE;
-
-
-//
-// EFI System Table
-//
-
-
-
-
-#define EFI_SYSTEM_TABLE_SIGNATURE      0x5453595320494249
-#define EFI_SYSTEM_TABLE_REVISION      (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
-
-typedef struct _EFI_SYSTEM_TABLE {
-    EFI_TABLE_HEADER                Hdr;
-
-    CHAR16                          *FirmwareVendor;
-    UINT32                          FirmwareRevision;
-
-    EFI_HANDLE                      ConsoleInHandle;
-    SIMPLE_INPUT_INTERFACE          *ConIn;
-
-    EFI_HANDLE                      ConsoleOutHandle;
-    SIMPLE_TEXT_OUTPUT_INTERFACE    *ConOut;
-
-    EFI_HANDLE                      StandardErrorHandle;
-    SIMPLE_TEXT_OUTPUT_INTERFACE    *StdErr;
-
-    EFI_RUNTIME_SERVICES            *RuntimeServices;
-    EFI_BOOT_SERVICES               *BootServices;
-
-    UINTN                           NumberOfTableEntries;
-    EFI_CONFIGURATION_TABLE         *ConfigurationTable;
-
-} EFI_SYSTEM_TABLE;
-
-#endif
-
diff --git a/third_party/gnu-efi/inc/eficompiler.h b/third_party/gnu-efi/inc/eficompiler.h
deleted file mode 100644
index 26636c7..0000000
--- a/third_party/gnu-efi/inc/eficompiler.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*++
-
-Copyright (c) 2016 Pete Batard <pete@akeo.ie>
-
-Module Name:
-
-    eficompiler.h
-
-Abstract:
-
-    Compiler specific adjustments
-
---*/
-
-#ifdef _MSC_EXTENSIONS
-#define EFI_UNUSED
-#else
-#define EFI_UNUSED __attribute__((__unused__))
-#endif
-
-#ifdef _MSC_EXTENSIONS
-#define ALIGN(x) __declspec(align(x))
-#else
-#define ALIGN(x) __attribute__((__aligned__(x)))
-#endif
-
-/* Also add a catch-all on __attribute__() for MS compilers */
-#ifdef _MSC_EXTENSIONS
-#define __attribute__(x)
-#endif
diff --git a/third_party/gnu-efi/inc/eficon.h b/third_party/gnu-efi/inc/eficon.h
deleted file mode 100644
index 089db98..0000000
--- a/third_party/gnu-efi/inc/eficon.h
+++ /dev/null
@@ -1,302 +0,0 @@
-#ifndef _EFI_CON_H
-#define _EFI_CON_H
-
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    eficon.h
-
-Abstract:
-
-    EFI console protocols
-
-
-
-Revision History
-
---*/
-
-//
-// Text output protocol
-//
-
-#define SIMPLE_TEXT_OUTPUT_PROTOCOL \
-    { 0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_SIMPLE_TEXT_OUTPUT_INTERFACE);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_RESET) (
-    IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE     *This,
-    IN BOOLEAN                      ExtendedVerification
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_OUTPUT_STRING) (
-    IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE     *This,
-    IN CHAR16                       *String
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_TEST_STRING) (
-    IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE     *This,
-    IN CHAR16                       *String
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_QUERY_MODE) (
-    IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE     *This,
-    IN UINTN                        ModeNumber,
-    OUT UINTN                       *Columns,
-    OUT UINTN                       *Rows
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_SET_MODE) (
-    IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE     *This,
-    IN UINTN                        ModeNumber
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_SET_ATTRIBUTE) (
-    IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE     *This,
-    IN UINTN                        Attribute
-    );
-
-#define EFI_BLACK   0x00
-#define EFI_BLUE    0x01
-#define EFI_GREEN   0x02
-#define EFI_CYAN            (EFI_BLUE | EFI_GREEN)
-#define EFI_RED     0x04
-#define EFI_MAGENTA         (EFI_BLUE | EFI_RED)
-#define EFI_BROWN           (EFI_GREEN | EFI_RED)
-#define EFI_LIGHTGRAY       (EFI_BLUE | EFI_GREEN | EFI_RED)
-#define EFI_BRIGHT  0x08
-#define EFI_DARKGRAY        (EFI_BRIGHT)
-#define EFI_LIGHTBLUE       (EFI_BLUE | EFI_BRIGHT)
-#define EFI_LIGHTGREEN      (EFI_GREEN | EFI_BRIGHT)
-#define EFI_LIGHTCYAN       (EFI_CYAN | EFI_BRIGHT)
-#define EFI_LIGHTRED        (EFI_RED | EFI_BRIGHT)
-#define EFI_LIGHTMAGENTA    (EFI_MAGENTA | EFI_BRIGHT)
-#define EFI_YELLOW          (EFI_BROWN | EFI_BRIGHT)
-#define EFI_WHITE           (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
-
-#define EFI_TEXT_ATTR(f,b)  ((f) | ((b) << 4))
-
-#define EFI_BACKGROUND_BLACK        0x00
-#define EFI_BACKGROUND_BLUE         0x10
-#define EFI_BACKGROUND_GREEN        0x20
-#define EFI_BACKGROUND_CYAN         (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN)
-#define EFI_BACKGROUND_RED          0x40
-#define EFI_BACKGROUND_MAGENTA      (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_RED)
-#define EFI_BACKGROUND_BROWN        (EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
-#define EFI_BACKGROUND_LIGHTGRAY    (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_CLEAR_SCREEN) (
-    IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE     *This
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_SET_CURSOR_POSITION) (
-    IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE     *This,
-    IN UINTN                        Column,
-    IN UINTN                        Row
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_TEXT_ENABLE_CURSOR) (
-    IN struct _SIMPLE_TEXT_OUTPUT_INTERFACE     *This,
-    IN BOOLEAN                      Enable
-    );
-
-typedef struct {
-    INT32                           MaxMode;
-    // current settings
-    INT32                           Mode;
-    INT32                           Attribute;
-    INT32                           CursorColumn;
-    INT32                           CursorRow;
-    BOOLEAN                         CursorVisible;
-} SIMPLE_TEXT_OUTPUT_MODE;
-
-typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE {
-    EFI_TEXT_RESET                  Reset;
-
-    EFI_TEXT_OUTPUT_STRING          OutputString;
-    EFI_TEXT_TEST_STRING            TestString;
-
-    EFI_TEXT_QUERY_MODE             QueryMode;
-    EFI_TEXT_SET_MODE               SetMode;
-    EFI_TEXT_SET_ATTRIBUTE          SetAttribute;
-
-    EFI_TEXT_CLEAR_SCREEN           ClearScreen;
-    EFI_TEXT_SET_CURSOR_POSITION    SetCursorPosition;
-    EFI_TEXT_ENABLE_CURSOR          EnableCursor;
-
-    // Current mode
-    SIMPLE_TEXT_OUTPUT_MODE         *Mode;
-} SIMPLE_TEXT_OUTPUT_INTERFACE;
-
-//
-// Define's for required EFI Unicode Box Draw character
-//
-
-#define BOXDRAW_HORIZONTAL                  0x2500
-#define BOXDRAW_VERTICAL                    0x2502
-#define BOXDRAW_DOWN_RIGHT                  0x250c
-#define BOXDRAW_DOWN_LEFT                   0x2510
-#define BOXDRAW_UP_RIGHT                    0x2514
-#define BOXDRAW_UP_LEFT                     0x2518
-#define BOXDRAW_VERTICAL_RIGHT              0x251c
-#define BOXDRAW_VERTICAL_LEFT               0x2524
-#define BOXDRAW_DOWN_HORIZONTAL             0x252c
-#define BOXDRAW_UP_HORIZONTAL               0x2534
-#define BOXDRAW_VERTICAL_HORIZONTAL         0x253c
-
-#define BOXDRAW_DOUBLE_HORIZONTAL           0x2550
-#define BOXDRAW_DOUBLE_VERTICAL             0x2551
-#define BOXDRAW_DOWN_RIGHT_DOUBLE           0x2552
-#define BOXDRAW_DOWN_DOUBLE_RIGHT           0x2553
-#define BOXDRAW_DOUBLE_DOWN_RIGHT           0x2554
-
-#define BOXDRAW_DOWN_LEFT_DOUBLE            0x2555
-#define BOXDRAW_DOWN_DOUBLE_LEFT            0x2556
-#define BOXDRAW_DOUBLE_DOWN_LEFT            0x2557
-
-#define BOXDRAW_UP_RIGHT_DOUBLE             0x2558
-#define BOXDRAW_UP_DOUBLE_RIGHT             0x2559
-#define BOXDRAW_DOUBLE_UP_RIGHT             0x255a
-
-#define BOXDRAW_UP_LEFT_DOUBLE              0x255b
-#define BOXDRAW_UP_DOUBLE_LEFT              0x255c
-#define BOXDRAW_DOUBLE_UP_LEFT              0x255d
-
-#define BOXDRAW_VERTICAL_RIGHT_DOUBLE       0x255e
-#define BOXDRAW_VERTICAL_DOUBLE_RIGHT       0x255f
-#define BOXDRAW_DOUBLE_VERTICAL_RIGHT       0x2560
-
-#define BOXDRAW_VERTICAL_LEFT_DOUBLE        0x2561
-#define BOXDRAW_VERTICAL_DOUBLE_LEFT        0x2562
-#define BOXDRAW_DOUBLE_VERTICAL_LEFT        0x2563
-
-#define BOXDRAW_DOWN_HORIZONTAL_DOUBLE      0x2564
-#define BOXDRAW_DOWN_DOUBLE_HORIZONTAL      0x2565
-#define BOXDRAW_DOUBLE_DOWN_HORIZONTAL      0x2566
-
-#define BOXDRAW_UP_HORIZONTAL_DOUBLE        0x2567
-#define BOXDRAW_UP_DOUBLE_HORIZONTAL        0x2568
-#define BOXDRAW_DOUBLE_UP_HORIZONTAL        0x2569
-
-#define BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE  0x256a
-#define BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL  0x256b
-#define BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL  0x256c
-
-//
-// EFI Required Block Elements Code Chart
-//
-
-#define BLOCKELEMENT_FULL_BLOCK             0x2588
-#define BLOCKELEMENT_LIGHT_SHADE            0x2591
-//
-// EFI Required Geometric Shapes Code Chart
-//
-
-#define GEOMETRICSHAPE_UP_TRIANGLE           0x25b2
-#define GEOMETRICSHAPE_RIGHT_TRIANGLE        0x25ba
-#define GEOMETRICSHAPE_DOWN_TRIANGLE         0x25bc
-#define GEOMETRICSHAPE_LEFT_TRIANGLE         0x25c4
-
-//
-// EFI Required Arrow shapes
-//
-
-#define ARROW_UP                            0x2191
-#define ARROW_DOWN                          0x2193
-
-//
-// Text input protocol
-//
-
-#define SIMPLE_TEXT_INPUT_PROTOCOL  \
-    { 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_SIMPLE_INPUT_INTERFACE);
-
-typedef struct {
-    UINT16                              ScanCode;
-    CHAR16                              UnicodeChar;
-} EFI_INPUT_KEY;
-
-//
-// Baseline unicode control chars
-//
-
-#define CHAR_NULL                       0x0000
-#define CHAR_BACKSPACE                  0x0008
-#define CHAR_TAB                        0x0009
-#define CHAR_LINEFEED                   0x000A
-#define CHAR_CARRIAGE_RETURN            0x000D
-
-//
-// Scan codes for base line keys
-//
-
-#define SCAN_NULL                       0x0000
-#define SCAN_UP                         0x0001
-#define SCAN_DOWN                       0x0002
-#define SCAN_RIGHT                      0x0003
-#define SCAN_LEFT                       0x0004
-#define SCAN_HOME                       0x0005
-#define SCAN_END                        0x0006
-#define SCAN_INSERT                     0x0007
-#define SCAN_DELETE                     0x0008
-#define SCAN_PAGE_UP                    0x0009
-#define SCAN_PAGE_DOWN                  0x000A
-#define SCAN_F1                         0x000B
-#define SCAN_F2                         0x000C
-#define SCAN_F3                         0x000D
-#define SCAN_F4                         0x000E
-#define SCAN_F5                         0x000F
-#define SCAN_F6                         0x0010
-#define SCAN_F7                         0x0011
-#define SCAN_F8                         0x0012
-#define SCAN_F9                         0x0013
-#define SCAN_F10                        0x0014
-#define SCAN_ESC                        0x0017
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INPUT_RESET) (
-    IN struct _SIMPLE_INPUT_INTERFACE   *This,
-    IN BOOLEAN                          ExtendedVerification
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_INPUT_READ_KEY) (
-    IN struct _SIMPLE_INPUT_INTERFACE   *This,
-    OUT EFI_INPUT_KEY                   *Key
-    );
-
-typedef struct _SIMPLE_INPUT_INTERFACE {
-    EFI_INPUT_RESET                     Reset;
-    EFI_INPUT_READ_KEY                  ReadKeyStroke;
-    EFI_EVENT                           WaitForKey;
-} SIMPLE_INPUT_INTERFACE;
-
-#endif
-
diff --git a/third_party/gnu-efi/inc/efidebug.h b/third_party/gnu-efi/inc/efidebug.h
deleted file mode 100644
index f95d492..0000000
--- a/third_party/gnu-efi/inc/efidebug.h
+++ /dev/null
@@ -1,110 +0,0 @@
-#ifndef _EFI_DEBUG_H
-#define _EFI_DEBUG_H
-
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efidebug.h
-
-Abstract:
-
-    EFI library debug functions
-
-
-
-Revision History
-
---*/
-
-extern UINTN     EFIDebug;
-
-#if EFI_DEBUG
-
-    #define DBGASSERT(a)        DbgAssert(__FILE__, __LINE__, #a)
-    #define DEBUG(a)            DbgPrint a
-    
-#else
-
-    #define DBGASSERT(a)
-    #define DEBUG(a)
-    
-#endif
-
-#if EFI_DEBUG_CLEAR_MEMORY
-
-    #define DBGSETMEM(a,l)      SetMem(a,l,(CHAR8)BAD_POINTER)
-
-#else
-
-    #define DBGSETMEM(a,l)
-
-#endif
-
-#define D_INIT        0x00000001          // Initialization style messages
-#define D_WARN        0x00000002          // Warnings
-#define D_LOAD        0x00000004          // Load events
-#define D_FS          0x00000008          // EFI File system
-#define D_POOL        0x00000010          // Alloc & Free's
-#define D_PAGE        0x00000020          // Alloc & Free's
-#define D_INFO        0x00000040          // Verbose
-#define D_VAR         0x00000100          // Variable
-#define D_PARSE       0x00000200          // Command parsing
-#define D_BM          0x00000400          // Boot manager
-#define D_BLKIO       0x00001000          // BlkIo Driver
-#define D_BLKIO_ULTRA 0x00002000          // BlkIo Driver
-#define D_NET         0x00004000          // SNI Driver
-#define D_NET_ULTRA   0x00008000          // SNI Driver
-#define D_TXTIN       0x00010000          // Simple Input Driver
-#define D_TXTOUT      0x00020000          // Simple Text Output Driver
-#define D_ERROR_ATA	  0x00040000		  		// ATA error messages 
-#define D_ERROR       0x80000000          // Error
-
-#define D_RESERVED    0x7fffC880          // Bits not reserved above
-
-//
-// Current Debug level of the system, value of EFIDebug
-//
-//#define EFI_DBUG_MASK   (D_ERROR | D_WARN | D_LOAD | D_BLKIO | D_INIT)
-#define EFI_DBUG_MASK   (D_ERROR)
-
-//
-//
-//
-
-#if EFI_DEBUG
-
-    #define ASSERT(a)               if(!(a))       DBGASSERT(a)
-    #define ASSERT_LOCKED(l)        if(!(l)->Lock) DBGASSERT(l not locked)
-    #define ASSERT_STRUCT(p,t)      DBGASSERT(t not structure), p
-
-#else
-
-    #define ASSERT(a)               
-    #define ASSERT_LOCKED(l)        
-    #define ASSERT_STRUCT(p,t)      
-
-#endif
-
-//
-// Prototypes
-//
-
-INTN
-DbgAssert (
-    CHAR8   *file,
-    INTN    lineno,
-    CHAR8   *string
-    );
-
-INTN
-DbgPrint (
-    INTN    mask,
-    CHAR8   *format,
-    ...
-    );
-
-#endif
-
diff --git a/third_party/gnu-efi/inc/efidef.h b/third_party/gnu-efi/inc/efidef.h
deleted file mode 100644
index 8b70051..0000000
--- a/third_party/gnu-efi/inc/efidef.h
+++ /dev/null
@@ -1,220 +0,0 @@
-#ifndef _EFI_DEF_H
-#define _EFI_DEF_H
-
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efidef.h
-
-Abstract:
-
-    EFI definitions
-
-
-
-
-Revision History
-
---*/
-
-typedef UINT16          CHAR16;
-typedef UINT8           CHAR8;
-typedef UINT8           BOOLEAN;
-#ifndef CONST
-   #define CONST const
-#endif
-#ifndef TRUE
-    #define TRUE    ((BOOLEAN) 1)
-    #define FALSE   ((BOOLEAN) 0)
-#endif
-
-#ifndef NULL
-    #define NULL    ((VOID *) 0)
-#endif
-
-typedef UINTN           EFI_STATUS;
-typedef UINT64          EFI_LBA;
-typedef UINTN           EFI_TPL;
-typedef VOID            *EFI_HANDLE;
-typedef VOID            *EFI_EVENT;
-
-
-//
-// Prototype argument decoration for EFI parameters to indicate
-// their direction
-//
-// IN - argument is passed into the function
-// OUT - argument (pointer) is returned from the function
-// OPTIONAL - argument is optional
-//
-
-#ifndef IN
-    #define IN
-    #define OUT
-    #define OPTIONAL
-#endif
-
-
-//
-// A GUID
-//
-
-typedef struct {          
-    UINT32  Data1;
-    UINT16  Data2;
-    UINT16  Data3;
-    UINT8   Data4[8]; 
-} EFI_GUID;
-
-
-//
-// Time
-//
-
-typedef struct {          
-    UINT16      Year;       // 1998 - 20XX
-    UINT8       Month;      // 1 - 12
-    UINT8       Day;        // 1 - 31
-    UINT8       Hour;       // 0 - 23
-    UINT8       Minute;     // 0 - 59
-    UINT8       Second;     // 0 - 59
-    UINT8       Pad1;
-    UINT32      Nanosecond; // 0 - 999,999,999
-    INT16       TimeZone;   // -1440 to 1440 or 2047
-    UINT8       Daylight;
-    UINT8       Pad2;
-} EFI_TIME;
-
-// Bit definitions for EFI_TIME.Daylight
-#define EFI_TIME_ADJUST_DAYLIGHT    0x01
-#define EFI_TIME_IN_DAYLIGHT        0x02
-
-// Value definition for EFI_TIME.TimeZone
-#define EFI_UNSPECIFIED_TIMEZONE    0x07FF
-
-
-
-//
-// Networking
-//
-
-typedef struct {
-    UINT8                   Addr[4];
-} EFI_IPv4_ADDRESS;
-
-typedef struct {
-    UINT8                   Addr[16];
-} EFI_IPv6_ADDRESS;
-
-typedef struct {
-    UINT8                   Addr[32];
-} EFI_MAC_ADDRESS;
-
-typedef struct {
-    UINT32 ReceivedQueueTimeoutValue;
-    UINT32 TransmitQueueTimeoutValue;
-    UINT16 ProtocolTypeFilter;
-    BOOLEAN EnableUnicastReceive;
-    BOOLEAN EnableMulticastReceive;
-    BOOLEAN EnableBroadcastReceive;
-    BOOLEAN EnablePromiscuousReceive;
-    BOOLEAN FlushQueuesOnReset;
-    BOOLEAN EnableReceiveTimestamps;
-    BOOLEAN DisableBackgroundPolling;
-} EFI_MANAGED_NETWORK_CONFIG_DATA;
-
-//
-// Memory
-//
-
-typedef UINT64          EFI_PHYSICAL_ADDRESS;
-typedef UINT64          EFI_VIRTUAL_ADDRESS;
-
-typedef enum {
-    AllocateAnyPages,
-    AllocateMaxAddress,
-    AllocateAddress,
-    MaxAllocateType
-} EFI_ALLOCATE_TYPE;
-
-//Preseve the attr on any range supplied.
-//ConventialMemory must have WB,SR,SW when supplied.
-//When allocating from ConventialMemory always make it WB,SR,SW
-//When returning to ConventialMemory always make it WB,SR,SW
-//When getting the memory map, or on RT for runtime types
-
-
-typedef enum {
-    EfiReservedMemoryType,
-    EfiLoaderCode,
-    EfiLoaderData,
-    EfiBootServicesCode,
-    EfiBootServicesData,
-    EfiRuntimeServicesCode,
-    EfiRuntimeServicesData,
-    EfiConventionalMemory,
-    EfiUnusableMemory,
-    EfiACPIReclaimMemory,
-    EfiACPIMemoryNVS,
-    EfiMemoryMappedIO,
-    EfiMemoryMappedIOPortSpace,
-    EfiPalCode,
-    EfiMaxMemoryType
-} EFI_MEMORY_TYPE;
-
-// possible caching types for the memory range
-#define EFI_MEMORY_UC           0x0000000000000001
-#define EFI_MEMORY_WC           0x0000000000000002
-#define EFI_MEMORY_WT           0x0000000000000004
-#define EFI_MEMORY_WB           0x0000000000000008
-#define EFI_MEMORY_UCE          0x0000000000000010  
-
-// physical memory protection on range 
-#define EFI_MEMORY_WP           0x0000000000001000
-#define EFI_MEMORY_RP           0x0000000000002000
-#define EFI_MEMORY_XP           0x0000000000004000
-
-// range requires a runtime mapping
-#define EFI_MEMORY_RUNTIME      0x8000000000000000
-
-#define EFI_MEMORY_DESCRIPTOR_VERSION  1
-typedef struct {
-    UINT32                          Type;           // Field size is 32 bits followed by 32 bit pad
-    UINT32                          Pad;
-    EFI_PHYSICAL_ADDRESS            PhysicalStart;  // Field size is 64 bits
-    EFI_VIRTUAL_ADDRESS             VirtualStart;   // Field size is 64 bits
-    UINT64                          NumberOfPages;  // Field size is 64 bits
-    UINT64                          Attribute;      // Field size is 64 bits
-} EFI_MEMORY_DESCRIPTOR;
-
-//
-// International Language
-//
-
-typedef UINT8   ISO_639_2;
-#define ISO_639_2_ENTRY_SIZE    3
-
-//
-//
-//
-
-#define EFI_PAGE_SIZE   4096
-#define EFI_PAGE_MASK   0xFFF
-#define EFI_PAGE_SHIFT  12
-
-#define EFI_SIZE_TO_PAGES(a)  \
-    ( ((a) >> EFI_PAGE_SHIFT) + ((a) & EFI_PAGE_MASK ? 1 : 0) )
-
-#define EFI_OS_INDICATIONS_BOOT_TO_FW_UI        0x0000000000000001
-#define EFI_OS_INDICATIONS_TIMESTAMP_REVOCATION 0x0000000000000002
-#define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED \
-                                                0x0000000000000004
-#define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED \
-                                                0x0000000000000008
-#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED \
-                                                0x0000000000000010
-
-#endif
diff --git a/third_party/gnu-efi/inc/efidevp.h b/third_party/gnu-efi/inc/efidevp.h
deleted file mode 100644
index b20c839..0000000
--- a/third_party/gnu-efi/inc/efidevp.h
+++ /dev/null
@@ -1,544 +0,0 @@
-#ifndef _DEVPATH_H
-#define _DEVPATH_H
-
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    devpath.h
-
-Abstract:
-
-    Defines for parsing the EFI Device Path structures
-
-
-
-Revision History
-
---*/
-
-//
-// Device Path structures - Section C
-//
-
-typedef struct _EFI_DEVICE_PATH {
-        UINT8                           Type;
-        UINT8                           SubType;
-        UINT8                           Length[2];
-} EFI_DEVICE_PATH;
-
-#define EFI_DP_TYPE_MASK                    0x7F
-#define EFI_DP_TYPE_UNPACKED                0x80
-
-//#define END_DEVICE_PATH_TYPE                0xff
-#define END_DEVICE_PATH_TYPE                0x7f
-//#define END_DEVICE_PATH_TYPE_UNPACKED       0x7f
-
-#define END_ENTIRE_DEVICE_PATH_SUBTYPE      0xff
-#define END_INSTANCE_DEVICE_PATH_SUBTYPE    0x01
-#define END_DEVICE_PATH_LENGTH              (sizeof(EFI_DEVICE_PATH))
-
-
-#define DP_IS_END_TYPE(a)
-#define DP_IS_END_SUBTYPE(a)        ( ((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
-
-#define DevicePathType(a)           ( ((a)->Type) & EFI_DP_TYPE_MASK )
-#define DevicePathSubType(a)        ( (a)->SubType )
-#define DevicePathNodeLength(a)     ( ((a)->Length[0]) | ((a)->Length[1] << 8) )
-#define NextDevicePathNode(a)       ( (EFI_DEVICE_PATH *) ( ((UINT8 *) (a)) + DevicePathNodeLength(a)))
-//#define IsDevicePathEndType(a)      ( DevicePathType(a) == END_DEVICE_PATH_TYPE_UNPACKED )
-#define IsDevicePathEndType(a)      ( DevicePathType(a) == END_DEVICE_PATH_TYPE )
-#define IsDevicePathEndSubType(a)   ( (a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
-#define IsDevicePathEnd(a)          ( IsDevicePathEndType(a) && IsDevicePathEndSubType(a) )
-#define IsDevicePathUnpacked(a)     ( (a)->Type & EFI_DP_TYPE_UNPACKED )
-
-
-#define SetDevicePathNodeLength(a,l) {                  \
-            (a)->Length[0] = (UINT8) (l);               \
-            (a)->Length[1] = (UINT8) ((l) >> 8);        \
-            }
-
-#define SetDevicePathEndNode(a)  {                      \
-            (a)->Type = END_DEVICE_PATH_TYPE;           \
-            (a)->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE;     \
-            (a)->Length[0] = sizeof(EFI_DEVICE_PATH);   \
-            (a)->Length[1] = 0;                         \
-            }
-
-
-/*
- * Hardware Device Path (UEFI 2.4 specification, version 2.4 § 9.3.2.)
- */
-
-#define HARDWARE_DEVICE_PATH            0x01
-
-#define HW_PCI_DP                       0x01
-typedef struct _PCI_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT8                           Function;
-        UINT8                           Device;
-} PCI_DEVICE_PATH;
-
-#define HW_PCCARD_DP                    0x02
-typedef struct _PCCARD_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT8                           FunctionNumber ;
-} PCCARD_DEVICE_PATH;
-
-#define HW_MEMMAP_DP                    0x03
-typedef struct _MEMMAP_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT32                          MemoryType;
-        EFI_PHYSICAL_ADDRESS            StartingAddress;
-        EFI_PHYSICAL_ADDRESS            EndingAddress;
-} MEMMAP_DEVICE_PATH;
-
-#define HW_VENDOR_DP                    0x04
-typedef struct _VENDOR_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        EFI_GUID                        Guid;
-} VENDOR_DEVICE_PATH;
-
-#define UNKNOWN_DEVICE_GUID \
-    { 0xcf31fac5, 0xc24e, 0x11d2,  {0x85, 0xf3, 0x0, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b}  }
-
-typedef struct _UKNOWN_DEVICE_VENDOR_DP {
-    VENDOR_DEVICE_PATH      DevicePath;
-    UINT8                   LegacyDriveLetter;
-} UNKNOWN_DEVICE_VENDOR_DEVICE_PATH;
-
-#define HW_CONTROLLER_DP            0x05
-typedef struct _CONTROLLER_DEVICE_PATH {
-        EFI_DEVICE_PATH     Header;
-        UINT32              Controller;
-} CONTROLLER_DEVICE_PATH;
-
-
-/*
- * ACPI Device Path (UEFI 2.4 specification, version 2.4 § 9.3.3 and 9.3.4.)
- */
-#define ACPI_DEVICE_PATH                 0x02
-
-#define ACPI_DP                         0x01
-typedef struct _ACPI_HID_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT32                          HID;
-        UINT32                          UID;
-} ACPI_HID_DEVICE_PATH;
-
-#define EXPANDED_ACPI_DP		0x02
-typedef struct _EXPANDED_ACPI_HID_DEVICE_PATH {
-	EFI_DEVICE_PATH			Header;
-	UINT32				HID;
-	UINT32				UID;
-	UINT32				CID;
-	UINT8				HidStr[1];
-} EXPANDED_ACPI_HID_DEVICE_PATH;
-
-#define ACPI_ADR_DP 3
-typedef struct _ACPI_ADR_DEVICE_PATH {
-    EFI_DEVICE_PATH Header ;
-    UINT32 ADR ;
-} ACPI_ADR_DEVICE_PATH ;
-
-//
-// EISA ID Macro
-// EISA ID Definition 32-bits
-//  bits[15:0] - three character compressed ASCII EISA ID.
-//  bits[31:16] - binary number
-//   Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
-//
-#define PNP_EISA_ID_CONST       0x41d0    
-#define EISA_ID(_Name, _Num)    ((UINT32) ((_Name) | (_Num) << 16))   
-#define EISA_PNP_ID(_PNPId)     (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
-
-#define PNP_EISA_ID_MASK        0xffff
-#define EISA_ID_TO_NUM(_Id)     ((_Id) >> 16)
-
-
-/*
- * Messaging Device Path (UEFI 2.4 specification, version 2.4 § 9.3.5.)
- */
-#define MESSAGING_DEVICE_PATH           0x03 
-
-#define MSG_ATAPI_DP                    0x01
-typedef struct _ATAPI_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT8                           PrimarySecondary;
-        UINT8                           SlaveMaster;
-        UINT16                          Lun;
-} ATAPI_DEVICE_PATH;
-
-#define MSG_SCSI_DP                     0x02
-typedef struct _SCSI_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT16                          Pun;
-        UINT16                          Lun; 
-} SCSI_DEVICE_PATH;
-
-#define MSG_FIBRECHANNEL_DP             0x03
-typedef struct _FIBRECHANNEL_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT32                          Reserved;
-        UINT64                          WWN;
-        UINT64                          Lun;
-} FIBRECHANNEL_DEVICE_PATH;
-
-/**
- * Fibre Channel Ex SubType.
- * UEFI 2.0 specification version 2.4 § 9.3.5.6.
- */
-#define MSG_FIBRECHANNELEX_DP 21
-typedef struct _FIBRECHANNELEX_DEVICE_PATH {
-    EFI_DEVICE_PATH Header ;
-    UINT32 Reserved ;
-    UINT8 WWN[ 8 ] ; /* World Wide Name */
-    UINT8 Lun[ 8 ] ; /* Logical unit, T-10 SCSI Architecture Model 4 specification */
-} FIBRECHANNELEX_DEVICE_PATH ;
-
-#define MSG_1394_DP                     0x04
-typedef struct _F1394_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT32                          Reserved;
-        UINT64                          Guid;
-} F1394_DEVICE_PATH;
-
-#define MSG_USB_DP                      0x05
-typedef struct _USB_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT8                           Port;
-        UINT8                           Endpoint;
-} USB_DEVICE_PATH;
-
-/**
- * SATA Device Path SubType.
- * UEFI 2.0 specification version 2.4 § 9.3.5.6.
- */
-#define MSG_SATA_DP 18
-typedef struct _SATA_DEVICE_PATH {
-    EFI_DEVICE_PATH Header ;
-    UINT16 HBAPortNumber ;
-    UINT16 PortMultiplierPortNumber ;
-    UINT16 Lun ; /* Logical Unit Number */
-} SATA_DEVICE_PATH ;
-
-/**
- * USB WWID Device Path SubType.
- * UEFI 2.0 specification version 2.4 § 9.3.5.7.
- */
-#define MSG_USB_WWID_DP 16
-typedef struct _USB_WWID_DEVICE_PATH {
-    EFI_DEVICE_PATH Header ;
-    UINT16 InterfaceNumber ;
-    UINT16 VendorId ;
-    UINT16 ProductId ;
-    CHAR16 SerialNumber[ 1 ] ; /* UTF-16 characters of the USB serial number */
-} USB_WWID_DEVICE_PATH ;
-
-/**
- * Device Logical Unit SubType.
- * UEFI 2.0 specification version 2.4 § 9.3.5.8.
- */
-#define MSG_DEVICE_LOGICAL_UNIT_DP 17
-typedef struct _DEVICE_LOGICAL_UNIT_DEVICE_PATH {
-    EFI_DEVICE_PATH Header ;
-    UINT8 Lun ; /* Logical Unit Number */
-} DEVICE_LOGICAL_UNIT_DEVICE_PATH ;
-
-#define MSG_USB_CLASS_DP                0x0F
-typedef struct _USB_CLASS_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT16                          VendorId;
-        UINT16                          ProductId;
-        UINT8                           DeviceClass;
-        UINT8                           DeviceSubclass;
-        UINT8                           DeviceProtocol;
-} USB_CLASS_DEVICE_PATH;
-
-#define MSG_I2O_DP                      0x06
-typedef struct _I2O_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT32                          Tid;
-} I2O_DEVICE_PATH;
-
-#define MSG_MAC_ADDR_DP                 0x0b
-typedef struct _MAC_ADDR_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        EFI_MAC_ADDRESS                 MacAddress;
-        UINT8                           IfType;
-} MAC_ADDR_DEVICE_PATH;
-
-#define MSG_IPv4_DP                     0x0c
-typedef struct _IPv4_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        EFI_IPv4_ADDRESS                LocalIpAddress;
-        EFI_IPv4_ADDRESS                RemoteIpAddress;
-        UINT16                          LocalPort;
-        UINT16                          RemotePort;
-        UINT16                          Protocol;
-        BOOLEAN                         StaticIpAddress;
-        /* new from UEFI version 2, code must check Length field in Header */
-        EFI_IPv4_ADDRESS                GatewayIpAddress ;
-        EFI_IPv4_ADDRESS                SubnetMask ;
-} IPv4_DEVICE_PATH;
-
-#define MSG_IPv6_DP                     0x0d
-typedef struct _IPv6_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        EFI_IPv6_ADDRESS                LocalIpAddress;
-        EFI_IPv6_ADDRESS                RemoteIpAddress;
-        UINT16                          LocalPort;
-        UINT16                          RemotePort;
-        UINT16                          Protocol;
-        BOOLEAN                         IPAddressOrigin ;
-        /* new from UEFI version 2, code must check Length field in Header */
-        UINT8                           PrefixLength ;
-        EFI_IPv6_ADDRESS                GatewayIpAddress ;
-} IPv6_DEVICE_PATH;
-
-
-/**
- * Uniform Resource Identifiers SubType.
- * UEFI 2.0 specification version 2.4C § 9.3.5.23.
- */
-#define MSG_URI_DP                      24
-typedef struct _URI_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        CHAR8                           Uri[1];
-} URI_DEVICE_PATH;
-
-/**
- * Device Logical Unit SubType.
- * UEFI 2.0 specification version 2.4 § 9.3.5.8.
- */
-#define MSG_VLAN_DP 20
-typedef struct _VLAN_DEVICE_PATH {
-    EFI_DEVICE_PATH Header ;
-    UINT16 VlanId ;
-} VLAN_DEVICE_PATH;
-
-#define MSG_INFINIBAND_DP               0x09
-typedef struct _INFINIBAND_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT32                          ResourceFlags ;
-        UINT64                          PortGid ;
-        UINT64                          ServiceId ;
-        UINT64                          TargetPortId ;
-        UINT64                          DeviceId ;
-} INFINIBAND_DEVICE_PATH;
-
-#define MSG_UART_DP                     0x0e
-typedef struct _UART_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT32                          Reserved;
-        UINT64                          BaudRate;
-        UINT8                           DataBits;
-        UINT8                           Parity;
-        UINT8                           StopBits;
-} UART_DEVICE_PATH;
-
-#define MSG_VENDOR_DP                   0x0A
-/* Use VENDOR_DEVICE_PATH struct */
-
-#define DEVICE_PATH_MESSAGING_PC_ANSI \
-    { 0xe0c14753, 0xf9be, 0x11d2,  {0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d}  }
-
-#define DEVICE_PATH_MESSAGING_VT_100 \
-    { 0xdfa66065, 0xb419, 0x11d3,  {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d}  }
-
-#define DEVICE_PATH_MESSAGING_VT_100_PLUS \
-    { 0x7baec70b , 0x57e0 , 0x4c76 , { 0x8e , 0x87 , 0x2f , 0x9e , 0x28 , 0x08 , 0x83 , 0x43 } }
-
-#define DEVICE_PATH_MESSAGING_VT_UTF8 \
-    { 0xad15a0d6 , 0x8bec , 0x4acf , { 0xa0 , 0x73 , 0xd0 , 0x1d , 0xe7 , 0x7e , 0x2d , 0x88 } }
-
-#define EFI_PC_ANSI_GUID \
-    { 0xe0c14753 , 0xf9be , 0x11d2 , 0x9a , 0x0c , 0x00 , 0x90 , 0x27 , 0x3f , 0xc1 , 0x4d }
-
-#define EFI_VT_100_GUID \
-    { 0xdfa66065 , 0xb419 , 0x11d3 , 0x9a , 0x2d , 0x00 , 0x90 , 0x27 , 0x3f , 0xc1 , 0x4d }
-
-#define EFI_VT_100_PLUS_GUID \
-    { 0x7baec70b , 0x57e0 , 0x4c76 , 0x8e , 0x87 , 0x2f , 0x9e , 0x28 , 0x08 , 0x83 , 0x43 }
-
-#define EFI_VT_UTF8_GUID \
-    { 0xad15a0d6 , 0x8bec , 0x4acf , 0xa0 , 0x73 , 0xd0 , 0x1d , 0xe7 , 0x7e , 0x2d , 0x88 }
-
-
-/*
- * Media Device Path (UEFI 2.4 specification, version 2.4 § 9.3.6.)
- */
-#define MEDIA_DEVICE_PATH               0x04
-
-#define MEDIA_HARDDRIVE_DP              0x01
-typedef struct _HARDDRIVE_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT32                          PartitionNumber;
-        UINT64                          PartitionStart;
-        UINT64                          PartitionSize;
-        UINT8                           Signature[16];
-        UINT8                           MBRType;
-        UINT8                           SignatureType;
-} HARDDRIVE_DEVICE_PATH;
-
-#define MBR_TYPE_PCAT                       0x01
-#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
-
-#define SIGNATURE_TYPE_MBR                  0x01
-#define SIGNATURE_TYPE_GUID                 0x02
-
-#define MEDIA_CDROM_DP                  0x02
-typedef struct _CDROM_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT32                          BootEntry;
-        UINT64                          PartitionStart;
-        UINT64                          PartitionSize;
-} CDROM_DEVICE_PATH;
-
-#define MEDIA_VENDOR_DP                 0x03
-/* Use VENDOR_DEVICE_PATH struct */
-
-#define MEDIA_FILEPATH_DP               0x04
-typedef struct _FILEPATH_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        CHAR16                          PathName[1];
-} FILEPATH_DEVICE_PATH;
-
-#define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
-
-#define MEDIA_PROTOCOL_DP               0x05
-typedef struct _MEDIA_PROTOCOL_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        EFI_GUID                        Protocol;
-} MEDIA_PROTOCOL_DEVICE_PATH;
-
-/**
- * PIWG Firmware File SubType.
- * UEFI 2.0 specification version 2.4 § 9.3.6.6.
- */
-#define MEDIA_PIWG_FW_FILE_DP 6
-typedef struct _MEDIA_FW_VOL_FILEPATH_DEVICE_PATH {
-    EFI_DEVICE_PATH Header ;
-    EFI_GUID FvFileName ;
-} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH ;
-
-/**
- * PIWG Firmware Volume Device Path SubType.
- * UEFI 2.0 specification version 2.4 § 9.3.6.7.
- */
-#define MEDIA_PIWG_FW_VOL_DP 7
-typedef struct _MEDIA_FW_VOL_DEVICE_PATH {
-    EFI_DEVICE_PATH Header ;
-    EFI_GUID FvName ;
-} MEDIA_FW_VOL_DEVICE_PATH ;
-
-/**
- * Media relative offset range device path.
- * UEFI 2.0 specification version 2.4 § 9.3.6.8.
- */
-#define MEDIA_RELATIVE_OFFSET_RANGE_DP 8
-typedef struct _MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH {
-    EFI_DEVICE_PATH Header ;
-    UINT32 Reserved ;
-    UINT64 StartingOffset ;
-    UINT64 EndingOffset ;
-} MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH ;
-
-
-/*
- * BIOS Boot Specification Device Path (UEFI 2.4 specification, version 2.4 § 9.3.7.)
- */
-#define BBS_DEVICE_PATH                 0x05
-
-#define BBS_BBS_DP                      0x01
-typedef struct _BBS_BBS_DEVICE_PATH {
-        EFI_DEVICE_PATH                 Header;
-        UINT16                          DeviceType;
-        UINT16                          StatusFlag;
-        CHAR8                           String[1];
-} BBS_BBS_DEVICE_PATH;
-
-/* DeviceType definitions - from BBS specification */
-#define BBS_TYPE_FLOPPY                 0x01
-#define BBS_TYPE_HARDDRIVE              0x02
-#define BBS_TYPE_CDROM                  0x03
-#define BBS_TYPE_PCMCIA                 0x04
-#define BBS_TYPE_USB                    0x05
-#define BBS_TYPE_EMBEDDED_NETWORK       0x06
-#define BBS_TYPE_DEV                    0x80
-#define BBS_TYPE_UNKNOWN                0xFF
-
-typedef union {
-    EFI_DEVICE_PATH                      DevPath;
-    PCI_DEVICE_PATH                      Pci;
-    PCCARD_DEVICE_PATH                   PcCard;
-    MEMMAP_DEVICE_PATH                   MemMap;
-    VENDOR_DEVICE_PATH                   Vendor;
-    UNKNOWN_DEVICE_VENDOR_DEVICE_PATH    UnknownVendor;   
-    CONTROLLER_DEVICE_PATH               Controller;
-    ACPI_HID_DEVICE_PATH                 Acpi;
-
-    ATAPI_DEVICE_PATH                    Atapi;
-    SCSI_DEVICE_PATH                     Scsi;
-    FIBRECHANNEL_DEVICE_PATH             FibreChannel;
-
-    F1394_DEVICE_PATH                    F1394;
-    USB_DEVICE_PATH                      Usb;
-    USB_CLASS_DEVICE_PATH                UsbClass;
-    I2O_DEVICE_PATH                      I2O;
-    MAC_ADDR_DEVICE_PATH                 MacAddr;
-    IPv4_DEVICE_PATH                     Ipv4;
-    IPv6_DEVICE_PATH                     Ipv6;
-    URI_DEVICE_PATH                      Uri;
-    INFINIBAND_DEVICE_PATH               InfiniBand;
-    UART_DEVICE_PATH                     Uart;
-
-    HARDDRIVE_DEVICE_PATH                HardDrive;
-    CDROM_DEVICE_PATH                    CD;
-
-    FILEPATH_DEVICE_PATH                 FilePath;
-    MEDIA_PROTOCOL_DEVICE_PATH           MediaProtocol;
-
-    BBS_BBS_DEVICE_PATH                  Bbs;
-
-} EFI_DEV_PATH;
-
-typedef union {
-    EFI_DEVICE_PATH                      *DevPath;
-    PCI_DEVICE_PATH                      *Pci;
-    PCCARD_DEVICE_PATH                   *PcCard;
-    MEMMAP_DEVICE_PATH                   *MemMap;
-    VENDOR_DEVICE_PATH                   *Vendor;
-    UNKNOWN_DEVICE_VENDOR_DEVICE_PATH    *UnknownVendor;   
-    CONTROLLER_DEVICE_PATH               *Controller;
-    ACPI_HID_DEVICE_PATH                 *Acpi;
-
-    ATAPI_DEVICE_PATH                    *Atapi;
-    SCSI_DEVICE_PATH                     *Scsi;
-    FIBRECHANNEL_DEVICE_PATH             *FibreChannel;
-
-    F1394_DEVICE_PATH                    *F1394;
-    USB_DEVICE_PATH                      *Usb;
-    USB_CLASS_DEVICE_PATH                *UsbClass;
-    I2O_DEVICE_PATH                      *I2O;
-    MAC_ADDR_DEVICE_PATH                 *MacAddr;
-    IPv4_DEVICE_PATH                     *Ipv4;
-    IPv6_DEVICE_PATH                     *Ipv6;
-    URI_DEVICE_PATH                      *Uri;
-    INFINIBAND_DEVICE_PATH               *InfiniBand;
-    UART_DEVICE_PATH                     *Uart;
-
-    HARDDRIVE_DEVICE_PATH                *HardDrive;
-
-    FILEPATH_DEVICE_PATH                 *FilePath;
-    MEDIA_PROTOCOL_DEVICE_PATH           *MediaProtocol;
-
-    CDROM_DEVICE_PATH                    *CD;
-    BBS_BBS_DEVICE_PATH                  *Bbs;
-
-} EFI_DEV_PATH_PTR;
-
-
-#endif
diff --git a/third_party/gnu-efi/inc/efierr.h b/third_party/gnu-efi/inc/efierr.h
deleted file mode 100644
index dfd3d3c..0000000
--- a/third_party/gnu-efi/inc/efierr.h
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef _EFI_ERR_H
-#define _EFI_ERR_H
-
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efierr.h
-
-Abstract:
-
-    EFI error codes
-
-
-
-
-Revision History
-
---*/
-
-
-#define EFIWARN(a)                            (a)
-#define EFI_ERROR(a)              (((INTN) a) < 0)
-
-
-#define EFI_SUCCESS                             0
-#define EFI_LOAD_ERROR                  EFIERR(1)
-#define EFI_INVALID_PARAMETER           EFIERR(2)
-#define EFI_UNSUPPORTED                 EFIERR(3)
-#define EFI_BAD_BUFFER_SIZE             EFIERR(4)
-#define EFI_BUFFER_TOO_SMALL            EFIERR(5)
-#define EFI_NOT_READY                   EFIERR(6)
-#define EFI_DEVICE_ERROR                EFIERR(7)
-#define EFI_WRITE_PROTECTED             EFIERR(8)
-#define EFI_OUT_OF_RESOURCES            EFIERR(9)
-#define EFI_VOLUME_CORRUPTED            EFIERR(10)
-#define EFI_VOLUME_FULL                 EFIERR(11)
-#define EFI_NO_MEDIA                    EFIERR(12)
-#define EFI_MEDIA_CHANGED               EFIERR(13)
-#define EFI_NOT_FOUND                   EFIERR(14)
-#define EFI_ACCESS_DENIED               EFIERR(15)
-#define EFI_NO_RESPONSE                 EFIERR(16)
-#define EFI_NO_MAPPING                  EFIERR(17)
-#define EFI_TIMEOUT                     EFIERR(18)
-#define EFI_NOT_STARTED                 EFIERR(19)
-#define EFI_ALREADY_STARTED             EFIERR(20)
-#define EFI_ABORTED                     EFIERR(21)
-#define EFI_ICMP_ERROR                  EFIERR(22)
-#define EFI_TFTP_ERROR                  EFIERR(23)
-#define EFI_PROTOCOL_ERROR              EFIERR(24)
-#define EFI_INCOMPATIBLE_VERSION        EFIERR(25)
-#define EFI_SECURITY_VIOLATION          EFIERR(26)
-#define EFI_CRC_ERROR                   EFIERR(27)
-#define EFI_END_OF_MEDIA                EFIERR(28)
-#define EFI_END_OF_FILE                 EFIERR(31)
-#define EFI_INVALID_LANGUAGE            EFIERR(32)
-#define EFI_COMPROMISED_DATA            EFIERR(33)
-
-#define EFI_WARN_UNKOWN_GLYPH           EFIWARN(1)
-#define EFI_WARN_DELETE_FAILURE         EFIWARN(2)
-#define EFI_WARN_WRITE_FAILURE          EFIWARN(3)
-#define EFI_WARN_BUFFER_TOO_SMALL       EFIWARN(4)
-
-#endif
-
diff --git a/third_party/gnu-efi/inc/efifs.h b/third_party/gnu-efi/inc/efifs.h
deleted file mode 100644
index fc595d1..0000000
--- a/third_party/gnu-efi/inc/efifs.h
+++ /dev/null
@@ -1,116 +0,0 @@
-#ifndef _EFI_FS_H
-#define _EFI_FS_H
-
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efifs.h
-
-Abstract:
-
-    EFI File System structures
-
-
-
-Revision History
-
---*/
-
-
-//
-// EFI Partition header (normaly starts in LBA 1)
-//
-
-#define EFI_PARTITION_SIGNATURE         0x5053595320494249
-#define EFI_PARTITION_REVISION          0x00010001
-#define MIN_EFI_PARTITION_BLOCK_SIZE    512
-#define EFI_PARTITION_LBA               1
-
-typedef struct _EFI_PARTITION_HEADER {
-    EFI_TABLE_HEADER    Hdr;
-    UINT32              DirectoryAllocationNumber;
-    UINT32              BlockSize;
-    EFI_LBA             FirstUsableLba;
-    EFI_LBA             LastUsableLba;
-    EFI_LBA             UnusableSpace;
-    EFI_LBA             FreeSpace;
-    EFI_LBA             RootFile;
-    EFI_LBA             SecutiryFile;
-} EFI_PARTITION_HEADER;
-
-
-//
-// File header
-//
-
-#define EFI_FILE_HEADER_SIGNATURE   0x454c494620494249
-#define EFI_FILE_HEADER_REVISION    0x00010000
-#define EFI_FILE_STRING_SIZE        260
-
-typedef struct _EFI_FILE_HEADER {
-    EFI_TABLE_HEADER    Hdr;
-    UINT32              Class;
-    UINT32              LBALOffset;
-    EFI_LBA             Parent;
-    UINT64              FileSize;
-    UINT64              FileAttributes;
-    EFI_TIME            FileCreateTime;
-    EFI_TIME            FileModificationTime;
-    EFI_GUID            VendorGuid;
-    CHAR16              FileString[EFI_FILE_STRING_SIZE];
-} EFI_FILE_HEADER;
-
-
-//
-// Return the file's first LBAL which is in the same
-// logical block as the file header
-//
-
-#define EFI_FILE_LBAL(a)    ((EFI_LBAL *) (((CHAR8 *) (a)) + (a)->LBALOffset))
-
-#define EFI_FILE_CLASS_FREE_SPACE   1
-#define EFI_FILE_CLASS_EMPTY        2
-#define EFI_FILE_CLASS_NORMAL       3
-
-
-//
-// Logical Block Address List - the fundemental block
-// description structure
-//
-
-#define EFI_LBAL_SIGNATURE      0x4c41424c20494249
-#define EFI_LBAL_REVISION       0x00010000
-
-typedef struct _EFI_LBAL {
-    EFI_TABLE_HEADER    Hdr;
-    UINT32              Class;
-    EFI_LBA             Parent;
-    EFI_LBA             Next;
-    UINT32              ArraySize;
-    UINT32              ArrayCount;
-} EFI_LBAL;
-
-// Array size 
-#define EFI_LBAL_ARRAY_SIZE(lbal,offs,blks)  \
-        (((blks) - (offs) - (lbal)->Hdr.HeaderSize) / sizeof(EFI_RL))
-
-//
-// Logical Block run-length
-//
-
-typedef struct {
-    EFI_LBA     Start;
-    UINT64      Length;
-} EFI_RL;
-
-//
-// Return the run-length structure from an LBAL header
-//
-
-#define EFI_LBAL_RL(a)      ((EFI_RL*) (((CHAR8 *) (a)) + (a)->Hdr.HeaderSize))
-
-#endif
-
diff --git a/third_party/gnu-efi/inc/efigpt.h b/third_party/gnu-efi/inc/efigpt.h
deleted file mode 100644
index d1694ae..0000000
--- a/third_party/gnu-efi/inc/efigpt.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef _EFI_GPT_H
-#define _EFI_GPT_H
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    EfiGpt.h
-    
-Abstract:
-    Include file for EFI partitioning scheme
-
-
-
-Revision History
-
---*/
-
-#define PRIMARY_PART_HEADER_LBA         1
-
-typedef struct {
-    EFI_TABLE_HEADER    Header;
-    EFI_LBA             MyLBA;
-    EFI_LBA             AlternateLBA;
-    EFI_LBA             FirstUsableLBA;
-    EFI_LBA             LastUsableLBA;
-    EFI_GUID            DiskGUID;
-    EFI_LBA             PartitionEntryLBA;
-    UINT32              NumberOfPartitionEntries;
-    UINT32              SizeOfPartitionEntry;
-    UINT32              PartitionEntryArrayCRC32;
-} EFI_PARTITION_TABLE_HEADER;
-
-#define EFI_PTAB_HEADER_ID  "EFI PART"
-
-typedef struct {
-    EFI_GUID    PartitionTypeGUID;
-    EFI_GUID    UniquePartitionGUID;
-    EFI_LBA     StartingLBA;
-    EFI_LBA     EndingLBA;
-    UINT64      Attributes;
-    CHAR16      PartitionName[36];
-} EFI_PARTITION_ENTRY;
-
-//
-// EFI Partition Attributes
-//
-#define EFI_PART_USED_BY_EFI            0x0000000000000001
-#define EFI_PART_REQUIRED_TO_FUNCTION   0x0000000000000002
-#define EFI_PART_USED_BY_OS             0x0000000000000004
-#define EFI_PART_REQUIRED_BY_OS         0x0000000000000008
-#define EFI_PART_BACKUP_REQUIRED        0x0000000000000010
-#define EFI_PART_USER_DATA              0x0000000000000020
-#define EFI_PART_CRITICAL_USER_DATA     0x0000000000000040
-#define EFI_PART_REDUNDANT_PARTITION    0x0000000000000080
-
-#define EFI_PART_TYPE_UNUSED_GUID   \
-    { 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} }
-    
-#define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID  \
-    { 0xc12a7328, 0xf81f, 0x11d2, {0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b} }
-
-#define EFI_PART_TYPE_LEGACY_MBR_GUID   \
-    { 0x024dee41, 0x33e7, 0x11d3, {0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f} }
-
-#endif
-
diff --git a/third_party/gnu-efi/inc/efiip.h b/third_party/gnu-efi/inc/efiip.h
deleted file mode 100644
index 8395079..0000000
--- a/third_party/gnu-efi/inc/efiip.h
+++ /dev/null
@@ -1,459 +0,0 @@
-#ifndef _EFI_IP_H
-#define _EFI_IP_H
-
-/*++
-Copyright (c) 2013  Intel Corporation
-
---*/
-
-#define EFI_IP4_SERVICE_BINDING_PROTOCOL \
-   {0xc51711e7,0xb4bf,0x404a,{0xbf,0xb8,0x0a,0x04, 0x8e,0xf1,0xff,0xe4}}
-
-#define EFI_IP4_PROTOCOL \
-    {0x41d94cd2,0x35b6,0x455a,{0x82,0x58,0xd4,0xe5,0x13,0x34,0xaa,0xdd}}
-
-#define EFI_IP6_SERVICE_BINDING_PROTOCOL \
-    {0xec835dd3,0xfe0f,0x617b,{0xa6,0x21,0xb3,0x50,0xc3,0xe1,0x33,0x88}}
-
-#define EFI_IP6_PROTOCOL \
-    {0x2c8759d5,0x5c2d,0x66ef,{0x92,0x5f,0xb6,0x6c,0x10,0x19,0x57,0xe2}}
-
-INTERFACE_DECL(_EFI_IP4);
-INTERFACE_DECL(_EFI_IP6);
-
-typedef struct {
-    EFI_HANDLE       InstanceHandle;
-    EFI_IPv4_ADDRESS Ip4Address;
-    EFI_IPv4_ADDRESS SubnetMask;
-} EFI_IP4_ADDRESS_PAIR;
-
-typedef struct {
-    EFI_HANDLE           DriverHandle;
-    UINT32               AddressCount;
-    EFI_IP4_ADDRESS_PAIR AddressPairs[1];
-} EFI_IP4_VARIABLE_DATA;
-
-typedef struct {
-    UINT8            DefaultProtocol;
-    BOOLEAN          AcceptAnyProtocol;
-    BOOLEAN          AcceptIcmpErrors;
-    BOOLEAN          AcceptBroadcast;
-    BOOLEAN          AcceptPromiscuous;
-    BOOLEAN          UseDefaultAddress;
-    EFI_IPv4_ADDRESS StationAddress;
-    EFI_IPv4_ADDRESS SubnetMask;
-    UINT8            TypeOfService;
-    UINT8            TimeToLive;
-    BOOLEAN          DoNotFragment;
-    BOOLEAN          RawData;
-    UINT32           ReceiveTimeout;
-    UINT32           TransmitTimeout;
-} EFI_IP4_CONFIG_DATA;
-
-typedef struct {
-    EFI_IPv4_ADDRESS SubnetAddress;
-    EFI_IPv4_ADDRESS SubnetMask;
-    EFI_IPv4_ADDRESS GatewayAddress;
-} EFI_IP4_ROUTE_TABLE;
-
-typedef struct {
-    UINT8 Type;
-    UINT8 Code;
-} EFI_IP4_ICMP_TYPE;
-
-typedef struct {
-    BOOLEAN             IsStarted;
-    UINT32              MaxPacketSize;
-    EFI_IP4_CONFIG_DATA ConfigData;
-    BOOLEAN             IsConfigured;
-    UINT32              GroupCount;
-    EFI_IPv4_ADDRESS    *GroupTable;
-    UINT32              RouteCount;
-    EFI_IP4_ROUTE_TABLE *RouteTable;
-    UINT32              IcmpTypeCount;
-    EFI_IP4_ICMP_TYPE   *IcmpTypeList;
-} EFI_IP4_MODE_DATA;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_GET_MODE_DATA) (
-    IN struct _EFI_IP4                  *This,
-    OUT EFI_IP4_MODE_DATA               *Ip4ModeData   OPTIONAL,
-    OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
-    OUT EFI_SIMPLE_NETWORK_MODE         *SnpModeData   OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_CONFIGURE) (
-    IN struct _EFI_IP4     *This,
-    IN EFI_IP4_CONFIG_DATA *IpConfigData OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_GROUPS) (
-    IN struct _EFI_IP4  *This,
-    IN BOOLEAN          JoinFlag,
-    IN EFI_IPv4_ADDRESS *GroupAddress OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_ROUTES) (
-    IN struct _EFI_IP4  *This,
-    IN BOOLEAN          DeleteRoute,
-    IN EFI_IPv4_ADDRESS *SubnetAddress,
-    IN EFI_IPv4_ADDRESS *SubnetMask,
-    IN EFI_IPv4_ADDRESS *GatewayAddress
-    );
-
-#pragma pack(1)
-typedef struct {
-    UINT8            HeaderLength:4;
-    UINT8            Version:4;
-    UINT8            TypeOfService;
-    UINT16           TotalLength;
-    UINT16           Identification;
-    UINT16           Fragmentation;
-    UINT8            TimeToLive;
-    UINT8            Protocol;
-    UINT16           Checksum;
-    EFI_IPv4_ADDRESS SourceAddress;
-    EFI_IPv4_ADDRESS DestinationAddress;
-} EFI_IP4_HEADER;
-#pragma pack()
-
-typedef struct {
-    UINT32 FragmentLength;
-    VOID   *FragmentBuffer;
-} EFI_IP4_FRAGMENT_DATA;
-
-typedef struct {
-    EFI_TIME              TimeStamp;
-    EFI_EVENT             RecycleSignal;
-    UINT32                HeaderLength;
-    EFI_IP4_HEADER        *Header;
-    UINT32                OptionsLength;
-    VOID                  *Options;
-    UINT32                DataLength;
-    UINT32                FragmentCount;
-    EFI_IP4_FRAGMENT_DATA FragmentTable[1];
-} EFI_IP4_RECEIVE_DATA;
-
-typedef struct {
-    EFI_IPv4_ADDRESS SourceAddress;
-    EFI_IPv4_ADDRESS GatewayAddress;
-    UINT8            Protocol;
-    UINT8            TypeOfService;
-    UINT8            TimeToLive;
-    BOOLEAN          DoNotFragment;
-} EFI_IP4_OVERRIDE_DATA;
-
-typedef struct {
-    EFI_IPv4_ADDRESS      DestinationAddress;
-    EFI_IP4_OVERRIDE_DATA *OverrideData;
-    UINT32                OptionsLength;
-    VOID                  *OptionsBuffer;
-    UINT32                TotalDataLength;
-    UINT32                FragmentCount;
-    EFI_IP4_FRAGMENT_DATA FragmentTable[1];
-} EFI_IP4_TRANSMIT_DATA;
-
-typedef struct {
-    EFI_EVENT                 Event;
-    EFI_STATUS                Status;
-    union {
-        EFI_IP4_RECEIVE_DATA  *RxData;
-        EFI_IP4_TRANSMIT_DATA *TxData;
-    } Packet;
-} EFI_IP4_COMPLETION_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_TRANSMIT) (
-    IN struct _EFI_IP4          *This,
-    IN EFI_IP4_COMPLETION_TOKEN *Token
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_RECEIVE) (
-    IN struct _EFI_IP4          *This,
-    IN EFI_IP4_COMPLETION_TOKEN *Token
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_CANCEL)(
-    IN struct _EFI_IP4          *This,
-    IN EFI_IP4_COMPLETION_TOKEN *Token OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP4_POLL) (
-    IN struct _EFI_IP4 *This
-    );
-
-typedef struct _EFI_IP4 {
-    EFI_IP4_GET_MODE_DATA GetModeData;
-    EFI_IP4_CONFIGURE     Configure;
-    EFI_IP4_GROUPS        Groups;
-    EFI_IP4_ROUTES        Routes;
-    EFI_IP4_TRANSMIT      Transmit;
-    EFI_IP4_RECEIVE       Receive;
-    EFI_IP4_CANCEL        Cancel;
-    EFI_IP4_POLL          Poll;
-} EFI_IP4;
-
-typedef struct {
-    UINT8            DefaultProtocol;
-    BOOLEAN          AcceptAnyProtocol;
-    BOOLEAN          AcceptIcmpErrors;
-    BOOLEAN          AcceptPromiscuous;
-    EFI_IPv6_ADDRESS DestinationAddress;
-    EFI_IPv6_ADDRESS StationAddress;
-    UINT8            TrafficClass;
-    UINT8            HopLimit;
-    UINT32           FlowLabel;
-    UINT32           ReceiveTimeout;
-    UINT32           TransmitTimeout;
-} EFI_IP6_CONFIG_DATA;
-
-typedef struct {
-    EFI_IPv6_ADDRESS Address;
-    UINT8            PrefixLength;
-} EFI_IP6_ADDRESS_INFO;
-
-typedef struct {
-    EFI_IPv6_ADDRESS Gateway;
-    EFI_IPv6_ADDRESS Destination;
-    UINT8            PrefixLength;
-} EFI_IP6_ROUTE_TABLE;
-
-typedef enum {
-    EfiNeighborInComplete,
-    EfiNeighborReachable,
-    EfiNeighborStale,
-    EfiNeighborDelay,
-    EfiNeighborProbe
-} EFI_IP6_NEIGHBOR_STATE;
-
-typedef struct {
-    EFI_IPv6_ADDRESS       Neighbor;
-    EFI_MAC_ADDRESS        LinkAddress;
-    EFI_IP6_NEIGHBOR_STATE State;
-} EFI_IP6_NEIGHBOR_CACHE;
-
-typedef struct {
-    UINT8 Type;
-    UINT8 Code;
-} EFI_IP6_ICMP_TYPE;
-
-//***********************************************************
-// ICMPv6 type definitions for error messages
-//***********************************************************
-#define ICMP_V6_DEST_UNREACHABLE     0x1
-#define ICMP_V6_PACKET_TOO_BIG       0x2
-#define ICMP_V6_TIME_EXCEEDED        0x3
-#define ICMP_V6_PARAMETER_PROBLEM    0x4
-
-//***********************************************************
-// ICMPv6 type definition for informational messages
-//***********************************************************
-#define ICMP_V6_ECHO_REQUEST         0x80
-#define ICMP_V6_ECHO_REPLY           0x81
-#define ICMP_V6_LISTENER_QUERY       0x82
-#define ICMP_V6_LISTENER_REPORT      0x83
-#define ICMP_V6_LISTENER_DONE        0x84
-#define ICMP_V6_ROUTER_SOLICIT       0x85
-#define ICMP_V6_ROUTER_ADVERTISE     0x86
-#define ICMP_V6_NEIGHBOR_SOLICIT     0x87
-#define ICMP_V6_NEIGHBOR_ADVERTISE   0x88
-#define ICMP_V6_REDIRECT             0x89
-#define ICMP_V6_LISTENER_REPORT_2    0x8F
-
-//***********************************************************
-// ICMPv6 code definitions for ICMP_V6_DEST_UNREACHABLE
-//***********************************************************
-#define ICMP_V6_NO_ROUTE_TO_DEST     0x0
-#define ICMP_V6_COMM_PROHIBITED      0x1
-#define ICMP_V6_BEYOND_SCOPE         0x2
-#define ICMP_V6_ADDR_UNREACHABLE     0x3
-#define ICMP_V6_PORT_UNREACHABLE     0x4
-#define ICMP_V6_SOURCE_ADDR_FAILED   0x5
-#define ICMP_V6_ROUTE_REJECTED       0x6
-
-//***********************************************************
-// ICMPv6 code definitions for ICMP_V6_TIME_EXCEEDED
-//***********************************************************
-#define ICMP_V6_TIMEOUT_HOP_LIMIT    0x0
-#define ICMP_V6_TIMEOUT_REASSEMBLE   0x1
-
-//***********************************************************
-// ICMPv6 code definitions for ICMP_V6_PARAMETER_PROBLEM
-//***********************************************************
-#define ICMP_V6_ERRONEOUS_HEADER     0x0
-#define ICMP_V6_UNRECOGNIZE_NEXT_HDR 0x1
-#define ICMP_V6_UNRECOGNIZE_OPTION   0x2
-
-typedef struct {
-    BOOLEAN                IsStarted;
-    UINT32                 MaxPacketSize;
-    EFI_IP6_CONFIG_DATA    ConfigData;
-    BOOLEAN                IsConfigured;
-    UINT32                 AddressCount;
-    EFI_IP6_ADDRESS_INFO   *AddressList;
-    UINT32                 GroupCount;
-    EFI_IPv6_ADDRESS       *GroupTable;
-    UINT32                 RouteCount;
-    EFI_IP6_ROUTE_TABLE    *RouteTable;
-    UINT32                 NeighborCount;
-    EFI_IP6_NEIGHBOR_CACHE *NeighborCache;
-    UINT32                 PrefixCount;
-    EFI_IP6_ADDRESS_INFO   *PrefixTable;
-    UINT32                 IcmpTypeCount;
-    EFI_IP6_ICMP_TYPE      *IcmpTypeList;
-} EFI_IP6_MODE_DATA;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_GET_MODE_DATA) (
-    IN struct _EFI_IP6                  *This,
-    OUT EFI_IP6_MODE_DATA               *Ip6ModeData   OPTIONAL,
-    OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
-    OUT EFI_SIMPLE_NETWORK_MODE         *SnpModeData   OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_CONFIGURE) (
-    IN struct _EFI_IP6     *This,
-    IN EFI_IP6_CONFIG_DATA *Ip6ConfigData OPTIONAL
-    );
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_GROUPS) (
-    IN struct _EFI_IP6  *This,
-    IN BOOLEAN          JoinFlag,
-    IN EFI_IPv6_ADDRESS *GroupAddress OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_ROUTES) (
-    IN struct _EFI_IP6  *This,
-    IN BOOLEAN          DeleteRoute,
-    IN EFI_IPv6_ADDRESS *Destination    OPTIONAL,
-    IN UINT8            PrefixLength,
-    IN EFI_IPv6_ADDRESS *GatewayAddress OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_NEIGHBORS) (
-    IN struct _EFI_IP6  *This,
-    IN BOOLEAN          DeleteFlag,
-    IN EFI_IPv6_ADDRESS *TargetIp6Address,
-    IN EFI_MAC_ADDRESS  *TargetLinkAddress OPTIONAL,
-    IN UINT32           Timeout,
-    IN BOOLEAN          Override
-    );
-
-typedef struct _EFI_IP6_FRAGMENT_DATA {
-    UINT32 FragmentLength;
-    VOID   *FragmentBuffer;
-} EFI_IP6_FRAGMENT_DATA;
-
-typedef struct _EFI_IP6_OVERRIDE_DATA {
-    UINT8  Protocol;
-    UINT8  HopLimit;
-    UINT32 FlowLabel;
-} EFI_IP6_OVERRIDE_DATA;
-
-typedef struct _EFI_IP6_TRANSMIT_DATA {
-    EFI_IPv6_ADDRESS      DestinationAddress;
-    EFI_IP6_OVERRIDE_DATA *OverrideData;
-    UINT32                ExtHdrsLength;
-    VOID                  *ExtHdrs;
-    UINT8                 NextHeader;
-    UINT32                DataLength;
-    UINT32                FragmentCount;
-    EFI_IP6_FRAGMENT_DATA FragmentTable[1];
-} EFI_IP6_TRANSMIT_DATA;
-
-#pragma pack(1)
-typedef struct _EFI_IP6_HEADER {
-    UINT8            TrafficClassH:4;
-    UINT8            Version:4;
-    UINT8            FlowLabelH:4;
-    UINT8            TrafficClassL:4;
-    UINT16           FlowLabelL;
-    UINT16           PayloadLength;
-    UINT8            NextHeader;
-    UINT8            HopLimit;
-    EFI_IPv6_ADDRESS SourceAddress;
-    EFI_IPv6_ADDRESS DestinationAddress;
-} EFI_IP6_HEADER;
-#pragma pack()
-
-typedef struct _EFI_IP6_RECEIVE_DATA {
-    EFI_TIME              TimeStamp;
-    EFI_EVENT             RecycleSignal;
-    UINT32                HeaderLength;
-    EFI_IP6_HEADER        *Header;
-    UINT32                DataLength;
-    UINT32                FragmentCount;
-    EFI_IP6_FRAGMENT_DATA FragmentTable[1];
-} EFI_IP6_RECEIVE_DATA;
-
-typedef struct {
-    EFI_EVENT                 Event;
-    EFI_STATUS                Status;
-    union {
-	EFI_IP6_RECEIVE_DATA  *RxData;
-	EFI_IP6_TRANSMIT_DATA *TxData;
-    }                         Packet;
-} EFI_IP6_COMPLETION_TOKEN;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_TRANSMIT) (
-    IN struct _EFI_IP6          *This,
-    IN EFI_IP6_COMPLETION_TOKEN *Token
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_RECEIVE) (
-    IN struct _EFI_IP6          *This,
-    IN EFI_IP6_COMPLETION_TOKEN *Token
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_CANCEL)(
-    IN struct _EFI_IP6          *This,
-    IN EFI_IP6_COMPLETION_TOKEN *Token OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IP6_POLL) (
-    IN struct _EFI_IP6 *This
-    );
-
-typedef struct _EFI_IP6 {
-    EFI_IP6_GET_MODE_DATA GetModeData;
-    EFI_IP6_CONFIGURE     Configure;
-    EFI_IP6_GROUPS        Groups;
-    EFI_IP6_ROUTES        Routes;
-    EFI_IP6_NEIGHBORS     Neighbors;
-    EFI_IP6_TRANSMIT      Transmit;
-    EFI_IP6_RECEIVE       Receive;
-    EFI_IP6_CANCEL        Cancel;
-    EFI_IP6_POLL          Poll;
-} EFI_IP6;
-
-#endif /* _EFI_IP_H */
diff --git a/third_party/gnu-efi/inc/efilib.h b/third_party/gnu-efi/inc/efilib.h
deleted file mode 100644
index 15bac36..0000000
--- a/third_party/gnu-efi/inc/efilib.h
+++ /dev/null
@@ -1,930 +0,0 @@
-#ifndef _EFILIB_INCLUDE_
-#define _EFILIB_INCLUDE_
-
-/*++
-
-Copyright (c) 2000  Intel Corporation
-
-Module Name:
-
-    efilib.h
-
-Abstract:
-
-    EFI library functions
-
-
-
-Revision History
-
---*/
-
-#include "efidebug.h"
-#include "efipart.h"
-#include "efilibplat.h"
-#include "efilink.h"
-#include "efirtlib.h"
-#include "efistdarg.h"
-#include "pci22.h"
-#include "libsmbios.h"
-
-//
-// Public read-only data in the EFI library
-//
-
-extern EFI_SYSTEM_TABLE         *ST;
-extern EFI_BOOT_SERVICES        *BS;
-extern EFI_RUNTIME_SERVICES     *RT;
-
-extern EFI_GUID DevicePathProtocol;
-extern EFI_GUID LoadedImageProtocol;
-extern EFI_GUID TextInProtocol;
-extern EFI_GUID TextOutProtocol;
-extern EFI_GUID BlockIoProtocol;
-extern EFI_GUID DiskIoProtocol;
-extern EFI_GUID FileSystemProtocol;
-extern EFI_GUID LoadFileProtocol;
-extern EFI_GUID DeviceIoProtocol;
-extern EFI_GUID VariableStoreProtocol;
-extern EFI_GUID LegacyBootProtocol;
-extern EFI_GUID UnicodeCollationProtocol;
-extern EFI_GUID SerialIoProtocol;
-extern EFI_GUID VgaClassProtocol;
-extern EFI_GUID TextOutSpliterProtocol;
-extern EFI_GUID ErrorOutSpliterProtocol;
-extern EFI_GUID TextInSpliterProtocol;
-extern EFI_GUID SimpleNetworkProtocol;
-extern EFI_GUID PxeBaseCodeProtocol;
-extern EFI_GUID PxeCallbackProtocol;
-extern EFI_GUID NetworkInterfaceIdentifierProtocol;
-extern EFI_GUID UiProtocol;
-extern EFI_GUID InternalShellProtocol;
-extern EFI_GUID PciIoProtocol;
-extern EFI_GUID DriverBindingProtocol;
-extern EFI_GUID ComponentNameProtocol;
-extern EFI_GUID ComponentName2Protocol;
-extern EFI_GUID LoadedImageProtocol;
-extern EFI_GUID HashProtocol;
-
-extern EFI_GUID EfiGlobalVariable;
-extern EFI_GUID GenericFileInfo;
-extern EFI_GUID FileSystemInfo;
-extern EFI_GUID FileSystemVolumeLabelInfo;
-extern EFI_GUID PcAnsiProtocol;
-extern EFI_GUID Vt100Protocol;
-extern EFI_GUID NullGuid;
-extern EFI_GUID UnknownDevice;
-
-extern EFI_GUID EfiPartTypeSystemPartitionGuid;
-extern EFI_GUID EfiPartTypeLegacyMbrGuid;
-
-extern EFI_GUID MpsTableGuid;
-extern EFI_GUID AcpiTableGuid;
-extern EFI_GUID SMBIOSTableGuid;
-extern EFI_GUID SalSystemTableGuid;
-
-extern EFI_GUID SimplePointerProtocol;
-extern EFI_GUID AbsolutePointerProtocol;
-
-//
-// EFI Variable strings
-//
-#define LOAD_OPTION_ACTIVE      0x00000001
-
-#define VarLanguageCodes       L"LangCodes"
-#define VarLanguage            L"Lang"
-#define VarTimeout             L"Timeout"
-#define VarConsoleInp          L"ConIn"
-#define VarConsoleOut          L"ConOut"
-#define VarErrorOut            L"ErrOut"
-#define VarBootOption          L"Boot%04x"
-#define VarBootOrder           L"BootOrder"
-#define VarBootNext            L"BootNext"
-#define VarBootCurrent         L"BootCurrent"
-#define VarDriverOption        L"Driver%04x"
-#define VarDriverOrder         L"DriverOrder"
-#define VarConsoleInpDev       L"ConInDev"
-#define VarConsoleOutDev       L"ConOutDev"
-#define VarErrorOutDev         L"ErrOutDev"
-
-#define LanguageCodeEnglish    "eng"
-
-extern EFI_DEVICE_PATH RootDevicePath[];
-extern EFI_DEVICE_PATH EndDevicePath[];
-extern EFI_DEVICE_PATH EndInstanceDevicePath[];
-
-//
-// Other public data in the EFI library
-//
-
-extern EFI_MEMORY_TYPE PoolAllocationType;
-
-//
-// STATIC - Name is internal to the module
-// INTERNAL - Name is internal to the component (i.e., directory)
-// BOOTSERVCE - Name of a boot service function
-//
-
-#define STATIC
-#define INTERNAL
-#define BOOTSERVICE
-
-//
-// Prototypes
-//
-
-VOID
-InitializeLib (
-    IN EFI_HANDLE           ImageHandle,
-    IN EFI_SYSTEM_TABLE     *SystemTable
-    );
-
-VOID
-InitializeUnicodeSupport (
-    CHAR8 *LangCode
-    );
-
-VOID
-EFIDebugVariable (
-    VOID
-    );
-
-INTN
-GetShellArgcArgv(
-    EFI_HANDLE ImageHandle,
-    CHAR16 **Argv[]  /* Statically allocated */
-    );
-
-VOID
-SetCrc (
-    IN OUT EFI_TABLE_HEADER *Hdr
-    );
-
-VOID
-SetCrcAltSize (
-    IN UINTN                 Size,
-    IN OUT EFI_TABLE_HEADER *Hdr
-    );
-
-BOOLEAN
-CheckCrc (
-    IN UINTN                 MaxSize,
-    IN OUT EFI_TABLE_HEADER *Hdr
-    );
-
-BOOLEAN
-CheckCrcAltSize (
-    IN UINTN                 MaxSize,
-    IN UINTN                 Size,
-    IN OUT EFI_TABLE_HEADER *Hdr
-    );
-
-UINT32
-CalculateCrc (
-    UINT8 *pt,
-    UINTN Size
-    );
-
-VOID
-ZeroMem (
-    IN VOID     *Buffer,
-    IN UINTN     Size
-    );
-
-VOID
-SetMem (
-    IN VOID     *Buffer,
-    IN UINTN    Size,
-    IN UINT8    Value    
-    );
-
-VOID
-CopyMem (
-    IN VOID     *Dest,
-    IN CONST VOID     *Src,
-    IN UINTN    len
-    );
-
-INTN
-CompareMem (
-    IN CONST VOID     *Dest,
-    IN CONST VOID     *Src,
-    IN UINTN    len
-    );
-
-INTN
-StrCmp (
-    IN CONST CHAR16   *s1,
-    IN CONST CHAR16   *s2
-    );
-
-INTN
-StrnCmp (
-    IN CONST CHAR16   *s1,
-    IN CONST CHAR16   *s2,
-    IN UINTN    len
-    );
-
-INTN
-StriCmp (
-    IN CONST CHAR16   *s1,
-    IN CONST CHAR16   *s2
-    );
-
-VOID
-StrLwr (
-    IN CHAR16   *Str
-    );
-
-VOID
-StrUpr (
-    IN CHAR16   *Str
-    );
-
-VOID
-StrCpy (
-    IN CHAR16   *Dest,
-    IN CONST CHAR16    *Src
-    );
-
-VOID
-StrCat (
-    IN CHAR16   *Dest,
-    IN CONST CHAR16   *Src
-    );
-
-UINTN
-StrLen (
-    IN CONST CHAR16   *s1
-    );
-
-UINTN
-StrSize (
-    IN CONST CHAR16   *s1
-    );
-
-CHAR16 *
-StrDuplicate (
-    IN CONST CHAR16   *Src
-    );
-
-UINTN
-strlena (
-    IN CONST CHAR8    *s1
-    );
-    
-UINTN
-strcmpa (
-    IN CONST CHAR8    *s1,
-    IN CONST CHAR8    *s2
-    );
-
-UINTN
-strncmpa (
-    IN CONST CHAR8    *s1,
-    IN CONST CHAR8    *s2,
-    IN UINTN    len
-    );
-
-UINTN
-xtoi (
-    CONST CHAR16      *str
-    );
-
-UINTN
-Atoi (
-    CONST CHAR16  *str
-    );
-
-BOOLEAN 
-MetaMatch (
-    IN CHAR16   *String,
-    IN CHAR16   *Pattern
-    );
-
-BOOLEAN 
-MetaiMatch (
-    IN CHAR16   *String,
-    IN CHAR16   *Pattern
-    );
-
-UINT64
-LShiftU64 (
-    IN UINT64   Operand,
-    IN UINTN    Count
-    );
-
-UINT64
-RShiftU64 (
-    IN UINT64   Operand,
-    IN UINTN    Count
-    );
-
-UINT64
-MultU64x32 (
-    IN UINT64   Multiplicand,
-    IN UINTN    Multiplier
-    );
-
-UINT64
-DivU64x32 (
-    IN UINT64   Dividend,
-    IN UINTN    Divisor,
-    OUT UINTN   *Remainder OPTIONAL
-    );
-
-VOID
-InitializeLock (
-    IN OUT FLOCK    *Lock,
-    IN EFI_TPL  Priority
-    );
-
-VOID
-AcquireLock (
-    IN FLOCK    *Lock
-    );
-
-VOID
-ReleaseLock (
-    IN FLOCK    *Lock
-    );
-
-
-INTN
-CompareGuid(
-    IN EFI_GUID     *Guid1,
-    IN EFI_GUID     *Guid2
-    );
-
-VOID *
-AllocatePool (
-    IN UINTN     Size
-    );
-
-VOID *
-AllocateZeroPool (
-    IN UINTN     Size
-    );
-
-VOID *
-ReallocatePool (
-    IN VOID                 *OldPool,
-    IN UINTN                OldSize,
-    IN UINTN                NewSize
-    );
-
-VOID
-FreePool (
-    IN VOID     *p
-    );
-
-
-VOID
-Output (
-    IN CHAR16   *Str
-    );
-
-VOID
-Input (
-    IN CHAR16   *Prompt OPTIONAL,
-    OUT CHAR16  *InStr,
-    IN UINTN    StrLen
-    );
-
-VOID
-IInput (
-    IN SIMPLE_TEXT_OUTPUT_INTERFACE     *ConOut,
-    IN SIMPLE_INPUT_INTERFACE           *ConIn,
-    IN CHAR16                           *Prompt OPTIONAL,
-    OUT CHAR16                          *InStr,
-    IN UINTN                            StrLen
-    );
-
-UINTN
-Print (
-    IN CHAR16   *fmt,
-    ...
-    );
-
-UINTN
-VPrint (
-    IN CHAR16   *fmt,
-    va_list     args
-    );
-
-UINTN
-SPrint (
-    OUT CHAR16  *Str,
-    IN UINTN    StrSize,
-    IN CHAR16   *fmt,
-    ...
-    );
-
-UINTN
-VSPrint (
-    OUT CHAR16  *Str,
-    IN UINTN    StrSize,
-    IN CHAR16   *fmt,
-    va_list     args
-    );
-
-CHAR16 *
-VPoolPrint (
-    IN CHAR16           *fmt,
-    va_list             args
-    );
-
-CHAR16 *
-PoolPrint (
-    IN CHAR16           *fmt,
-    ...
-    );
-
-typedef struct {
-    CHAR16      *str;
-    UINTN       len;
-    UINTN       maxlen;
-} POOL_PRINT;
-
-CHAR16 *
-CatPrint (
-    IN OUT POOL_PRINT   *Str,
-    IN CHAR16           *fmt,
-    ...
-    );
-
-UINTN
-PrintAt (
-    IN UINTN    Column,
-    IN UINTN    Row,
-    IN CHAR16   *fmt,
-    ...
-    );
-
-UINTN
-IPrint (
-    IN SIMPLE_TEXT_OUTPUT_INTERFACE    *Out,
-    IN CHAR16                          *fmt,
-    ...
-    );
-
-UINTN
-IPrintAt (
-    IN SIMPLE_TEXT_OUTPUT_INTERFACE     *Out,
-    IN UINTN                            Column,
-    IN UINTN                            Row,
-    IN CHAR16                           *fmt,
-    ...
-    );
-
-UINTN
-APrint (
-    IN CHAR8    *fmt,
-    ...
-    );
-
-VOID
-ValueToHex (
-    IN CHAR16   *Buffer,
-    IN UINT64   v
-    );
-
-VOID
-ValueToString (
-    IN CHAR16   *Buffer,
-    IN BOOLEAN  Comma,
-    IN INT64    v
-    );
-
-VOID
-TimeToString (
-    OUT CHAR16      *Buffer,
-    IN EFI_TIME     *Time
-    );
-
-VOID
-GuidToString (
-    OUT CHAR16      *Buffer,
-    IN EFI_GUID     *Guid
-    );
-
-VOID
-StatusToString (
-    OUT CHAR16      *Buffer,
-    EFI_STATUS      Status
-    );
-
-VOID
-DumpHex (
-    IN UINTN        Indent,
-    IN UINTN        Offset,
-    IN UINTN        DataSize,
-    IN VOID         *UserData
-    );
-
-BOOLEAN
-GrowBuffer(
-    IN OUT EFI_STATUS   *Status,
-    IN OUT VOID         **Buffer,
-    IN UINTN            BufferSize
-    );
-
-EFI_MEMORY_DESCRIPTOR *
-LibMemoryMap (
-    OUT UINTN               *NoEntries,
-    OUT UINTN               *MapKey,
-    OUT UINTN               *DescriptorSize,
-    OUT UINT32              *DescriptorVersion
-    );
-
-VOID *
-LibGetVariable (
-    IN CHAR16               *Name,
-    IN EFI_GUID             *VendorGuid
-    );
-
-VOID *
-LibGetVariableAndSize (
-    IN CHAR16               *Name,
-    IN EFI_GUID             *VendorGuid,
-    OUT UINTN               *VarSize
-    );
-
-EFI_STATUS
-LibDeleteVariable (
-    IN CHAR16   *VarName,
-    IN EFI_GUID *VarGuid
-    );
-
-EFI_STATUS
-LibSetNVVariable (
-    IN CHAR16   *VarName,
-    IN EFI_GUID *VarGuid,
-    IN UINTN	 DataSize,
-    IN VOID     *Data
-    );
-
-EFI_STATUS
-LibSetVariable (
-    IN CHAR16   *VarName,
-    IN EFI_GUID *VarGuid,
-    IN UINTN	 DataSize,
-    IN VOID     *Data
-    );
-EFI_STATUS
-LibInsertToTailOfBootOrder (
-    IN  UINT16  BootOption,
-    IN  BOOLEAN OnlyInsertIfEmpty
-    );
-
-EFI_STATUS
-LibLocateProtocol (
-    IN  EFI_GUID    *ProtocolGuid,
-    OUT VOID        **Interface
-    );
-
-EFI_STATUS
-LibLocateHandle (
-    IN EFI_LOCATE_SEARCH_TYPE   SearchType,
-    IN EFI_GUID                 *Protocol OPTIONAL,
-    IN VOID                     *SearchKey OPTIONAL,
-    IN OUT UINTN                *NoHandles,
-    OUT EFI_HANDLE              **Buffer
-    );
-
-EFI_STATUS
-LibLocateHandleByDiskSignature (
-    IN UINT8                        MBRType,
-    IN UINT8                        SignatureType,
-    IN VOID                         *Signature,
-    IN OUT UINTN                    *NoHandles,
-    OUT EFI_HANDLE                  **Buffer
-    );
-
-EFI_STATUS
-LibInstallProtocolInterfaces (
-    IN OUT EFI_HANDLE       *Handle,
-    ...
-    );
-
-VOID
-LibUninstallProtocolInterfaces (
-    IN EFI_HANDLE           Handle,
-    ...
-    );
-
-EFI_STATUS
-LibReinstallProtocolInterfaces (
-    IN OUT EFI_HANDLE           *Handle,
-    ...
-    );
-
-EFI_EVENT
-LibCreateProtocolNotifyEvent (
-    IN EFI_GUID             *ProtocolGuid,
-    IN EFI_TPL              NotifyTpl,
-    IN EFI_EVENT_NOTIFY     NotifyFunction,
-    IN VOID                 *NotifyContext,
-    OUT VOID                *Registration
-    );
-
-EFI_STATUS
-WaitForSingleEvent (
-    IN EFI_EVENT        Event,
-    IN UINT64           Timeout OPTIONAL
-    );
-
-VOID
-WaitForEventWithTimeout (
-    IN  EFI_EVENT       Event,
-    IN  UINTN           Timeout,
-    IN  UINTN           Row,
-    IN  UINTN           Column,
-    IN  CHAR16          *String,
-    IN  EFI_INPUT_KEY   TimeoutKey,
-    OUT EFI_INPUT_KEY   *Key
-    );
-
-EFI_FILE_HANDLE
-LibOpenRoot (
-    IN EFI_HANDLE           DeviceHandle
-    );
-
-EFI_FILE_INFO *
-LibFileInfo (
-    IN EFI_FILE_HANDLE      FHand
-    );
-
-EFI_FILE_SYSTEM_INFO *
-LibFileSystemInfo (
-    IN EFI_FILE_HANDLE      FHand
-    );
-
-EFI_FILE_SYSTEM_VOLUME_LABEL_INFO *
-LibFileSystemVolumeLabelInfo (
-    IN EFI_FILE_HANDLE      FHand
-    );
-
-BOOLEAN
-ValidMBR(
-    IN  MASTER_BOOT_RECORD  *Mbr,
-    IN  EFI_BLOCK_IO        *BlkIo
-    );
-
-BOOLEAN
-LibMatchDevicePaths (
-    IN  EFI_DEVICE_PATH *Multi,
-    IN  EFI_DEVICE_PATH *Single
-    );
-
-EFI_DEVICE_PATH *
-LibDuplicateDevicePathInstance (
-    IN EFI_DEVICE_PATH  *DevPath
-    );
-
-EFI_DEVICE_PATH *
-DevicePathFromHandle (
-    IN EFI_HANDLE           Handle
-    );
-
-EFI_DEVICE_PATH *
-DevicePathInstance (
-    IN OUT EFI_DEVICE_PATH  **DevicePath,
-    OUT UINTN               *Size
-    );
-
-UINTN
-DevicePathInstanceCount (
-    IN EFI_DEVICE_PATH      *DevicePath
-    );
-
-EFI_DEVICE_PATH *
-AppendDevicePath (
-    IN EFI_DEVICE_PATH      *Src1,
-    IN EFI_DEVICE_PATH      *Src2
-    );
-
-EFI_DEVICE_PATH *
-AppendDevicePathNode (
-    IN EFI_DEVICE_PATH      *Src1,
-    IN EFI_DEVICE_PATH      *Src2
-    );
-
-EFI_DEVICE_PATH*
-AppendDevicePathInstance (
-    IN EFI_DEVICE_PATH  *Src,
-    IN EFI_DEVICE_PATH  *Instance
-    );
-
-EFI_DEVICE_PATH *
-FileDevicePath (
-    IN EFI_HANDLE           Device  OPTIONAL,
-    IN CHAR16               *FileName
-    );
-
-UINTN
-DevicePathSize (
-    IN EFI_DEVICE_PATH      *DevPath
-    );
-
-EFI_DEVICE_PATH *
-DuplicateDevicePath (
-    IN EFI_DEVICE_PATH      *DevPath
-    );
-
-EFI_DEVICE_PATH *
-UnpackDevicePath (
-    IN EFI_DEVICE_PATH      *DevPath
-    );
-
-EFI_STATUS
-LibDevicePathToInterface (
-    IN EFI_GUID             *Protocol,
-    IN EFI_DEVICE_PATH      *FilePath,
-    OUT VOID                **Interface
-    );
-
-CHAR16 *
-DevicePathToStr (
-    EFI_DEVICE_PATH         *DevPath
-    );
-
-//
-// BugBug: I need my own include files
-//
-typedef struct {
-    UINT8   Register;
-    UINT8   Function;
-    UINT8   Device;
-    UINT8   Bus;
-    UINT32  Reserved;
-} EFI_ADDRESS;
-
-typedef union {
-    UINT64          Address;
-    EFI_ADDRESS     EfiAddress;
-} EFI_PCI_ADDRESS_UNION;
-
-
-EFI_STATUS
-PciFindDeviceClass (
-    IN  OUT EFI_PCI_ADDRESS_UNION   *Address,
-    IN      UINT8                   BaseClass,
-    IN      UINT8                   SubClass
-    );
-
-EFI_STATUS
-PciFindDevice (
-    IN  OUT EFI_PCI_ADDRESS_UNION   *DeviceAddress,
-    IN      UINT16                  VendorId,
-    IN      UINT16                  DeviceId,
-    IN OUT  PCI_TYPE00              *Pci
-    );
-
-//
-// SIMPLE_READ_FILE object used to access files
-//
-
-typedef VOID        *SIMPLE_READ_FILE;
-
-EFI_STATUS
-OpenSimpleReadFile (
-    IN BOOLEAN                  BootPolicy,
-    IN VOID                     *SourceBuffer   OPTIONAL,
-    IN UINTN                    SourceSize,
-    IN OUT EFI_DEVICE_PATH      **FilePath,
-    OUT EFI_HANDLE              *DeviceHandle,    
-    OUT SIMPLE_READ_FILE        *SimpleReadHandle
-    );
-
-EFI_STATUS
-ReadSimpleReadFile (
-    IN SIMPLE_READ_FILE     SimpleReadHandle,
-    IN UINTN                Offset,
-    IN OUT UINTN            *ReadSize,
-    OUT VOID                *Buffer
-    );
-
-
-VOID
-CloseSimpleReadFile (
-    IN SIMPLE_READ_FILE     SimpleReadHandle
-    );
-
-VOID
-InitializeGuid (
-    VOID
-    );
-
-UINT8
-DecimaltoBCD(
-    IN  UINT8 DecValue
-    );
-
-UINT8
-BCDtoDecimal(
-    IN  UINT8 BcdValue
-    );
-
-EFI_STATUS
-LibGetSystemConfigurationTable(
-    IN EFI_GUID *TableGuid,
-    IN OUT VOID **Table
-    );
-
-BOOLEAN
-LibIsValidTextGraphics (
-    IN  CHAR16  Graphic,   
-    OUT CHAR8   *PcAnsi,    OPTIONAL
-    OUT CHAR8   *Ascii      OPTIONAL
-    );
-
-BOOLEAN
-IsValidAscii (
-    IN  CHAR16  Ascii
-    );
-
-BOOLEAN
-IsValidEfiCntlChar (
-    IN  CHAR16  c
-    );
-
-CHAR16 *
-LibGetUiString (
-    IN  EFI_HANDLE      Handle,
-    IN  UI_STRING_TYPE  StringType,
-    IN  ISO_639_2       *LangCode,
-    IN  BOOLEAN         ReturnDevicePathStrOnMismatch
-    );
-
-CHAR8*
-LibGetSmbiosString (
-    IN  SMBIOS_STRUCTURE_POINTER    *Smbios,
-    IN  UINT16                      StringNumber
-    );
-
-EFI_STATUS
-LibGetSmbiosSystemGuidAndSerialNumber (
-    IN  EFI_GUID    *SystemGuid,
-    OUT CHAR8       **SystemSerialNumber
-    );
-
-
-EFI_STATUS
-InitializeGlobalIoDevice (
-        IN  EFI_DEVICE_PATH             *DevicePath,
-        IN  EFI_GUID                    *Protocol,
-        IN  CHAR8                       *ErrorStr,
-        OUT EFI_DEVICE_IO_INTERFACE     **GlobalIoFncs 
-        );
-
-UINT32 
-ReadPort (
-        IN  EFI_DEVICE_IO_INTERFACE     *GlobalIoFncs, 
-        IN  EFI_IO_WIDTH                Width,
-        IN  UINTN                       Port
-        );
-
-UINT32 
-WritePort (
-        IN  EFI_DEVICE_IO_INTERFACE     *GlobalIoFncs, 
-        IN  EFI_IO_WIDTH                Width,
-        IN  UINTN                       Port,
-        IN  UINTN                       Data
-        );
-
-UINT32 
-ReadPciConfig (
-        IN  EFI_DEVICE_IO_INTERFACE     *GlobalIoFncs, 
-        IN  EFI_IO_WIDTH                Width,
-        IN  UINTN                       Port
-        );
-
-UINT32 
-WritePciConfig (
-        IN  EFI_DEVICE_IO_INTERFACE     *GlobalIoFncs, 
-        IN  EFI_IO_WIDTH                Width,
-        IN  UINTN                       Port,
-        IN  UINTN                       Data
-        );
-
-extern EFI_DEVICE_IO_INTERFACE  *GlobalIoFncs;
-
-#define outp(_Port, _DataByte)  (UINT8)WritePort(GlobalIoFncs,  IO_UINT8,  (UINTN)_Port, (UINTN)_DataByte)
-#define inp(_Port)              (UINT8)ReadPort(GlobalIoFncs,   IO_UINT8,  (UINTN)_Port)
-#define outpw(_Port, _DataByte) (UINT16)WritePort(GlobalIoFncs, IO_UINT16, (UINTN)_Port, (UINTN)_DataByte)
-#define inpw(_Port)             (UINT16)ReadPort(GlobalIoFncs,  IO_UINT16, (UINTN)_Port)
-#define outpd(_Port, _DataByte) (UINT32)WritePort(GlobalIoFncs, IO_UINT32, (UINTN)_Port, (UINTN)_DataByte)
-#define inpd(_Port)             (UINT32)ReadPort(GlobalIoFncs,  IO_UINT32, (UINTN)_Port)
-
-#define writepci8(_Addr, _DataByte)  (UINT8)WritePciConfig(GlobalIoFncs,  IO_UINT8,  (UINTN)_Addr, (UINTN)_DataByte)
-#define readpci8(_Addr)              (UINT8)ReadPciConfig(GlobalIoFncs,   IO_UINT8,  (UINTN)_Addr)
-#define writepci16(_Addr, _DataByte) (UINT16)WritePciConfig(GlobalIoFncs, IO_UINT16, (UINTN)_Addr, (UINTN)_DataByte)
-#define readpci16(_Addr)             (UINT16)ReadPciConfig(GlobalIoFncs,  IO_UINT16, (UINTN)_Addr)
-#define writepci32(_Addr, _DataByte) (UINT32)WritePciConfig(GlobalIoFncs, IO_UINT32, (UINTN)_Addr, (UINTN)_DataByte)
-#define readpci32(_Addr)             (UINT32)ReadPciConfig(GlobalIoFncs,  IO_UINT32, (UINTN)_Addr)
-
-#define Pause()             WaitForSingleEvent (ST->ConIn->WaitForKey, 0)
-#define Port80(_PostCode)   GlobalIoFncs->Io.Write (GlobalIoFncs, IO_UINT16, (UINT64)0x80, 1, &(_PostCode))
-
-#endif
diff --git a/third_party/gnu-efi/inc/efilink.h b/third_party/gnu-efi/inc/efilink.h
deleted file mode 100644
index b2ff4fa..0000000
--- a/third_party/gnu-efi/inc/efilink.h
+++ /dev/null
@@ -1,177 +0,0 @@
-#ifndef _EFI_LINK_H
-#define _EFI_LINK_H
-
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    link.h (renamed efilink.h to avoid conflicts)
-
-Abstract:
-
-    EFI link list macro's
-
-
-
-Revision History
-
---*/
-
-#ifndef EFI_NT_EMUL
-
-//
-// List entry - doubly linked list
-//
-
-typedef struct _LIST_ENTRY {
-    struct _LIST_ENTRY  *Flink;
-    struct _LIST_ENTRY  *Blink;
-} LIST_ENTRY;
-
-#endif 
-
-
-//
-//  VOID
-//  InitializeListHead(
-//      LIST_ENTRY *ListHead
-//      );
-//
-
-#define InitializeListHead(ListHead) \
-    (ListHead)->Flink = ListHead;    \
-    (ListHead)->Blink = ListHead;
-
-//
-//  BOOLEAN
-//  IsListEmpty(
-//      PLIST_ENTRY ListHead
-//      );
-//
-
-#define IsListEmpty(ListHead) \
-    ((ListHead)->Flink == (ListHead))
-
-//
-//  VOID
-//  RemoveEntryList(
-//      PLIST_ENTRY Entry
-//      );
-//
-
-#define _RemoveEntryList(Entry) {       \
-        LIST_ENTRY *_Blink, *_Flink;    \
-        _Flink = (Entry)->Flink;        \
-        _Blink = (Entry)->Blink;        \
-        _Blink->Flink = _Flink;         \
-        _Flink->Blink = _Blink;         \
-        }
-
-#if EFI_DEBUG
-    #define RemoveEntryList(Entry)                      \
-        _RemoveEntryList(Entry);                        \
-        (Entry)->Flink = (LIST_ENTRY *) BAD_POINTER;    \
-        (Entry)->Blink = (LIST_ENTRY *) BAD_POINTER; 
-#else
-    #define RemoveEntryList(Entry)      \
-        _RemoveEntryList(Entry);
-#endif
-
-//
-//  VOID
-//  InsertTailList(
-//      PLIST_ENTRY ListHead,
-//      PLIST_ENTRY Entry
-//      );
-//
-
-#define InsertTailList(ListHead,Entry) {\
-    LIST_ENTRY *_ListHead, *_Blink;     \
-    _ListHead = (ListHead);             \
-    _Blink = _ListHead->Blink;          \
-    (Entry)->Flink = _ListHead;         \
-    (Entry)->Blink = _Blink;            \
-    _Blink->Flink = (Entry);            \
-    _ListHead->Blink = (Entry);         \
-    }
-
-//
-//  VOID
-//  InsertHeadList(
-//      PLIST_ENTRY ListHead,
-//      PLIST_ENTRY Entry
-//      );
-//
-
-#define InsertHeadList(ListHead,Entry) {\
-    LIST_ENTRY *_ListHead, *_Flink;     \
-    _ListHead = (ListHead);             \
-    _Flink = _ListHead->Flink;          \
-    (Entry)->Flink = _Flink;            \
-    (Entry)->Blink = _ListHead;         \
-    _Flink->Blink = (Entry);            \
-    _ListHead->Flink = (Entry);         \
-    }
-
-//  VOID
-//  SwapListEntries(
-//      PLIST_ENTRY Entry1,
-//      PLIST_ENTRY Entry2
-//      );
-//
-// Put Entry2 before Entry1
-//
-#define SwapListEntries(Entry1,Entry2) {\
-    LIST_ENTRY *Entry1Flink, *Entry1Blink;     \
-    LIST_ENTRY *Entry2Flink, *Entry2Blink;     \
-    Entry2Flink = (Entry2)->Flink;             \
-    Entry2Blink = (Entry2)->Blink;             \
-    Entry1Flink = (Entry1)->Flink;             \
-    Entry1Blink = (Entry1)->Blink;             \
-    Entry2Blink->Flink = Entry2Flink;       \
-    Entry2Flink->Blink = Entry2Blink;        \
-    (Entry2)->Flink = Entry1;               \
-    (Entry2)->Blink = Entry1Blink;          \
-    Entry1Blink->Flink = (Entry2);            \
-    (Entry1)->Blink = (Entry2);             \
-    }
-
-//
-//  EFI_FIELD_OFFSET - returns the byte offset to a field within a structure
-//
-
-#define EFI_FIELD_OFFSET(TYPE,Field) ((UINTN)(&(((TYPE *) 0)->Field)))
-
-//
-//  CONTAINING_RECORD - returns a pointer to the structure
-//      from one of it's elements.
-//
-
-#define _CR(Record, TYPE, Field)  \
-    ((TYPE *) ( (CHAR8 *)(Record) - (CHAR8 *) &(((TYPE *) 0)->Field)))
-
-#if EFI_DEBUG
-    #define CR(Record, TYPE, Field, Sig)     \
-        _CR(Record, TYPE, Field)->Signature != Sig ?        \
-            (TYPE *) ASSERT_STRUCT(_CR(Record, TYPE, Field), Record) : \
-            _CR(Record, TYPE, Field)
-#else
-    #define CR(Record, TYPE, Field, Signature)   \
-        _CR(Record, TYPE, Field)                           
-#endif
-
-
-//
-// A lock structure
-//
-
-typedef struct _FLOCK {
-    EFI_TPL     Tpl;
-    EFI_TPL     OwnerTpl;
-    UINTN       Lock;
-} FLOCK;
-
-#endif
-
diff --git a/third_party/gnu-efi/inc/efinet.h b/third_party/gnu-efi/inc/efinet.h
deleted file mode 100644
index b2e5aa8..0000000
--- a/third_party/gnu-efi/inc/efinet.h
+++ /dev/null
@@ -1,340 +0,0 @@
-#ifndef _EFINET_H
-#define _EFINET_H
-
-
-/*++
-Copyright (c) 1999  Intel Corporation
-
-Module Name:
-    efinet.h
-
-Abstract:
-    EFI Simple Network protocol
-
-Revision History
---*/
-
-
-///////////////////////////////////////////////////////////////////////////////
-//
-//      Simple Network Protocol
-//
-
-#define EFI_SIMPLE_NETWORK_PROTOCOL \
-    { 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
-
-
-INTERFACE_DECL(_EFI_SIMPLE_NETWORK);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef struct {
-    //
-    // Total number of frames received.  Includes frames with errors and
-    // dropped frames.
-    //
-    UINT64  RxTotalFrames;
-
-    //
-    // Number of valid frames received and copied into receive buffers.
-    //
-    UINT64  RxGoodFrames;
-
-    //
-    // Number of frames below the minimum length for the media.
-    // This would be <64 for ethernet.
-    //
-    UINT64  RxUndersizeFrames;
-
-    //
-    // Number of frames longer than the maxminum length for the
-    // media.  This would be >1500 for ethernet.
-    //
-    UINT64  RxOversizeFrames;
-
-    //
-    // Valid frames that were dropped because receive buffers were full.
-    //
-    UINT64  RxDroppedFrames;
-
-    //
-    // Number of valid unicast frames received and not dropped.
-    //
-    UINT64  RxUnicastFrames;
-
-    //
-    // Number of valid broadcast frames received and not dropped.
-    //
-    UINT64  RxBroadcastFrames;
-
-    //
-    // Number of valid mutlicast frames received and not dropped.
-    //
-    UINT64  RxMulticastFrames;
-
-    //
-    // Number of frames w/ CRC or alignment errors.
-    //
-    UINT64  RxCrcErrorFrames;
-
-    //
-    // Total number of bytes received.  Includes frames with errors
-    // and dropped frames.
-    //
-    UINT64  RxTotalBytes;
-
-    //
-    // Transmit statistics.
-    //
-    UINT64  TxTotalFrames;
-    UINT64  TxGoodFrames;
-    UINT64  TxUndersizeFrames;
-    UINT64  TxOversizeFrames;
-    UINT64  TxDroppedFrames;
-    UINT64  TxUnicastFrames;
-    UINT64  TxBroadcastFrames;
-    UINT64  TxMulticastFrames;
-    UINT64  TxCrcErrorFrames;
-    UINT64  TxTotalBytes;
-
-    //
-    // Number of collisions detection on this subnet.
-    //
-    UINT64  Collisions;
-
-    //
-    // Number of frames destined for unsupported protocol.
-    //
-    UINT64  UnsupportedProtocol;
-
-} EFI_NETWORK_STATISTICS;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef enum {
-    EfiSimpleNetworkStopped,
-    EfiSimpleNetworkStarted,
-    EfiSimpleNetworkInitialized,
-    EfiSimpleNetworkMaxState
-} EFI_SIMPLE_NETWORK_STATE;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST               0x01
-#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST             0x02
-#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST             0x04
-#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS           0x08
-#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT        0x01
-#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT       0x02
-#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT        0x04
-#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT       0x08
-
-///////////////////////////////////////////////////////////////////////////////
-//
-#define MAX_MCAST_FILTER_CNT    16
-typedef struct {
-    UINT32                      State;
-    UINT32                      HwAddressSize;
-    UINT32                      MediaHeaderSize;
-    UINT32                      MaxPacketSize;
-    UINT32                      NvRamSize;
-    UINT32                      NvRamAccessSize;
-    UINT32                      ReceiveFilterMask;
-    UINT32                      ReceiveFilterSetting;
-    UINT32                      MaxMCastFilterCount;
-    UINT32                      MCastFilterCount;
-    EFI_MAC_ADDRESS             MCastFilter[MAX_MCAST_FILTER_CNT];
-    EFI_MAC_ADDRESS             CurrentAddress;
-    EFI_MAC_ADDRESS             BroadcastAddress;
-    EFI_MAC_ADDRESS             PermanentAddress;
-    UINT8                       IfType;
-    BOOLEAN                     MacAddressChangeable;
-    BOOLEAN                     MultipleTxSupported;
-    BOOLEAN                     MediaPresentSupported;
-    BOOLEAN                     MediaPresent;
-} EFI_SIMPLE_NETWORK_MODE;
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_START) (
-    IN struct _EFI_SIMPLE_NETWORK  *This
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
-    IN struct _EFI_SIMPLE_NETWORK  *This
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
-    IN struct _EFI_SIMPLE_NETWORK  *This,
-    IN UINTN                       ExtraRxBufferSize  OPTIONAL,
-    IN UINTN                       ExtraTxBufferSize  OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
-    IN struct _EFI_SIMPLE_NETWORK   *This,
-    IN BOOLEAN                      ExtendedVerification
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
-    IN struct _EFI_SIMPLE_NETWORK  *This
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
-    IN struct _EFI_SIMPLE_NETWORK   *This,
-    IN UINT32                       Enable,
-    IN UINT32                       Disable,
-    IN BOOLEAN                      ResetMCastFilter,
-    IN UINTN                        MCastFilterCnt     OPTIONAL,
-    IN EFI_MAC_ADDRESS              *MCastFilter       OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
-    IN struct _EFI_SIMPLE_NETWORK   *This,
-    IN BOOLEAN                      Reset,
-    IN EFI_MAC_ADDRESS              *New      OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
-    IN struct _EFI_SIMPLE_NETWORK   *This,
-    IN BOOLEAN                      Reset,
-    IN OUT UINTN                    *StatisticsSize   OPTIONAL,
-    OUT EFI_NETWORK_STATISTICS      *StatisticsTable  OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
-    IN struct _EFI_SIMPLE_NETWORK   *This,
-    IN BOOLEAN                      IPv6,
-    IN EFI_IP_ADDRESS               *IP,
-    OUT EFI_MAC_ADDRESS             *MAC
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
-    IN struct _EFI_SIMPLE_NETWORK  *This,
-    IN BOOLEAN                     ReadWrite,
-    IN UINTN                       Offset,
-    IN UINTN                       BufferSize,
-    IN OUT VOID                    *Buffer
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
-    IN struct _EFI_SIMPLE_NETWORK  *This,
-    OUT UINT32                     *InterruptStatus  OPTIONAL,
-    OUT VOID                       **TxBuf           OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
-    IN struct _EFI_SIMPLE_NETWORK   *This,
-    IN UINTN                        HeaderSize,
-    IN UINTN                        BufferSize,
-    IN VOID                         *Buffer,
-    IN EFI_MAC_ADDRESS              *SrcAddr     OPTIONAL,
-    IN EFI_MAC_ADDRESS              *DestAddr    OPTIONAL,
-    IN UINT16                       *Protocol    OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-typedef 
-EFI_STATUS 
-(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
-    IN struct _EFI_SIMPLE_NETWORK   *This,
-    OUT UINTN                       *HeaderSize  OPTIONAL,
-    IN OUT UINTN                    *BufferSize,
-    OUT VOID                        *Buffer,
-    OUT EFI_MAC_ADDRESS             *SrcAddr     OPTIONAL,
-    OUT EFI_MAC_ADDRESS             *DestAddr    OPTIONAL,
-    OUT UINT16                      *Protocol    OPTIONAL
-);
-
-///////////////////////////////////////////////////////////////////////////////
-//
-
-#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION   0x00010000
-
-typedef struct _EFI_SIMPLE_NETWORK {
-    UINT64                              Revision;
-    EFI_SIMPLE_NETWORK_START            Start;
-    EFI_SIMPLE_NETWORK_STOP             Stop;
-    EFI_SIMPLE_NETWORK_INITIALIZE       Initialize;
-    EFI_SIMPLE_NETWORK_RESET            Reset;
-    EFI_SIMPLE_NETWORK_SHUTDOWN         Shutdown;
-    EFI_SIMPLE_NETWORK_RECEIVE_FILTERS  ReceiveFilters;
-    EFI_SIMPLE_NETWORK_STATION_ADDRESS  StationAddress;
-    EFI_SIMPLE_NETWORK_STATISTICS       Statistics;
-    EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC  MCastIpToMac;
-    EFI_SIMPLE_NETWORK_NVDATA           NvData;
-    EFI_SIMPLE_NETWORK_GET_STATUS       GetStatus;
-    EFI_SIMPLE_NETWORK_TRANSMIT         Transmit;
-    EFI_SIMPLE_NETWORK_RECEIVE          Receive;
-    EFI_EVENT                           WaitForPacket;
-    EFI_SIMPLE_NETWORK_MODE             *Mode;
-} EFI_SIMPLE_NETWORK;
-
-#endif /* _EFINET_H */
diff --git a/third_party/gnu-efi/inc/efipart.h b/third_party/gnu-efi/inc/efipart.h
deleted file mode 100644
index d4c5573..0000000
--- a/third_party/gnu-efi/inc/efipart.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef _EFI_PART_H
-#define _EFI_PART_H
-
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efipart.h
-    
-Abstract:   
-    Info about disk partitions and Master Boot Records
-
-
-
-
-Revision History
-
---*/
-
-//
-//
-//
-
-#define EFI_PARTITION   0xef
-#define MBR_SIZE        512
-
-#pragma pack(1)
-
-typedef struct {
-    UINT8       BootIndicator;
-    UINT8       StartHead;
-    UINT8       StartSector;
-    UINT8       StartTrack;
-    UINT8       OSIndicator;
-    UINT8       EndHead;
-    UINT8       EndSector;
-    UINT8       EndTrack;
-    UINT8       StartingLBA[4];
-    UINT8       SizeInLBA[4];
-} MBR_PARTITION_RECORD;
-
-#define EXTRACT_UINT32(D) (UINT32)(D[0] | (D[1] << 8) | (D[2] << 16) | (D[3] << 24))
-
-#define MBR_SIGNATURE           0xaa55
-#define MIN_MBR_DEVICE_SIZE     0x80000
-#define MBR_ERRATA_PAD          0x40000 // 128 MB
-
-#define MAX_MBR_PARTITIONS  4   
-typedef struct {
-    UINT8                   BootStrapCode[440];
-    UINT8                   UniqueMbrSignature[4];
-    UINT8                   Unknown[2];
-    MBR_PARTITION_RECORD    Partition[MAX_MBR_PARTITIONS];
-    UINT16                  Signature;
-} MASTER_BOOT_RECORD;
-#pragma pack()
-
-
-#endif
diff --git a/third_party/gnu-efi/inc/efipciio.h b/third_party/gnu-efi/inc/efipciio.h
deleted file mode 100644
index 0724f95..0000000
--- a/third_party/gnu-efi/inc/efipciio.h
+++ /dev/null
@@ -1,219 +0,0 @@
-#ifndef _EFI_PCI_IO_H
-#define _EFI_PCI_IO_H
-
-#define EFI_PCI_IO_PROTOCOL \
-    { 0x4cf5b200, 0x68b8, 0x4ca5, {0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x02, 0x9a} }
-
-INTERFACE_DECL(_EFI_PCI_IO);
-
-typedef enum {
-    EfiPciIoWidthUint8,
-    EfiPciIoWidthUint16,
-    EfiPciIoWidthUint32,
-    EfiPciIoWidthUint64,
-    EfiPciIoWidthFifoUint8,
-    EfiPciIoWidthFifoUint16,
-    EfiPciIoWidthFifoUint32,
-    EfiPciIoWidthFifoUint64,
-    EfiPciIoWidthFillUint8,
-    EfiPciIoWidthFillUint16,
-    EfiPciIoWidthFillUint32,
-    EfiPciIoWidthFillUint64,
-    EfiPciIoWidthMaximum
-} EFI_PCI_IO_PROTOCOL_WIDTH;
-
-#define EFI_PCI_IO_PASS_THROUGH_BAR 0xff
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_POLL_IO_MEM) (
-  IN struct _EFI_PCI_IO *This,
-  IN EFI_PCI_IO_PROTOCOL_WIDTH  Width,
-  IN UINT8                      BarIndex,
-  IN UINT64                     Offset,
-  IN UINT64                     Mask,
-  IN UINT64                     Value,
-  IN UINT64                     Delay,
-  OUT UINT64                    *Result
-  );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_IO_MEM) (
-  IN struct _EFI_PCI_IO *This,
-  IN EFI_PCI_IO_PROTOCOL_WIDTH  Width,
-  IN UINT8                      BarIndex,
-  IN UINT64                     Offset,
-  IN UINTN                      Count,
-  IN OUT VOID                   *Buffer
-);
-
-typedef struct {
-  EFI_PCI_IO_PROTOCOL_IO_MEM    Read;
-  EFI_PCI_IO_PROTOCOL_IO_MEM    Write;
-} EFI_PCI_IO_PROTOCOL_ACCESS;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_CONFIG) (
-  IN struct _EFI_PCI_IO *This,
-  IN EFI_PCI_IO_PROTOCOL_WIDTH  Width,
-  IN UINT32                     Offset,
-  IN UINTN                      Count,
-  IN OUT VOID                   *Buffer
-);
-
-typedef struct {
-  EFI_PCI_IO_PROTOCOL_CONFIG Read;
-  EFI_PCI_IO_PROTOCOL_CONFIG Write;
-} EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_COPY_MEM) (
-  IN struct _EFI_PCI_IO *This,
-  IN EFI_PCI_IO_PROTOCOL_WIDTH  Width,
-  IN UINT8                      DestBarIndex,
-  IN UINT64                     DestOffset,
-  IN UINT8                      SrcBarIndex,
-  IN UINT64                     SrcOffset,
-  IN UINTN                      Count
-  );
-
-typedef enum {
-    EfiPciIoOperationBusMasterRead,
-    EfiPciIoOperationBusMasterWrite,
-    EfiPciIoOperationBusMasterCommonBuffer,
-    EfiPciIoOperationMaximum
-} EFI_PCI_IO_PROTOCOL_OPERATION;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_MAP) (
-  IN struct _EFI_PCI_IO    *This,
-  IN EFI_PCI_IO_PROTOCOL_OPERATION Operation,
-  IN VOID                          *HostAddress,
-  IN OUT UINTN                     *NumberOfBytes,
-  OUT EFI_PHYSICAL_ADDRESS         *DeviceAddress,
-  OUT VOID                         **Mapping
-  );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_UNMAP) (
-  IN struct _EFI_PCI_IO *This,
-  IN VOID                       *Mapping
-);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER) (
-  IN struct _EFI_PCI_IO *This,
-  IN EFI_ALLOCATE_TYPE          Type,
-  IN EFI_MEMORY_TYPE            MemoryType,
-  IN UINTN                      Pages,
-  OUT VOID                      **HostAddress,
-  IN UINT64                     Attributes
-  );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_FREE_BUFFER) (
-  IN struct _EFI_PCI_IO *This,
-  IN UINTN                      Pages,
-  IN VOID                       *HostAddress
-  );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_FLUSH) (
-  IN struct _EFI_PCI_IO *This
-  );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_GET_LOCATION) (
-  IN struct _EFI_PCI_IO *This,
-  OUT UINTN                     *SegmentNumber,
-  OUT UINTN                     *BusNumber,
-  OUT UINTN                     *DeviceNumber,
-  OUT UINTN                     *FunctionNumber
-  );
-
-#define EFI_PCI_IO_ATTRIBUTE_ISA_IO               0x0002
-#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO       0x0004
-#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY           0x0008
-#define EFI_PCI_IO_ATTRIBUTE_VGA_IO               0x0010
-#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO       0x0020
-#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO     0x0040
-#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080
-#define EFI_PCI_IO_ATTRIBUTE_IO                   0x0100
-#define EFI_PCI_IO_ATTRIBUTE_MEMORY               0x0200
-#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER           0x0400
-#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED        0x0800
-#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE       0x1000
-#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE      0x2000
-#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM         0x4000
-#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE   0x8000
-#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16            0x10000
-#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16    0x20000
-#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16            0x40000
-
-typedef enum {
-    EfiPciIoAttributeOperationGet,
-    EfiPciIoAttributeOperationSet,
-    EfiPciIoAttributeOperationEnable,
-    EfiPciIoAttributeOperationDisable,
-    EfiPciIoAttributeOperationSupported,
-    EfiPciIoAttributeOperationMaximum
-} EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_ATTRIBUTES) (
-  IN struct _EFI_PCI_IO             *This,
-  IN EFI_PCI_IO_PROTOCOL_ATTRIBUTE_OPERATION Operation,
-  IN UINT64                                  Attributes,
-  OUT UINT64                                 *Result OPTIONAL
-  );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES) (
-  IN struct _EFI_PCI_IO *This,
-  IN UINT8                      BarIndex,
-  OUT UINT64                    *Supports OPTIONAL,
-  OUT VOID                      **Resources OPTIONAL
-  );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES) (
-  IN struct _EFI_PCI_IO *This,
-  IN UINT64                     Attributes,
-  IN UINT8                      BarIndex,
-  IN OUT UINT64                 *Offset,
-  IN OUT UINT64                 *Length
-  );
-
-typedef struct _EFI_PCI_IO {
-  EFI_PCI_IO_PROTOCOL_POLL_IO_MEM        PollMem;
-  EFI_PCI_IO_PROTOCOL_POLL_IO_MEM        PollIo;
-  EFI_PCI_IO_PROTOCOL_ACCESS             Mem;
-  EFI_PCI_IO_PROTOCOL_ACCESS             Io;
-  EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS      Pci;
-  EFI_PCI_IO_PROTOCOL_COPY_MEM           CopyMem;
-  EFI_PCI_IO_PROTOCOL_MAP                Map;
-  EFI_PCI_IO_PROTOCOL_UNMAP              Unmap;
-  EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER    AllocateBuffer;
-  EFI_PCI_IO_PROTOCOL_FREE_BUFFER        FreeBuffer;
-  EFI_PCI_IO_PROTOCOL_FLUSH              Flush;
-  EFI_PCI_IO_PROTOCOL_GET_LOCATION       GetLocation;
-  EFI_PCI_IO_PROTOCOL_ATTRIBUTES         Attributes;
-  EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES GetBarAttributes;
-  EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes;
-  UINT64                                 RomSize;
-  VOID                                   *RomImage;
-} EFI_PCI_IO;
-
-#endif /* _EFI_PCI_IO_H */
diff --git a/third_party/gnu-efi/inc/efipoint.h b/third_party/gnu-efi/inc/efipoint.h
deleted file mode 100644
index 4dbcf18..0000000
--- a/third_party/gnu-efi/inc/efipoint.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright (C) 2014 by John Cronin

- *

- * Permission is hereby granted, free of charge, to any person obtaining a copy

- * of this software and associated documentation files (the "Software"), to deal

- * in the Software without restriction, including without limitation the rights

- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

- * copies of the Software, and to permit persons to whom the Software is

- * furnished to do so, subject to the following conditions:

-

- * The above copyright notice and this permission notice shall be included in

- * all copies or substantial portions of the Software.

-

- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN

- * THE SOFTWARE.

- */

-

-#ifndef _EFI_POINT_H

-#define _EFI_POINT_H

-

-#define EFI_SIMPLE_POINTER_PROTOCOL_GUID \

-	{ 0x31878c87, 0xb75, 0x11d5, { 0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }

-

-INTERFACE_DECL(_EFI_SIMPLE_POINTER);

-

-typedef struct {

-	INT32 RelativeMovementX;

-	INT32 RelativeMovementY;

-	INT32 RelativeMovementZ;

-	BOOLEAN LeftButton;

-	BOOLEAN RightButton;

-} EFI_SIMPLE_POINTER_STATE;

-

-typedef struct {

-	UINT64 ResolutionX;

-	UINT64 ResolutionY;

-	UINT64 ResolutionZ;

-	BOOLEAN LeftButton;

-	BOOLEAN RightButton;

-} EFI_SIMPLE_POINTER_MODE;

-

-typedef

-EFI_STATUS

-(EFIAPI *EFI_SIMPLE_POINTER_RESET) (

-	IN struct _EFI_SIMPLE_POINTER *This,

-	IN BOOLEAN ExtendedVerification

-);

-

-typedef

-EFI_STATUS

-(EFIAPI *EFI_SIMPLE_POINTER_GET_STATE) (

-	IN struct _EFI_SIMPLE_POINTER *This,

-	IN OUT EFI_SIMPLE_POINTER_STATE *State

-);

-

-typedef struct _EFI_SIMPLE_POINTER {

-	EFI_SIMPLE_POINTER_RESET Reset;

-	EFI_SIMPLE_POINTER_GET_STATE GetState;

-	EFI_EVENT WaitForInput;

-	EFI_SIMPLE_POINTER_MODE *Mode;

-} EFI_SIMPLE_POINTER_PROTOCOL;

-

-#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \

-	{ 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } }

-

-INTERFACE_DECL(_EFI_ABSOLUTE_POINTER_PROTOCOL);

-

-typedef struct {

-	UINT64 AbsoluteMinX;

-	UINT64 AbsoluteMinY;

-	UINT64 AbsoluteMinZ;

-	UINT64 AbsoluteMaxX;

-	UINT64 AbsoluteMaxY;

-	UINT64 AbsoluteMaxZ;

-	UINT32 Attributes;

-} EFI_ABSOLUTE_POINTER_MODE;

-

-typedef struct {

-	UINT64 CurrentX;

-	UINT64 CurrentY;

-	UINT64 CurrentZ;

-	UINT32 ActiveButtons;

-} EFI_ABSOLUTE_POINTER_STATE;

-

-#define EFI_ABSP_SupportsAltActive 0x00000001

-#define EFI_ABSP_SupportsPressureAsZ 0x00000002

-#define EFI_ABSP_TouchActive 0x00000001

-#define EFI_ABS_AltActive 0x00000002

-

-typedef

-EFI_STATUS

-(EFIAPI *EFI_ABSOLUTE_POINTER_RESET) (

-	IN struct _EFI_ABSOLUTE_POINTER_PROTOCOL *This,

-	IN BOOLEAN ExtendedVerification

-);

-

-typedef

-EFI_STATUS

-(EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE) (

-	IN struct _EFI_ABSOLUTE_POINTER_PROTOCOL *This,

-	IN OUT EFI_ABSOLUTE_POINTER_STATE *State

-);

-

-typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL {

-	EFI_ABSOLUTE_POINTER_RESET Reset;

-	EFI_ABSOLUTE_POINTER_GET_STATE GetState;

-	EFI_EVENT WaitForInput;

-	EFI_ABSOLUTE_POINTER_MODE *Mode;

-} EFI_ABSOLUTE_POINTER_PROTOCOL;

-

-#endif

diff --git a/third_party/gnu-efi/inc/efiprot.h b/third_party/gnu-efi/inc/efiprot.h
deleted file mode 100644
index 2209fcc..0000000
--- a/third_party/gnu-efi/inc/efiprot.h
+++ /dev/null
@@ -1,1021 +0,0 @@
-#ifndef _EFI_PROT_H
-#define _EFI_PROT_H
-
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efiprot.h
-
-Abstract:
-
-    EFI Protocols
-
-
-
-Revision History
-
---*/
-
-//
-//  FPSWA library protocol
-//
-#define FPSWA_PROTOCOL          \
-    { 0xc41b6531, 0x97b9, 0x11d3, {0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-//
-// Device Path protocol
-//
-
-#define DEVICE_PATH_PROTOCOL    \
-    { 0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-
-//
-// Block IO protocol
-//
-
-#define BLOCK_IO_PROTOCOL \
-    { 0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-#define EFI_BLOCK_IO_INTERFACE_REVISION   0x00010000
-#define EFI_BLOCK_IO_INTERFACE_REVISION2  0x00020001
-#define EFI_BLOCK_IO_INTERFACE_REVISION3  ((2<<16) | 31)
-
-INTERFACE_DECL(_EFI_BLOCK_IO);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_RESET) (
-    IN struct _EFI_BLOCK_IO     *This,
-    IN BOOLEAN                  ExtendedVerification
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_READ) (
-    IN struct _EFI_BLOCK_IO     *This,
-    IN UINT32                   MediaId,
-    IN EFI_LBA                  LBA,
-    IN UINTN                    BufferSize,
-    OUT VOID                    *Buffer
-    );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_WRITE) (
-    IN struct _EFI_BLOCK_IO     *This,
-    IN UINT32                   MediaId,
-    IN EFI_LBA                  LBA,
-    IN UINTN                    BufferSize,
-    IN VOID                     *Buffer
-    );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_BLOCK_FLUSH) (
-    IN struct _EFI_BLOCK_IO     *This
-    );
-
-
-
-typedef struct {
-    UINT32              MediaId;
-    BOOLEAN             RemovableMedia;
-    BOOLEAN             MediaPresent;
-
-    BOOLEAN             LogicalPartition;
-    BOOLEAN             ReadOnly;
-    BOOLEAN             WriteCaching;
-
-    UINT32              BlockSize;
-    UINT32              IoAlign;
-
-    EFI_LBA             LastBlock;
-
-    /* revision 2 */
-    EFI_LBA             LowestAlignedLba;
-    UINT32              LogicalBlocksPerPhysicalBlock;
-    /* revision 3 */
-    UINT32              OptimalTransferLengthGranularity;
-} EFI_BLOCK_IO_MEDIA;
-
-typedef struct _EFI_BLOCK_IO {
-    UINT64                  Revision;
-
-    EFI_BLOCK_IO_MEDIA      *Media;
-
-    EFI_BLOCK_RESET         Reset;
-    EFI_BLOCK_READ          ReadBlocks;
-    EFI_BLOCK_WRITE         WriteBlocks;
-    EFI_BLOCK_FLUSH         FlushBlocks;
-
-} EFI_BLOCK_IO;
-
-
-
-//
-// Disk Block IO protocol
-//
-
-#define DISK_IO_PROTOCOL \
-    { 0xce345171, 0xba0b, 0x11d2,  {0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-#define EFI_DISK_IO_INTERFACE_REVISION   0x00010000
-
-INTERFACE_DECL(_EFI_DISK_IO);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DISK_READ) (
-    IN struct _EFI_DISK_IO      *This,
-    IN UINT32                   MediaId,
-    IN UINT64                   Offset,
-    IN UINTN                    BufferSize,
-    OUT VOID                    *Buffer
-    );
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DISK_WRITE) (
-    IN struct _EFI_DISK_IO      *This,
-    IN UINT32                   MediaId,
-    IN UINT64                   Offset,
-    IN UINTN                    BufferSize,
-    IN VOID                     *Buffer
-    );
-
-
-typedef struct _EFI_DISK_IO {
-    UINT64              Revision;
-    EFI_DISK_READ       ReadDisk;
-    EFI_DISK_WRITE      WriteDisk;
-} EFI_DISK_IO;
-
-
-//
-// Simple file system protocol
-//
-
-#define SIMPLE_FILE_SYSTEM_PROTOCOL \
-    { 0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_EFI_FILE_IO_INTERFACE);
-INTERFACE_DECL(_EFI_FILE_HANDLE);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_VOLUME_OPEN) (
-    IN struct _EFI_FILE_IO_INTERFACE    *This,
-    OUT struct _EFI_FILE_HANDLE         **Root
-    );
-
-#define EFI_FILE_IO_INTERFACE_REVISION   0x00010000
-
-typedef struct _EFI_FILE_IO_INTERFACE {
-    UINT64                  Revision;
-    EFI_VOLUME_OPEN         OpenVolume;
-} EFI_FILE_IO_INTERFACE;
-
-//
-//
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_OPEN) (
-    IN struct _EFI_FILE_HANDLE  *File,
-    OUT struct _EFI_FILE_HANDLE **NewHandle,
-    IN CHAR16                   *FileName,
-    IN UINT64                   OpenMode,
-    IN UINT64                   Attributes
-    );
-
-// Open modes
-#define EFI_FILE_MODE_READ      0x0000000000000001
-#define EFI_FILE_MODE_WRITE     0x0000000000000002
-#define EFI_FILE_MODE_CREATE    0x8000000000000000
-
-// File attributes
-#define EFI_FILE_READ_ONLY      0x0000000000000001
-#define EFI_FILE_HIDDEN         0x0000000000000002
-#define EFI_FILE_SYSTEM         0x0000000000000004
-#define EFI_FILE_RESERVIED      0x0000000000000008
-#define EFI_FILE_DIRECTORY      0x0000000000000010
-#define EFI_FILE_ARCHIVE        0x0000000000000020
-#define EFI_FILE_VALID_ATTR     0x0000000000000037
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_CLOSE) (
-    IN struct _EFI_FILE_HANDLE  *File
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_DELETE) (
-    IN struct _EFI_FILE_HANDLE  *File
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_READ) (
-    IN struct _EFI_FILE_HANDLE  *File,
-    IN OUT UINTN                *BufferSize,
-    OUT VOID                    *Buffer
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_WRITE) (
-    IN struct _EFI_FILE_HANDLE  *File,
-    IN OUT UINTN                *BufferSize,
-    IN VOID                     *Buffer
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_SET_POSITION) (
-    IN struct _EFI_FILE_HANDLE  *File,
-    IN UINT64                   Position
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_GET_POSITION) (
-    IN struct _EFI_FILE_HANDLE  *File,
-    OUT UINT64                  *Position
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_GET_INFO) (
-    IN struct _EFI_FILE_HANDLE  *File,
-    IN EFI_GUID                 *InformationType,
-    IN OUT UINTN                *BufferSize,
-    OUT VOID                    *Buffer
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_SET_INFO) (
-    IN struct _EFI_FILE_HANDLE  *File,
-    IN EFI_GUID                 *InformationType,
-    IN UINTN                    BufferSize,
-    IN VOID                     *Buffer
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_FILE_FLUSH) (
-    IN struct _EFI_FILE_HANDLE  *File
-    );
-
-
-
-#define EFI_FILE_HANDLE_REVISION         0x00010000
-typedef struct _EFI_FILE_HANDLE {
-    UINT64                  Revision;
-    EFI_FILE_OPEN           Open;
-    EFI_FILE_CLOSE          Close;
-    EFI_FILE_DELETE         Delete;
-    EFI_FILE_READ           Read;
-    EFI_FILE_WRITE          Write;
-    EFI_FILE_GET_POSITION   GetPosition;
-    EFI_FILE_SET_POSITION   SetPosition;
-    EFI_FILE_GET_INFO       GetInfo;
-    EFI_FILE_SET_INFO       SetInfo;
-    EFI_FILE_FLUSH          Flush;
-} EFI_FILE, *EFI_FILE_HANDLE;
-
-
-//
-// File information types
-//
-
-#define EFI_FILE_INFO_ID   \
-    { 0x9576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-typedef struct {
-    UINT64                  Size;
-    UINT64                  FileSize;
-    UINT64                  PhysicalSize;
-    EFI_TIME                CreateTime;
-    EFI_TIME                LastAccessTime;
-    EFI_TIME                ModificationTime;
-    UINT64                  Attribute;
-    CHAR16                  FileName[1];
-} EFI_FILE_INFO;
-
-//
-// The FileName field of the EFI_FILE_INFO data structure is variable length.
-// Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
-// be the size of the data structure without the FileName field.  The following macro 
-// computes this size correctly no matter how big the FileName array is declared.
-// This is required to make the EFI_FILE_INFO data structure ANSI compilant. 
-//
-
-#define SIZE_OF_EFI_FILE_INFO EFI_FIELD_OFFSET(EFI_FILE_INFO,FileName)
-
-#define EFI_FILE_SYSTEM_INFO_ID    \
-    { 0x9576e93, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-typedef struct {
-    UINT64                  Size;
-    BOOLEAN                 ReadOnly;
-    UINT64                  VolumeSize;
-    UINT64                  FreeSpace;
-    UINT32                  BlockSize;
-    CHAR16                  VolumeLabel[1];
-} EFI_FILE_SYSTEM_INFO;
-
-//
-// The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
-// Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
-// to be the size of the data structure without the VolumeLable field.  The following macro 
-// computes this size correctly no matter how big the VolumeLable array is declared.
-// This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant. 
-//
-
-#define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_INFO,VolumeLabel)
-
-#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID    \
-    { 0xDB47D7D3,0xFE81, 0x11d3, {0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
-
-typedef struct {
-    CHAR16                  VolumeLabel[1];
-} EFI_FILE_SYSTEM_VOLUME_LABEL_INFO;
-
-#define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL_INFO,VolumeLabel)
-
-//
-// Load file protocol
-//
-
-
-#define LOAD_FILE_PROTOCOL \
-    { 0x56EC3091, 0x954C, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
-
-INTERFACE_DECL(_EFI_LOAD_FILE_INTERFACE);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_LOAD_FILE) (
-    IN struct _EFI_LOAD_FILE_INTERFACE  *This,
-    IN EFI_DEVICE_PATH                  *FilePath,
-    IN BOOLEAN                          BootPolicy,
-    IN OUT UINTN                        *BufferSize,
-    IN VOID                             *Buffer OPTIONAL
-    );
-
-typedef struct _EFI_LOAD_FILE_INTERFACE {
-    EFI_LOAD_FILE                       LoadFile;
-} EFI_LOAD_FILE_INTERFACE;
-
-
-//
-// Device IO protocol
-//
-
-#define DEVICE_IO_PROTOCOL \
-    { 0xaf6ac311, 0x84c3, 0x11d2, {0x8e, 0x3c, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-INTERFACE_DECL(_EFI_DEVICE_IO_INTERFACE);
-
-typedef enum {
-    IO_UINT8,
-    IO_UINT16,
-    IO_UINT32,
-    IO_UINT64,
-//
-// Specification Change: Copy from MMIO to MMIO vs. MMIO to buffer, buffer to MMIO
-//
-    MMIO_COPY_UINT8,
-    MMIO_COPY_UINT16,
-    MMIO_COPY_UINT32,
-    MMIO_COPY_UINT64
-} EFI_IO_WIDTH;
-
-#define EFI_PCI_ADDRESS(_bus,_dev,_func) \
-    ( (UINT64) ( (((UINTN)_bus) << 24) + (((UINTN)_dev) << 16) + (((UINTN)_func) << 8) ) )
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DEVICE_IO) (
-    IN struct _EFI_DEVICE_IO_INTERFACE *This,
-    IN EFI_IO_WIDTH                 Width,
-    IN UINT64                       Address,
-    IN UINTN                        Count,
-    IN OUT VOID                     *Buffer
-    );
-
-typedef struct {
-    EFI_DEVICE_IO                   Read;
-    EFI_DEVICE_IO                   Write;
-} EFI_IO_ACCESS;
-
-typedef 
-EFI_STATUS
-(EFIAPI *EFI_PCI_DEVICE_PATH) (
-    IN struct _EFI_DEVICE_IO_INTERFACE  *This,
-    IN UINT64                           Address,
-    IN OUT EFI_DEVICE_PATH              **PciDevicePath
-    );
-
-typedef enum {
-    EfiBusMasterRead,
-    EfiBusMasterWrite,
-    EfiBusMasterCommonBuffer
-} EFI_IO_OPERATION_TYPE;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_MAP) (
-    IN struct _EFI_DEVICE_IO_INTERFACE  *This,
-    IN EFI_IO_OPERATION_TYPE            Operation,
-    IN EFI_PHYSICAL_ADDRESS             *HostAddress,
-    IN OUT UINTN                        *NumberOfBytes,
-    OUT EFI_PHYSICAL_ADDRESS            *DeviceAddress,
-    OUT VOID                            **Mapping
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_UNMAP) (
-    IN struct _EFI_DEVICE_IO_INTERFACE  *This,
-    IN VOID                             *Mapping
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_ALLOCATE_BUFFER) (
-    IN struct _EFI_DEVICE_IO_INTERFACE  *This,
-    IN EFI_ALLOCATE_TYPE                Type,
-    IN EFI_MEMORY_TYPE                  MemoryType,
-    IN UINTN                            Pages,
-    IN OUT EFI_PHYSICAL_ADDRESS         *HostAddress
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_FLUSH) (
-    IN struct _EFI_DEVICE_IO_INTERFACE  *This
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IO_FREE_BUFFER) (
-    IN struct _EFI_DEVICE_IO_INTERFACE  *This,
-    IN UINTN                            Pages,
-    IN EFI_PHYSICAL_ADDRESS             HostAddress
-    );
-
-typedef struct _EFI_DEVICE_IO_INTERFACE {
-    EFI_IO_ACCESS                       Mem;
-    EFI_IO_ACCESS                       Io;
-    EFI_IO_ACCESS                       Pci;
-    EFI_IO_MAP                          Map;
-    EFI_PCI_DEVICE_PATH                 PciDevicePath;
-    EFI_IO_UNMAP                        Unmap;
-    EFI_IO_ALLOCATE_BUFFER              AllocateBuffer;
-    EFI_IO_FLUSH                        Flush;
-    EFI_IO_FREE_BUFFER                  FreeBuffer;
-} EFI_DEVICE_IO_INTERFACE;
-
-
-//
-// Unicode Collation protocol
-//
-
-#define UNICODE_COLLATION_PROTOCOL \
-    { 0x1d85cd7f, 0xf43d, 0x11d2, {0x9a, 0xc,  0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-#define UNICODE_BYTE_ORDER_MARK       (CHAR16)(0xfeff)
-
-INTERFACE_DECL(_EFI_UNICODE_COLLATION_INTERFACE);
-
-typedef
-INTN
-(EFIAPI *EFI_UNICODE_STRICOLL) (
-    IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
-    IN CHAR16                         *s1,
-    IN CHAR16                         *s2
-    );
-
-typedef
-BOOLEAN
-(EFIAPI *EFI_UNICODE_METAIMATCH) (
-    IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
-    IN CHAR16                         *String,
-    IN CHAR16                         *Pattern
-    );
-
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_STRLWR) (
-    IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
-    IN OUT CHAR16                       *Str
-    );
-
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_STRUPR) (
-    IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
-    IN OUT CHAR16                       *Str
-    );
-
-typedef
-VOID
-(EFIAPI *EFI_UNICODE_FATTOSTR) (
-    IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
-    IN UINTN                            FatSize,
-    IN CHAR8                            *Fat,
-    OUT CHAR16                          *String
-    );
-
-typedef
-BOOLEAN
-(EFIAPI *EFI_UNICODE_STRTOFAT) (
-    IN struct _EFI_UNICODE_COLLATION_INTERFACE  *This,
-    IN CHAR16                           *String,
-    IN UINTN                            FatSize,
-    OUT CHAR8                           *Fat
-    );
-
-//
-// Hash Protocol
-//
-#define HASH_PROTOCOL \
-  { 0xC5184932, 0xDBA5, 0x46DB, { 0xA5, 0xBA, 0xCC, 0x0B, 0xDA, 0x9C, 0x14, 0x35 } }
-
-#define EFI_HASH_ALGORITHM_SHA1 \
-  { 0x2AE9D80F, 0x3FB2, 0x4095, { 0xB7, 0xB1, 0xE9, 0x31, 0x57, 0xB9, 0x46, 0xB6 } } // Deprecated
-
-#define EFI_HASH_ALGORITHM_SHA224 \
-  { 0x8DF01A06, 0x9BD5, 0x4BF7, { 0xB0, 0x21, 0xDB, 0x4F, 0xD9, 0xCC, 0xF4, 0x5B } } // Deprecated
-
-#define EFI_HASH_ALGORITHM_SHA256 \
-  { 0x51AA59DE, 0xFDF2, 0x4EA3, { 0xBC, 0x63, 0x87, 0x5F, 0xB7, 0x84, 0x2E, 0xE9 } } // Deprecated
-
-#define EFI_HASH_ALGORITHM_SHA384 \
-  { 0xEFA96432, 0xDE33, 0x4DD2, { 0xAE, 0xE6, 0x32, 0x8C, 0x33, 0xDF, 0x77, 0x7A } } // Deprecated
-
-#define EFI_HASH_ALGORITHM_SHA512 \
-  { 0xCAA4381E, 0x750C, 0x4770, { 0xB8, 0x70, 0x7A, 0x23, 0xB4, 0xE4, 0x21, 0x30 } } // Deprecated
-
-#define EFI_HASH_ALGORITHM_MD5 \
-  { 0x0AF7C79C, 0x65B5, 0x4319, { 0xB0, 0xAE, 0x44, 0xEC, 0x48, 0x4E, 0x4A, 0xD7 } } // Deprecated
-
-#define EFI_HASH_ALGORITHM_SHA1_NOPAD \
-  { 0x24C5DC2F, 0x53E2, 0x40CA, { 0x9E, 0xD6, 0xA5, 0xD9, 0xA4, 0x9F, 0x46, 0x3B } }
-
-#define EFI_HASH_ALGORITHM_SHA256_NOPAD \
-  { 0x8628752A, 0x6CB7, 0x4814, { 0x96, 0xFC, 0x24, 0xA8, 0x15, 0xAC, 0x22, 0x26 } }
-
-
-INTERFACE_DECL(_EFI_HASH);
-
-typedef UINT8 EFI_MD5_HASH[16];
-typedef UINT8 EFI_SHA1_HASH[20];
-typedef UINT8 EFI_SHA224_HASH[28];
-typedef UINT8 EFI_SHA256_HASH[32];
-typedef UINT8 EFI_SHA384_HASH[48];
-typedef UINT8 EFI_SHA512_HASH[64];
-typedef union _EFI_HASH_OUTPUT {
-  EFI_MD5_HASH                    *Md5Hash;
-  EFI_SHA1_HASH                   *Sha1Hash;
-  EFI_SHA224_HASH                 *Sha224Hash;
-  EFI_SHA256_HASH                 *Sha256Hash;
-  EFI_SHA384_HASH                 *Sha384Hash;
-  EFI_SHA512_HASH                 *Sha512Hash;
-} EFI_HASH_OUTPUT;
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HASH_GET_HASH_SIZE) (
-  IN CONST struct _EFI_HASH       *This,
-  IN CONST EFI_GUID               *HashAlgorithm,
-  OUT UINTN                       *HashSize);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_HASH_HASH) (
-  IN CONST struct _EFI_HASH       *This,
-  IN CONST EFI_GUID               *HashAlgorithm,
-  IN BOOLEAN                      Extend,
-  IN CONST UINT8                  *Message,
-  IN UINT64                       MessageSize,
-  IN OUT EFI_HASH_OUTPUT          *Hash);
-
-typedef struct _EFI_HASH {
-  EFI_HASH_GET_HASH_SIZE                  GetHashSize;
-  EFI_HASH_HASH                           Hash;
-} EFI_HASH;
-
-
-typedef struct _EFI_UNICODE_COLLATION_INTERFACE {
-
-    // general
-    EFI_UNICODE_STRICOLL                StriColl;
-    EFI_UNICODE_METAIMATCH              MetaiMatch;
-    EFI_UNICODE_STRLWR                  StrLwr;
-    EFI_UNICODE_STRUPR                  StrUpr;
-
-    // for supporting fat volumes
-    EFI_UNICODE_FATTOSTR                FatToStr;
-    EFI_UNICODE_STRTOFAT                StrToFat;
-
-    CHAR8                               *SupportedLanguages;
-} EFI_UNICODE_COLLATION_INTERFACE;
-
-/* Graphics output protocol */
-#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \
-  { \
-    0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a } \
-  }
-
-typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;
-
-typedef struct {
-  UINT32            RedMask;
-  UINT32            GreenMask;
-  UINT32            BlueMask;
-  UINT32            ReservedMask;
-} EFI_PIXEL_BITMASK;
-
-typedef enum {
-  PixelRedGreenBlueReserved8BitPerColor,
-  PixelBlueGreenRedReserved8BitPerColor,
-  PixelBitMask,
-  PixelBltOnly,
-  PixelFormatMax
-} EFI_GRAPHICS_PIXEL_FORMAT;
-
-typedef struct {
-  UINT32                     Version;
-  UINT32                     HorizontalResolution;
-  UINT32                     VerticalResolution;
-  EFI_GRAPHICS_PIXEL_FORMAT  PixelFormat;
-  EFI_PIXEL_BITMASK          PixelInformation;
-  UINT32                     PixelsPerScanLine;
-} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;
-
-/**
-  Return the current video mode information.
-
-  @param  This       Protocol instance pointer.
-  @param  ModeNumber The mode number to return information on.
-  @param  SizeOfInfo A pointer to the size, in bytes, of the Info buffer.
-  @param  Info       A pointer to callee allocated buffer that returns information about ModeNumber.
-
-  @retval EFI_SUCCESS           Mode information returned.
-  @retval EFI_BUFFER_TOO_SMALL  The Info buffer was too small.
-  @retval EFI_DEVICE_ERROR      A hardware error occurred trying to retrieve the video mode.
-  @retval EFI_NOT_STARTED       Video display is not initialized. Call SetMode ()
-  @retval EFI_INVALID_PARAMETER One of the input args was NULL.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) (
-  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL          *This,
-  IN  UINT32                                ModeNumber,
-  OUT UINTN                                 *SizeOfInfo,
-  OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION  **Info
-  )
-;
-
-/**
-  Return the current video mode information.
-
-  @param  This              Protocol instance pointer.
-  @param  ModeNumber        The mode number to be set.
-
-  @retval EFI_SUCCESS       Graphics mode was changed.
-  @retval EFI_DEVICE_ERROR  The device had an error and could not complete the request.
-  @retval EFI_UNSUPPORTED   ModeNumber is not supported by this device.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) (
-  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
-  IN  UINT32                       ModeNumber
-  );
-
-typedef struct {
-  UINT8 Blue;
-  UINT8 Green;
-  UINT8 Red;
-  UINT8 Reserved;
-} EFI_GRAPHICS_OUTPUT_BLT_PIXEL;
-
-typedef union {
-  EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel;
-  UINT32                        Raw;
-} EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION;
-
-typedef enum {
-  EfiBltVideoFill,
-  EfiBltVideoToBltBuffer,
-  EfiBltBufferToVideo, 
-  EfiBltVideoToVideo,
-  EfiGraphicsOutputBltOperationMax
-} EFI_GRAPHICS_OUTPUT_BLT_OPERATION;
-
-/**
-  The following table defines actions for BltOperations:
-
-  <B>EfiBltVideoFill</B> - Write data from the  BltBuffer pixel (SourceX, SourceY) 
-  directly to every pixel of the video display rectangle 
-  (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). 
-  Only one pixel will be used from the BltBuffer. Delta is NOT used.
-
-  <B>EfiBltVideoToBltBuffer</B> - Read data from the video display rectangle 
-  (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in 
-  the BltBuffer rectangle (DestinationX, DestinationY ) 
-  (DestinationX + Width, DestinationY + Height). If DestinationX or 
-  DestinationY is not zero then Delta must be set to the length in bytes 
-  of a row in the BltBuffer.
-
-  <B>EfiBltBufferToVideo</B> - Write data from the  BltBuffer rectangle 
-  (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the 
-  video display rectangle (DestinationX, DestinationY) 
-  (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is 
-  not zero then Delta must be set to the length in bytes of a row in the 
-  BltBuffer.
-
-  <B>EfiBltVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)
-  (SourceX + Width, SourceY + Height) .to the video display rectangle 
-  (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). 
-  The BltBuffer and Delta  are not used in this mode.
-
-  @param  This         Protocol instance pointer.
-  @param  BltBuffer    Buffer containing data to blit into video buffer. This
-                       buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
-  @param  BltOperation Operation to perform on BlitBuffer and video memory
-  @param  SourceX      X coordinate of source for the BltBuffer.
-  @param  SourceY      Y coordinate of source for the BltBuffer.
-  @param  DestinationX X coordinate of destination for the BltBuffer.
-  @param  DestinationY Y coordinate of destination for the BltBuffer.
-  @param  Width        Width of rectangle in BltBuffer in pixels.
-  @param  Height       Hight of rectangle in BltBuffer in pixels.
-  @param  Delta        OPTIONAL
-
-  @retval EFI_SUCCESS           The Blt operation completed.
-  @retval EFI_INVALID_PARAMETER BltOperation is not valid.
-  @retval EFI_DEVICE_ERROR      A hardware error occured writting to the video buffer.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) (
-  IN  EFI_GRAPHICS_OUTPUT_PROTOCOL            *This,
-  IN  EFI_GRAPHICS_OUTPUT_BLT_PIXEL           *BltBuffer,   OPTIONAL
-  IN  EFI_GRAPHICS_OUTPUT_BLT_OPERATION       BltOperation,
-  IN  UINTN                                   SourceX,
-  IN  UINTN                                   SourceY,
-  IN  UINTN                                   DestinationX,
-  IN  UINTN                                   DestinationY,
-  IN  UINTN                                   Width,
-  IN  UINTN                                   Height,
-  IN  UINTN                                   Delta         OPTIONAL
-  );
-
-typedef struct {
-  UINT32                                 MaxMode;
-  UINT32                                 Mode;
-  EFI_GRAPHICS_OUTPUT_MODE_INFORMATION   *Info;
-  UINTN                                  SizeOfInfo;
-  EFI_PHYSICAL_ADDRESS                   FrameBufferBase;
-  UINTN                                  FrameBufferSize;
-} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
-
-struct _EFI_GRAPHICS_OUTPUT_PROTOCOL {
-  EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE  QueryMode;
-  EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE    SetMode;
-  EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT         Blt;
-  EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE        *Mode;
-};
-
-INTERFACE_DECL(_EFI_SERVICE_BINDING);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERVICE_BINDING_CREATE_CHILD) (
-    IN struct _EFI_SERVICE_BINDING *This,
-    IN EFI_HANDLE                  *ChildHandle
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SERVICE_BINDING_DESTROY_CHILD) (
-    IN struct _EFI_SERVICE_BINDING *This,
-    IN EFI_HANDLE                  ChildHandle
-    );
-
-typedef struct _EFI_SERVICE_BINDING {
-    EFI_SERVICE_BINDING_CREATE_CHILD  CreateChild;
-    EFI_SERVICE_BINDING_DESTROY_CHILD DestroyChild;
-} EFI_SERVICE_BINDING;
-
-//
-// Driver Binding Protocol
-//
-
-#define DRIVER_BINDING_PROTOCOL \
-    { 0x18A031AB, 0xB443, 0x4D1A, { 0xA5, 0xC0, 0x0C, 0x09, 0x26, 0x1E, 0x9F, 0x71} }
-
-INTERFACE_DECL(_EFI_DRIVER_BINDING);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DRIVER_SUPPORTED) (
-    IN struct _EFI_DRIVER_BINDING *This,
-    IN EFI_HANDLE                 ControllerHandle,
-    IN EFI_DEVICE_PATH            *RemainingDevicePath OPTIONAL);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DRIVER_START) (
-    IN struct _EFI_DRIVER_BINDING *This,
-    IN EFI_HANDLE                 ControllerHandle,
-    IN EFI_DEVICE_PATH            *RemainingDevicePath OPTIONAL);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_DRIVER_STOP) (
-    IN struct _EFI_DRIVER_BINDING *This,
-    IN EFI_HANDLE                 ControllerHandle,
-    IN UINTN                      NumberOfChildren,
-    IN EFI_HANDLE                 *ChildHandleBuffer OPTIONAL);
-
-typedef struct _EFI_DRIVER_BINDING {
-    EFI_DRIVER_SUPPORTED          Supported;
-    EFI_DRIVER_START              Start;
-    EFI_DRIVER_STOP               Stop;
-    UINT32                        Version;
-    EFI_HANDLE                    ImageHandle;
-    EFI_HANDLE                    DriverBindingHandle;
-} EFI_DRIVER_BINDING;
-
-//
-// Component Name Protocol
-// Deprecated - use Component Name 2 Protocol instead
-//
-
-#define COMPONENT_NAME_PROTOCOL \
-    {0x107A772C, 0xD5E1, 0x11D4, { 0x9A, 0x46, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
-
-INTERFACE_DECL(_EFI_COMPONENT_NAME);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) (
-  IN struct _EFI_COMPONENT_NAME   *This,
-  IN CHAR8                        *Language,
-  OUT CHAR16                      **DriverName);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) (
-  IN struct _EFI_COMPONENT_NAME   *This,
-  IN EFI_HANDLE                   ControllerHandle,
-  IN EFI_HANDLE                   ChildHandle OPTIONAL,
-  IN CHAR8                        *Language,
-  OUT CHAR16                      **ControllerName);
-
-typedef struct _EFI_COMPONENT_NAME {
-  EFI_COMPONENT_NAME_GET_DRIVER_NAME     GetDriverName;
-  EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;
-  CHAR8                                  *SupportedLanguages;
-} EFI_COMPONENT_NAME;
-
-//
-// Component Name 2 Protocol
-//
-
-#define COMPONENT_NAME2_PROTOCOL \
-    {0x6A7A5CFF, 0xE8D9, 0x4F70, { 0xBA, 0xDA, 0x75, 0xAB, 0x30, 0x25, 0xCE, 0x14} }
-
-INTERFACE_DECL(_EFI_COMPONENT_NAME2);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME) (
-  IN struct _EFI_COMPONENT_NAME2  *This,
-  IN CHAR8                        *Language,
-  OUT CHAR16                      **DriverName);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) (
-  IN struct _EFI_COMPONENT_NAME2  *This,
-  IN EFI_HANDLE                   ControllerHandle,
-  IN EFI_HANDLE                   ChildHandle OPTIONAL,
-  IN CHAR8                        *Language,
-  OUT CHAR16                      **ControllerName);
-
-typedef struct _EFI_COMPONENT_NAME2 {
-  EFI_COMPONENT_NAME2_GET_DRIVER_NAME     GetDriverName;
-  EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;
-  CHAR8                                   *SupportedLanguages;
-} EFI_COMPONENT_NAME2;
-
-
-//
-// Loaded Image Protocol
-//
-#define LOADED_IMAGE_PROTOCOL      \
-    { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
-
-typedef 
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_UNLOAD) (
-    IN EFI_HANDLE                   ImageHandle
-    );
-
-#define EFI_IMAGE_INFORMATION_REVISION      0x1000
-typedef struct {
-    UINT32                          Revision;
-    EFI_HANDLE                      ParentHandle;
-    struct _EFI_SYSTEM_TABLE        *SystemTable;
-
-    // Source location of image
-    EFI_HANDLE                      DeviceHandle;
-    EFI_DEVICE_PATH                 *FilePath;
-    VOID                            *Reserved;
-
-    // Images load options
-    UINT32                          LoadOptionsSize;
-    VOID                            *LoadOptions;
-
-    // Location of where image was loaded
-    VOID                            *ImageBase;
-    UINT64                          ImageSize;
-    EFI_MEMORY_TYPE                 ImageCodeType;
-    EFI_MEMORY_TYPE                 ImageDataType;
-
-    // If the driver image supports a dynamic unload request
-    EFI_IMAGE_UNLOAD                Unload;
-} EFI_LOADED_IMAGE;
-
-
-//
-// EFI_RNG_PROTOCOL
-//
-
-#define EFI_RNG_PROTOCOL_GUID                          \
-          { 0x3152bca5, 0xeade, 0x433d, {0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44} }
-
-typedef EFI_GUID EFI_RNG_ALGORITHM;
-
-#define EFI_RNG_ALGORITHM_SP800_90_HASH_256_GUID       \
-     {0xa7af67cb, 0x603b, 0x4d42, {0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96} }
-
-#define EFI_RNG_ALGORITHM_SP800_90_HMAC_256_GUID       \
-     {0xc5149b43, 0xae85, 0x4f53, {0x99, 0x82, 0xb9, 0x43, 0x35, 0xd3, 0xa9, 0xe7} }
-
-#define EFI_RNG_ALGORITHM_SP800_90_CTR_256_GUID        \
-     {0x44f0de6e, 0x4d8c, 0x4045, {0xa8, 0xc7, 0x4d, 0xd1, 0x68, 0x85, 0x6b, 0x9e} }
-
-#define EFI_RNG_ALGORITHM_X9_31_3DES_GUID              \
-     {0x63c4785a, 0xca34, 0x4012, {0xa3, 0xc8, 0x0b, 0x6a, 0x32, 0x4f, 0x55, 0x46} }
-
-#define EFI_RNG_ALGORITHM_X9_31_AES_GUID               \
-     {0xacd03321, 0x777e, 0x4d3d, {0xb1, 0xc8, 0x20, 0xcf, 0xd8, 0x88, 0x20, 0xc9} }
-
-#define EFI_RNG_ALGORITHM_RAW                          \
-     {0xe43176d7, 0xb6e8, 0x4827, {0xb7, 0x84, 0x7f, 0xfd, 0xc4, 0xb6, 0x85, 0x61} }
-
-INTERFACE_DECL(_EFI_RNG_PROTOCOL);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_RNG_GET_INFO) (
-IN struct _EFI_RNG_PROTOCOL   *This,
-IN OUT UINTN                  *RNGAlgorithmListSize,
-OUT EFI_RNG_ALGORITHM         *RNGAlgorithmList
-);
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_RNG_GET_RNG) (
-IN struct _EFI_RNG_PROTOCOL   *This,
-IN EFI_RNG_ALGORITHM          *RNGAlgorithm,           OPTIONAL
-IN UINTN                      RNGValueLength,
-OUT UINT8                     *RNGValue
-);
-
-typedef struct _EFI_RNG_PROTOCOL {
-     EFI_RNG_GET_INFO        GetInfo;
-     EFI_RNG_GET_RNG         GetRNG;
-} EFI_RNG_PROTOCOL;
-
-
-#endif
-
diff --git a/third_party/gnu-efi/inc/efipxebc.h b/third_party/gnu-efi/inc/efipxebc.h
deleted file mode 100644
index 932382a..0000000
--- a/third_party/gnu-efi/inc/efipxebc.h
+++ /dev/null
@@ -1,464 +0,0 @@
-#ifndef _EFIPXEBC_H
-#define _EFIPXEBC_H
-
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efipxebc.h
-
-Abstract:
-
-    EFI PXE Base Code Protocol
-
-
-
-Revision History
-
---*/
-
-//
-// PXE Base Code protocol
-//
-
-#define EFI_PXE_BASE_CODE_PROTOCOL \
-    { 0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
-
-INTERFACE_DECL(_EFI_PXE_BASE_CODE);
-
-#define DEFAULT_TTL 4
-#define DEFAULT_ToS 0
-//
-// Address definitions
-//
-
-typedef union {
-    UINT32      Addr[4];
-    EFI_IPv4_ADDRESS    v4;
-    EFI_IPv6_ADDRESS    v6;
-} EFI_IP_ADDRESS;
-
-typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT;
-
-//
-// Packet definitions
-//
-
-typedef struct {
-    UINT8                           BootpOpcode;
-    UINT8                           BootpHwType;
-    UINT8                           BootpHwAddrLen;
-    UINT8                           BootpGateHops;
-    UINT32                          BootpIdent;
-    UINT16                          BootpSeconds;
-    UINT16                          BootpFlags;
-    UINT8                           BootpCiAddr[4];
-    UINT8                           BootpYiAddr[4];
-    UINT8                           BootpSiAddr[4];
-    UINT8                           BootpGiAddr[4];
-    UINT8                           BootpHwAddr[16];
-    UINT8                           BootpSrvName[64];
-    UINT8                           BootpBootFile[128];
-    UINT32                          DhcpMagik;
-    UINT8                           DhcpOptions[56];
-} EFI_PXE_BASE_CODE_DHCPV4_PACKET;
-
-typedef struct {
-    UINT32                          MessageType:8;
-    UINT32                          TransactionId:24;
-    UINT8                           DhcpOptions[1024];
-} EFI_PXE_BASE_CODE_DHCPV6_PACKET;
-
-typedef union {
-    UINT8                               Raw[1472];
-    EFI_PXE_BASE_CODE_DHCPV4_PACKET     Dhcpv4;
-    EFI_PXE_BASE_CODE_DHCPV6_PACKET     Dhcpv6;
-} EFI_PXE_BASE_CODE_PACKET;
-
-typedef struct {
-    UINT8                   Type;
-    UINT8                   Code;
-    UINT16                  Checksum;
-    union {
-        UINT32              reserved;
-        UINT32              Mtu;
-        UINT32              Pointer;
-        struct {
-            UINT16          Identifier;
-            UINT16          Sequence;
-        } Echo;
-    } u;
-    UINT8                   Data[494];
-} EFI_PXE_BASE_CODE_ICMP_ERROR;
-
-typedef struct {
-    UINT8                   ErrorCode;
-    CHAR8                   ErrorString[127];
-} EFI_PXE_BASE_CODE_TFTP_ERROR;
-
-//
-// IP Receive Filter definitions
-//
-#define EFI_PXE_BASE_CODE_MAX_IPCNT             8
-typedef struct {
-    UINT8                       Filters;
-    UINT8                       IpCnt;
-    UINT16                      reserved;
-    EFI_IP_ADDRESS              IpList[EFI_PXE_BASE_CODE_MAX_IPCNT];
-} EFI_PXE_BASE_CODE_IP_FILTER;
-
-#define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP             0x0001
-#define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST              0x0002
-#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS            0x0004
-#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST  0x0008
-
-//
-// ARP Cache definitions
-//
-
-typedef struct {
-    EFI_IP_ADDRESS       IpAddr;
-    EFI_MAC_ADDRESS      MacAddr;
-} EFI_PXE_BASE_CODE_ARP_ENTRY;
-
-typedef struct {
-    EFI_IP_ADDRESS       IpAddr;
-    EFI_IP_ADDRESS       SubnetMask;
-    EFI_IP_ADDRESS       GwAddr;
-} EFI_PXE_BASE_CODE_ROUTE_ENTRY;
-
-//
-// UDP definitions
-//
-
-#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP    0x0001
-#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT  0x0002
-#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP   0x0004
-#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008
-#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER    0x0010
-#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT  0x0020
-
-//
-// Discover() definitions
-//
-
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP           0   
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS        1
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_INTEL_LCM           2
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_DOSUNDI             3
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_NEC_ESMPRO          4
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_WSoD            5
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_IBM_LCCM            6
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_CA_UNICENTER_TNG    7
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_HP_OPENVIEW         8
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_9           9
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_10          10
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_ALTIRIS_11          11
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_NOT_USED_12         12
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_INSTALL      13
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_BOOT         14
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_REMBO               15
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_BEOBOOT             16
-//
-// 17 through 32767 are reserved
-// 32768 through 65279 are for vendor use
-// 65280 through 65534 are reserved
-//
-#define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST             65535
-
-#define EFI_PXE_BASE_CODE_BOOT_LAYER_MASK               0x7FFF
-#define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL            0x0000
-
-
-typedef struct {
-    UINT16                      Type;
-    BOOLEAN                     AcceptAnyResponse;
-    UINT8                       Reserved;
-    EFI_IP_ADDRESS              IpAddr;
-} EFI_PXE_BASE_CODE_SRVLIST;
-
-typedef struct {
-    BOOLEAN                     UseMCast;
-    BOOLEAN                     UseBCast;
-    BOOLEAN                     UseUCast;
-    BOOLEAN                     MustUseList;
-    EFI_IP_ADDRESS              ServerMCastIp;
-    UINT16                      IpCnt;
-    EFI_PXE_BASE_CODE_SRVLIST   SrvList[1];
-} EFI_PXE_BASE_CODE_DISCOVER_INFO;
-
-//
-// Mtftp() definitions
-//
-
-typedef enum {
-    EFI_PXE_BASE_CODE_TFTP_FIRST,
-    EFI_PXE_BASE_CODE_TFTP_GET_FILE_SIZE,
-    EFI_PXE_BASE_CODE_TFTP_READ_FILE,
-    EFI_PXE_BASE_CODE_TFTP_WRITE_FILE,
-    EFI_PXE_BASE_CODE_TFTP_READ_DIRECTORY,
-    EFI_PXE_BASE_CODE_MTFTP_GET_FILE_SIZE,
-    EFI_PXE_BASE_CODE_MTFTP_READ_FILE,
-    EFI_PXE_BASE_CODE_MTFTP_READ_DIRECTORY,
-    EFI_PXE_BASE_CODE_MTFTP_LAST
-} EFI_PXE_BASE_CODE_TFTP_OPCODE;
-
-typedef struct {
-    EFI_IP_ADDRESS   MCastIp;
-    EFI_PXE_BASE_CODE_UDP_PORT  CPort;
-    EFI_PXE_BASE_CODE_UDP_PORT  SPort;
-    UINT16                      ListenTimeout;
-    UINT16                      TransmitTimeout;
-} EFI_PXE_BASE_CODE_MTFTP_INFO;
-
-//
-// PXE Base Code Mode structure
-//
-
-#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES       8
-#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES     8
-
-typedef struct {
-    BOOLEAN                         Started;
-    BOOLEAN                         Ipv6Available;
-    BOOLEAN                         Ipv6Supported;
-    BOOLEAN                         UsingIpv6;
-    BOOLEAN                         BisSupported;
-    BOOLEAN                         BisDetected;
-    BOOLEAN                         AutoArp;
-    BOOLEAN                         SendGUID;
-    BOOLEAN                         DhcpDiscoverValid;
-    BOOLEAN                         DhcpAckReceived;
-    BOOLEAN                         ProxyOfferReceived;
-    BOOLEAN                         PxeDiscoverValid;
-    BOOLEAN                         PxeReplyReceived;
-    BOOLEAN                         PxeBisReplyReceived;
-    BOOLEAN                         IcmpErrorReceived;
-    BOOLEAN                         TftpErrorReceived;
-    BOOLEAN                         MakeCallbacks;
-    UINT8                           TTL;
-    UINT8                           ToS;
-    EFI_IP_ADDRESS                  StationIp;
-    EFI_IP_ADDRESS                  SubnetMask;
-    EFI_PXE_BASE_CODE_PACKET        DhcpDiscover;
-    EFI_PXE_BASE_CODE_PACKET        DhcpAck;
-    EFI_PXE_BASE_CODE_PACKET        ProxyOffer;
-    EFI_PXE_BASE_CODE_PACKET        PxeDiscover;
-    EFI_PXE_BASE_CODE_PACKET        PxeReply;
-    EFI_PXE_BASE_CODE_PACKET        PxeBisReply;
-    EFI_PXE_BASE_CODE_IP_FILTER     IpFilter;
-    UINT32                          ArpCacheEntries;
-    EFI_PXE_BASE_CODE_ARP_ENTRY     ArpCache[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES];
-    UINT32                          RouteTableEntries;
-    EFI_PXE_BASE_CODE_ROUTE_ENTRY   RouteTable[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES];
-    EFI_PXE_BASE_CODE_ICMP_ERROR    IcmpError;
-    EFI_PXE_BASE_CODE_TFTP_ERROR    TftpError;
-} EFI_PXE_BASE_CODE_MODE;
-
-//
-// PXE Base Code Interface Function definitions
-//
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_START) (
-    IN struct _EFI_PXE_BASE_CODE    *This,
-    IN BOOLEAN                      UseIpv6
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_STOP) (
-    IN struct _EFI_PXE_BASE_CODE    *This
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_DHCP) (
-    IN struct _EFI_PXE_BASE_CODE    *This,
-    IN BOOLEAN                      SortOffers
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_DISCOVER) (
-    IN struct _EFI_PXE_BASE_CODE            *This,
-    IN UINT16                               Type,
-    IN UINT16                               *Layer,
-    IN BOOLEAN                              UseBis,
-    IN OUT EFI_PXE_BASE_CODE_DISCOVER_INFO  *Info   OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_MTFTP) (
-    IN struct _EFI_PXE_BASE_CODE        *This,
-    IN EFI_PXE_BASE_CODE_TFTP_OPCODE    Operation,
-    IN OUT VOID                         *BufferPtr  OPTIONAL,
-    IN BOOLEAN                          Overwrite,
-    IN OUT UINT64                       *BufferSize,
-    IN UINTN                            *BlockSize  OPTIONAL,
-    IN EFI_IP_ADDRESS                   *ServerIp,
-    IN UINT8                            *Filename,
-    IN EFI_PXE_BASE_CODE_MTFTP_INFO     *Info       OPTIONAL,
-    IN BOOLEAN                          DontUseBuffer
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_UDP_WRITE) (
-    IN struct _EFI_PXE_BASE_CODE        *This,
-    IN UINT16                           OpFlags,
-    IN EFI_IP_ADDRESS                   *DestIp,
-    IN EFI_PXE_BASE_CODE_UDP_PORT       *DestPort,
-    IN EFI_IP_ADDRESS                   *GatewayIp,  OPTIONAL
-    IN EFI_IP_ADDRESS                   *SrcIp,      OPTIONAL
-    IN OUT EFI_PXE_BASE_CODE_UDP_PORT   *SrcPort,    OPTIONAL
-    IN UINTN                            *HeaderSize, OPTIONAL
-    IN VOID                             *HeaderPtr,  OPTIONAL
-    IN UINTN                            *BufferSize,
-    IN VOID                             *BufferPtr
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_UDP_READ) (
-    IN struct _EFI_PXE_BASE_CODE        *This,
-    IN UINT16                           OpFlags,
-    IN OUT EFI_IP_ADDRESS               *DestIp,      OPTIONAL
-    IN OUT EFI_PXE_BASE_CODE_UDP_PORT   *DestPort,    OPTIONAL
-    IN OUT EFI_IP_ADDRESS               *SrcIp,       OPTIONAL
-    IN OUT EFI_PXE_BASE_CODE_UDP_PORT   *SrcPort,     OPTIONAL
-    IN UINTN                            *HeaderSize,  OPTIONAL
-    IN VOID                             *HeaderPtr,   OPTIONAL
-    IN OUT UINTN                        *BufferSize,
-    IN VOID                             *BufferPtr
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_SET_IP_FILTER) (
-    IN struct _EFI_PXE_BASE_CODE    *This,
-    IN EFI_PXE_BASE_CODE_IP_FILTER  *NewFilter
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_ARP) (
-    IN struct _EFI_PXE_BASE_CODE    *This,
-    IN EFI_IP_ADDRESS               *IpAddr,      
-    IN EFI_MAC_ADDRESS              *MacAddr      OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_SET_PARAMETERS) (
-    IN struct _EFI_PXE_BASE_CODE    *This,
-    IN BOOLEAN                      *NewAutoArp,    OPTIONAL
-    IN BOOLEAN                      *NewSendGUID,   OPTIONAL
-    IN UINT8                        *NewTTL,        OPTIONAL
-    IN UINT8                        *NewToS,        OPTIONAL
-    IN BOOLEAN                      *NewMakeCallback    OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_SET_STATION_IP) (
-    IN struct _EFI_PXE_BASE_CODE    *This,
-    IN EFI_IP_ADDRESS               *NewStationIp,  OPTIONAL
-    IN EFI_IP_ADDRESS               *NewSubnetMask  OPTIONAL
-    );
-
-typedef
-EFI_STATUS
-(EFIAPI *EFI_PXE_BASE_CODE_SET_PACKETS) (
-    IN struct _EFI_PXE_BASE_CODE    *This,
-    BOOLEAN                         *NewDhcpDiscoverValid,  OPTIONAL
-    BOOLEAN                         *NewDhcpAckReceived,    OPTIONAL
-    BOOLEAN                         *NewProxyOfferReceived, OPTIONAL
-    BOOLEAN                         *NewPxeDiscoverValid,   OPTIONAL
-    BOOLEAN                         *NewPxeReplyReceived,   OPTIONAL
-    BOOLEAN                         *NewPxeBisReplyReceived,OPTIONAL
-    IN EFI_PXE_BASE_CODE_PACKET     *NewDhcpDiscover, OPTIONAL
-    IN EFI_PXE_BASE_CODE_PACKET     *NewDhcpAck,      OPTIONAL
-    IN EFI_PXE_BASE_CODE_PACKET     *NewProxyOffer,   OPTIONAL
-    IN EFI_PXE_BASE_CODE_PACKET     *NewPxeDiscover,  OPTIONAL
-    IN EFI_PXE_BASE_CODE_PACKET     *NewPxeReply,     OPTIONAL
-    IN EFI_PXE_BASE_CODE_PACKET     *NewPxeBisReply   OPTIONAL
-    );
-
-//
-// PXE Base Code Protocol structure
-//
-
-#define EFI_PXE_BASE_CODE_INTERFACE_REVISION    0x00010000
-
-typedef struct _EFI_PXE_BASE_CODE {
-    UINT64                              Revision;
-    EFI_PXE_BASE_CODE_START             Start;
-    EFI_PXE_BASE_CODE_STOP              Stop;
-    EFI_PXE_BASE_CODE_DHCP              Dhcp;
-    EFI_PXE_BASE_CODE_DISCOVER          Discover;
-    EFI_PXE_BASE_CODE_MTFTP             Mtftp;
-    EFI_PXE_BASE_CODE_UDP_WRITE         UdpWrite;
-    EFI_PXE_BASE_CODE_UDP_READ          UdpRead;
-    EFI_PXE_BASE_CODE_SET_IP_FILTER     SetIpFilter;
-    EFI_PXE_BASE_CODE_ARP               Arp;
-    EFI_PXE_BASE_CODE_SET_PARAMETERS    SetParameters;
-    EFI_PXE_BASE_CODE_SET_STATION_IP    SetStationIp;
-    EFI_PXE_BASE_CODE_SET_PACKETS       SetPackets;
-    EFI_PXE_BASE_CODE_MODE              *Mode;
-} EFI_PXE_BASE_CODE;
-
-//
-// Call Back Definitions
-//
-
-#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL \
-    { 0x245dca21, 0xfb7b, 0x11d3, {0x8f, 0x01, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
-
-//
-// Revision Number
-//
-
-#define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION   0x00010000
-
-INTERFACE_DECL(_EFI_PXE_BASE_CODE_CALLBACK);
-
-typedef enum {
-    EFI_PXE_BASE_CODE_FUNCTION_FIRST,
-    EFI_PXE_BASE_CODE_FUNCTION_DHCP,
-    EFI_PXE_BASE_CODE_FUNCTION_DISCOVER,
-    EFI_PXE_BASE_CODE_FUNCTION_MTFTP,
-    EFI_PXE_BASE_CODE_FUNCTION_UDP_WRITE,
-    EFI_PXE_BASE_CODE_FUNCTION_UDP_READ,
-    EFI_PXE_BASE_CODE_FUNCTION_ARP,
-    EFI_PXE_BASE_CODE_FUNCTION_IGMP,
-    EFI_PXE_BASE_CODE_PXE_FUNCTION_LAST
-} EFI_PXE_BASE_CODE_FUNCTION;
-
-typedef enum {
-    EFI_PXE_BASE_CODE_CALLBACK_STATUS_FIRST,
-    EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE,
-    EFI_PXE_BASE_CODE_CALLBACK_STATUS_ABORT,
-    EFI_PXE_BASE_CODE_CALLBACK_STATUS_LAST
-} EFI_PXE_BASE_CODE_CALLBACK_STATUS;
-
-typedef
-EFI_PXE_BASE_CODE_CALLBACK_STATUS 
-(EFIAPI *EFI_PXE_CALLBACK) (
-    IN struct _EFI_PXE_BASE_CODE_CALLBACK   *This,
-    IN EFI_PXE_BASE_CODE_FUNCTION           Function,
-    IN BOOLEAN                              Received,
-    IN UINT32                               PacketLen,
-    IN EFI_PXE_BASE_CODE_PACKET             *Packet     OPTIONAL
-    );
-
-typedef struct _EFI_PXE_BASE_CODE_CALLBACK {
-    UINT64                      Revision;
-    EFI_PXE_CALLBACK            Callback;
-} EFI_PXE_BASE_CODE_CALLBACK;
-
-#endif /* _EFIPXEBC_H */
diff --git a/third_party/gnu-efi/inc/efirtlib.h b/third_party/gnu-efi/inc/efirtlib.h
deleted file mode 100644
index c073ead..0000000
--- a/third_party/gnu-efi/inc/efirtlib.h
+++ /dev/null
@@ -1,141 +0,0 @@
-#ifndef _EFI_RT_LIB_INCLUDE_
-#define _EFI_RT_LIB_INCLUDE_
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    efilib.h
-
-Abstract:
-
-    EFI Runtime library functions
-
-
-
-Revision History
-
---*/
-
-#include "efidebug.h"
-#include "efipart.h"
-#include "efilibplat.h"
-
-
-VOID
-RUNTIMEFUNCTION
-RtZeroMem (
-    IN VOID     *Buffer,
-    IN UINTN     Size
-    );
-
-VOID
-RUNTIMEFUNCTION
-RtSetMem (
-    IN VOID     *Buffer,
-    IN UINTN    Size,
-    IN UINT8    Value    
-    );
-
-VOID
-RUNTIMEFUNCTION
-RtCopyMem (
-    IN VOID     *Dest,
-    IN CONST VOID     *Src,
-    IN UINTN    len
-    );
-
-INTN
-RUNTIMEFUNCTION
-RtCompareMem (
-    IN CONST VOID     *Dest,
-    IN CONST VOID     *Src,
-    IN UINTN    len
-    );
-
-INTN
-RUNTIMEFUNCTION
-RtStrCmp (
-    IN CONST CHAR16   *s1,
-    IN CONST CHAR16   *s2
-    );
-
-
-VOID
-RUNTIMEFUNCTION
-RtStrCpy (
-    IN CHAR16   *Dest,
-    IN CONST CHAR16    *Src
-    );
-
-VOID
-RUNTIMEFUNCTION
-RtStrCat (
-    IN CHAR16   *Dest,
-    IN CONST CHAR16   *Src
-    );
-
-UINTN
-RUNTIMEFUNCTION
-RtStrLen (
-    IN CONST CHAR16   *s1
-    );
-
-UINTN
-RUNTIMEFUNCTION
-RtStrSize (
-    IN CONST CHAR16   *s1
-    );
-
-INTN
-RUNTIMEFUNCTION
-RtCompareGuid (
-    IN EFI_GUID     *Guid1,
-    IN EFI_GUID     *Guid2
-    );
-
-UINT8
-RUNTIMEFUNCTION
-RtDecimaltoBCD(
-    IN  UINT8 BcdValue
-    );
-
-UINT8
-RUNTIMEFUNCTION
-RtBCDtoDecimal(
-    IN  UINT8 BcdValue
-    );
-
-//
-// Virtual mapping transition support.  (Only used during
-// the virtual address change transisition)
-//
-
-VOID