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