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