summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorNigel Croxon <nigel.croxon@hpe.com>2016-03-17 09:50:15 -0400
committerNigel Croxon <nigel.croxon@hpe.com>2016-03-17 09:50:15 -0400
commit3b31a5e394081d1fc8b5d17008d25910bc4e8f49 (patch)
tree9843f8efe76a90daa2b6d6a82507f43975b9a7fc /inc
parent8c29617e0bfe1675bdaf49d6708672f61faed29a (diff)
downloadgnu-efi-3b31a5e394081d1fc8b5d17008d25910bc4e8f49.tar.gz
Moved LOADED_IMAGE_PROTOCOL definitions into efiprot.h,
with other protocol definitions. Signed-off-by: Nathan Blythe <nblythe@lgsinnovations.com> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
Diffstat (limited to 'inc')
-rw-r--r--inc/efiapi.h10
-rw-r--r--inc/efilib.h1
-rw-r--r--inc/efiprot.h39
3 files changed, 42 insertions, 8 deletions
diff --git a/inc/efiapi.h b/inc/efiapi.h
index 14cd939..f62d185 100644
--- a/inc/efiapi.h
+++ b/inc/efiapi.h
@@ -351,15 +351,9 @@ EFI_STATUS
IN CHAR16 *ExitData OPTIONAL
);
-typedef
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_UNLOAD) (
- IN EFI_HANDLE ImageHandle
- );
-
// Image handle
-#define LOADED_IMAGE_PROTOCOL \
+/*#define LOADED_IMAGE_PROTOCOL \
{ 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
#define EFI_IMAGE_INFORMATION_REVISION 0x1000
@@ -386,7 +380,7 @@ typedef struct {
// If the driver image supports a dynamic unload request
EFI_IMAGE_UNLOAD Unload;
-} EFI_LOADED_IMAGE;
+} EFI_LOADED_IMAGE;*/
typedef
diff --git a/inc/efilib.h b/inc/efilib.h
index 85edd90..15bac36 100644
--- a/inc/efilib.h
+++ b/inc/efilib.h
@@ -63,6 +63,7 @@ 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;
diff --git a/inc/efiprot.h b/inc/efiprot.h
index 007294d..52c9ace 100644
--- a/inc/efiprot.h
+++ b/inc/efiprot.h
@@ -926,5 +926,44 @@ typedef struct _EFI_COMPONENT_NAME2 {
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;
+
+
#endif