diff --git a/gnu-efi-3.0e-add-uefi-2.x-boot-services.patch b/gnu-efi-3.0e-add-uefi-2.x-boot-services.patch new file mode 100644 index 0000000..1e18ddc --- /dev/null +++ b/gnu-efi-3.0e-add-uefi-2.x-boot-services.patch @@ -0,0 +1,211 @@ +From 896d31cb20f831c28edba7d96413900a3ac8fde3 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Fri, 23 Jul 2010 16:07:13 -0400 +Subject: [PATCH] Add the UEFI 2.x bits for EFI_BOOT_SERVICES + +--- + inc/efiapi.h | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 files changed, 168 insertions(+), 6 deletions(-) + +diff --git a/inc/efiapi.h b/inc/efiapi.h +index 888e052..812d8b4 100644 +--- a/inc/efiapi.h ++++ b/inc/efiapi.h +@@ -412,6 +412,140 @@ EFI_STATUS + 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 ++ ); ++ ++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, +@@ -491,12 +625,6 @@ EFI_STATUS + OUT VOID **Registration + ); + +-typedef enum { +- AllHandles, +- ByRegisterNotify, +- ByProtocol +-} EFI_LOCATE_SEARCH_TYPE; +- + typedef + EFI_STATUS + (EFIAPI *EFI_LOCATE_HANDLE) ( +@@ -655,6 +783,40 @@ typedef struct _EFI_BOOT_SERVICES { + 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; + + +-- +1.7.1.1 + diff --git a/gnu-efi-3.0e-no-relocations.patch b/gnu-efi-3.0e-no-relocations.patch index 06f6a35..4e1be41 100644 --- a/gnu-efi-3.0e-no-relocations.patch +++ b/gnu-efi-3.0e-no-relocations.patch @@ -1,17 +1,8 @@ -diff --git a/apps/.t2.c.swp b/apps/.t2.c.swp -deleted file mode 100644 -index 4c0e28e..0000000 -Binary files a/apps/.t2.c.swp and /dev/null differ -diff --git a/apps/.t3.c.swp b/apps/.t3.c.swp -deleted file mode 100644 -index 68e3246..0000000 -Binary files a/apps/.t3.c.swp and /dev/null differ -diff --git a/apps/t2.efi b/apps/t2.efi -index f7ec910..f2742ed 100755 -Binary files a/apps/t2.efi and b/apps/t2.efi differ -diff --git a/gnuefi/libgnuefi.a b/gnuefi/libgnuefi.a -index 297b765..1fdc201 100644 -Binary files a/gnuefi/libgnuefi.a and b/gnuefi/libgnuefi.a differ +From 364351b4448ff20730250e89ad09088d6aeafc72 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Fri, 3 Oct 2008 14:40:56 -0400 +Subject: [PATCH] Fix the case where there are no relocations. + diff --git a/gnuefi/reloc_ia32.c b/gnuefi/reloc_ia32.c index 9bf4a8d..0b461cf 100644 --- a/gnuefi/reloc_ia32.c diff --git a/gnu-efi.spec b/gnu-efi.spec index f0b121f..baee804 100644 --- a/gnu-efi.spec +++ b/gnu-efi.spec @@ -1,7 +1,7 @@ Summary: Development Libraries and headers for EFI Name: gnu-efi Version: 3.0e -Release: 9%{?dist} +Release: 10%{?dist} Group: Development/System License: GPLv2+ URL: ftp://ftp.hpl.hp.com/pub/linux-ia64 @@ -9,11 +9,16 @@ Source: ftp://ftp.hpl.hp.com/pub/linux-ia64/gnu-efi-%{version}.tar.bz2 Patch0: gnu-efi-3.0e-no-relocations.patch Patch1: gnu-efi-3.0e-Fix-usage-of-INSTALLROOT-PREFIX-and-LIBDIR.patch Patch2: gnu-efi-3.0e-ignore-gnu-stack -Patch3: gnu-efi-3.0d-unwrap.patch -Patch4: gnu-efi-3.0d-uefi_wrap.patch -Patch5: gnu-efi-3.0d-uefi_wrap_call10.patch +Patch3: gnu-efi-3.0e-add-uefi-2.x-boot-services.patch +# these are currently disabled as we don't need them per se, and they +# haven't gone upstream yet either. Also they haven't been updated +# to work with gnu-efi-3.0e yet. +#Patch4: gnu-efi-3.0d-unwrap.patch +#Patch5: gnu-efi-3.0d-uefi_wrap.patch +#Patch6: gnu-efi-3.0d-uefi_wrap_call10.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExclusiveArch: i686 x86_64 ia64 +BuildRequires: git %define debug_package %{nil} @@ -23,15 +28,12 @@ applications that run under EFI (Extensible Firmware Interface). %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -# these are currently disabled as we don't need them per se, and they -# haven't gone upstream yet either. Also #2 and #3 haven't been updated -# to work with gnu-efi-3.0e yet. -#%%patch3 -p1 -#%%patch4 -p1 -#%%patch5 -p1 +git init +git config user.email "pjones@fedoraproject.org" +git config user.name "Fedora Ninjas" +git add . +git commit -a -q -m "%{version} baseline." +git am %{patches} %build # Package cannot build with %{?_smp_mflags}. @@ -59,6 +61,9 @@ rm -rf %{buildroot} %{_libdir}/* %changelog +* Fri Jul 23 2010 Peter Jones - 3.0e-10 +- Add UEFI 2.x boot services. + * Tue Aug 11 2009 Peter Jones - 3.0e-9 - Change ExclusiveArch to reflect arch changes in repos.