2 Runtime Architectural Protocol as defined in PI Specification VOLUME 2 DXE
4 This code is used to produce the UEFI 2.0 runtime virtual switch over
6 This driver must add SetVirtualAddressMap () and ConvertPointer () to
7 the EFI system table. This driver is not responcible for CRCing the
10 This driver will add EFI_RUNTIME_ARCH_PROTOCOL_GUID protocol with a
11 pointer to the Runtime Arch Protocol instance structure. The protocol
12 member functions are used by the DXE core to export information need
13 by this driver to produce the runtime transition to virtual mode
16 Copyright (c) 2006 - 2008, Intel Corporation
17 All rights reserved. This program and the accompanying materials
18 are licensed and made available under the terms and conditions of the BSD License
19 which accompanies this distribution. The full text of the license may be found at
20 http://opensource.org/licenses/bsd-license.php
22 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
23 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
27 #ifndef __ARCH_PROTOCOL_RUNTIME_H__
28 #define __ARCH_PROTOCOL_RUNTIME_H__
31 /// Global ID for the Runtime Architectural Protocol
33 #define EFI_RUNTIME_ARCH_PROTOCOL_GUID \
34 { 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33 } }
36 typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL
;
39 /// LIST_ENTRY from BaseType
41 typedef LIST_ENTRY EFI_LIST_ENTRY
;
43 typedef struct _EFI_RUNTIME_IMAGE_ENTRY EFI_RUNTIME_IMAGE_ENTRY
;
45 struct _EFI_RUNTIME_IMAGE_ENTRY
{
53 typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY
;
55 struct _EFI_RUNTIME_EVENT_ENTRY
{
58 EFI_EVENT_NOTIFY NotifyFunction
;
65 // Interface stucture for the Runtime Architectural Protocol
68 @par Protocol Description:
69 Allows the runtime functionality of the DXE Foundation to be contained in a
70 separate driver. It also provides hooks for the DXE Foundation to export
71 information that is needed at runtime. As such, this protocol allows the DXE
72 Foundation to manage runtime drivers and events. This protocol also implies
73 that the runtime services required to transition to virtual mode,
74 SetVirtualAddressMap() and ConvertPointer(), have been registered into the
75 EFI Runtime Table in the EFI System Partition. This protocol must be produced
76 by a runtime DXE driver and may only be consumed by the DXE Foundation.
78 struct _EFI_RUNTIME_ARCH_PROTOCOL
{
80 /// A list of type EFI_RUNTIME_IMAGE_ENTRY.
82 EFI_LIST_ENTRY ImageHead
;
85 /// A list of type EFI_RUNTIME_EVENT_ENTRY.
87 EFI_LIST_ENTRY EventHead
;
90 /// Size of a memory descriptor that is return by GetMemoryMap().
92 UINTN MemoryDescriptorSize
;
95 /// Version of a memory descriptor that is return by GetMemoryMap().
97 UINT32 MemoryDesciptorVersion
;
100 /// Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual.
105 /// Pointer to a runtime buffer that contains a copy of
106 /// the memory map returned via GetMemoryMap().
108 EFI_MEMORY_DESCRIPTOR
*MemoryMapPhysical
;
111 /// Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().
113 EFI_MEMORY_DESCRIPTOR
*MemoryMapVirtual
;
116 /// Boolean that is TRUE if SetVirtualAddressMap() has been called.
121 /// Boolean that is TRUE if ExitBootServices () has been called.
126 extern EFI_GUID gEfiRuntimeArchProtocolGuid
;