]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Dxe/ArchProtocol/Runtime.h
automagically convert ELF to PE/COFF (i386 only)
[mirror_edk2.git] / MdePkg / Include / Dxe / ArchProtocol / Runtime.h
1 /** @file
2 Runtime Architectural Protocol as defined in DXE CIS
3
4 This code is used to produce the EFI 1.0 runtime virtual switch over
5
6 This driver must add SetVirtualAddressMap () and ConvertPointer () to
7 the EFI system table. This driver is not responcible for CRCing the
8 EFI system table.
9
10 This driver will add EFI_RUNTIME_ARCH_PROTOCOL_GUID protocol with a
11 pointer to the Runtime Arch Protocol instance structure. The protocol
12 member functions are used by the DXE core to export information need
13 by this driver to produce the runtime transition to virtual mode
14 calling.
15
16 Copyright (c) 2006, Intel Corporation
17 All rights reserved. This program and the accompanying materials
18 are licensed and made available under the terms and conditions of the BSD License
19 which accompanies this distribution. The full text of the license may be found at
20 http://opensource.org/licenses/bsd-license.php
21
22 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
23 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
24
25 Module Name: Runtime.h
26
27 @par Revision Reference:
28 Version 0.91.
29
30 **/
31
32 #ifndef __ARCH_PROTOCOL_RUNTIME_H__
33 #define __ARCH_PROTOCOL_RUNTIME_H__
34
35 //
36 // Global ID for the Runtime Architectural Protocol
37 //
38 #define EFI_RUNTIME_ARCH_PROTOCOL_GUID \
39 { 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33 } }
40
41 typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL;
42
43 //
44 // LIST_ENTRY from BaseType
45 //
46 typedef LIST_ENTRY EFI_LIST_ENTRY;
47
48 typedef struct _EFI_RUNTIME_IMAGE_ENTRY EFI_RUNTIME_IMAGE_ENTRY;
49
50 struct _EFI_RUNTIME_IMAGE_ENTRY {
51 VOID *ImageBase;
52 UINT64 ImageSize;
53 VOID *RelocationData;
54 EFI_HANDLE Handle;
55 EFI_LIST_ENTRY Link;
56 };
57
58 typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY;
59
60 struct _EFI_RUNTIME_EVENT_ENTRY {
61 UINT32 Type;
62 EFI_TPL NotifyTpl;
63 EFI_EVENT_NOTIFY NotifyFunction;
64 VOID *NotifyContext;
65 EFI_EVENT *Event;
66 EFI_LIST_ENTRY Link;
67 };
68
69 //
70 // Interface stucture for the Runtime Architectural Protocol
71 //
72 /**
73 @par Protocol Description:
74 Allows the runtime functionality of the DXE Foundation to be contained in a
75 separate driver. It also provides hooks for the DXE Foundation to export
76 information that is needed at runtime. As such, this protocol allows the DXE
77 Foundation to manage runtime drivers and events. This protocol also implies
78 that the runtime services required to transition to virtual mode,
79 SetVirtualAddressMap() and ConvertPointer(), have been registered into the
80 EFI Runtime Table in the EFI System Partition. This protocol must be produced
81 by a runtime DXE driver and may only be consumed by the DXE Foundation.
82
83 @param ImageHead
84 A list of type EFI_RUNTIME_IMAGE_ENTRY.
85
86 @param EventHead
87 A list of type EFI_RUNTIME_EVENT_ENTRY.
88
89 @param MemoryDescriptorSize
90 Size of a memory descriptor that is return by GetMemoryMap().
91
92 @param MemoryDescriptorVersion
93 Version of a memory descriptor that is return by GetMemoryMap().
94
95 @param MemoryMapSize
96 Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual.
97
98 @param MemoryMapPhysical
99 Pointer to a runtime buffer that contains a copy of
100 the memory map returned via GetMemoryMap().
101
102 @param MemoryMapVirtual
103 Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap().
104
105 @param VirtualMode
106 Boolean that is TRUE if SetVirtualAddressMap() has been called.
107
108 @param AtRuntime
109 Boolean that is TRUE if ExitBootServices () has been called.
110
111 **/
112 struct _EFI_RUNTIME_ARCH_PROTOCOL {
113 EFI_LIST_ENTRY ImageHead;
114 EFI_LIST_ENTRY EventHead;
115 UINTN MemoryDescriptorSize;
116 UINT32 MemoryDesciptorVersion;
117 UINTN MemoryMapSize;
118 EFI_MEMORY_DESCRIPTOR *MemoryMapPhysical;
119 EFI_MEMORY_DESCRIPTOR *MemoryMapVirtual;
120 BOOLEAN VirtualMode;
121 BOOLEAN AtRuntime;
122 };
123
124 extern EFI_GUID gEfiRuntimeArchProtocolGuid;
125
126 #endif