]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/LoadedImage.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Protocol / LoadedImage.h
CommitLineData
c2f83f0a 1/** @file\r
8a7d75b0 2 UEFI 2.0 Loaded image protocol definition.\r
c2f83f0a 3\r
4 Every EFI driver and application is passed an image handle when it is loaded.\r
5 This image handle will contain a Loaded Image Protocol.\r
6\r
9095d37b 7 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
9344f092 8 SPDX-License-Identifier: BSD-2-Clause-Patent\r
c2f83f0a 9\r
c2f83f0a 10**/\r
11\r
12#ifndef __LOADED_IMAGE_PROTOCOL_H__\r
13#define __LOADED_IMAGE_PROTOCOL_H__\r
14\r
c2f83f0a 15#define EFI_LOADED_IMAGE_PROTOCOL_GUID \\r
16 { \\r
17 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \\r
18 }\r
19\r
d02d144f 20#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \\r
21 { \\r
22 0xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } \\r
23 }\r
24\r
99e8ed21 25///\r
26/// Protocol GUID defined in EFI1.1.\r
9095d37b 27///\r
a6508c05 28#define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID\r
29\r
99e8ed21 30///\r
31/// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h\r
32///\r
a6508c05 33#define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000\r
34\r
99e8ed21 35///\r
36/// Revision defined in EFI1.1.\r
9095d37b 37///\r
a6508c05 38#define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION\r
39\r
44717a39 40///\r
41/// Can be used on any image handle to obtain information about the loaded image.\r
42///\r
c2f83f0a 43typedef struct {\r
9095d37b 44 UINT32 Revision; ///< Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure.\r
84c11ea2 45 ///< All future revisions will be backward compatible to the current revision.\r
9095d37b
LG
46 EFI_HANDLE ParentHandle; ///< Parent image's image handle. NULL if the image is loaded directly from\r
47 ///< the firmware's boot manager.\r
84c11ea2 48 EFI_SYSTEM_TABLE *SystemTable; ///< the image's EFI system table pointer.\r
c2f83f0a 49\r
50 //\r
51 // Source location of image\r
52 //\r
9095d37b
LG
53 EFI_HANDLE DeviceHandle; ///< The device handle that the EFI Image was loaded from.\r
54 EFI_DEVICE_PATH_PROTOCOL *FilePath; ///< A pointer to the file path portion specific to DeviceHandle\r
55 ///< that the EFI Image was loaded from.\r
84c11ea2 56 VOID *Reserved; ///< Reserved. DO NOT USE.\r
c2f83f0a 57\r
58 //\r
59 // Images load options\r
60 //\r
84c11ea2 61 UINT32 LoadOptionsSize;///< The size in bytes of LoadOptions.\r
62 VOID *LoadOptions; ///< A pointer to the image's binary load options.\r
c2f83f0a 63\r
64 //\r
65 // Location of where image was loaded\r
66 //\r
84c11ea2 67 VOID *ImageBase; ///< The base address at which the image was loaded.\r
68 UINT64 ImageSize; ///< The size in bytes of the loaded image.\r
69 EFI_MEMORY_TYPE ImageCodeType; ///< The memory type that the code sections were loaded as.\r
70 EFI_MEMORY_TYPE ImageDataType; ///< The memory type that the data sections were loaded as.\r
71 EFI_IMAGE_UNLOAD Unload;\r
c2f83f0a 72} EFI_LOADED_IMAGE_PROTOCOL;\r
73\r
a6508c05 74//\r
75// For backward-compatible with EFI1.1.\r
9095d37b 76//\r
a6508c05 77typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE;\r
78\r
c2f83f0a 79extern EFI_GUID gEfiLoadedImageProtocolGuid;\r
d02d144f 80extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid;\r
c2f83f0a 81\r
82#endif\r