]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/Runtime.h
add a error macro to prevent this file from included for now #error "UEFI 2.1 HII...
[mirror_edk2.git] / MdePkg / Include / Protocol / Runtime.h
CommitLineData
d1f95000 1/** @file\r
2 Runtime Architectural Protocol as defined in DXE CIS\r
3\r
4 This code is used to produce the EFI 1.0 runtime virtual switch over\r
5\r
6 This driver must add SetVirtualAddressMap () and ConvertPointer () to\r
7 the EFI system table. This driver is not responcible for CRCing the \r
8 EFI system table.\r
9\r
10 This driver will add EFI_RUNTIME_ARCH_PROTOCOL_GUID protocol with a \r
11 pointer to the Runtime Arch Protocol instance structure. The protocol\r
12 member functions are used by the DXE core to export information need\r
13 by this driver to produce the runtime transition to virtual mode\r
14 calling.\r
15\r
16 Copyright (c) 2006, Intel Corporation \r
17 All rights reserved. This program and the accompanying materials \r
18 are licensed and made available under the terms and conditions of the BSD License \r
19 which accompanies this distribution. The full text of the license may be found at \r
20 http://opensource.org/licenses/bsd-license.php \r
21\r
22 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
23 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
24\r
d1f95000 25 @par Revision Reference:\r
26 Version 0.91.\r
27\r
28**/\r
29\r
30#ifndef __ARCH_PROTOCOL_RUNTIME_H__\r
31#define __ARCH_PROTOCOL_RUNTIME_H__\r
32\r
33//\r
34// Global ID for the Runtime Architectural Protocol\r
35//\r
36#define EFI_RUNTIME_ARCH_PROTOCOL_GUID \\r
37 { 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33 } }\r
38\r
39typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL;\r
40\r
41//\r
42// LIST_ENTRY from BaseType \r
43//\r
44typedef LIST_ENTRY EFI_LIST_ENTRY;\r
45\r
46typedef struct _EFI_RUNTIME_IMAGE_ENTRY EFI_RUNTIME_IMAGE_ENTRY;\r
47\r
48struct _EFI_RUNTIME_IMAGE_ENTRY {\r
49 VOID *ImageBase;\r
50 UINT64 ImageSize;\r
51 VOID *RelocationData;\r
52 EFI_HANDLE Handle;\r
53 EFI_LIST_ENTRY Link;\r
54};\r
55\r
56typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY;\r
57\r
58struct _EFI_RUNTIME_EVENT_ENTRY {\r
59 UINT32 Type;\r
60 EFI_TPL NotifyTpl;\r
61 EFI_EVENT_NOTIFY NotifyFunction;\r
62 VOID *NotifyContext;\r
63 EFI_EVENT *Event;\r
64 EFI_LIST_ENTRY Link;\r
65};\r
66\r
67//\r
68// Interface stucture for the Runtime Architectural Protocol\r
69//\r
70/**\r
71 @par Protocol Description:\r
72 Allows the runtime functionality of the DXE Foundation to be contained in a \r
73 separate driver. It also provides hooks for the DXE Foundation to export \r
74 information that is needed at runtime. As such, this protocol allows the DXE \r
75 Foundation to manage runtime drivers and events. This protocol also implies \r
76 that the runtime services required to transition to virtual mode, \r
77 SetVirtualAddressMap() and ConvertPointer(), have been registered into the \r
78 EFI Runtime Table in the EFI System Partition. This protocol must be produced \r
79 by a runtime DXE driver and may only be consumed by the DXE Foundation.\r
80\r
81 @param ImageHead\r
82 A list of type EFI_RUNTIME_IMAGE_ENTRY.\r
83\r
84 @param EventHead\r
85 A list of type EFI_RUNTIME_EVENT_ENTRY.\r
86\r
87 @param MemoryDescriptorSize\r
88 Size of a memory descriptor that is return by GetMemoryMap().\r
89\r
90 @param MemoryDescriptorVersion\r
91 Version of a memory descriptor that is return by GetMemoryMap().\r
92\r
93 @param MemoryMapSize \r
94 Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual. \r
95\r
96 @param MemoryMapPhysical\r
97 Pointer to a runtime buffer that contains a copy of \r
98 the memory map returned via GetMemoryMap().\r
99\r
100 @param MemoryMapVirtual\r
101 Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().\r
102\r
103 @param VirtualMode\r
104 Boolean that is TRUE if SetVirtualAddressMap() has been called.\r
105\r
106 @param AtRuntime\r
107 Boolean that is TRUE if ExitBootServices () has been called.\r
108\r
109**/\r
110struct _EFI_RUNTIME_ARCH_PROTOCOL {\r
111 EFI_LIST_ENTRY ImageHead;\r
112 EFI_LIST_ENTRY EventHead;\r
113 UINTN MemoryDescriptorSize;\r
114 UINT32 MemoryDesciptorVersion;\r
115 UINTN MemoryMapSize;\r
116 EFI_MEMORY_DESCRIPTOR *MemoryMapPhysical;\r
117 EFI_MEMORY_DESCRIPTOR *MemoryMapVirtual;\r
118 BOOLEAN VirtualMode;\r
119 BOOLEAN AtRuntime;\r
120};\r
121\r
122extern EFI_GUID gEfiRuntimeArchProtocolGuid;\r
123\r
124#endif\r