]>
Commit | Line | Data |
---|---|---|
d1f95000 | 1 | /** @file\r |
4ca9b6c4 | 2 | Runtime Architectural Protocol as defined in PI Specification VOLUME 2 DXE\r |
d1f95000 | 3 | \r |
f1004231 LG |
4 | Allows the runtime functionality of the DXE Foundation to be contained \r |
5 | in a separate driver. It also provides hooks for the DXE Foundation to \r | |
6 | export information that is needed at runtime. As such, this protocol allows \r | |
7 | services to the DXE Foundation to manage runtime drivers and events. \r | |
8 | This protocol also implies that the runtime services required to transition \r | |
9 | to virtual mode, SetVirtualAddressMap() and ConvertPointer(), have been \r | |
10 | registered into the UEFI Runtime Table in the UEFI System Table. This protocol \r | |
11 | must be produced by a runtime DXE driver and may only be consumed by the DXE Foundation.\r | |
d1f95000 | 12 | \r |
4ca9b6c4 | 13 | Copyright (c) 2006 - 2008, Intel Corporation \r |
d1f95000 | 14 | All rights reserved. This program and the accompanying materials \r |
15 | are licensed and made available under the terms and conditions of the BSD License \r | |
16 | which accompanies this distribution. The full text of the license may be found at \r | |
17 | http://opensource.org/licenses/bsd-license.php \r | |
18 | \r | |
19 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
20 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
21 | \r | |
d1f95000 | 22 | **/\r |
23 | \r | |
24 | #ifndef __ARCH_PROTOCOL_RUNTIME_H__\r | |
25 | #define __ARCH_PROTOCOL_RUNTIME_H__\r | |
26 | \r | |
99e8ed21 | 27 | ///\r |
28 | /// Global ID for the Runtime Architectural Protocol\r | |
29 | ///\r | |
d1f95000 | 30 | #define EFI_RUNTIME_ARCH_PROTOCOL_GUID \\r |
31 | { 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33 } }\r | |
32 | \r | |
33 | typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL;\r | |
34 | \r | |
99e8ed21 | 35 | ///\r |
36 | /// LIST_ENTRY from BaseType \r | |
37 | ///\r | |
d1f95000 | 38 | typedef LIST_ENTRY EFI_LIST_ENTRY;\r |
39 | \r | |
40 | typedef struct _EFI_RUNTIME_IMAGE_ENTRY EFI_RUNTIME_IMAGE_ENTRY;\r | |
41 | \r | |
f1004231 LG |
42 | ///\r |
43 | /// EFI_RUNTIME_IMAGE_ENTRY\r | |
44 | ///\r | |
d1f95000 | 45 | struct _EFI_RUNTIME_IMAGE_ENTRY {\r |
ee6c452c | 46 | ///\r |
47 | /// Start of image that has been loaded in memory. It is a pointer \r | |
48 | /// to either the DOS header or PE header of the image.\r | |
49 | ///\r | |
d1f95000 | 50 | VOID *ImageBase;\r |
ee6c452c | 51 | ///\r |
52 | /// Size in bytes of the image represented by ImageBase.\r | |
53 | ///\r | |
d1f95000 | 54 | UINT64 ImageSize;\r |
ee6c452c | 55 | ///\r |
56 | /// Information about the fix-ups that were performed on ImageBase when it was\r | |
57 | /// loaded into memory.\r | |
58 | ///\r | |
d1f95000 | 59 | VOID *RelocationData;\r |
ee6c452c | 60 | ///\r |
61 | /// The ImageHandle passed into ImageBase when it was loaded.\r | |
62 | ///\r | |
d1f95000 | 63 | EFI_HANDLE Handle;\r |
f1004231 LG |
64 | ///\r |
65 | /// Entry for this node in the EFI_RUNTIME_ARCHITECTURE_PROTOCOL.ImageHead list.\r | |
66 | ///\r | |
d1f95000 | 67 | EFI_LIST_ENTRY Link;\r |
68 | };\r | |
69 | \r | |
70 | typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY;\r | |
71 | \r | |
f1004231 LG |
72 | ///\r |
73 | /// EFI_RUNTIME_EVENT_ENTRY\r | |
74 | ///\r | |
d1f95000 | 75 | struct _EFI_RUNTIME_EVENT_ENTRY {\r |
f1004231 LG |
76 | ///\r |
77 | /// The same as Type passed into CreateEvent().\r | |
78 | ///\r | |
d1f95000 | 79 | UINT32 Type;\r |
f1004231 LG |
80 | ///\r |
81 | /// The same as NotifyTpl passed into CreateEvent().\r | |
82 | ///\r | |
d1f95000 | 83 | EFI_TPL NotifyTpl;\r |
f1004231 LG |
84 | ///\r |
85 | /// The same as NotifyFunction passed into CreateEvent().\r | |
86 | ///\r | |
d1f95000 | 87 | EFI_EVENT_NOTIFY NotifyFunction;\r |
f1004231 LG |
88 | ///\r |
89 | /// The same as NotifyContext passed into CreateEvent().\r | |
90 | ///\r | |
d1f95000 | 91 | VOID *NotifyContext;\r |
f1004231 LG |
92 | ///\r |
93 | /// The EFI_EVENT returned by CreateEvent(). Event must be in runtime memory.\r | |
94 | ///\r | |
d1f95000 | 95 | EFI_EVENT *Event;\r |
f1004231 LG |
96 | ///\r |
97 | /// Entry for this node in the\r | |
98 | /// EFI_RUNTIME_ARCHITECTURE_PROTOCOL.EventHead list.\r | |
99 | ///\r | |
d1f95000 | 100 | EFI_LIST_ENTRY Link;\r |
101 | };\r | |
102 | \r | |
44717a39 | 103 | ///\r |
104 | /// Allows the runtime functionality of the DXE Foundation to be contained in a \r | |
105 | /// separate driver. It also provides hooks for the DXE Foundation to export \r | |
106 | /// information that is needed at runtime. As such, this protocol allows the DXE \r | |
107 | /// Foundation to manage runtime drivers and events. This protocol also implies \r | |
108 | /// that the runtime services required to transition to virtual mode, \r | |
109 | /// SetVirtualAddressMap() and ConvertPointer(), have been registered into the \r | |
110 | /// EFI Runtime Table in the EFI System Partition. This protocol must be produced \r | |
111 | /// by a runtime DXE driver and may only be consumed by the DXE Foundation.\r | |
112 | ///\r | |
d1f95000 | 113 | struct _EFI_RUNTIME_ARCH_PROTOCOL {\r |
11f2f87e | 114 | EFI_LIST_ENTRY ImageHead; ///< A list of type EFI_RUNTIME_IMAGE_ENTRY.\r |
115 | EFI_LIST_ENTRY EventHead; ///< A list of type EFI_RUNTIME_EVENT_ENTRY.\r | |
116 | UINTN MemoryDescriptorSize; ///< Size of a memory descriptor that is return by GetMemoryMap().\r | |
117 | UINT32 MemoryDesciptorVersion; ///< Version of a memory descriptor that is return by GetMemoryMap().\r | |
118 | UINTN MemoryMapSize;///< Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual. \r | |
119 | EFI_MEMORY_DESCRIPTOR *MemoryMapPhysical; ///< Pointer to a runtime buffer that contains a copy of \r | |
120 | ///< the memory map returned via GetMemoryMap().\r | |
121 | EFI_MEMORY_DESCRIPTOR *MemoryMapVirtual; ///< Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().\r | |
122 | BOOLEAN VirtualMode; ///< Boolean that is TRUE if SetVirtualAddressMap() has been called.\r | |
123 | BOOLEAN AtRuntime; ///< Boolean that is TRUE if ExitBootServices () has been called.\r | |
d1f95000 | 124 | };\r |
125 | \r | |
126 | extern EFI_GUID gEfiRuntimeArchProtocolGuid;\r | |
127 | \r | |
128 | #endif\r |