]>
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 | |
44717a39 | 64 | ///\r |
65 | /// Allows the runtime functionality of the DXE Foundation to be contained in a \r | |
66 | /// separate driver. It also provides hooks for the DXE Foundation to export \r | |
67 | /// information that is needed at runtime. As such, this protocol allows the DXE \r | |
68 | /// Foundation to manage runtime drivers and events. This protocol also implies \r | |
69 | /// that the runtime services required to transition to virtual mode, \r | |
70 | /// SetVirtualAddressMap() and ConvertPointer(), have been registered into the \r | |
71 | /// EFI Runtime Table in the EFI System Partition. This protocol must be produced \r | |
72 | /// by a runtime DXE driver and may only be consumed by the DXE Foundation.\r | |
73 | ///\r | |
d1f95000 | 74 | struct _EFI_RUNTIME_ARCH_PROTOCOL {\r |
11f2f87e | 75 | EFI_LIST_ENTRY ImageHead; ///< A list of type EFI_RUNTIME_IMAGE_ENTRY.\r |
76 | EFI_LIST_ENTRY EventHead; ///< A list of type EFI_RUNTIME_EVENT_ENTRY.\r | |
77 | UINTN MemoryDescriptorSize; ///< Size of a memory descriptor that is return by GetMemoryMap().\r | |
78 | UINT32 MemoryDesciptorVersion; ///< Version of a memory descriptor that is return by GetMemoryMap().\r | |
79 | UINTN MemoryMapSize;///< Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual. \r | |
80 | EFI_MEMORY_DESCRIPTOR *MemoryMapPhysical; ///< Pointer to a runtime buffer that contains a copy of \r | |
81 | ///< the memory map returned via GetMemoryMap().\r | |
82 | EFI_MEMORY_DESCRIPTOR *MemoryMapVirtual; ///< Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().\r | |
83 | BOOLEAN VirtualMode; ///< Boolean that is TRUE if SetVirtualAddressMap() has been called.\r | |
84 | BOOLEAN AtRuntime; ///< Boolean that is TRUE if ExitBootServices () has been called.\r | |
d1f95000 | 85 | };\r |
86 | \r | |
87 | extern EFI_GUID gEfiRuntimeArchProtocolGuid;\r | |
88 | \r | |
89 | #endif\r |