summaryrefslogtreecommitdiff
path: root/gnu-efi/inc
diff options
context:
space:
mode:
Diffstat (limited to 'gnu-efi/inc')
-rw-r--r--gnu-efi/inc/efiapi.h72
-rw-r--r--gnu-efi/inc/efierr.h5
-rw-r--r--gnu-efi/inc/efilib.h6
-rw-r--r--gnu-efi/inc/efiprot.h63
4 files changed, 145 insertions, 1 deletions
diff --git a/gnu-efi/inc/efiapi.h b/gnu-efi/inc/efiapi.h
index 96e9e4a0..9d399a28 100644
--- a/gnu-efi/inc/efiapi.h
+++ b/gnu-efi/inc/efiapi.h
@@ -971,5 +971,75 @@ typedef struct _EFI_SYSTEM_TABLE {
} EFI_SYSTEM_TABLE;
-#endif
+//
+// Not technically EFI, but oh well.
+//
+
+#define EFI_DXE_SERVICES_TABLE_SIGNATURE 0x565245535f455844ULL
+
+typedef enum {
+ EFI_GCD_MEMORY_TYPE_NON_EXISTENT,
+ EFI_GCD_MEMORY_TYPE_RESERVED,
+ EFI_GCD_MEMORY_TYPE_SYSTEM_MEMORY,
+ EFI_GCD_MEMORY_TYPE_MEMORY_MAPPED_IO,
+ EFI_GCD_MEMORY_TYPE_PERSISTENT,
+ EFI_GCD_MEMORY_TYPE_MORE_RELIABLE,
+ EFI_GCD_MEMORY_TYPE_MAXIMUM
+} EFI_GCD_MEMORY_TYPE_T;
+
+#define DXE_SERVICES_TABLE_GUID \
+ { \
+ 0x5ad34ba, 0x6f02, 0x4214, {0x95, 0x2e, 0x4d, 0xa0, 0x39, 0x8e, 0x2b, 0xb9 } \
+ }
+
+struct _EFI_GCD_MEMORY_SPACE_DESCRIPTOR {
+ EFI_PHYSICAL_ADDRESS BaseAddress;
+ UINT64 Length;
+ UINT64 Capabilities;
+ UINT64 Attributes;
+ EFI_GCD_MEMORY_TYPE_T GcdMemoryType;
+ EFI_HANDLE ImageHandle;
+ EFI_HANDLE DeviceHandle;
+} __attribute__((__packed__));
+
+typedef struct _EFI_GCD_MEMORY_SPACE_DESCRIPTOR EFI_GCD_MEMORY_SPACE_DESCRIPTOR;
+
+typedef
+EFI_STATUS
+(EFIAPI *GET_MEMORY_SPACE_DESCRIPTOR) (
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,
+ OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Desc
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *SET_MEMORY_SPACE_ATTRIBUTES) (
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,
+ IN UINT64 Length,
+ IN UINT64 Attributes
+ );
+
+typedef struct _EFI_DXE_SERVICES_TABLE {
+ EFI_TABLE_HEADER Hdr;
+ VOID *AddMemorySpace;
+ VOID *AllocateMemorySpace;
+ VOID *FreeMemorySpace;
+ VOID *RemoveMemorySpace;
+ GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor;
+ SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes;
+ VOID *GetMemorySpaceMap;
+ VOID *AddIoSpace;
+ VOID *AllocateIoSpace;
+ VOID *FreeIoSpace;
+ VOID *RemoveIoSpace;
+ VOID *GetIoSpaceDescriptor;
+ VOID *GetIoSpaceMap;
+ VOID *Dispatch;
+ VOID *Schedule;
+ VOID *Trust;
+ VOID *ProcessFirmwareVolume;
+ VOID *SetMemorySpaceCapabilities;
+} EFI_DXE_SERVICES_TABLE;
+
+#endif
diff --git a/gnu-efi/inc/efierr.h b/gnu-efi/inc/efierr.h
index 5a66e1a0..ac9ef7ba 100644
--- a/gnu-efi/inc/efierr.h
+++ b/gnu-efi/inc/efierr.h
@@ -57,12 +57,17 @@ Revision History
#define EFI_END_OF_FILE EFIERR(31)
#define EFI_INVALID_LANGUAGE EFIERR(32)
#define EFI_COMPROMISED_DATA EFIERR(33)
+#define EFI_IP_ADDRESS_CONFLICT EFIERR(34)
+#define EFI_HTTP_ERROR EFIERR(35)
#define EFI_WARN_UNKOWN_GLYPH EFIWARN(1)
#define EFI_WARN_UNKNOWN_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)
+#define EFI_WARN_STALE_DATA EFIWARN(5)
+#define EFI_WARN_FILE_SYSTEM EFIWARN(6)
+#define EFI_WARN_RESET_REQUIRED EFIWARN(7)
#endif
diff --git a/gnu-efi/inc/efilib.h b/gnu-efi/inc/efilib.h
index af470191..a8316661 100644
--- a/gnu-efi/inc/efilib.h
+++ b/gnu-efi/inc/efilib.h
@@ -79,10 +79,16 @@ extern EFI_GUID gEfiDiskIoProtocolGuid;
#define DiskIoProtocol gEfiDiskIoProtocolGuid
extern EFI_GUID gEfiDiskIo2ProtocolGuid;
#define DiskIo2Protocol gEfiDiskIo2ProtocolGuid
+extern EFI_GUID gEfiDxeServicesTableGuid;
+#define DxeServicesTable gEfiDxeServicesTableGuid
extern EFI_GUID gEfiSimpleFileSystemProtocolGuid;
#define FileSystemProtocol gEfiSimpleFileSystemProtocolGuid
+extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid;
+#define LoadedImageDevicePathProtocol gEfiLoadedImageDevicePathProtocolGuid
extern EFI_GUID gEfiLoadFileProtocolGuid;
#define LoadFileProtocol gEfiLoadFileProtocolGuid
+extern EFI_GUID gEfiLoadFile2ProtocolGuid;
+#define LoadFile2Protocol gEfiLoadFile2ProtocolGuid
extern EFI_GUID gEfiDeviceIoProtocolGuid;
#define DeviceIoProtocol gEfiDeviceIoProtocolGuid
extern EFI_GUID VariableStoreProtocol;
diff --git a/gnu-efi/inc/efiprot.h b/gnu-efi/inc/efiprot.h
index 4013ab25..db291579 100644
--- a/gnu-efi/inc/efiprot.h
+++ b/gnu-efi/inc/efiprot.h
@@ -554,6 +554,69 @@ typedef struct _EFI_LOAD_FILE_PROTOCOL {
typedef struct _EFI_LOAD_FILE_PROTOCOL _EFI_LOAD_FILE_INTERFACE;
typedef EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_INTERFACE;
+
+//
+// Load File 2 Protocol
+//
+
+#define EFI_LOAD_FILE2_PROTOCOL_GUID \
+ { \
+ 0x4006c0c1, 0xfcb3, 0x403e, {0x99, 0x6d, 0x4a, 0x6c, 0x87, 0x24, 0xe0, 0x6d } \
+ }
+
+///
+/// Protocol Guid defined by UEFI2.1.
+///
+#define LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL_GUID
+
+typedef struct _EFI_LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL;
+
+/**
+ Causes the driver to load a specified file.
+
+ @param This Protocol instance pointer.
+ @param FilePath The device specific path of the file to load.
+ @param BootPolicy Should always be FALSE.
+ @param BufferSize On input the size of Buffer in bytes. On output with a return
+ code of EFI_SUCCESS, the amount of data transferred to
+ Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL,
+ the size of Buffer required to retrieve the requested file.
+ @param Buffer The memory buffer to transfer the file to. IF Buffer is NULL,
+ then no the size of the requested file is returned in
+ BufferSize.
+
+ @retval EFI_SUCCESS The file was loaded.
+ @retval EFI_UNSUPPORTED BootPolicy is TRUE.
+ @retval EFI_INVALID_PARAMETER FilePath is not a valid device path, or
+ BufferSize is NULL.
+ @retval EFI_NO_MEDIA No medium was present to load the file.
+ @retval EFI_DEVICE_ERROR The file was not loaded due to a device error.
+ @retval EFI_NO_RESPONSE The remote system did not respond.
+ @retval EFI_NOT_FOUND The file was not found
+ @retval EFI_ABORTED The file load process was manually canceled.
+ @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the current
+ directory entry. BufferSize has been updated with
+ the size needed to complete the request.
+
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_LOAD_FILE2)(
+ IN EFI_LOAD_FILE2_PROTOCOL *This,
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
+ IN BOOLEAN BootPolicy,
+ IN OUT UINTN *BufferSize,
+ IN VOID *Buffer OPTIONAL
+ );
+
+///
+/// The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices.
+///
+struct _EFI_LOAD_FILE2_PROTOCOL {
+ EFI_LOAD_FILE2 LoadFile;
+};
+
//
// Device IO protocol
//