2 UEFI 2.0 Loaded image protocol definition.
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.
7 Copyright (c) 2006 - 2008, Intel Corporation
8 All rights reserved. This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #ifndef __LOADED_IMAGE_PROTOCOL_H__
19 #define __LOADED_IMAGE_PROTOCOL_H__
21 #include <Protocol/DevicePath.h>
23 #define EFI_LOADED_IMAGE_PROTOCOL_GUID \
25 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \
28 #define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \
30 0xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } \
34 /// Protocol GUID defined in EFI1.1.
36 #define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID
39 /// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h
41 #define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000
44 /// Revision defined in EFI1.1.
46 #define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION
49 /// Can be used on any image handle to obtain information about the loaded image.
53 /// Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure.
54 /// All future revisions will be backward compatible to the current revision.
59 /// Parent image's image handle. NULL if the image is loaded directly from
60 /// the firmware's boot manager.
62 EFI_HANDLE ParentHandle
;
65 /// the image's EFI system table pointer.
67 EFI_SYSTEM_TABLE
*SystemTable
;
70 // Source location of image
73 /// The device handle that the EFI Image was loaded from.
75 EFI_HANDLE DeviceHandle
;
78 /// A pointer to the file path portion specific to DeviceHandle
79 /// that the EFI Image was loaded from.
81 EFI_DEVICE_PATH_PROTOCOL
*FilePath
;
82 VOID
*Reserved
; ///< Reserved. DO NOT USE.
85 // Images load options
88 /// The size in bytes of LoadOptions.
90 UINT32 LoadOptionsSize
;
93 /// A pointer to the image's binary load options.
98 // Location of where image was loaded
101 /// The base address at which the image was loaded.
106 /// The size in bytes of the loaded image.
111 /// The memory type that the code sections were loaded as.
113 EFI_MEMORY_TYPE ImageCodeType
;
116 /// The memory type that the data sections were loaded as.
118 EFI_MEMORY_TYPE ImageDataType
;
120 EFI_IMAGE_UNLOAD Unload
;
122 } EFI_LOADED_IMAGE_PROTOCOL
;
125 // For backward-compatible with EFI1.1.
127 typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE
;
129 extern EFI_GUID gEfiLoadedImageProtocolGuid
;
130 extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid
;