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