]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Dxe/ArchProtocol/Runtime.h
automagically convert ELF to PE/COFF (i386 only)
[mirror_edk2.git] / MdePkg / Include / Dxe / ArchProtocol / Runtime.h
CommitLineData
878ddf1f 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
25 Module Name: Runtime.h\r
26\r
27 @par Revision Reference:\r
3ec2611d 28 Version 0.91.\r
878ddf1f 29\r
30**/\r
31\r
32#ifndef __ARCH_PROTOCOL_RUNTIME_H__\r
33#define __ARCH_PROTOCOL_RUNTIME_H__\r
34\r
35//\r
36// Global ID for the Runtime Architectural Protocol\r
37//\r
38#define EFI_RUNTIME_ARCH_PROTOCOL_GUID \\r
3ec2611d 39 { 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33 } }\r
878ddf1f 40\r
3ec2611d 41typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL;\r
878ddf1f 42\r
3ec2611d
LG
43//\r
44// LIST_ENTRY from BaseType \r
45//\r
46typedef LIST_ENTRY EFI_LIST_ENTRY;\r
878ddf1f 47\r
3ec2611d 48typedef struct _EFI_RUNTIME_IMAGE_ENTRY EFI_RUNTIME_IMAGE_ENTRY;\r
878ddf1f 49\r
3ec2611d
LG
50struct _EFI_RUNTIME_IMAGE_ENTRY {\r
51 VOID *ImageBase;\r
52 UINT64 ImageSize;\r
53 VOID *RelocationData;\r
54 EFI_HANDLE Handle;\r
55 EFI_LIST_ENTRY Link;\r
56};\r
878ddf1f 57\r
3ec2611d 58typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY;\r
878ddf1f 59\r
3ec2611d
LG
60struct _EFI_RUNTIME_EVENT_ENTRY {\r
61 UINT32 Type;\r
62 EFI_TPL NotifyTpl;\r
63 EFI_EVENT_NOTIFY NotifyFunction;\r
64 VOID *NotifyContext;\r
65 EFI_EVENT *Event;\r
66 EFI_LIST_ENTRY Link;\r
67};\r
878ddf1f 68\r
69//\r
70// Interface stucture for the Runtime Architectural Protocol\r
71//\r
72/**\r
73 @par Protocol Description:\r
3ec2611d
LG
74 Allows the runtime functionality of the DXE Foundation to be contained in a \r
75 separate driver. It also provides hooks for the DXE Foundation to export \r
76 information that is needed at runtime. As such, this protocol allows the DXE \r
77 Foundation to manage runtime drivers and events. This protocol also implies \r
78 that the runtime services required to transition to virtual mode, \r
79 SetVirtualAddressMap() and ConvertPointer(), have been registered into the \r
80 EFI Runtime Table in the EFI System Partition. This protocol must be produced \r
81 by a runtime DXE driver and may only be consumed by the DXE Foundation.\r
82\r
83 @param ImageHead\r
84 A list of type EFI_RUNTIME_IMAGE_ENTRY.\r
85\r
86 @param EventHead\r
87 A list of type EFI_RUNTIME_EVENT_ENTRY.\r
88\r
89 @param MemoryDescriptorSize\r
90 Size of a memory descriptor that is return by GetMemoryMap().\r
91\r
92 @param MemoryDescriptorVersion\r
93 Version of a memory descriptor that is return by GetMemoryMap().\r
94\r
95 @param MemoryMapSize \r
96 Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual. \r
97\r
98 @param MemoryMapPhysical\r
99 Pointer to a runtime buffer that contains a copy of \r
100 the memory map returned via GetMemoryMap().\r
101\r
102 @param MemoryMapVirtual\r
103 Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().\r
104\r
105 @param VirtualMode\r
106 Boolean that is TRUE if SetVirtualAddressMap() has been called.\r
107\r
108 @param AtRuntime\r
109 Boolean that is TRUE if ExitBootServices () has been called.\r
878ddf1f 110\r
111**/\r
112struct _EFI_RUNTIME_ARCH_PROTOCOL {\r
3ec2611d
LG
113 EFI_LIST_ENTRY ImageHead;\r
114 EFI_LIST_ENTRY EventHead;\r
115 UINTN MemoryDescriptorSize;\r
116 UINT32 MemoryDesciptorVersion;\r
117 UINTN MemoryMapSize;\r
118 EFI_MEMORY_DESCRIPTOR *MemoryMapPhysical;\r
119 EFI_MEMORY_DESCRIPTOR *MemoryMapVirtual;\r
120 BOOLEAN VirtualMode;\r
121 BOOLEAN AtRuntime;\r
878ddf1f 122};\r
123\r
124extern EFI_GUID gEfiRuntimeArchProtocolGuid;\r
125\r
126#endif\r