Path: blob/main/sys/contrib/edk2/Include/Protocol/LoadedImage.h
96339 views
/** @file1UEFI 2.0 Loaded image protocol definition.23Every EFI driver and application is passed an image handle when it is loaded.4This image handle will contain a Loaded Image Protocol.56Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>7SPDX-License-Identifier: BSD-2-Clause-Patent89**/1011#ifndef __LOADED_IMAGE_PROTOCOL_H__12#define __LOADED_IMAGE_PROTOCOL_H__1314#define EFI_LOADED_IMAGE_PROTOCOL_GUID \15{ \160x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \17}1819#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \20{ \210xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } \22}2324///25/// Protocol GUID defined in EFI1.1.26///27#define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID2829///30/// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h31///32#define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x10003334///35/// Revision defined in EFI1.1.36///37#define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION3839///40/// Can be used on any image handle to obtain information about the loaded image.41///42typedef struct {43UINT32 Revision; ///< Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure.44///< All future revisions will be backward compatible to the current revision.45EFI_HANDLE ParentHandle; ///< Parent image's image handle. NULL if the image is loaded directly from46///< the firmware's boot manager.47EFI_SYSTEM_TABLE *SystemTable; ///< the image's EFI system table pointer.4849//50// Source location of image51//52EFI_HANDLE DeviceHandle; ///< The device handle that the EFI Image was loaded from.53EFI_DEVICE_PATH_PROTOCOL *FilePath; ///< A pointer to the file path portion specific to DeviceHandle54///< that the EFI Image was loaded from.55VOID *Reserved; ///< Reserved. DO NOT USE.5657//58// Images load options59//60UINT32 LoadOptionsSize; ///< The size in bytes of LoadOptions.61VOID *LoadOptions; ///< A pointer to the image's binary load options.6263//64// Location of where image was loaded65//66VOID *ImageBase; ///< The base address at which the image was loaded.67UINT64 ImageSize; ///< The size in bytes of the loaded image.68EFI_MEMORY_TYPE ImageCodeType; ///< The memory type that the code sections were loaded as.69EFI_MEMORY_TYPE ImageDataType; ///< The memory type that the data sections were loaded as.70EFI_IMAGE_UNLOAD Unload;71} EFI_LOADED_IMAGE_PROTOCOL;7273//74// For backward-compatible with EFI1.1.75//76typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE;7778extern EFI_GUID gEfiLoadedImageProtocolGuid;79extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid;8081#endif828384