]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/RuntimeDxe/Runtime.h
Fix the RuntimeDxe driver can not be dispatched correctly issue.
[mirror_edk2.git] / MdeModulePkg / Universal / RuntimeDxe / Runtime.h
CommitLineData
ce2f5557 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 Runtime.h\r
15\r
16Abstract:\r
17\r
18 Runtime Architectural Protocol as defined in the DXE CIS\r
19\r
20 This code is used to produce the EFI runtime architectural protocol.\r
21\r
22--*/\r
23\r
24#ifndef _RUNTIME_H_\r
25#define _RUNTIME_H_\r
26\r
ba237732
A
27#include <PiDxe.h>\r
28#include <Protocol/LoadedImage.h>\r
29#include <Protocol/Runtime.h>\r
30#include <Protocol/UgaIo.h>\r
31#include <Library/BaseLib.h>\r
32#include <Library/UefiDriverEntryPoint.h>\r
33#include <Library/DebugLib.h>\r
34#include <Library/ReportStatusCodeLib.h>\r
35#include <Library/BaseMemoryLib.h>\r
36#include <Library/UefiRuntimeServicesTableLib.h>\r
37#include <Library/UefiBootServicesTableLib.h>\r
38#include <Library/CacheMaintenanceLib.h>\r
39#include <Library/PeCoffLib.h>\r
40#include <Library/PcdLib.h>\r
41\r
42\r
ce2f5557 43//\r
44// Function Prototypes\r
45//\r
46EFI_STATUS\r
47EFIAPI\r
48RuntimeDriverCalculateCrc32 (\r
49 IN VOID *Data,\r
50 IN UINTN DataSize,\r
51 OUT UINT32 *CrcOut\r
52 )\r
53/*++\r
54\r
55Routine Description:\r
56\r
57 Calculate CRC32 for target data\r
58\r
59Arguments:\r
60\r
61 Data - The target data.\r
62 DataSize - The target data size.\r
63 CrcOut - The CRC32 for target data.\r
64\r
65Returns:\r
66\r
67 EFI_SUCCESS - The CRC32 for target data is calculated successfully.\r
68 EFI_INVALID_PARAMETER - Some parameter is not valid, so the CRC32 is not \r
69 calculated.\r
70\r
71--*/\r
72;\r
73\r
74EFI_STATUS\r
75EFIAPI\r
76RuntimeDriverConvertPointer (\r
77 IN UINTN DebugDisposition,\r
78 IN OUT VOID **ConvertAddress\r
79 )\r
80/*++\r
81\r
82Routine Description:\r
83\r
84 Determines the new virtual address that is to be used on subsequent memory accesses.\r
85\r
86Arguments:\r
87 \r
88 DebugDisposition - Supplies type information for the pointer being converted.\r
89 ConvertAddress - A pointer to a pointer that is to be fixed to be the value needed\r
90 for the new virtual address mappings being applied.\r
91\r
92Returns:\r
93\r
94 EFI_SUCCESS - The pointer pointed to by Address was modified.\r
95 EFI_NOT_FOUND - The pointer pointed to by Address was not found to be part\r
96 of the current memory map. This is normally fatal.\r
97 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.\r
98\r
99--*/\r
100;\r
101\r
102EFI_STATUS\r
103EFIAPI\r
104RuntimeDriverSetVirtualAddressMap (\r
105 IN UINTN MemoryMapSize,\r
106 IN UINTN DescriptorSize,\r
107 IN UINT32 DescriptorVersion,\r
108 IN EFI_MEMORY_DESCRIPTOR *VirtualMap\r
109 )\r
110/*++\r
111\r
112Routine Description:\r
113\r
114 Changes the runtime addressing mode of EFI firmware from physical to virtual.\r
115\r
116Arguments:\r
117 \r
118 MemoryMapSize - The size in bytes of VirtualMap.\r
119 DescriptorSize - The size in bytes of an entry in the VirtualMap.\r
120 DescriptorVersion - The version of the structure entries in VirtualMap.\r
121 VirtualMap - An array of memory descriptors which contain new virtual\r
122 address mapping information for all runtime ranges.\r
123\r
124Returns:\r
125\r
126 EFI_SUCCESS - The virtual address map has been applied.\r
127 EFI_UNSUPPORTED - EFI firmware is not at runtime, or the EFI firmware is already in\r
128 virtual address mapped mode.\r
129 EFI_INVALID_PARAMETER - DescriptorSize or DescriptorVersion is invalid.\r
130 EFI_NO_MAPPING - A virtual address was not supplied for a range in the memory\r
131 map that requires a mapping.\r
132 EFI_NOT_FOUND - A virtual address was supplied for an address that is not found\r
133 in the memory map.\r
134\r
135--*/\r
136;\r
137\r
138VOID\r
139RuntimeDriverInitializeCrc32Table (\r
140 VOID\r
141 )\r
142/*++\r
143\r
144Routine Description:\r
145\r
146 Initialize CRC32 table.\r
147\r
148Arguments:\r
149\r
150 None.\r
151\r
152Returns:\r
153\r
154 None.\r
155\r
156--*/\r
157;\r
158\r
159EFI_STATUS\r
160EFIAPI\r
161RuntimeDriverInitialize (\r
162 IN EFI_HANDLE ImageHandle,\r
163 IN EFI_SYSTEM_TABLE *SystemTable\r
164 )\r
165/*++\r
166\r
167Routine Description:\r
168\r
169 Install Runtime AP. This code includes the EfiRuntimeLib, but it only \r
170 functions at RT in physical mode. \r
171\r
172Arguments:\r
173 \r
174 ImageHandle - Image handle of this driver.\r
175 SystemTable - Pointer to the EFI System Table.\r
176\r
177Returns:\r
178\r
179 EFI_SUCEESS - Runtime Driver Architectural Protocol installed.\r
180\r
181--*/\r
182;\r
183\r
184#endif\r