]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/LoadPe32Image.h
Add comments and DoxyGen format for these files.
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / LoadPe32Image.h
CommitLineData
504214c4 1/** @file\r
d8a43975 2\r
8a7d75b0 3 Load File protocol.\r
d8a43975 4\r
5 Load file protocol exists to supports the addition of new boot devices,\r
6 and to support booting from devices that do not map well to file system.\r
7 Network boot is done via a LoadFile protocol.\r
8\r
8a7d75b0 9 UEFI 2.0 can boot from any device that produces a LoadFile protocol.\r
d8a43975 10\r
504214c4
LG
11Copyright (c) 2006 - 2008, Intel Corporation\r
12All rights reserved. This program and the accompanying materials\r
13are licensed and made available under the terms and conditions of the BSD License\r
14which accompanies this distribution. The full text of the license may be found at\r
15http://opensource.org/licenses/bsd-license.php\r
16\r
17THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
18WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
19\r
20**/\r
d8a43975 21\r
22#ifndef __LOAD_PE32_IMAGE_H__\r
23#define __LOAD_PE32_IMAGE_H__\r
24\r
25#define PE32_IMAGE_PROTOCOL_GUID \\r
26 {0x5cb5c776,0x60d5,0x45ee,{0x88,0x3c,0x45,0x27,0x8,0xcd,0x74,0x3f }}\r
27\r
28#define EFI_LOAD_PE_IMAGE_ATTRIBUTE_NONE 0x00\r
29#define EFI_LOAD_PE_IMAGE_ATTRIBUTE_RUNTIME_REGISTRATION 0x01\r
30#define EFI_LOAD_PE_IMAGE_ATTRIBUTE_DEBUG_IMAGE_INFO_TABLE_REGISTRATION 0x02\r
31\r
32typedef struct _EFI_PE32_IMAGE_PROTOCOL EFI_PE32_IMAGE_PROTOCOL;\r
33\r
504214c4
LG
34/**\r
35\r
36 Loads an EFI image into memory and returns a handle to the image with extended parameters.\r
37\r
38 @param This Calling context\r
39 @param ParentImageHandle The caller's image handle.\r
40 @param FilePath The specific file path from which the image is loaded.\r
41 @param SourceBuffer If not NULL, a pointer to the memory location containing a copy of\r
42 the image to be loaded.\r
43 @param SourceSize The size in bytes of SourceBuffer.\r
44 @param DstBuffer The buffer to store the image.\r
45 @param NumberOfPages For input, specifies the space size of the image by caller if not NULL.\r
46 For output, specifies the actual space size needed.\r
47 @param ImageHandle Image handle for output.\r
48 @param EntryPoint Image entry point for output.\r
49 @param Attribute The bit mask of attributes to set for the load PE image.\r
50\r
51 @retval EFI_SUCCESS The image was loaded into memory.\r
52 @retval EFI_NOT_FOUND The FilePath was not found.\r
53 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
54 @retval EFI_UNSUPPORTED The image type is not supported, or the device path cannot be\r
55 parsed to locate the proper protocol for loading the file.\r
56 @retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient resources.\r
57**/\r
d8a43975 58typedef\r
59EFI_STATUS\r
60(EFIAPI *LOAD_PE_IMAGE) (\r
61 IN EFI_PE32_IMAGE_PROTOCOL *This,\r
62 IN EFI_HANDLE ParentImageHandle,\r
63 IN EFI_DEVICE_PATH_PROTOCOL *FilePath,\r
64 IN VOID *SourceBuffer OPTIONAL,\r
65 IN UINTN SourceSize,\r
66 IN EFI_PHYSICAL_ADDRESS DstBuffer OPTIONAL,\r
67 OUT UINTN *NumberOfPages OPTIONAL,\r
68 OUT EFI_HANDLE *ImageHandle,\r
69 OUT EFI_PHYSICAL_ADDRESS *EntryPoint OPTIONAL,\r
70 IN UINT32 Attribute\r
71 );\r
72\r
504214c4
LG
73/**\r
74\r
75 Unload the specified image.\r
76\r
77 @param This Indicates the calling context.\r
78 @param ImageHandle The specified image handle.\r
79\r
80 @retval EFI_INVALID_PARAMETER Image handle is NULL.\r
81 @retval EFI_UNSUPPORTED Attempt to unload an unsupported image.\r
82 @retval EFI_SUCCESS Image successfully unloaded.\r
83\r
84--*/\r
d8a43975 85typedef\r
86EFI_STATUS\r
87(EFIAPI *UNLOAD_PE_IMAGE) (\r
88 IN EFI_PE32_IMAGE_PROTOCOL *This,\r
89 IN EFI_HANDLE ImageHandle\r
90 );\r
91\r
92struct _EFI_PE32_IMAGE_PROTOCOL {\r
93 LOAD_PE_IMAGE LoadPeImage;\r
94 UNLOAD_PE_IMAGE UnLoadPeImage;\r
95};\r
96\r
97extern EFI_GUID gEfiLoadPeImageProtocolGuid;\r
98\r
99#endif\r
100\r