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#pragma once
13
14FILE_LICENCE ( BSD2_PATENT );
15FILE_SECBOOT ( PERMITTED );
16
17#define EFI_LOADED_IMAGE_PROTOCOL_GUID \
18 { \
19 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \
20 }
21
22#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \
23 { \
24 0xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } \
25 }
26
27///
28/// Protocol GUID defined in EFI1.1.
29///
30#define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID
31
32///
33/// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h
34///
35#define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000
36
37///
38/// Revision defined in EFI1.1.
39///
40#define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION
41
42///
43/// Can be used on any image handle to obtain information about the loaded image.
44///
45typedef struct {
46 UINT32 Revision; ///< Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure.
47 ///< All future revisions will be backward compatible to the current revision.
48 EFI_HANDLE ParentHandle; ///< Parent image's image handle. NULL if the image is loaded directly from
49 ///< the firmware's boot manager.
50 EFI_SYSTEM_TABLE *SystemTable; ///< the image's EFI system table pointer.
51
52 //
53 // Source location of image
54 //
55 EFI_HANDLE DeviceHandle; ///< The device handle that the EFI Image was loaded from.
56 EFI_DEVICE_PATH_PROTOCOL *FilePath; ///< A pointer to the file path portion specific to DeviceHandle
57 ///< that the EFI Image was loaded from.
58 VOID *Reserved; ///< Reserved. DO NOT USE.
59
60 //
61 // Images load options
62 //
63 UINT32 LoadOptionsSize; ///< The size in bytes of LoadOptions.
64 VOID *LoadOptions; ///< A pointer to the image's binary load options.
65
66 //
67 // Location of where image was loaded
68 //
69 VOID *ImageBase; ///< The base address at which the image was loaded.
70 UINT64 ImageSize; ///< The size in bytes of the loaded image.
71 EFI_MEMORY_TYPE ImageCodeType; ///< The memory type that the code sections were loaded as.
72 EFI_MEMORY_TYPE ImageDataType; ///< The memory type that the data sections were loaded as.
75
76//
77// For backward-compatible with EFI1.1.
78//
80
unsigned long long UINT64
8-byte unsigned value.
unsigned int UINT32
4-byte unsigned value.
#define VOID
Undeclared type.
Definition Base.h:271
EFI_GUID gEfiLoadedImageDevicePathProtocolGuid
EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE
Definition LoadedImage.h:79
EFI_GUID gEfiLoadedImageProtocolGuid
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
EFI_MEMORY_TYPE
Enumeration of memory types introduced in UEFI.
EFI_STATUS(EFIAPI * EFI_IMAGE_UNLOAD)(IN EFI_HANDLE ImageHandle)
Unloads an image.
Definition UefiSpec.h:1023
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:921
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:951
#define EFI_HANDLE
Definition efi.h:53
This protocol can be used on any device handle to obtain generic path/location information concerning...
Definition DevicePath.h:45
Can be used on any image handle to obtain information about the loaded image.
Definition LoadedImage.h:45
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:56
EFI_MEMORY_TYPE ImageDataType
The memory type that the data sections were loaded as.
Definition LoadedImage.h:72
VOID * LoadOptions
A pointer to the image's binary load options.
Definition LoadedImage.h:64
EFI_HANDLE DeviceHandle
The device handle that the EFI Image was loaded from.
Definition LoadedImage.h:55
UINT32 LoadOptionsSize
The size in bytes of LoadOptions.
Definition LoadedImage.h:63
EFI_MEMORY_TYPE ImageCodeType
The memory type that the code sections were loaded as.
Definition LoadedImage.h:71
UINT32 Revision
Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure.
Definition LoadedImage.h:46
EFI_IMAGE_UNLOAD Unload
Definition LoadedImage.h:73
VOID * Reserved
Reserved. DO NOT USE.
Definition LoadedImage.h:58
UINT64 ImageSize
The size in bytes of the loaded image.
Definition LoadedImage.h:70
EFI_HANDLE ParentHandle
Parent image's image handle.
Definition LoadedImage.h:48
EFI_SYSTEM_TABLE * SystemTable
the image's EFI system table pointer.
Definition LoadedImage.h:50
VOID * ImageBase
The base address at which the image was loaded.
Definition LoadedImage.h:69
EFI System Table.
Definition UefiSpec.h:2043