2007-06-19 12:29:07 +02:00
|
|
|
/** @file
|
2007-11-22 07:00:39 +01:00
|
|
|
UEFI 2.0 Loaded image protocol definition.
|
2007-06-19 12:29:07 +02:00
|
|
|
|
|
|
|
Every EFI driver and application is passed an image handle when it is loaded.
|
|
|
|
This image handle will contain a Loaded Image Protocol.
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
Copyright (c) 2006 - 2008, Intel Corporation
|
2007-06-19 12:29:07 +02:00
|
|
|
All rights reserved. This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef __LOADED_IMAGE_PROTOCOL_H__
|
|
|
|
#define __LOADED_IMAGE_PROTOCOL_H__
|
|
|
|
|
|
|
|
#include <Protocol/DevicePath.h>
|
|
|
|
|
|
|
|
#define EFI_LOADED_IMAGE_PROTOCOL_GUID \
|
|
|
|
{ \
|
|
|
|
0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \
|
|
|
|
}
|
|
|
|
|
2008-01-25 04:08:14 +01:00
|
|
|
#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \
|
|
|
|
{ \
|
|
|
|
0xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } \
|
|
|
|
}
|
|
|
|
|
2007-06-21 09:16:27 +02:00
|
|
|
//
|
|
|
|
// Protocol GUID defined in EFI1.1.
|
|
|
|
//
|
|
|
|
#define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID
|
|
|
|
|
2007-06-19 12:29:07 +02:00
|
|
|
//
|
|
|
|
// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h
|
|
|
|
//
|
2007-06-21 09:16:27 +02:00
|
|
|
#define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000
|
|
|
|
|
|
|
|
//
|
|
|
|
// Revision defined in EFI1.1.
|
|
|
|
//
|
|
|
|
#define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION
|
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
/**
|
|
|
|
@par Protocol Description:
|
|
|
|
Can be used on any image handle to obtain information about the loaded image.
|
2007-06-19 12:29:07 +02:00
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
@param Revision
|
|
|
|
Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure.
|
|
|
|
All future revisions will be backward compatible to the current revision.
|
|
|
|
|
|
|
|
@param ParentHandle
|
|
|
|
Parent image's image handle. NULL if the image is loaded directly from
|
|
|
|
the firmware's boot manager.
|
|
|
|
|
|
|
|
@param SystemTable
|
|
|
|
The image's EFI system table pointer.
|
|
|
|
|
|
|
|
@param DeviceHandle
|
|
|
|
The device handle that the EFI Image was loaded from.
|
|
|
|
|
|
|
|
@param FilePath
|
|
|
|
A pointer to the file path portion specific to DeviceHandle
|
|
|
|
that the EFI Image was loaded from.
|
|
|
|
|
|
|
|
@param Reserved
|
|
|
|
Reserved. DO NOT USE.
|
|
|
|
|
|
|
|
@param LoadOptionsSize
|
|
|
|
The size in bytes of LoadOptions.
|
|
|
|
|
|
|
|
@param LoadOptions
|
|
|
|
A pointer to the image's binary load options.
|
|
|
|
|
|
|
|
@param ImageBase
|
|
|
|
The base address at which the image was loaded.
|
|
|
|
|
|
|
|
@param ImageSize
|
|
|
|
The size in bytes of the loaded image.
|
|
|
|
|
|
|
|
@param ImageCodeType
|
|
|
|
The memory
|
|
|
|
|
|
|
|
@param ImageDataType
|
|
|
|
The memory
|
|
|
|
|
|
|
|
@param Unload
|
|
|
|
Function that unloads the image.
|
|
|
|
|
|
|
|
**/
|
2007-06-19 12:29:07 +02:00
|
|
|
typedef struct {
|
|
|
|
UINT32 Revision;
|
|
|
|
EFI_HANDLE ParentHandle;
|
|
|
|
EFI_SYSTEM_TABLE *SystemTable;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Source location of image
|
|
|
|
//
|
|
|
|
EFI_HANDLE DeviceHandle;
|
|
|
|
EFI_DEVICE_PATH_PROTOCOL *FilePath;
|
|
|
|
VOID *Reserved;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Images load options
|
|
|
|
//
|
|
|
|
UINT32 LoadOptionsSize;
|
|
|
|
VOID *LoadOptions;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Location of where image was loaded
|
|
|
|
//
|
|
|
|
VOID *ImageBase;
|
|
|
|
UINT64 ImageSize;
|
|
|
|
EFI_MEMORY_TYPE ImageCodeType;
|
|
|
|
EFI_MEMORY_TYPE ImageDataType;
|
|
|
|
|
|
|
|
//
|
|
|
|
// If the driver image supports a dynamic unload request
|
|
|
|
//
|
|
|
|
EFI_IMAGE_UNLOAD Unload;
|
|
|
|
|
|
|
|
} EFI_LOADED_IMAGE_PROTOCOL;
|
|
|
|
|
2007-06-21 09:16:27 +02:00
|
|
|
//
|
|
|
|
// For backward-compatible with EFI1.1.
|
|
|
|
//
|
|
|
|
typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE;
|
|
|
|
|
2007-06-19 12:29:07 +02:00
|
|
|
extern EFI_GUID gEfiLoadedImageProtocolGuid;
|
2008-01-25 04:08:14 +01:00
|
|
|
extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid;
|
2007-06-19 12:29:07 +02:00
|
|
|
|
|
|
|
#endif
|