2007-06-19 12:12:02 +02:00
|
|
|
/** @file
|
2008-07-25 12:37:15 +02:00
|
|
|
Runtime Architectural Protocol as defined in PI Specification VOLUME 2 DXE
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2008-11-19 15:24:27 +01:00
|
|
|
Allows the runtime functionality of the DXE Foundation to be contained
|
|
|
|
in a separate driver. It also provides hooks for the DXE Foundation to
|
|
|
|
export information that is needed at runtime. As such, this protocol allows
|
|
|
|
services to the DXE Foundation to manage runtime drivers and events.
|
|
|
|
This protocol also implies that the runtime services required to transition
|
|
|
|
to virtual mode, SetVirtualAddressMap() and ConvertPointer(), have been
|
|
|
|
registered into the UEFI Runtime Table in the UEFI System Table. This protocol
|
|
|
|
must be produced by a runtime DXE driver and may only be consumed by the DXE Foundation.
|
2007-06-19 12:12:02 +02:00
|
|
|
|
2008-07-25 12:37:15 +02:00
|
|
|
Copyright (c) 2006 - 2008, Intel Corporation
|
2007-06-19 12:12:02 +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 __ARCH_PROTOCOL_RUNTIME_H__
|
|
|
|
#define __ARCH_PROTOCOL_RUNTIME_H__
|
|
|
|
|
2008-08-14 06:29:48 +02:00
|
|
|
///
|
|
|
|
/// Global ID for the Runtime Architectural Protocol
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
#define EFI_RUNTIME_ARCH_PROTOCOL_GUID \
|
|
|
|
{ 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33 } }
|
|
|
|
|
|
|
|
typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL;
|
|
|
|
|
2008-08-14 06:29:48 +02:00
|
|
|
///
|
|
|
|
/// LIST_ENTRY from BaseType
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
typedef LIST_ENTRY EFI_LIST_ENTRY;
|
|
|
|
|
|
|
|
typedef struct _EFI_RUNTIME_IMAGE_ENTRY EFI_RUNTIME_IMAGE_ENTRY;
|
|
|
|
|
2008-11-19 15:24:27 +01:00
|
|
|
///
|
|
|
|
/// EFI_RUNTIME_IMAGE_ENTRY
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
struct _EFI_RUNTIME_IMAGE_ENTRY {
|
2008-11-19 16:14:25 +01:00
|
|
|
///
|
|
|
|
/// Start of image that has been loaded in memory. It is a pointer
|
|
|
|
/// to either the DOS header or PE header of the image.
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
VOID *ImageBase;
|
2008-11-19 16:14:25 +01:00
|
|
|
///
|
|
|
|
/// Size in bytes of the image represented by ImageBase.
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
UINT64 ImageSize;
|
2008-11-19 16:14:25 +01:00
|
|
|
///
|
|
|
|
/// Information about the fix-ups that were performed on ImageBase when it was
|
|
|
|
/// loaded into memory.
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
VOID *RelocationData;
|
2008-11-19 16:14:25 +01:00
|
|
|
///
|
|
|
|
/// The ImageHandle passed into ImageBase when it was loaded.
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
EFI_HANDLE Handle;
|
2008-11-19 15:24:27 +01:00
|
|
|
///
|
|
|
|
/// Entry for this node in the EFI_RUNTIME_ARCHITECTURE_PROTOCOL.ImageHead list.
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
EFI_LIST_ENTRY Link;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY;
|
|
|
|
|
2008-11-19 15:24:27 +01:00
|
|
|
///
|
|
|
|
/// EFI_RUNTIME_EVENT_ENTRY
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
struct _EFI_RUNTIME_EVENT_ENTRY {
|
2008-11-19 15:24:27 +01:00
|
|
|
///
|
|
|
|
/// The same as Type passed into CreateEvent().
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
UINT32 Type;
|
2008-11-19 15:24:27 +01:00
|
|
|
///
|
|
|
|
/// The same as NotifyTpl passed into CreateEvent().
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
EFI_TPL NotifyTpl;
|
2008-11-19 15:24:27 +01:00
|
|
|
///
|
|
|
|
/// The same as NotifyFunction passed into CreateEvent().
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
EFI_EVENT_NOTIFY NotifyFunction;
|
2008-11-19 15:24:27 +01:00
|
|
|
///
|
|
|
|
/// The same as NotifyContext passed into CreateEvent().
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
VOID *NotifyContext;
|
2008-11-19 15:24:27 +01:00
|
|
|
///
|
|
|
|
/// The EFI_EVENT returned by CreateEvent(). Event must be in runtime memory.
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
EFI_EVENT *Event;
|
2008-11-19 15:24:27 +01:00
|
|
|
///
|
|
|
|
/// Entry for this node in the
|
|
|
|
/// EFI_RUNTIME_ARCHITECTURE_PROTOCOL.EventHead list.
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
EFI_LIST_ENTRY Link;
|
|
|
|
};
|
|
|
|
|
2008-10-13 04:54:29 +02:00
|
|
|
///
|
|
|
|
/// Allows the runtime functionality of the DXE Foundation to be contained in a
|
|
|
|
/// separate driver. It also provides hooks for the DXE Foundation to export
|
|
|
|
/// information that is needed at runtime. As such, this protocol allows the DXE
|
|
|
|
/// Foundation to manage runtime drivers and events. This protocol also implies
|
|
|
|
/// that the runtime services required to transition to virtual mode,
|
|
|
|
/// SetVirtualAddressMap() and ConvertPointer(), have been registered into the
|
|
|
|
/// EFI Runtime Table in the EFI System Partition. This protocol must be produced
|
|
|
|
/// by a runtime DXE driver and may only be consumed by the DXE Foundation.
|
|
|
|
///
|
2007-06-19 12:12:02 +02:00
|
|
|
struct _EFI_RUNTIME_ARCH_PROTOCOL {
|
2008-10-21 20:35:06 +02:00
|
|
|
EFI_LIST_ENTRY ImageHead; ///< A list of type EFI_RUNTIME_IMAGE_ENTRY.
|
|
|
|
EFI_LIST_ENTRY EventHead; ///< A list of type EFI_RUNTIME_EVENT_ENTRY.
|
2009-06-04 07:49:29 +02:00
|
|
|
UINTN MemoryDescriptorSize; ///< Size of a memory descriptor that is returned by GetMemoryMap().
|
|
|
|
UINT32 MemoryDesciptorVersion; ///< Version of a memory descriptor that is returned by GetMemoryMap().
|
2008-10-21 20:35:06 +02:00
|
|
|
UINTN MemoryMapSize;///< Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual.
|
|
|
|
EFI_MEMORY_DESCRIPTOR *MemoryMapPhysical; ///< Pointer to a runtime buffer that contains a copy of
|
|
|
|
///< the memory map returned via GetMemoryMap().
|
|
|
|
EFI_MEMORY_DESCRIPTOR *MemoryMapVirtual; ///< Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().
|
|
|
|
BOOLEAN VirtualMode; ///< Boolean that is TRUE if SetVirtualAddressMap() has been called.
|
|
|
|
BOOLEAN AtRuntime; ///< Boolean that is TRUE if ExitBootServices () has been called.
|
2007-06-19 12:12:02 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern EFI_GUID gEfiRuntimeArchProtocolGuid;
|
|
|
|
|
|
|
|
#endif
|