iPXE
LoadedImage.h
Go to the documentation of this file.
1 /** @file
2  UEFI 2.0 Loaded image protocol definition.
3 
4  Every EFI driver and application is passed an image handle when it is loaded.
5  This image handle will contain a Loaded Image Protocol.
6 
7  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
8  SPDX-License-Identifier: BSD-2-Clause-Patent
9 
10 **/
11 
12 #ifndef __LOADED_IMAGE_PROTOCOL_H__
13 #define __LOADED_IMAGE_PROTOCOL_H__
14 
15 FILE_LICENCE ( BSD2_PATENT );
16 FILE_SECBOOT ( PERMITTED );
17 
18 #define EFI_LOADED_IMAGE_PROTOCOL_GUID \
19  { \
20  0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \
21  }
22 
23 #define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \
24  { \
25  0xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } \
26  }
27 
28 ///
29 /// Protocol GUID defined in EFI1.1.
30 ///
31 #define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID
32 
33 ///
34 /// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h
35 ///
36 #define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000
37 
38 ///
39 /// Revision defined in EFI1.1.
40 ///
41 #define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION
42 
43 ///
44 /// Can be used on any image handle to obtain information about the loaded image.
45 ///
46 typedef struct {
47  UINT32 Revision; ///< Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure.
48  ///< All future revisions will be backward compatible to the current revision.
49  EFI_HANDLE ParentHandle; ///< Parent image's image handle. NULL if the image is loaded directly from
50  ///< the firmware's boot manager.
51  EFI_SYSTEM_TABLE *SystemTable; ///< the image's EFI system table pointer.
52 
53  //
54  // Source location of image
55  //
56  EFI_HANDLE DeviceHandle; ///< The device handle that the EFI Image was loaded from.
57  EFI_DEVICE_PATH_PROTOCOL *FilePath; ///< A pointer to the file path portion specific to DeviceHandle
58  ///< that the EFI Image was loaded from.
59  VOID *Reserved; ///< Reserved. DO NOT USE.
60 
61  //
62  // Images load options
63  //
64  UINT32 LoadOptionsSize; ///< The size in bytes of LoadOptions.
65  VOID *LoadOptions; ///< A pointer to the image's binary load options.
66 
67  //
68  // Location of where image was loaded
69  //
70  VOID *ImageBase; ///< The base address at which the image was loaded.
71  UINT64 ImageSize; ///< The size in bytes of the loaded image.
72  EFI_MEMORY_TYPE ImageCodeType; ///< The memory type that the code sections were loaded as.
73  EFI_MEMORY_TYPE ImageDataType; ///< The memory type that the data sections were loaded as.
76 
77 //
78 // For backward-compatible with EFI1.1.
79 //
81 
84 
85 #endif
EFI_GUID gEfiLoadedImageProtocolGuid
128 bit buffer containing a unique identifier value.
Definition: Base.h:216
UINT64 ImageSize
The size in bytes of the loaded image.
Definition: LoadedImage.h:71
EFI_DEVICE_PATH_PROTOCOL * FilePath
A pointer to the file path portion specific to DeviceHandle that the EFI Image was loaded from.
Definition: LoadedImage.h:57
unsigned int UINT32
Definition: ProcessorBind.h:99
VOID * ImageBase
The base address at which the image was loaded.
Definition: LoadedImage.h:70
This protocol can be used on any device handle to obtain generic path/location information concerning...
Definition: DevicePath.h:46
EFI_MEMORY_TYPE ImageCodeType
The memory type that the code sections were loaded as.
Definition: LoadedImage.h:72
UINT32 Revision
Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure.
Definition: LoadedImage.h:47
Can be used on any image handle to obtain information about the loaded image.
Definition: LoadedImage.h:46
EFI_MEMORY_TYPE
Enumeration of memory types introduced in UEFI.
VOID * LoadOptions
A pointer to the image's binary load options.
Definition: LoadedImage.h:65
EFI_GUID gEfiLoadedImageDevicePathProtocolGuid
EFI_MEMORY_TYPE ImageDataType
The memory type that the data sections were loaded as.
Definition: LoadedImage.h:73
EFI_STATUS(EFIAPI * EFI_IMAGE_UNLOAD)(IN EFI_HANDLE ImageHandle)
Unloads an image.
Definition: UefiSpec.h:1024
EFI_IMAGE_UNLOAD Unload
Definition: LoadedImage.h:74
FILE_LICENCE(BSD2_PATENT)
EFI System Table.
Definition: UefiSpec.h:2044
#define VOID
Undeclared type.
Definition: Base.h:272
unsigned long long UINT64
Definition: ProcessorBind.h:97
FILE_SECBOOT(PERMITTED)
UINT32 LoadOptionsSize
The size in bytes of LoadOptions.
Definition: LoadedImage.h:64
VOID * Reserved
Reserved. DO NOT USE.
Definition: LoadedImage.h:59
EFI_SYSTEM_TABLE * SystemTable
the image's EFI system table pointer.
Definition: LoadedImage.h:51
EFI_HANDLE ParentHandle
Parent image's image handle.
Definition: LoadedImage.h:49
Definition: efi.h:62
EFI_HANDLE DeviceHandle
The device handle that the EFI Image was loaded from.
Definition: LoadedImage.h:56
EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE
Definition: LoadedImage.h:80