]>
Commit | Line | Data |
---|---|---|
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 | |
99e8ed21 | 30 | ///\r |
31 | /// Global ID for the Runtime Architectural Protocol\r | |
32 | ///\r | |
d1f95000 | 33 | #define EFI_RUNTIME_ARCH_PROTOCOL_GUID \\r |
34 | { 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33 } }\r | |
35 | \r | |
36 | typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL;\r | |
37 | \r | |
99e8ed21 | 38 | ///\r |
39 | /// LIST_ENTRY from BaseType \r | |
40 | ///\r | |
d1f95000 | 41 | typedef LIST_ENTRY EFI_LIST_ENTRY;\r |
42 | \r | |
43 | typedef struct _EFI_RUNTIME_IMAGE_ENTRY EFI_RUNTIME_IMAGE_ENTRY;\r | |
44 | \r | |
45 | struct _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 | |
53 | typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY;\r | |
54 | \r | |
55 | struct _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 | |
d1f95000 | 77 | **/\r |
78 | struct _EFI_RUNTIME_ARCH_PROTOCOL {\r | |
1f08a159 | 79 | ///\r |
80 | /// A list of type EFI_RUNTIME_IMAGE_ENTRY.\r | |
81 | ///\r | |
d1f95000 | 82 | EFI_LIST_ENTRY ImageHead;\r |
1f08a159 | 83 | \r |
84 | ///\r | |
85 | /// A list of type EFI_RUNTIME_EVENT_ENTRY.\r | |
86 | ///\r | |
d1f95000 | 87 | EFI_LIST_ENTRY EventHead;\r |
1f08a159 | 88 | \r |
89 | ///\r | |
90 | /// Size of a memory descriptor that is return by GetMemoryMap().\r | |
91 | ///\r | |
d1f95000 | 92 | UINTN MemoryDescriptorSize;\r |
1f08a159 | 93 | \r |
94 | ///\r | |
95 | /// Version of a memory descriptor that is return by GetMemoryMap().\r | |
96 | ///\r | |
d1f95000 | 97 | UINT32 MemoryDesciptorVersion;\r |
1f08a159 | 98 | \r |
99 | ///\r | |
100 | /// Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual. \r | |
101 | ///\r | |
d1f95000 | 102 | UINTN MemoryMapSize;\r |
1f08a159 | 103 | \r |
104 | ///\r | |
105 | /// Pointer to a runtime buffer that contains a copy of \r | |
106 | /// the memory map returned via GetMemoryMap().\r | |
107 | ///\r | |
d1f95000 | 108 | EFI_MEMORY_DESCRIPTOR *MemoryMapPhysical;\r |
1f08a159 | 109 | \r |
110 | ///\r | |
111 | /// Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().\r | |
112 | ///\r | |
d1f95000 | 113 | EFI_MEMORY_DESCRIPTOR *MemoryMapVirtual;\r |
1f08a159 | 114 | \r |
115 | ///\r | |
116 | /// Boolean that is TRUE if SetVirtualAddressMap() has been called.\r | |
117 | ///\r | |
d1f95000 | 118 | BOOLEAN VirtualMode;\r |
1f08a159 | 119 | \r |
120 | ///\r | |
121 | /// Boolean that is TRUE if ExitBootServices () has been called.\r | |
122 | ///\r | |
d1f95000 | 123 | BOOLEAN AtRuntime;\r |
124 | };\r | |
125 | \r | |
126 | extern EFI_GUID gEfiRuntimeArchProtocolGuid;\r | |
127 | \r | |
128 | #endif\r |