]>
Commit | Line | Data |
---|---|---|
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 | |
4ca9b6c4 | 7 | Copyright (c) 2006 - 2008, Intel Corporation \r |
c2f83f0a | 8 | All rights reserved. This program and the accompanying materials \r |
9 | are licensed and made available under the terms and conditions of the BSD License \r | |
10 | which accompanies this distribution. The full text of the license may be found at \r | |
11 | http://opensource.org/licenses/bsd-license.php \r | |
12 | \r | |
13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
15 | \r | |
c2f83f0a | 16 | **/\r |
17 | \r | |
18 | #ifndef __LOADED_IMAGE_PROTOCOL_H__\r | |
19 | #define __LOADED_IMAGE_PROTOCOL_H__\r | |
20 | \r | |
21 | #include <Protocol/DevicePath.h>\r | |
22 | \r | |
23 | #define EFI_LOADED_IMAGE_PROTOCOL_GUID \\r | |
24 | { \\r | |
25 | 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \\r | |
26 | }\r | |
27 | \r | |
d02d144f | 28 | #define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \\r |
29 | { \\r | |
30 | 0xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } \\r | |
31 | }\r | |
32 | \r | |
99e8ed21 | 33 | ///\r |
34 | /// Protocol GUID defined in EFI1.1.\r | |
35 | /// \r | |
a6508c05 | 36 | #define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID\r |
37 | \r | |
99e8ed21 | 38 | ///\r |
39 | /// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h\r | |
40 | ///\r | |
a6508c05 | 41 | #define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000\r |
42 | \r | |
99e8ed21 | 43 | ///\r |
44 | /// Revision defined in EFI1.1.\r | |
45 | /// \r | |
a6508c05 | 46 | #define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION\r |
47 | \r | |
4ca9b6c4 LG |
48 | /** \r |
49 | @par Protocol Description:\r | |
50 | Can be used on any image handle to obtain information about the loaded image.\r | |
c2f83f0a | 51 | \r |
4ca9b6c4 LG |
52 | @param Revision\r |
53 | Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure. \r | |
54 | All future revisions will be backward compatible to the current revision.\r | |
55 | \r | |
56 | @param ParentHandle\r | |
57 | Parent image's image handle. NULL if the image is loaded directly from \r | |
58 | the firmware's boot manager. \r | |
59 | \r | |
60 | @param SystemTable\r | |
61 | The image's EFI system table pointer. \r | |
62 | \r | |
63 | @param DeviceHandle\r | |
64 | The device handle that the EFI Image was loaded from. \r | |
65 | \r | |
66 | @param FilePath\r | |
67 | A pointer to the file path portion specific to DeviceHandle \r | |
68 | that the EFI Image was loaded from. \r | |
69 | \r | |
70 | @param Reserved\r | |
71 | Reserved. DO NOT USE.\r | |
72 | \r | |
73 | @param LoadOptionsSize\r | |
74 | The size in bytes of LoadOptions.\r | |
75 | \r | |
76 | @param LoadOptions\r | |
77 | A pointer to the image's binary load options.\r | |
78 | \r | |
79 | @param ImageBase\r | |
80 | The base address at which the image was loaded.\r | |
81 | \r | |
82 | @param ImageSize\r | |
83 | The size in bytes of the loaded image.\r | |
84 | \r | |
85 | @param ImageCodeType\r | |
86 | The memory \r | |
87 | \r | |
88 | @param ImageDataType\r | |
89 | The memory \r | |
90 | \r | |
91 | @param Unload\r | |
92 | Function that unloads the image. \r | |
93 | \r | |
94 | **/\r | |
c2f83f0a | 95 | typedef struct {\r |
96 | UINT32 Revision;\r | |
97 | EFI_HANDLE ParentHandle;\r | |
98 | EFI_SYSTEM_TABLE *SystemTable;\r | |
99 | \r | |
100 | //\r | |
101 | // Source location of image\r | |
102 | //\r | |
103 | EFI_HANDLE DeviceHandle;\r | |
104 | EFI_DEVICE_PATH_PROTOCOL *FilePath;\r | |
105 | VOID *Reserved;\r | |
106 | \r | |
107 | //\r | |
108 | // Images load options\r | |
109 | //\r | |
110 | UINT32 LoadOptionsSize;\r | |
111 | VOID *LoadOptions;\r | |
112 | \r | |
113 | //\r | |
114 | // Location of where image was loaded\r | |
115 | //\r | |
116 | VOID *ImageBase;\r | |
117 | UINT64 ImageSize;\r | |
118 | EFI_MEMORY_TYPE ImageCodeType;\r | |
119 | EFI_MEMORY_TYPE ImageDataType;\r | |
120 | \r | |
121 | //\r | |
122 | // If the driver image supports a dynamic unload request\r | |
123 | //\r | |
124 | EFI_IMAGE_UNLOAD Unload;\r | |
125 | \r | |
126 | } EFI_LOADED_IMAGE_PROTOCOL;\r | |
127 | \r | |
a6508c05 | 128 | //\r |
129 | // For backward-compatible with EFI1.1.\r | |
130 | // \r | |
131 | typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE;\r | |
132 | \r | |
c2f83f0a | 133 | extern EFI_GUID gEfiLoadedImageProtocolGuid;\r |
d02d144f | 134 | extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid;\r |
c2f83f0a | 135 | \r |
136 | #endif\r |