]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | UEFI 2.0 Loaded image protocol definition.\r | |
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 | |
7 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r | |
8 | 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 | |
16 | **/\r | |
17 | \r | |
18 | #ifndef __LOADED_IMAGE_PROTOCOL_H__\r | |
19 | #define __LOADED_IMAGE_PROTOCOL_H__\r | |
20 | \r | |
21 | #define EFI_LOADED_IMAGE_PROTOCOL_GUID \\r | |
22 | { \\r | |
23 | 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \\r | |
24 | }\r | |
25 | \r | |
26 | #define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \\r | |
27 | { \\r | |
28 | 0xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } \\r | |
29 | }\r | |
30 | \r | |
31 | ///\r | |
32 | /// Protocol GUID defined in EFI1.1.\r | |
33 | /// \r | |
34 | #define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID\r | |
35 | \r | |
36 | ///\r | |
37 | /// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h\r | |
38 | ///\r | |
39 | #define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000\r | |
40 | \r | |
41 | ///\r | |
42 | /// Revision defined in EFI1.1.\r | |
43 | /// \r | |
44 | #define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION\r | |
45 | \r | |
46 | ///\r | |
47 | /// Can be used on any image handle to obtain information about the loaded image.\r | |
48 | ///\r | |
49 | typedef struct {\r | |
50 | UINT32 Revision; ///< Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure. \r | |
51 | ///< All future revisions will be backward compatible to the current revision.\r | |
52 | EFI_HANDLE ParentHandle; ///< Parent image's image handle. NULL if the image is loaded directly from \r | |
53 | ///< the firmware's boot manager. \r | |
54 | EFI_SYSTEM_TABLE *SystemTable; ///< the image's EFI system table pointer.\r | |
55 | \r | |
56 | //\r | |
57 | // Source location of image\r | |
58 | //\r | |
59 | EFI_HANDLE DeviceHandle; ///< The device handle that the EFI Image was loaded from. \r | |
60 | EFI_DEVICE_PATH_PROTOCOL *FilePath; ///< A pointer to the file path portion specific to DeviceHandle \r | |
61 | ///< that the EFI Image was loaded from. \r | |
62 | VOID *Reserved; ///< Reserved. DO NOT USE.\r | |
63 | \r | |
64 | //\r | |
65 | // Images load options\r | |
66 | //\r | |
67 | UINT32 LoadOptionsSize;///< The size in bytes of LoadOptions.\r | |
68 | VOID *LoadOptions; ///< A pointer to the image's binary load options.\r | |
69 | \r | |
70 | //\r | |
71 | // Location of where image was loaded\r | |
72 | //\r | |
73 | VOID *ImageBase; ///< The base address at which the image was loaded.\r | |
74 | UINT64 ImageSize; ///< The size in bytes of the loaded image.\r | |
75 | EFI_MEMORY_TYPE ImageCodeType; ///< The memory type that the code sections were loaded as.\r | |
76 | EFI_MEMORY_TYPE ImageDataType; ///< The memory type that the data sections were loaded as.\r | |
77 | EFI_IMAGE_UNLOAD Unload;\r | |
78 | } EFI_LOADED_IMAGE_PROTOCOL;\r | |
79 | \r | |
80 | //\r | |
81 | // For backward-compatible with EFI1.1.\r | |
82 | // \r | |
83 | typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE;\r | |
84 | \r | |
85 | extern EFI_GUID gEfiLoadedImageProtocolGuid;\r | |
86 | extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid;\r | |
87 | \r | |
88 | #endif\r |