]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/Runtime/RuntimeDxe/Runtime.h
remove unnecessary check for NULL pointer.
[mirror_edk2.git] / EdkModulePkg / Universal / Runtime / RuntimeDxe / Runtime.h
CommitLineData
878ddf1f 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
3ec2611d 20 This code is used to produce the EFI runtime architectural protocol.\r
878ddf1f 21\r
22--*/\r
23\r
24#ifndef _RUNTIME_H_\r
25#define _RUNTIME_H_\r
26\r
878ddf1f 27//\r
28// Function Prototypes\r
29//\r
878ddf1f 30EFI_STATUS\r
31EFIAPI\r
32RuntimeDriverCalculateCrc32 (\r
33 IN VOID *Data,\r
34 IN UINTN DataSize,\r
35 OUT UINT32 *CrcOut\r
3ec2611d
LG
36 )\r
37/*++\r
878ddf1f 38\r
3ec2611d 39Routine Description:\r
878ddf1f 40\r
3ec2611d
LG
41 Calculate CRC32 for target data\r
42\r
43Arguments:\r
44\r
45 Data - The target data.\r
46 DataSize - The target data size.\r
47 CrcOut - The CRC32 for target data.\r
48\r
49Returns:\r
50\r
51 EFI_SUCCESS - The CRC32 for target data is calculated successfully.\r
52 EFI_INVALID_PARAMETER - Some parameter is not valid, so the CRC32 is not \r
53 calculated.\r
54\r
55--*/\r
56;\r
878ddf1f 57\r
58EFI_STATUS\r
59EFIAPI\r
60RuntimeDriverConvertPointer (\r
61 IN UINTN DebugDisposition,\r
62 IN OUT VOID **ConvertAddress\r
3ec2611d
LG
63 )\r
64/*++\r
65\r
66Routine Description:\r
67\r
68 Determines the new virtual address that is to be used on subsequent memory accesses.\r
69\r
70Arguments:\r
71 \r
72 DebugDisposition - Supplies type information for the pointer being converted.\r
73 ConvertAddress - A pointer to a pointer that is to be fixed to be the value needed\r
74 for the new virtual address mappings being applied.\r
75\r
76Returns:\r
77\r
78 EFI_SUCCESS - The pointer pointed to by Address was modified.\r
79 EFI_NOT_FOUND - The pointer pointed to by Address was not found to be part\r
80 of the current memory map. This is normally fatal.\r
81 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.\r
82\r
83--*/\r
84;\r
85\r
86EFI_STATUS\r
87EFIAPI\r
88RuntimeDriverSetVirtualAddressMap (\r
89 IN UINTN MemoryMapSize,\r
90 IN UINTN DescriptorSize,\r
91 IN UINT32 DescriptorVersion,\r
92 IN EFI_MEMORY_DESCRIPTOR *VirtualMap\r
93 )\r
94/*++\r
95\r
96Routine Description:\r
97\r
98 Changes the runtime addressing mode of EFI firmware from physical to virtual.\r
99\r
100Arguments:\r
101 \r
102 MemoryMapSize - The size in bytes of VirtualMap.\r
103 DescriptorSize - The size in bytes of an entry in the VirtualMap.\r
104 DescriptorVersion - The version of the structure entries in VirtualMap.\r
105 VirtualMap - An array of memory descriptors which contain new virtual\r
106 address mapping information for all runtime ranges.\r
107\r
108Returns:\r
109\r
110 EFI_SUCCESS - The virtual address map has been applied.\r
111 EFI_UNSUPPORTED - EFI firmware is not at runtime, or the EFI firmware is already in\r
112 virtual address mapped mode.\r
113 EFI_INVALID_PARAMETER - DescriptorSize or DescriptorVersion is invalid.\r
114 EFI_NO_MAPPING - A virtual address was not supplied for a range in the memory\r
115 map that requires a mapping.\r
116 EFI_NOT_FOUND - A virtual address was supplied for an address that is not found\r
117 in the memory map.\r
118\r
119--*/\r
120;\r
878ddf1f 121\r
122VOID\r
123RuntimeDriverInitializeCrc32Table (\r
124 VOID\r
3ec2611d
LG
125 )\r
126/*++\r
127\r
128Routine Description:\r
129\r
130 Initialize CRC32 table.\r
131\r
132Arguments:\r
133\r
134 None.\r
135\r
136Returns:\r
137\r
138 None.\r
139\r
140--*/\r
141;\r
878ddf1f 142\r
143EFI_STATUS\r
144EFIAPI\r
145RuntimeDriverInitialize (\r
146 IN EFI_HANDLE ImageHandle,\r
147 IN EFI_SYSTEM_TABLE *SystemTable\r
3ec2611d
LG
148 )\r
149/*++\r
150\r
151Routine Description:\r
152\r
153 Install Runtime AP. This code includes the EfiRuntimeLib, but it only \r
154 functions at RT in physical mode. \r
878ddf1f 155\r
3ec2611d
LG
156Arguments:\r
157 \r
158 ImageHandle - Image handle of this driver.\r
159 SystemTable - Pointer to the EFI System Table.\r
878ddf1f 160\r
3ec2611d
LG
161Returns:\r
162\r
163 EFI_SUCEESS - Runtime Driver Architectural Protocol installed.\r
164\r
165--*/\r
166;\r
878ddf1f 167\r
168#endif\r