2 Runtime Architectural Protocol as defined in PI Specification VOLUME 2 DXE
4 Allows the runtime functionality of the DXE Foundation to be contained
5 in a separate driver. It also provides hooks for the DXE Foundation to
6 export information that is needed at runtime. As such, this protocol allows
7 services to the DXE Foundation to manage runtime drivers and events.
8 This protocol also implies that the runtime services required to transition
9 to virtual mode, SetVirtualAddressMap() and ConvertPointer(), have been
10 registered into the UEFI Runtime Table in the UEFI System Table. This protocol
11 must be produced by a runtime DXE driver and may only be consumed by the DXE Foundation.
13 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
14 SPDX-License-Identifier: BSD-2-Clause-Patent
18 #ifndef __ARCH_PROTOCOL_RUNTIME_H__
19 #define __ARCH_PROTOCOL_RUNTIME_H__
22 /// Global ID for the Runtime Architectural Protocol
24 #define EFI_RUNTIME_ARCH_PROTOCOL_GUID \
25 { 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33 } }
27 typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL
;
30 /// LIST_ENTRY from BaseType
32 typedef LIST_ENTRY EFI_LIST_ENTRY
;
34 typedef struct _EFI_RUNTIME_IMAGE_ENTRY EFI_RUNTIME_IMAGE_ENTRY
;
37 /// EFI_RUNTIME_IMAGE_ENTRY
39 struct _EFI_RUNTIME_IMAGE_ENTRY
{
41 /// Start of image that has been loaded in memory. It is a pointer
42 /// to either the DOS header or PE header of the image.
46 /// Size in bytes of the image represented by ImageBase.
50 /// Information about the fix-ups that were performed on ImageBase when it was
51 /// loaded into memory.
55 /// The ImageHandle passed into ImageBase when it was loaded.
59 /// Entry for this node in the EFI_RUNTIME_ARCHITECTURE_PROTOCOL.ImageHead list.
64 typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY
;
67 /// EFI_RUNTIME_EVENT_ENTRY
69 struct _EFI_RUNTIME_EVENT_ENTRY
{
71 /// The same as Type passed into CreateEvent().
75 /// The same as NotifyTpl passed into CreateEvent().
79 /// The same as NotifyFunction passed into CreateEvent().
81 EFI_EVENT_NOTIFY NotifyFunction
;
83 /// The same as NotifyContext passed into CreateEvent().
87 /// The EFI_EVENT returned by CreateEvent(). Event must be in runtime memory.
91 /// Entry for this node in the
92 /// EFI_RUNTIME_ARCHITECTURE_PROTOCOL.EventHead list.
98 /// Allows the runtime functionality of the DXE Foundation to be contained in a
99 /// separate driver. It also provides hooks for the DXE Foundation to export
100 /// information that is needed at runtime. As such, this protocol allows the DXE
101 /// Foundation to manage runtime drivers and events. This protocol also implies
102 /// that the runtime services required to transition to virtual mode,
103 /// SetVirtualAddressMap() and ConvertPointer(), have been registered into the
104 /// EFI Runtime Table in the EFI System Partition. This protocol must be produced
105 /// by a runtime DXE driver and may only be consumed by the DXE Foundation.
107 struct _EFI_RUNTIME_ARCH_PROTOCOL
{
108 EFI_LIST_ENTRY ImageHead
; ///< A list of type EFI_RUNTIME_IMAGE_ENTRY.
109 EFI_LIST_ENTRY EventHead
; ///< A list of type EFI_RUNTIME_EVENT_ENTRY.
110 UINTN MemoryDescriptorSize
; ///< Size of a memory descriptor that is returned by GetMemoryMap().
111 UINT32 MemoryDesciptorVersion
; ///< Version of a memory descriptor that is returned by GetMemoryMap().
112 UINTN MemoryMapSize
;///< Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual.
113 EFI_MEMORY_DESCRIPTOR
*MemoryMapPhysical
; ///< Pointer to a runtime buffer that contains a copy of
114 ///< the memory map returned via GetMemoryMap().
115 EFI_MEMORY_DESCRIPTOR
*MemoryMapVirtual
; ///< Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().
116 BOOLEAN VirtualMode
; ///< Boolean that is TRUE if SetVirtualAddressMap() has been called.
117 BOOLEAN AtRuntime
; ///< Boolean that is TRUE if ExitBootServices () has been called.
120 extern EFI_GUID gEfiRuntimeArchProtocolGuid
;