/** @file\r
Data structure and functions to load and unload PeImage.\r
\r
-Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
#ifndef _IMAGE_H_\r
#define _IMAGE_H_\r
\r
-#define LOADED_IMAGE_PRIVATE_DATA_SIGNATURE SIGNATURE_32('l','d','r','i')\r
-\r
-typedef struct {\r
- UINTN Signature;\r
- /// Image handle\r
- EFI_HANDLE Handle; \r
- /// Image type\r
- UINTN Type; \r
- /// If entrypoint has been called\r
- BOOLEAN Started; \r
- /// The image's entry point\r
- EFI_IMAGE_ENTRY_POINT EntryPoint; \r
- /// loaded image protocol\r
- EFI_LOADED_IMAGE_PROTOCOL Info; \r
- /// Location in memory\r
- EFI_PHYSICAL_ADDRESS ImageBasePage; \r
- /// Number of pages\r
- UINTN NumberOfPages; \r
- /// Original fixup data\r
- CHAR8 *FixupData; \r
- /// Tpl of started image\r
- EFI_TPL Tpl; \r
- /// Status returned by started image\r
- EFI_STATUS Status; \r
- /// Size of ExitData from started image\r
- UINTN ExitDataSize; \r
- /// Pointer to exit data from started image\r
- VOID *ExitData; \r
- /// Pointer to pool allocation for context save/retore\r
- VOID *JumpBuffer; \r
- /// Pointer to buffer for context save/retore\r
- BASE_LIBRARY_JUMP_BUFFER *JumpContext; \r
- /// Machine type from PE image\r
- UINT16 Machine; \r
- /// EBC Protocol pointer\r
- EFI_EBC_PROTOCOL *Ebc; \r
- /// Runtime image list\r
- EFI_RUNTIME_IMAGE_ENTRY *RuntimeData; \r
- /// Pointer to Loaded Image Device Path Protocl\r
- EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath; \r
- /// PeCoffLoader ImageContext\r
- PE_COFF_LOADER_IMAGE_CONTEXT ImageContext; \r
-\r
-} LOADED_IMAGE_PRIVATE_DATA;\r
-\r
-#define LOADED_IMAGE_PRIVATE_DATA_FROM_THIS(a) \\r
- CR(a, LOADED_IMAGE_PRIVATE_DATA, Info, LOADED_IMAGE_PRIVATE_DATA_SIGNATURE)\r
-\r
-\r
#define LOAD_PE32_IMAGE_PRIVATE_DATA_SIGNATURE SIGNATURE_32('l','p','e','i')\r
\r
typedef struct {\r
protocol for loading the file.\r
@retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient\r
resources.\r
+ @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not\r
+ understood.\r
+ @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error.\r
+ @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the \r
+ image from being loaded. NULL is returned in *ImageHandle.\r
+ @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a \r
+ valid EFI_LOADED_IMAGE_PROTOCOL. However, the current \r
+ platform policy specifies that the image should not be started.\r
\r
**/\r
EFI_STATUS\r