]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/LoadedImage.h
Import Pal.h and Sal.h.
[mirror_edk2.git] / MdePkg / Include / Protocol / LoadedImage.h
1 /** @file
2 EFI 1.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, 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
12
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.
15
16 Module Name: LoadedImage.h
17
18 **/
19
20 #ifndef __LOADED_IMAGE_PROTOCOL_H__
21 #define __LOADED_IMAGE_PROTOCOL_H__
22
23 #include <Protocol/DevicePath.h>
24
25 #define EFI_LOADED_IMAGE_PROTOCOL_GUID \
26 { \
27 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \
28 }
29
30 //
31 // Protocol GUID defined in EFI1.1.
32 //
33 #define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID
34
35 //
36 // EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h
37 //
38 #define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000
39
40 //
41 // Revision defined in EFI1.1.
42 //
43 #define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION
44
45
46 typedef struct {
47 UINT32 Revision;
48 EFI_HANDLE ParentHandle;
49 EFI_SYSTEM_TABLE *SystemTable;
50
51 //
52 // Source location of image
53 //
54 EFI_HANDLE DeviceHandle;
55 EFI_DEVICE_PATH_PROTOCOL *FilePath;
56 VOID *Reserved;
57
58 //
59 // Images load options
60 //
61 UINT32 LoadOptionsSize;
62 VOID *LoadOptions;
63
64 //
65 // Location of where image was loaded
66 //
67 VOID *ImageBase;
68 UINT64 ImageSize;
69 EFI_MEMORY_TYPE ImageCodeType;
70 EFI_MEMORY_TYPE ImageDataType;
71
72 //
73 // If the driver image supports a dynamic unload request
74 //
75 EFI_IMAGE_UNLOAD Unload;
76
77 } EFI_LOADED_IMAGE_PROTOCOL;
78
79 //
80 // For backward-compatible with EFI1.1.
81 //
82 typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE;
83
84 extern EFI_GUID gEfiLoadedImageProtocolGuid;
85
86 #endif