Commit | Line | Data |
---|---|---|
162ed594 | 1 | /** @file\r |
504214c4 LG |
2 | The internal header file includes the common header files, defines\r |
3 | internal structure and functions used by DxeCore module.\r | |
23c98c94 | 4 | \r |
eb1cace2 | 5 | Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r |
cd5ebaa0 | 6 | This program and the accompanying materials\r |
23c98c94 | 7 | are licensed and made available under the terms and conditions of the BSD License\r |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
28a00297 | 13 | \r |
797a9d67 | 14 | **/\r |
28a00297 | 15 | \r |
16 | #ifndef _DXE_MAIN_H_\r | |
17 | #define _DXE_MAIN_H_\r | |
18 | \r | |
19 | \r | |
ed7748fe | 20 | \r |
28a00297 | 21 | #include <PiDxe.h>\r |
ed7748fe | 22 | \r |
28a00297 | 23 | #include <Protocol/LoadedImage.h>\r |
24 | #include <Protocol/GuidedSectionExtraction.h>\r | |
28a00297 | 25 | #include <Protocol/DevicePath.h>\r |
26 | #include <Protocol/Runtime.h>\r | |
27 | #include <Protocol/LoadFile.h>\r | |
0a9fe763 | 28 | #include <Protocol/LoadFile2.h>\r |
28a00297 | 29 | #include <Protocol/DriverBinding.h>\r |
30 | #include <Protocol/VariableWrite.h>\r | |
31 | #include <Protocol/PlatformDriverOverride.h>\r | |
32 | #include <Protocol/Variable.h>\r | |
28a00297 | 33 | #include <Protocol/Timer.h>\r |
34 | #include <Protocol/SimpleFileSystem.h>\r | |
35 | #include <Protocol/Bds.h>\r | |
28a00297 | 36 | #include <Protocol/RealTimeClock.h>\r |
28a00297 | 37 | #include <Protocol/WatchdogTimer.h>\r |
0c2b5da8 | 38 | #include <Protocol/FirmwareVolume2.h>\r |
28a00297 | 39 | #include <Protocol/MonotonicCounter.h>\r |
28a00297 | 40 | #include <Protocol/StatusCode.h>\r |
28a00297 | 41 | #include <Protocol/Decompress.h>\r |
023c0fec | 42 | #include <Protocol/LoadPe32Image.h>\r |
28a00297 | 43 | #include <Protocol/Security.h>\r |
bc2dfdbc | 44 | #include <Protocol/Security2.h>\r |
28a00297 | 45 | #include <Protocol/Ebc.h>\r |
28a00297 | 46 | #include <Protocol/Reset.h>\r |
28a00297 | 47 | #include <Protocol/Cpu.h>\r |
28a00297 | 48 | #include <Protocol/Metronome.h>\r |
49 | #include <Protocol/FirmwareVolumeBlock.h>\r | |
50 | #include <Protocol/Capsule.h>\r | |
51 | #include <Protocol/BusSpecificDriverOverride.h>\r | |
396e9039 | 52 | #include <Protocol/DriverFamilyOverride.h>\r |
022c6d45 | 53 | #include <Protocol/TcgService.h>\r |
7547649f | 54 | #include <Protocol/HiiPackageList.h>\r |
0803854b | 55 | #include <Protocol/SmmBase2.h>\r |
022c6d45 | 56 | #include <Guid/MemoryTypeInformation.h>\r |
57 | #include <Guid/FirmwareFileSystem2.h>\r | |
6c85d162 | 58 | #include <Guid/FirmwareFileSystem3.h>\r |
022c6d45 | 59 | #include <Guid/HobList.h>\r |
60 | #include <Guid/DebugImageInfoTable.h>\r | |
61 | #include <Guid/FileInfo.h>\r | |
62 | #include <Guid/Apriori.h>\r | |
63 | #include <Guid/DxeServices.h>\r | |
64 | #include <Guid/MemoryAllocationHob.h>\r | |
65 | #include <Guid/EventLegacyBios.h>\r | |
66 | #include <Guid/EventGroup.h>\r | |
044824d9 | 67 | #include <Guid/EventExitBootServiceFailed.h>\r |
54ea99a7 | 68 | #include <Guid/LoadModuleAtFixedAddress.h>\r |
54cd17e9 | 69 | #include <Guid/IdleLoopEvent.h>\r |
57f360f2 JF |
70 | #include <Guid/VectorHandoffTable.h>\r |
71 | #include <Ppi/VectorHandoffInfo.h>\r | |
84edd20b SZ |
72 | #include <Guid/ZeroGuid.h>\r |
73 | #include <Guid/MemoryProfile.h>\r | |
ed7748fe | 74 | \r |
28a00297 | 75 | #include <Library/DxeCoreEntryPoint.h>\r |
76 | #include <Library/DebugLib.h>\r | |
77 | #include <Library/UefiLib.h>\r | |
78 | #include <Library/BaseLib.h>\r | |
79 | #include <Library/HobLib.h>\r | |
80 | #include <Library/PerformanceLib.h>\r | |
81 | #include <Library/UefiDecompressLib.h>\r | |
18fd8d65 | 82 | #include <Library/ExtractGuidedSectionLib.h>\r |
28a00297 | 83 | #include <Library/CacheMaintenanceLib.h>\r |
84 | #include <Library/BaseMemoryLib.h>\r | |
3d7b0992 | 85 | #include <Library/PeCoffLib.h>\r |
b43619d0 | 86 | #include <Library/PeCoffGetEntryPointLib.h>\r |
87 | #include <Library/PeCoffExtraActionLib.h>\r | |
797a9d67 | 88 | #include <Library/PcdLib.h>\r |
c4869732 | 89 | #include <Library/MemoryAllocationLib.h>\r |
070f0cf7 | 90 | #include <Library/DevicePathLib.h>\r |
0e9b156d | 91 | #include <Library/UefiBootServicesTableLib.h>\r |
2680a308 | 92 | #include <Library/ReportStatusCodeLib.h>\r |
7cff25d6 | 93 | #include <Library/TimerLib.h>\r |
7748df3d | 94 | #include <Library/DxeServicesLib.h>\r |
e7af83ae | 95 | #include <Library/DebugAgentLib.h>\r |
1e172d6b | 96 | #include <Library/CpuExceptionHandlerLib.h>\r |
28a00297 | 97 | \r |
54ea99a7 | 98 | \r |
28a00297 | 99 | //\r |
100 | // attributes for reserved memory before it is promoted to system memory\r | |
101 | //\r | |
102 | #define EFI_MEMORY_PRESENT 0x0100000000000000ULL\r | |
103 | #define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL\r | |
104 | #define EFI_MEMORY_TESTED 0x0400000000000000ULL\r | |
105 | \r | |
106 | //\r | |
107 | // range for memory mapped port I/O on IPF\r | |
108 | //\r | |
109 | #define EFI_MEMORY_PORT_IO 0x4000000000000000ULL\r | |
110 | \r | |
111 | \r | |
112 | ///\r | |
113 | /// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependecy expression\r | |
114 | /// to save time. A EFI_DEP_PUSH is evauated one an\r | |
7f932291 | 115 | /// replaced with EFI_DEP_REPLACE_TRUE. If PI spec's Vol 2\r |
116 | /// Driver Execution Environment Core Interface use 0xff\r | |
117 | /// as new DEPEX opcode. EFI_DEP_REPLACE_TRUE should be\r | |
118 | /// defined to a new value that is not conflicting with PI spec.\r | |
28a00297 | 119 | ///\r |
120 | #define EFI_DEP_REPLACE_TRUE 0xff\r | |
121 | \r | |
122 | ///\r | |
123 | /// Define the initial size of the dependency expression evaluation stack\r | |
124 | ///\r | |
125 | #define DEPEX_STACK_SIZE_INCREMENT 0x1000\r | |
126 | \r | |
127 | typedef struct {\r | |
128 | EFI_GUID *ProtocolGuid;\r | |
129 | VOID **Protocol;\r | |
130 | EFI_EVENT Event;\r | |
131 | VOID *Registration;\r | |
132 | BOOLEAN Present;\r | |
74e44290 | 133 | } EFI_CORE_PROTOCOL_NOTIFY_ENTRY;\r |
28a00297 | 134 | \r |
28a00297 | 135 | //\r |
136 | // DXE Dispatcher Data structures\r | |
137 | //\r | |
138 | \r | |
f3f2e05d | 139 | #define KNOWN_HANDLE_SIGNATURE SIGNATURE_32('k','n','o','w')\r |
28a00297 | 140 | typedef struct {\r |
141 | UINTN Signature;\r | |
022c6d45 | 142 | LIST_ENTRY Link; // mFvHandleList\r |
28a00297 | 143 | EFI_HANDLE Handle;\r |
2fc46f86 | 144 | EFI_GUID FvNameGuid;\r |
28a00297 | 145 | } KNOWN_HANDLE;\r |
146 | \r | |
147 | \r | |
f3f2e05d | 148 | #define EFI_CORE_DRIVER_ENTRY_SIGNATURE SIGNATURE_32('d','r','v','r')\r |
28a00297 | 149 | typedef struct {\r |
150 | UINTN Signature;\r | |
151 | LIST_ENTRY Link; // mDriverList\r | |
152 | \r | |
153 | LIST_ENTRY ScheduledLink; // mScheduledQueue\r | |
154 | \r | |
155 | EFI_HANDLE FvHandle;\r | |
156 | EFI_GUID FileName;\r | |
157 | EFI_DEVICE_PATH_PROTOCOL *FvFileDevicePath;\r | |
0c2b5da8 | 158 | EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;\r |
28a00297 | 159 | \r |
160 | VOID *Depex;\r | |
161 | UINTN DepexSize;\r | |
162 | \r | |
163 | BOOLEAN Before;\r | |
164 | BOOLEAN After;\r | |
165 | EFI_GUID BeforeAfterGuid;\r | |
166 | \r | |
167 | BOOLEAN Dependent;\r | |
168 | BOOLEAN Unrequested;\r | |
169 | BOOLEAN Scheduled;\r | |
170 | BOOLEAN Untrusted;\r | |
171 | BOOLEAN Initialized;\r | |
172 | BOOLEAN DepexProtocolError;\r | |
173 | \r | |
174 | EFI_HANDLE ImageHandle;\r | |
d3592549 | 175 | BOOLEAN IsFvImage;\r |
28a00297 | 176 | \r |
177 | } EFI_CORE_DRIVER_ENTRY;\r | |
178 | \r | |
179 | //\r | |
180 | //The data structure of GCD memory map entry\r | |
181 | //\r | |
f3f2e05d | 182 | #define EFI_GCD_MAP_SIGNATURE SIGNATURE_32('g','c','d','m')\r |
28a00297 | 183 | typedef struct {\r |
184 | UINTN Signature;\r | |
185 | LIST_ENTRY Link;\r | |
186 | EFI_PHYSICAL_ADDRESS BaseAddress;\r | |
187 | UINT64 EndAddress;\r | |
188 | UINT64 Capabilities;\r | |
189 | UINT64 Attributes;\r | |
190 | EFI_GCD_MEMORY_TYPE GcdMemoryType;\r | |
191 | EFI_GCD_IO_TYPE GcdIoType;\r | |
192 | EFI_HANDLE ImageHandle;\r | |
193 | EFI_HANDLE DeviceHandle;\r | |
194 | } EFI_GCD_MAP_ENTRY;\r | |
195 | \r | |
84edd20b SZ |
196 | \r |
197 | #define LOADED_IMAGE_PRIVATE_DATA_SIGNATURE SIGNATURE_32('l','d','r','i')\r | |
198 | \r | |
199 | typedef struct {\r | |
200 | UINTN Signature;\r | |
201 | /// Image handle\r | |
202 | EFI_HANDLE Handle; \r | |
203 | /// Image type\r | |
204 | UINTN Type; \r | |
205 | /// If entrypoint has been called\r | |
206 | BOOLEAN Started; \r | |
207 | /// The image's entry point\r | |
208 | EFI_IMAGE_ENTRY_POINT EntryPoint; \r | |
209 | /// loaded image protocol\r | |
210 | EFI_LOADED_IMAGE_PROTOCOL Info; \r | |
211 | /// Location in memory\r | |
212 | EFI_PHYSICAL_ADDRESS ImageBasePage; \r | |
213 | /// Number of pages\r | |
214 | UINTN NumberOfPages; \r | |
215 | /// Original fixup data\r | |
216 | CHAR8 *FixupData; \r | |
217 | /// Tpl of started image\r | |
218 | EFI_TPL Tpl; \r | |
219 | /// Status returned by started image\r | |
220 | EFI_STATUS Status; \r | |
221 | /// Size of ExitData from started image\r | |
222 | UINTN ExitDataSize; \r | |
223 | /// Pointer to exit data from started image\r | |
224 | VOID *ExitData; \r | |
225 | /// Pointer to pool allocation for context save/retore\r | |
226 | VOID *JumpBuffer; \r | |
227 | /// Pointer to buffer for context save/retore\r | |
228 | BASE_LIBRARY_JUMP_BUFFER *JumpContext; \r | |
229 | /// Machine type from PE image\r | |
230 | UINT16 Machine; \r | |
231 | /// EBC Protocol pointer\r | |
232 | EFI_EBC_PROTOCOL *Ebc; \r | |
233 | /// Runtime image list\r | |
234 | EFI_RUNTIME_IMAGE_ENTRY *RuntimeData; \r | |
235 | /// Pointer to Loaded Image Device Path Protocl\r | |
236 | EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath; \r | |
237 | /// PeCoffLoader ImageContext\r | |
238 | PE_COFF_LOADER_IMAGE_CONTEXT ImageContext; \r | |
239 | /// Status returned by LoadImage() service.\r | |
240 | EFI_STATUS LoadImageStatus;\r | |
241 | } LOADED_IMAGE_PRIVATE_DATA;\r | |
242 | \r | |
243 | #define LOADED_IMAGE_PRIVATE_DATA_FROM_THIS(a) \\r | |
244 | CR(a, LOADED_IMAGE_PRIVATE_DATA, Info, LOADED_IMAGE_PRIVATE_DATA_SIGNATURE)\r | |
245 | \r | |
28a00297 | 246 | //\r |
247 | // DXE Core Global Variables\r | |
248 | //\r | |
249 | extern EFI_SYSTEM_TABLE *gDxeCoreST;\r | |
28a00297 | 250 | extern EFI_RUNTIME_SERVICES *gDxeCoreRT;\r |
251 | extern EFI_DXE_SERVICES *gDxeCoreDS;\r | |
252 | extern EFI_HANDLE gDxeCoreImageHandle;\r | |
253 | \r | |
254 | extern EFI_DECOMPRESS_PROTOCOL gEfiDecompress;\r | |
28a00297 | 255 | \r |
256 | extern EFI_RUNTIME_ARCH_PROTOCOL *gRuntime;\r | |
257 | extern EFI_CPU_ARCH_PROTOCOL *gCpu;\r | |
258 | extern EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *gWatchdogTimer;\r | |
259 | extern EFI_METRONOME_ARCH_PROTOCOL *gMetronome;\r | |
260 | extern EFI_TIMER_ARCH_PROTOCOL *gTimer;\r | |
261 | extern EFI_SECURITY_ARCH_PROTOCOL *gSecurity;\r | |
bc2dfdbc | 262 | extern EFI_SECURITY2_ARCH_PROTOCOL *gSecurity2;\r |
28a00297 | 263 | extern EFI_BDS_ARCH_PROTOCOL *gBds;\r |
0803854b | 264 | extern EFI_SMM_BASE2_PROTOCOL *gSmmBase2;\r |
28a00297 | 265 | \r |
266 | extern EFI_TPL gEfiCurrentTpl;\r | |
267 | \r | |
268 | extern EFI_GUID *gDxeCoreFileName;\r | |
269 | extern EFI_LOADED_IMAGE_PROTOCOL *gDxeCoreLoadedImage;\r | |
270 | \r | |
271 | extern EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation[EfiMaxMemoryType + 1];\r | |
272 | \r | |
273 | extern BOOLEAN gDispatcherRunning;\r | |
274 | extern EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate;\r | |
275 | \r | |
54ea99a7 | 276 | extern EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE gLoadModuleAtFixAddressConfigurationTable;\r |
277 | extern BOOLEAN gLoadFixedAddressCodeMemoryReady;\r | |
28a00297 | 278 | //\r |
279 | // Service Initialization Functions\r | |
280 | //\r | |
281 | \r | |
282 | \r | |
162ed594 | 283 | \r |
284 | /**\r | |
285 | Called to initialize the pool.\r | |
286 | \r | |
287 | **/\r | |
28a00297 | 288 | VOID\r |
289 | CoreInitializePool (\r | |
290 | VOID\r | |
23c98c94 | 291 | );\r |
28a00297 | 292 | \r |
28a00297 | 293 | \r |
162ed594 | 294 | /**\r |
295 | Called to initialize the memory map and add descriptors to\r | |
296 | the current descriptor list.\r | |
297 | The first descriptor that is added must be general usable\r | |
298 | memory as the addition allocates heap.\r | |
28a00297 | 299 | \r |
022c6d45 | 300 | @param Type The type of memory to add\r |
301 | @param Start The starting address in the memory range Must be\r | |
302 | page aligned\r | |
303 | @param NumberOfPages The number of pages in the range\r | |
304 | @param Attribute Attributes of the memory to add\r | |
28a00297 | 305 | \r |
162ed594 | 306 | @return None. The range is added to the memory map\r |
28a00297 | 307 | \r |
162ed594 | 308 | **/\r |
28a00297 | 309 | VOID\r |
310 | CoreAddMemoryDescriptor (\r | |
311 | IN EFI_MEMORY_TYPE Type,\r | |
312 | IN EFI_PHYSICAL_ADDRESS Start,\r | |
313 | IN UINT64 NumberOfPages,\r | |
314 | IN UINT64 Attribute\r | |
23c98c94 | 315 | );\r |
28a00297 | 316 | \r |
28a00297 | 317 | \r |
162ed594 | 318 | /**\r |
319 | Release memory lock on mGcdMemorySpaceLock.\r | |
28a00297 | 320 | \r |
162ed594 | 321 | **/\r |
28a00297 | 322 | VOID\r |
323 | CoreReleaseGcdMemoryLock (\r | |
324 | VOID\r | |
23c98c94 | 325 | );\r |
28a00297 | 326 | \r |
28a00297 | 327 | \r |
162ed594 | 328 | /**\r |
329 | Acquire memory lock on mGcdMemorySpaceLock.\r | |
28a00297 | 330 | \r |
162ed594 | 331 | **/\r |
28a00297 | 332 | VOID\r |
333 | CoreAcquireGcdMemoryLock (\r | |
334 | VOID\r | |
23c98c94 | 335 | );\r |
28a00297 | 336 | \r |
28a00297 | 337 | \r |
162ed594 | 338 | /**\r |
c18f12d3 | 339 | External function. Initializes memory services based on the memory\r |
340 | descriptor HOBs. This function is responsible for priming the memory\r | |
341 | map, so memory allocations and resource allocations can be made.\r | |
342 | The first part of this function can not depend on any memory services\r | |
343 | until at least one memory descriptor is provided to the memory services.\r | |
28a00297 | 344 | \r |
022c6d45 | 345 | @param HobStart The start address of the HOB.\r |
346 | @param MemoryBaseAddress Start address of memory region found to init DXE\r | |
347 | core.\r | |
348 | @param MemoryLength Length of memory region found to init DXE core.\r | |
28a00297 | 349 | \r |
162ed594 | 350 | @retval EFI_SUCCESS Memory services successfully initialized.\r |
28a00297 | 351 | \r |
162ed594 | 352 | **/\r |
28a00297 | 353 | EFI_STATUS\r |
354 | CoreInitializeMemoryServices (\r | |
23c98c94 | 355 | IN VOID **HobStart,\r |
356 | OUT EFI_PHYSICAL_ADDRESS *MemoryBaseAddress,\r | |
357 | OUT UINT64 *MemoryLength\r | |
358 | );\r | |
162ed594 | 359 | \r |
28a00297 | 360 | \r |
28a00297 | 361 | \r |
162ed594 | 362 | /**\r |
363 | External function. Initializes the GCD and memory services based on the memory\r | |
28a00297 | 364 | descriptor HOBs. This function is responsible for priming the GCD map and the\r |
c18f12d3 | 365 | memory map, so memory allocations and resource allocations can be made. The\r |
366 | HobStart will be relocated to a pool buffer.\r | |
28a00297 | 367 | \r |
022c6d45 | 368 | @param HobStart The start address of the HOB\r |
369 | @param MemoryBaseAddress Start address of memory region found to init DXE\r | |
370 | core.\r | |
371 | @param MemoryLength Length of memory region found to init DXE core.\r | |
28a00297 | 372 | \r |
162ed594 | 373 | @retval EFI_SUCCESS GCD services successfully initialized.\r |
28a00297 | 374 | \r |
162ed594 | 375 | **/\r |
28a00297 | 376 | EFI_STATUS\r |
377 | CoreInitializeGcdServices (\r | |
022c6d45 | 378 | IN OUT VOID **HobStart,\r |
28a00297 | 379 | IN EFI_PHYSICAL_ADDRESS MemoryBaseAddress,\r |
380 | IN UINT64 MemoryLength\r | |
23c98c94 | 381 | );\r |
28a00297 | 382 | \r |
28a00297 | 383 | \r |
162ed594 | 384 | /**\r |
1947c70c | 385 | Initializes "event" support.\r |
28a00297 | 386 | \r |
162ed594 | 387 | @retval EFI_SUCCESS Always return success\r |
28a00297 | 388 | \r |
162ed594 | 389 | **/\r |
28a00297 | 390 | EFI_STATUS\r |
391 | CoreInitializeEventServices (\r | |
392 | VOID\r | |
23c98c94 | 393 | );\r |
28a00297 | 394 | \r |
28a00297 | 395 | \r |
162ed594 | 396 | /**\r |
397 | Add the Image Services to EFI Boot Services Table and install the protocol\r | |
398 | interfaces for this image.\r | |
28a00297 | 399 | \r |
022c6d45 | 400 | @param HobStart The HOB to initialize\r |
28a00297 | 401 | \r |
162ed594 | 402 | @return Status code.\r |
28a00297 | 403 | \r |
162ed594 | 404 | **/\r |
28a00297 | 405 | EFI_STATUS\r |
406 | CoreInitializeImageServices (\r | |
407 | IN VOID *HobStart\r | |
23c98c94 | 408 | );\r |
28a00297 | 409 | \r |
28a00297 | 410 | \r |
162ed594 | 411 | /**\r |
412 | Creates an event that is fired everytime a Protocol of a specific type is installed.\r | |
28a00297 | 413 | \r |
162ed594 | 414 | **/\r |
28a00297 | 415 | VOID\r |
74e44290 | 416 | CoreNotifyOnProtocolInstallation (\r |
28a00297 | 417 | VOID\r |
23c98c94 | 418 | );\r |
28a00297 | 419 | \r |
28a00297 | 420 | \r |
162ed594 | 421 | /**\r |
422 | Return TRUE if all AP services are availible.\r | |
28a00297 | 423 | \r |
022c6d45 | 424 | @retval EFI_SUCCESS All AP services are available\r |
162ed594 | 425 | @retval EFI_NOT_FOUND At least one AP service is not available\r |
28a00297 | 426 | \r |
162ed594 | 427 | **/\r |
28a00297 | 428 | EFI_STATUS\r |
429 | CoreAllEfiServicesAvailable (\r | |
430 | VOID\r | |
23c98c94 | 431 | );\r |
28a00297 | 432 | \r |
28a00297 | 433 | \r |
162ed594 | 434 | /**\r |
435 | Calcualte the 32-bit CRC in a EFI table using the service provided by the\r | |
436 | gRuntime service.\r | |
28a00297 | 437 | \r |
162ed594 | 438 | @param Hdr Pointer to an EFI standard header\r |
28a00297 | 439 | \r |
162ed594 | 440 | **/\r |
28a00297 | 441 | VOID\r |
442 | CalculateEfiHdrCrc (\r | |
443 | IN OUT EFI_TABLE_HEADER *Hdr\r | |
23c98c94 | 444 | );\r |
28a00297 | 445 | \r |
28a00297 | 446 | \r |
162ed594 | 447 | /**\r |
448 | Called by the platform code to process a tick.\r | |
28a00297 | 449 | \r |
022c6d45 | 450 | @param Duration The number of 100ns elasped since the last call\r |
162ed594 | 451 | to TimerTick\r |
28a00297 | 452 | \r |
162ed594 | 453 | **/\r |
28a00297 | 454 | VOID\r |
455 | EFIAPI\r | |
456 | CoreTimerTick (\r | |
23c98c94 | 457 | IN UINT64 Duration\r |
458 | );\r | |
28a00297 | 459 | \r |
28a00297 | 460 | \r |
162ed594 | 461 | /**\r |
462 | Initialize the dispatcher. Initialize the notification function that runs when\r | |
022c6d45 | 463 | an FV2 protocol is added to the system.\r |
28a00297 | 464 | \r |
162ed594 | 465 | **/\r |
28a00297 | 466 | VOID\r |
467 | CoreInitializeDispatcher (\r | |
468 | VOID\r | |
23c98c94 | 469 | );\r |
28a00297 | 470 | \r |
28a00297 | 471 | \r |
162ed594 | 472 | /**\r |
473 | This is the POSTFIX version of the dependency evaluator. This code does\r | |
474 | not need to handle Before or After, as it is not valid to call this\r | |
475 | routine in this case. The SOR is just ignored and is a nop in the grammer.\r | |
476 | POSTFIX means all the math is done on top of the stack.\r | |
28a00297 | 477 | \r |
022c6d45 | 478 | @param DriverEntry DriverEntry element to update.\r |
28a00297 | 479 | \r |
022c6d45 | 480 | @retval TRUE If driver is ready to run.\r |
481 | @retval FALSE If driver is not ready to run or some fatal error\r | |
162ed594 | 482 | was found.\r |
28a00297 | 483 | \r |
162ed594 | 484 | **/\r |
28a00297 | 485 | BOOLEAN\r |
486 | CoreIsSchedulable (\r | |
022c6d45 | 487 | IN EFI_CORE_DRIVER_ENTRY *DriverEntry\r |
23c98c94 | 488 | );\r |
28a00297 | 489 | \r |
28a00297 | 490 | \r |
162ed594 | 491 | /**\r |
492 | Preprocess dependency expression and update DriverEntry to reflect the\r | |
493 | state of Before, After, and SOR dependencies. If DriverEntry->Before\r | |
494 | or DriverEntry->After is set it will never be cleared. If SOR is set\r | |
495 | it will be cleared by CoreSchedule(), and then the driver can be\r | |
496 | dispatched.\r | |
28a00297 | 497 | \r |
022c6d45 | 498 | @param DriverEntry DriverEntry element to update .\r |
28a00297 | 499 | \r |
162ed594 | 500 | @retval EFI_SUCCESS It always works.\r |
28a00297 | 501 | \r |
162ed594 | 502 | **/\r |
28a00297 | 503 | EFI_STATUS\r |
504 | CorePreProcessDepex (\r | |
022c6d45 | 505 | IN EFI_CORE_DRIVER_ENTRY *DriverEntry\r |
23c98c94 | 506 | );\r |
28a00297 | 507 | \r |
28a00297 | 508 | \r |
28a00297 | 509 | \r |
162ed594 | 510 | /**\r |
511 | Terminates all boot services.\r | |
28a00297 | 512 | \r |
022c6d45 | 513 | @param ImageHandle Handle that identifies the exiting image.\r |
162ed594 | 514 | @param MapKey Key to the latest memory map.\r |
28a00297 | 515 | \r |
022c6d45 | 516 | @retval EFI_SUCCESS Boot Services terminated\r |
162ed594 | 517 | @retval EFI_INVALID_PARAMETER MapKey is incorrect.\r |
28a00297 | 518 | \r |
162ed594 | 519 | **/\r |
28a00297 | 520 | EFI_STATUS\r |
521 | EFIAPI\r | |
522 | CoreExitBootServices (\r | |
523 | IN EFI_HANDLE ImageHandle,\r | |
524 | IN UINTN MapKey\r | |
23c98c94 | 525 | );\r |
28a00297 | 526 | \r |
28a00297 | 527 | \r |
162ed594 | 528 | /**\r |
529 | Make sure the memory map is following all the construction rules,\r | |
530 | it is the last time to check memory map error before exit boot services.\r | |
28a00297 | 531 | \r |
022c6d45 | 532 | @param MapKey Memory map key\r |
28a00297 | 533 | \r |
022c6d45 | 534 | @retval EFI_INVALID_PARAMETER Memory map not consistent with construction\r |
535 | rules.\r | |
162ed594 | 536 | @retval EFI_SUCCESS Valid memory map.\r |
28a00297 | 537 | \r |
162ed594 | 538 | **/\r |
28a00297 | 539 | EFI_STATUS\r |
540 | CoreTerminateMemoryMap (\r | |
23c98c94 | 541 | IN UINTN MapKey\r |
542 | );\r | |
28a00297 | 543 | \r |
28a00297 | 544 | \r |
162ed594 | 545 | /**\r |
546 | Signals all events in the EventGroup.\r | |
28a00297 | 547 | \r |
162ed594 | 548 | @param EventGroup The list to signal\r |
28a00297 | 549 | \r |
162ed594 | 550 | **/\r |
28a00297 | 551 | VOID\r |
552 | CoreNotifySignalList (\r | |
553 | IN EFI_GUID *EventGroup\r | |
23c98c94 | 554 | );\r |
28a00297 | 555 | \r |
28a00297 | 556 | \r |
28a00297 | 557 | \r |
162ed594 | 558 | /**\r |
559 | Boot Service called to add, modify, or remove a system configuration table from\r | |
560 | the EFI System Table.\r | |
28a00297 | 561 | \r |
022c6d45 | 562 | @param Guid Pointer to the GUID for the entry to add, update, or\r |
563 | remove\r | |
564 | @param Table Pointer to the configuration table for the entry to add,\r | |
565 | update, or remove, may be NULL.\r | |
28a00297 | 566 | \r |
162ed594 | 567 | @return EFI_SUCCESS Guid, Table pair added, updated, or removed.\r |
568 | @return EFI_INVALID_PARAMETER Input GUID not valid.\r | |
569 | @return EFI_NOT_FOUND Attempted to delete non-existant entry\r | |
570 | @return EFI_OUT_OF_RESOURCES Not enough memory available\r | |
28a00297 | 571 | \r |
162ed594 | 572 | **/\r |
28a00297 | 573 | EFI_STATUS\r |
574 | EFIAPI\r | |
575 | CoreInstallConfigurationTable (\r | |
23c98c94 | 576 | IN EFI_GUID *Guid,\r |
577 | IN VOID *Table\r | |
578 | );\r | |
28a00297 | 579 | \r |
28a00297 | 580 | \r |
28a00297 | 581 | \r |
162ed594 | 582 | /**\r |
583 | Raise the task priority level to the new level.\r | |
584 | High level is implemented by disabling processor interrupts.\r | |
28a00297 | 585 | \r |
022c6d45 | 586 | @param NewTpl New task priority level\r |
28a00297 | 587 | \r |
162ed594 | 588 | @return The previous task priority level\r |
28a00297 | 589 | \r |
162ed594 | 590 | **/\r |
28a00297 | 591 | EFI_TPL\r |
592 | EFIAPI\r | |
593 | CoreRaiseTpl (\r | |
23c98c94 | 594 | IN EFI_TPL NewTpl\r |
595 | );\r | |
28a00297 | 596 | \r |
28a00297 | 597 | \r |
28a00297 | 598 | \r |
162ed594 | 599 | /**\r |
600 | Lowers the task priority to the previous value. If the new\r | |
601 | priority unmasks events at a higher priority, they are dispatched.\r | |
28a00297 | 602 | \r |
162ed594 | 603 | @param NewTpl New, lower, task priority\r |
28a00297 | 604 | \r |
162ed594 | 605 | **/\r |
28a00297 | 606 | VOID\r |
607 | EFIAPI\r | |
608 | CoreRestoreTpl (\r | |
23c98c94 | 609 | IN EFI_TPL NewTpl\r |
610 | );\r | |
28a00297 | 611 | \r |
28a00297 | 612 | \r |
28a00297 | 613 | \r |
162ed594 | 614 | /**\r |
615 | Introduces a fine-grained stall.\r | |
28a00297 | 616 | \r |
162ed594 | 617 | @param Microseconds The number of microseconds to stall execution.\r |
28a00297 | 618 | \r |
022c6d45 | 619 | @retval EFI_SUCCESS Execution was stalled for at least the requested\r |
620 | amount of microseconds.\r | |
162ed594 | 621 | @retval EFI_NOT_AVAILABLE_YET gMetronome is not available yet\r |
28a00297 | 622 | \r |
162ed594 | 623 | **/\r |
28a00297 | 624 | EFI_STATUS\r |
625 | EFIAPI\r | |
626 | CoreStall (\r | |
627 | IN UINTN Microseconds\r | |
23c98c94 | 628 | );\r |
28a00297 | 629 | \r |
28a00297 | 630 | \r |
28a00297 | 631 | \r |
162ed594 | 632 | /**\r |
633 | Sets the system's watchdog timer.\r | |
28a00297 | 634 | \r |
162ed594 | 635 | @param Timeout The number of seconds to set the watchdog timer to.\r |
636 | A value of zero disables the timer.\r | |
637 | @param WatchdogCode The numeric code to log on a watchdog timer timeout\r | |
638 | event. The firmware reserves codes 0x0000 to 0xFFFF.\r | |
639 | Loaders and operating systems may use other timeout\r | |
640 | codes.\r | |
641 | @param DataSize The size, in bytes, of WatchdogData.\r | |
642 | @param WatchdogData A data buffer that includes a Null-terminated Unicode\r | |
643 | string, optionally followed by additional binary data.\r | |
644 | The string is a description that the call may use to\r | |
645 | further indicate the reason to be logged with a\r | |
646 | watchdog event.\r | |
647 | \r | |
648 | @return EFI_SUCCESS Timeout has been set\r | |
649 | @return EFI_NOT_AVAILABLE_YET WatchdogTimer is not available yet\r | |
650 | @return EFI_UNSUPPORTED System does not have a timer (currently not used)\r | |
651 | @return EFI_DEVICE_ERROR Could not complete due to hardware error\r | |
28a00297 | 652 | \r |
162ed594 | 653 | **/\r |
28a00297 | 654 | EFI_STATUS\r |
655 | EFIAPI\r | |
656 | CoreSetWatchdogTimer (\r | |
23c98c94 | 657 | IN UINTN Timeout,\r |
658 | IN UINT64 WatchdogCode,\r | |
659 | IN UINTN DataSize,\r | |
660 | IN CHAR16 *WatchdogData OPTIONAL\r | |
661 | );\r | |
28a00297 | 662 | \r |
28a00297 | 663 | \r |
28a00297 | 664 | \r |
162ed594 | 665 | /**\r |
666 | Wrapper function to CoreInstallProtocolInterfaceNotify. This is the public API which\r | |
667 | Calls the private one which contains a BOOLEAN parameter for notifications\r | |
28a00297 | 668 | \r |
022c6d45 | 669 | @param UserHandle The handle to install the protocol handler on,\r |
670 | or NULL if a new handle is to be allocated\r | |
671 | @param Protocol The protocol to add to the handle\r | |
672 | @param InterfaceType Indicates whether Interface is supplied in\r | |
673 | native form.\r | |
674 | @param Interface The interface for the protocol being added\r | |
28a00297 | 675 | \r |
162ed594 | 676 | @return Status code\r |
28a00297 | 677 | \r |
162ed594 | 678 | **/\r |
28a00297 | 679 | EFI_STATUS\r |
680 | EFIAPI\r | |
681 | CoreInstallProtocolInterface (\r | |
682 | IN OUT EFI_HANDLE *UserHandle,\r | |
683 | IN EFI_GUID *Protocol,\r | |
684 | IN EFI_INTERFACE_TYPE InterfaceType,\r | |
685 | IN VOID *Interface\r | |
23c98c94 | 686 | );\r |
28a00297 | 687 | \r |
28a00297 | 688 | \r |
162ed594 | 689 | /**\r |
690 | Installs a protocol interface into the boot services environment.\r | |
28a00297 | 691 | \r |
022c6d45 | 692 | @param UserHandle The handle to install the protocol handler on,\r |
693 | or NULL if a new handle is to be allocated\r | |
694 | @param Protocol The protocol to add to the handle\r | |
695 | @param InterfaceType Indicates whether Interface is supplied in\r | |
696 | native form.\r | |
697 | @param Interface The interface for the protocol being added\r | |
698 | @param Notify indicates whether notify the notification list\r | |
699 | for this protocol\r | |
28a00297 | 700 | \r |
022c6d45 | 701 | @retval EFI_INVALID_PARAMETER Invalid parameter\r |
702 | @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r | |
162ed594 | 703 | @retval EFI_SUCCESS Protocol interface successfully installed\r |
28a00297 | 704 | \r |
162ed594 | 705 | **/\r |
28a00297 | 706 | EFI_STATUS\r |
707 | CoreInstallProtocolInterfaceNotify (\r | |
708 | IN OUT EFI_HANDLE *UserHandle,\r | |
709 | IN EFI_GUID *Protocol,\r | |
710 | IN EFI_INTERFACE_TYPE InterfaceType,\r | |
711 | IN VOID *Interface,\r | |
712 | IN BOOLEAN Notify\r | |
23c98c94 | 713 | );\r |
28a00297 | 714 | \r |
28a00297 | 715 | \r |
28a00297 | 716 | \r |
162ed594 | 717 | /**\r |
718 | Installs a list of protocol interface into the boot services environment.\r | |
719 | This function calls InstallProtocolInterface() in a loop. If any error\r | |
720 | occures all the protocols added by this function are removed. This is\r | |
721 | basically a lib function to save space.\r | |
28a00297 | 722 | \r |
022c6d45 | 723 | @param Handle The handle to install the protocol handlers on,\r |
724 | or NULL if a new handle is to be allocated\r | |
725 | @param ... EFI_GUID followed by protocol instance. A NULL\r | |
726 | terminates the list. The pairs are the\r | |
727 | arguments to InstallProtocolInterface(). All the\r | |
728 | protocols are added to Handle.\r | |
28a00297 | 729 | \r |
5a7b9bbe SQ |
730 | @retval EFI_SUCCESS All the protocol interface was installed.\r |
731 | @retval EFI_OUT_OF_RESOURCES There was not enough memory in pool to install all the protocols.\r | |
732 | @retval EFI_ALREADY_STARTED A Device Path Protocol instance was passed in that is already present in\r | |
733 | the handle database.\r | |
022c6d45 | 734 | @retval EFI_INVALID_PARAMETER Handle is NULL.\r |
5a7b9bbe | 735 | @retval EFI_INVALID_PARAMETER Protocol is already installed on the handle specified by Handle.\r |
28a00297 | 736 | \r |
162ed594 | 737 | **/\r |
28a00297 | 738 | EFI_STATUS\r |
739 | EFIAPI\r | |
740 | CoreInstallMultipleProtocolInterfaces (\r | |
741 | IN OUT EFI_HANDLE *Handle,\r | |
742 | ...\r | |
23c98c94 | 743 | );\r |
28a00297 | 744 | \r |
28a00297 | 745 | \r |
28a00297 | 746 | \r |
162ed594 | 747 | /**\r |
748 | Uninstalls a list of protocol interface in the boot services environment.\r | |
749 | This function calls UnisatllProtocolInterface() in a loop. This is\r | |
750 | basically a lib function to save space.\r | |
28a00297 | 751 | \r |
022c6d45 | 752 | @param Handle The handle to uninstall the protocol\r |
753 | @param ... EFI_GUID followed by protocol instance. A NULL\r | |
754 | terminates the list. The pairs are the\r | |
755 | arguments to UninstallProtocolInterface(). All\r | |
756 | the protocols are added to Handle.\r | |
28a00297 | 757 | \r |
162ed594 | 758 | @return Status code\r |
28a00297 | 759 | \r |
162ed594 | 760 | **/\r |
28a00297 | 761 | EFI_STATUS\r |
762 | EFIAPI\r | |
763 | CoreUninstallMultipleProtocolInterfaces (\r | |
764 | IN EFI_HANDLE Handle,\r | |
765 | ...\r | |
23c98c94 | 766 | );\r |
28a00297 | 767 | \r |
28a00297 | 768 | \r |
28a00297 | 769 | \r |
162ed594 | 770 | /**\r |
771 | Reinstall a protocol interface on a device handle. The OldInterface for Protocol is replaced by the NewInterface.\r | |
28a00297 | 772 | \r |
022c6d45 | 773 | @param UserHandle Handle on which the interface is to be\r |
774 | reinstalled\r | |
775 | @param Protocol The numeric ID of the interface\r | |
776 | @param OldInterface A pointer to the old interface\r | |
777 | @param NewInterface A pointer to the new interface\r | |
28a00297 | 778 | \r |
162ed594 | 779 | @retval EFI_SUCCESS The protocol interface was installed\r |
780 | @retval EFI_NOT_FOUND The OldInterface on the handle was not found\r | |
781 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value\r | |
28a00297 | 782 | \r |
162ed594 | 783 | **/\r |
28a00297 | 784 | EFI_STATUS\r |
785 | EFIAPI\r | |
786 | CoreReinstallProtocolInterface (\r | |
787 | IN EFI_HANDLE UserHandle,\r | |
788 | IN EFI_GUID *Protocol,\r | |
789 | IN VOID *OldInterface,\r | |
790 | IN VOID *NewInterface\r | |
23c98c94 | 791 | );\r |
28a00297 | 792 | \r |
793 | \r | |
28a00297 | 794 | \r |
162ed594 | 795 | /**\r |
796 | Uninstalls all instances of a protocol:interfacer from a handle.\r | |
797 | If the last protocol interface is remove from the handle, the\r | |
798 | handle is freed.\r | |
28a00297 | 799 | \r |
022c6d45 | 800 | @param UserHandle The handle to remove the protocol handler from\r |
801 | @param Protocol The protocol, of protocol:interface, to remove\r | |
802 | @param Interface The interface, of protocol:interface, to remove\r | |
28a00297 | 803 | \r |
022c6d45 | 804 | @retval EFI_INVALID_PARAMETER Protocol is NULL.\r |
162ed594 | 805 | @retval EFI_SUCCESS Protocol interface successfully uninstalled.\r |
28a00297 | 806 | \r |
162ed594 | 807 | **/\r |
28a00297 | 808 | EFI_STATUS\r |
809 | EFIAPI\r | |
810 | CoreUninstallProtocolInterface (\r | |
811 | IN EFI_HANDLE UserHandle,\r | |
812 | IN EFI_GUID *Protocol,\r | |
813 | IN VOID *Interface\r | |
23c98c94 | 814 | );\r |
28a00297 | 815 | \r |
28a00297 | 816 | \r |
28a00297 | 817 | \r |
162ed594 | 818 | /**\r |
819 | Queries a handle to determine if it supports a specified protocol.\r | |
28a00297 | 820 | \r |
022c6d45 | 821 | @param UserHandle The handle being queried.\r |
822 | @param Protocol The published unique identifier of the protocol.\r | |
823 | @param Interface Supplies the address where a pointer to the\r | |
824 | corresponding Protocol Interface is returned.\r | |
28a00297 | 825 | \r |
162ed594 | 826 | @return The requested protocol interface for the handle\r |
28a00297 | 827 | \r |
162ed594 | 828 | **/\r |
28a00297 | 829 | EFI_STATUS\r |
830 | EFIAPI\r | |
831 | CoreHandleProtocol (\r | |
23c98c94 | 832 | IN EFI_HANDLE UserHandle,\r |
833 | IN EFI_GUID *Protocol,\r | |
834 | OUT VOID **Interface\r | |
835 | );\r | |
28a00297 | 836 | \r |
28a00297 | 837 | \r |
28a00297 | 838 | \r |
162ed594 | 839 | /**\r |
840 | Locates the installed protocol handler for the handle, and\r | |
841 | invokes it to obtain the protocol interface. Usage information\r | |
842 | is registered in the protocol data base.\r | |
28a00297 | 843 | \r |
022c6d45 | 844 | @param UserHandle The handle to obtain the protocol interface on\r |
845 | @param Protocol The ID of the protocol\r | |
846 | @param Interface The location to return the protocol interface\r | |
847 | @param ImageHandle The handle of the Image that is opening the\r | |
848 | protocol interface specified by Protocol and\r | |
849 | Interface.\r | |
850 | @param ControllerHandle The controller handle that is requiring this\r | |
851 | interface.\r | |
852 | @param Attributes The open mode of the protocol interface\r | |
853 | specified by Handle and Protocol.\r | |
854 | \r | |
855 | @retval EFI_INVALID_PARAMETER Protocol is NULL.\r | |
162ed594 | 856 | @retval EFI_SUCCESS Get the protocol interface.\r |
28a00297 | 857 | \r |
162ed594 | 858 | **/\r |
28a00297 | 859 | EFI_STATUS\r |
860 | EFIAPI\r | |
861 | CoreOpenProtocol (\r | |
862 | IN EFI_HANDLE UserHandle,\r | |
863 | IN EFI_GUID *Protocol,\r | |
864 | OUT VOID **Interface OPTIONAL,\r | |
865 | IN EFI_HANDLE ImageHandle,\r | |
866 | IN EFI_HANDLE ControllerHandle,\r | |
867 | IN UINT32 Attributes\r | |
23c98c94 | 868 | );\r |
28a00297 | 869 | \r |
28a00297 | 870 | \r |
28a00297 | 871 | \r |
162ed594 | 872 | /**\r |
873 | Return information about Opened protocols in the system\r | |
28a00297 | 874 | \r |
022c6d45 | 875 | @param UserHandle The handle to close the protocol interface on\r |
876 | @param Protocol The ID of the protocol\r | |
877 | @param EntryBuffer A pointer to a buffer of open protocol\r | |
878 | information in the form of\r | |
879 | EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.\r | |
162ed594 | 880 | @param EntryCount Number of EntryBuffer entries\r |
28a00297 | 881 | \r |
162ed594 | 882 | **/\r |
28a00297 | 883 | EFI_STATUS\r |
884 | EFIAPI\r | |
885 | CoreOpenProtocolInformation (\r | |
886 | IN EFI_HANDLE UserHandle,\r | |
887 | IN EFI_GUID *Protocol,\r | |
888 | OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,\r | |
889 | OUT UINTN *EntryCount\r | |
23c98c94 | 890 | );\r |
28a00297 | 891 | \r |
28a00297 | 892 | \r |
28a00297 | 893 | \r |
162ed594 | 894 | /**\r |
895 | Closes a protocol on a handle that was opened using OpenProtocol().\r | |
28a00297 | 896 | \r |
022c6d45 | 897 | @param UserHandle The handle for the protocol interface that was\r |
898 | previously opened with OpenProtocol(), and is\r | |
899 | now being closed.\r | |
900 | @param Protocol The published unique identifier of the protocol.\r | |
901 | It is the caller's responsibility to pass in a\r | |
902 | valid GUID.\r | |
903 | @param AgentHandle The handle of the agent that is closing the\r | |
904 | protocol interface.\r | |
905 | @param ControllerHandle If the agent that opened a protocol is a driver\r | |
906 | that follows the EFI Driver Model, then this\r | |
907 | parameter is the controller handle that required\r | |
908 | the protocol interface. If the agent does not\r | |
909 | follow the EFI Driver Model, then this parameter\r | |
910 | is optional and may be NULL.\r | |
911 | \r | |
912 | @retval EFI_SUCCESS The protocol instance was closed.\r | |
913 | @retval EFI_INVALID_PARAMETER Handle, AgentHandle or ControllerHandle is not a\r | |
914 | valid EFI_HANDLE.\r | |
915 | @retval EFI_NOT_FOUND Can not find the specified protocol or\r | |
162ed594 | 916 | AgentHandle.\r |
28a00297 | 917 | \r |
162ed594 | 918 | **/\r |
28a00297 | 919 | EFI_STATUS\r |
920 | EFIAPI\r | |
921 | CoreCloseProtocol (\r | |
922 | IN EFI_HANDLE UserHandle,\r | |
923 | IN EFI_GUID *Protocol,\r | |
162ed594 | 924 | IN EFI_HANDLE AgentHandle,\r |
022c6d45 | 925 | IN EFI_HANDLE ControllerHandle\r |
23c98c94 | 926 | );\r |
28a00297 | 927 | \r |
28a00297 | 928 | \r |
28a00297 | 929 | \r |
162ed594 | 930 | /**\r |
931 | Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated\r | |
932 | from pool.\r | |
933 | \r | |
022c6d45 | 934 | @param UserHandle The handle from which to retrieve the list of\r |
935 | protocol interface GUIDs.\r | |
936 | @param ProtocolBuffer A pointer to the list of protocol interface GUID\r | |
937 | pointers that are installed on Handle.\r | |
938 | @param ProtocolBufferCount A pointer to the number of GUID pointers present\r | |
939 | in ProtocolBuffer.\r | |
940 | \r | |
941 | @retval EFI_SUCCESS The list of protocol interface GUIDs installed\r | |
942 | on Handle was returned in ProtocolBuffer. The\r | |
943 | number of protocol interface GUIDs was returned\r | |
944 | in ProtocolBufferCount.\r | |
945 | @retval EFI_INVALID_PARAMETER Handle is NULL.\r | |
946 | @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.\r | |
947 | @retval EFI_INVALID_PARAMETER ProtocolBuffer is NULL.\r | |
948 | @retval EFI_INVALID_PARAMETER ProtocolBufferCount is NULL.\r | |
949 | @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the\r | |
162ed594 | 950 | results.\r |
28a00297 | 951 | \r |
162ed594 | 952 | **/\r |
28a00297 | 953 | EFI_STATUS\r |
954 | EFIAPI\r | |
955 | CoreProtocolsPerHandle (\r | |
23c98c94 | 956 | IN EFI_HANDLE UserHandle,\r |
957 | OUT EFI_GUID ***ProtocolBuffer,\r | |
958 | OUT UINTN *ProtocolBufferCount\r | |
959 | );\r | |
28a00297 | 960 | \r |
28a00297 | 961 | \r |
28a00297 | 962 | \r |
162ed594 | 963 | /**\r |
964 | Add a new protocol notification record for the request protocol.\r | |
28a00297 | 965 | \r |
022c6d45 | 966 | @param Protocol The requested protocol to add the notify\r |
967 | registration\r | |
968 | @param Event The event to signal\r | |
969 | @param Registration Returns the registration record\r | |
28a00297 | 970 | \r |
022c6d45 | 971 | @retval EFI_INVALID_PARAMETER Invalid parameter\r |
972 | @retval EFI_SUCCESS Successfully returned the registration record\r | |
162ed594 | 973 | that has been added\r |
28a00297 | 974 | \r |
162ed594 | 975 | **/\r |
28a00297 | 976 | EFI_STATUS\r |
977 | EFIAPI\r | |
978 | CoreRegisterProtocolNotify (\r | |
23c98c94 | 979 | IN EFI_GUID *Protocol,\r |
980 | IN EFI_EVENT Event,\r | |
022c6d45 | 981 | OUT VOID **Registration\r |
23c98c94 | 982 | );\r |
022c6d45 | 983 | \r |
28a00297 | 984 | \r |
ec90508b | 985 | /**\r |
986 | Removes all the events in the protocol database that match Event.\r | |
987 | \r | |
988 | @param Event The event to search for in the protocol\r | |
989 | database.\r | |
990 | \r | |
991 | @return EFI_SUCCESS when done searching the entire database.\r | |
992 | \r | |
993 | **/\r | |
994 | EFI_STATUS\r | |
995 | CoreUnregisterProtocolNotify (\r | |
996 | IN EFI_EVENT Event\r | |
997 | );\r | |
998 | \r | |
28a00297 | 999 | \r |
162ed594 | 1000 | /**\r |
1001 | Locates the requested handle(s) and returns them in Buffer.\r | |
28a00297 | 1002 | \r |
022c6d45 | 1003 | @param SearchType The type of search to perform to locate the\r |
1004 | handles\r | |
1005 | @param Protocol The protocol to search for\r | |
1006 | @param SearchKey Dependant on SearchType\r | |
1007 | @param BufferSize On input the size of Buffer. On output the\r | |
1008 | size of data returned.\r | |
1009 | @param Buffer The buffer to return the results in\r | |
28a00297 | 1010 | \r |
022c6d45 | 1011 | @retval EFI_BUFFER_TOO_SMALL Buffer too small, required buffer size is\r |
1012 | returned in BufferSize.\r | |
1013 | @retval EFI_INVALID_PARAMETER Invalid parameter\r | |
1014 | @retval EFI_SUCCESS Successfully found the requested handle(s) and\r | |
162ed594 | 1015 | returns them in Buffer.\r |
28a00297 | 1016 | \r |
162ed594 | 1017 | **/\r |
28a00297 | 1018 | EFI_STATUS\r |
1019 | EFIAPI\r | |
1020 | CoreLocateHandle (\r | |
23c98c94 | 1021 | IN EFI_LOCATE_SEARCH_TYPE SearchType,\r |
1022 | IN EFI_GUID *Protocol OPTIONAL,\r | |
1023 | IN VOID *SearchKey OPTIONAL,\r | |
1024 | IN OUT UINTN *BufferSize,\r | |
1025 | OUT EFI_HANDLE *Buffer\r | |
1026 | );\r | |
022c6d45 | 1027 | \r |
28a00297 | 1028 | \r |
28a00297 | 1029 | \r |
162ed594 | 1030 | /**\r |
1031 | Locates the handle to a device on the device path that best matches the specified protocol.\r | |
28a00297 | 1032 | \r |
022c6d45 | 1033 | @param Protocol The protocol to search for.\r |
1034 | @param DevicePath On input, a pointer to a pointer to the device\r | |
1035 | path. On output, the device path pointer is\r | |
1036 | modified to point to the remaining part of the\r | |
1037 | devicepath.\r | |
1038 | @param Device A pointer to the returned device handle.\r | |
28a00297 | 1039 | \r |
022c6d45 | 1040 | @retval EFI_SUCCESS The resulting handle was returned.\r |
1041 | @retval EFI_NOT_FOUND No handles matched the search.\r | |
162ed594 | 1042 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r |
28a00297 | 1043 | \r |
162ed594 | 1044 | **/\r |
28a00297 | 1045 | EFI_STATUS\r |
1046 | EFIAPI\r | |
1047 | CoreLocateDevicePath (\r | |
23c98c94 | 1048 | IN EFI_GUID *Protocol,\r |
1049 | IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,\r | |
1050 | OUT EFI_HANDLE *Device\r | |
1051 | );\r | |
28a00297 | 1052 | \r |
022c6d45 | 1053 | \r |
28a00297 | 1054 | \r |
162ed594 | 1055 | /**\r |
1056 | Function returns an array of handles that support the requested protocol\r | |
1057 | in a buffer allocated from pool. This is a version of CoreLocateHandle()\r | |
1058 | that allocates a buffer for the caller.\r | |
28a00297 | 1059 | \r |
022c6d45 | 1060 | @param SearchType Specifies which handle(s) are to be returned.\r |
1061 | @param Protocol Provides the protocol to search by. This\r | |
1062 | parameter is only valid for SearchType\r | |
1063 | ByProtocol.\r | |
1064 | @param SearchKey Supplies the search key depending on the\r | |
1065 | SearchType.\r | |
1066 | @param NumberHandles The number of handles returned in Buffer.\r | |
1067 | @param Buffer A pointer to the buffer to return the requested\r | |
1068 | array of handles that support Protocol.\r | |
1069 | \r | |
1070 | @retval EFI_SUCCESS The result array of handles was returned.\r | |
1071 | @retval EFI_NOT_FOUND No handles match the search.\r | |
1072 | @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the\r | |
1073 | matching results.\r | |
1074 | @retval EFI_INVALID_PARAMETER One or more paramters are not valid.\r | |
28a00297 | 1075 | \r |
162ed594 | 1076 | **/\r |
28a00297 | 1077 | EFI_STATUS\r |
1078 | EFIAPI\r | |
1079 | CoreLocateHandleBuffer (\r | |
23c98c94 | 1080 | IN EFI_LOCATE_SEARCH_TYPE SearchType,\r |
1081 | IN EFI_GUID *Protocol OPTIONAL,\r | |
1082 | IN VOID *SearchKey OPTIONAL,\r | |
1083 | IN OUT UINTN *NumberHandles,\r | |
1084 | OUT EFI_HANDLE **Buffer\r | |
1085 | );\r | |
28a00297 | 1086 | \r |
022c6d45 | 1087 | \r |
28a00297 | 1088 | \r |
162ed594 | 1089 | /**\r |
1090 | Return the first Protocol Interface that matches the Protocol GUID. If\r | |
8bc18cc6 | 1091 | Registration is passed in, return a Protocol Instance that was just add\r |
1092 | to the system. If Registration is NULL return the first Protocol Interface\r | |
162ed594 | 1093 | you find.\r |
28a00297 | 1094 | \r |
44310938 | 1095 | @param Protocol The protocol to search for\r |
1096 | @param Registration Optional Registration Key returned from\r | |
1097 | RegisterProtocolNotify()\r | |
1098 | @param Interface Return the Protocol interface (instance).\r | |
28a00297 | 1099 | \r |
44310938 | 1100 | @retval EFI_SUCCESS If a valid Interface is returned\r |
1101 | @retval EFI_INVALID_PARAMETER Invalid parameter\r | |
162ed594 | 1102 | @retval EFI_NOT_FOUND Protocol interface not found\r |
28a00297 | 1103 | \r |
162ed594 | 1104 | **/\r |
28a00297 | 1105 | EFI_STATUS\r |
1106 | EFIAPI\r | |
1107 | CoreLocateProtocol (\r | |
23c98c94 | 1108 | IN EFI_GUID *Protocol,\r |
1109 | IN VOID *Registration OPTIONAL,\r | |
1110 | OUT VOID **Interface\r | |
1111 | );\r | |
28a00297 | 1112 | \r |
28a00297 | 1113 | \r |
162ed594 | 1114 | /**\r |
1115 | return handle database key.\r | |
28a00297 | 1116 | \r |
28a00297 | 1117 | \r |
162ed594 | 1118 | @return Handle database key.\r |
28a00297 | 1119 | \r |
162ed594 | 1120 | **/\r |
28a00297 | 1121 | UINT64\r |
1122 | CoreGetHandleDatabaseKey (\r | |
1123 | VOID\r | |
23c98c94 | 1124 | );\r |
28a00297 | 1125 | \r |
28a00297 | 1126 | \r |
162ed594 | 1127 | /**\r |
1128 | Go connect any handles that were created or modified while a image executed.\r | |
28a00297 | 1129 | \r |
022c6d45 | 1130 | @param Key The Key to show that the handle has been\r |
162ed594 | 1131 | created/modified\r |
28a00297 | 1132 | \r |
162ed594 | 1133 | **/\r |
28a00297 | 1134 | VOID\r |
1135 | CoreConnectHandlesByKey (\r | |
1136 | UINT64 Key\r | |
23c98c94 | 1137 | );\r |
28a00297 | 1138 | \r |
28a00297 | 1139 | \r |
28a00297 | 1140 | \r |
162ed594 | 1141 | /**\r |
1142 | Connects one or more drivers to a controller.\r | |
28a00297 | 1143 | \r |
bc2dfdbc LG |
1144 | @param ControllerHandle The handle of the controller to which driver(s) are to be connected.\r |
1145 | @param DriverImageHandle A pointer to an ordered list handles that support the\r | |
1146 | EFI_DRIVER_BINDING_PROTOCOL.\r | |
1147 | @param RemainingDevicePath A pointer to the device path that specifies a child of the\r | |
1148 | controller specified by ControllerHandle.\r | |
1149 | @param Recursive If TRUE, then ConnectController() is called recursively\r | |
1150 | until the entire tree of controllers below the controller specified\r | |
1151 | by ControllerHandle have been created. If FALSE, then\r | |
1152 | the tree of controllers is only expanded one level.\r | |
1153 | \r | |
1154 | @retval EFI_SUCCESS 1) One or more drivers were connected to ControllerHandle.\r | |
1155 | 2) No drivers were connected to ControllerHandle, but\r | |
1156 | RemainingDevicePath is not NULL, and it is an End Device\r | |
1157 | Path Node.\r | |
1158 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r | |
1159 | @retval EFI_NOT_FOUND 1) There are no EFI_DRIVER_BINDING_PROTOCOL instances\r | |
1160 | present in the system.\r | |
1161 | 2) No drivers were connected to ControllerHandle.\r | |
1162 | @retval EFI_SECURITY_VIOLATION \r | |
1163 | The user has no permission to start UEFI device drivers on the device path \r | |
1164 | associated with the ControllerHandle or specified by the RemainingDevicePath.\r | |
28a00297 | 1165 | \r |
162ed594 | 1166 | **/\r |
022c6d45 | 1167 | EFI_STATUS\r |
28a00297 | 1168 | EFIAPI\r |
1169 | CoreConnectController (\r | |
1170 | IN EFI_HANDLE ControllerHandle,\r | |
1171 | IN EFI_HANDLE *DriverImageHandle OPTIONAL,\r | |
1172 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL,\r | |
1173 | IN BOOLEAN Recursive\r | |
23c98c94 | 1174 | );\r |
28a00297 | 1175 | \r |
28a00297 | 1176 | \r |
28a00297 | 1177 | \r |
162ed594 | 1178 | /**\r |
1179 | Disonnects a controller from a driver\r | |
28a00297 | 1180 | \r |
022c6d45 | 1181 | @param ControllerHandle ControllerHandle The handle of\r |
1182 | the controller from which\r | |
1183 | driver(s) are to be\r | |
1184 | disconnected.\r | |
1185 | @param DriverImageHandle DriverImageHandle The driver to\r | |
1186 | disconnect from ControllerHandle.\r | |
1187 | @param ChildHandle ChildHandle The handle of the\r | |
1188 | child to destroy.\r | |
1189 | \r | |
1190 | @retval EFI_SUCCESS One or more drivers were\r | |
1191 | disconnected from the controller.\r | |
1192 | @retval EFI_SUCCESS On entry, no drivers are managing\r | |
1193 | ControllerHandle.\r | |
1194 | @retval EFI_SUCCESS DriverImageHandle is not NULL,\r | |
1195 | and on entry DriverImageHandle is\r | |
1196 | not managing ControllerHandle.\r | |
284ee2e8 | 1197 | @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r |
022c6d45 | 1198 | @retval EFI_INVALID_PARAMETER DriverImageHandle is not NULL,\r |
1199 | and it is not a valid EFI_HANDLE.\r | |
1200 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL, and it\r | |
1201 | is not a valid EFI_HANDLE.\r | |
1202 | @retval EFI_OUT_OF_RESOURCES There are not enough resources\r | |
1203 | available to disconnect any\r | |
1204 | drivers from ControllerHandle.\r | |
1205 | @retval EFI_DEVICE_ERROR The controller could not be\r | |
1206 | disconnected because of a device\r | |
162ed594 | 1207 | error.\r |
28a00297 | 1208 | \r |
162ed594 | 1209 | **/\r |
022c6d45 | 1210 | EFI_STATUS\r |
28a00297 | 1211 | EFIAPI\r |
1212 | CoreDisconnectController (\r | |
23c98c94 | 1213 | IN EFI_HANDLE ControllerHandle,\r |
1214 | IN EFI_HANDLE DriverImageHandle OPTIONAL,\r | |
1215 | IN EFI_HANDLE ChildHandle OPTIONAL\r | |
1216 | );\r | |
28a00297 | 1217 | \r |
28a00297 | 1218 | \r |
28a00297 | 1219 | \r |
162ed594 | 1220 | /**\r |
1221 | Allocates pages from the memory map.\r | |
28a00297 | 1222 | \r |
022c6d45 | 1223 | @param Type The type of allocation to perform\r |
1224 | @param MemoryType The type of memory to turn the allocated pages\r | |
1225 | into\r | |
1226 | @param NumberOfPages The number of pages to allocate\r | |
1227 | @param Memory A pointer to receive the base allocated memory\r | |
1228 | address\r | |
28a00297 | 1229 | \r |
162ed594 | 1230 | @return Status. On success, Memory is filled in with the base address allocated\r |
022c6d45 | 1231 | @retval EFI_INVALID_PARAMETER Parameters violate checking rules defined in\r |
1232 | spec.\r | |
1233 | @retval EFI_NOT_FOUND Could not allocate pages match the requirement.\r | |
1234 | @retval EFI_OUT_OF_RESOURCES No enough pages to allocate.\r | |
162ed594 | 1235 | @retval EFI_SUCCESS Pages successfully allocated.\r |
28a00297 | 1236 | \r |
162ed594 | 1237 | **/\r |
28a00297 | 1238 | EFI_STATUS\r |
1239 | EFIAPI\r | |
1240 | CoreAllocatePages (\r | |
23c98c94 | 1241 | IN EFI_ALLOCATE_TYPE Type,\r |
1242 | IN EFI_MEMORY_TYPE MemoryType,\r | |
1243 | IN UINTN NumberOfPages,\r | |
1244 | IN OUT EFI_PHYSICAL_ADDRESS *Memory\r | |
1245 | );\r | |
28a00297 | 1246 | \r |
84edd20b SZ |
1247 | /**\r |
1248 | Allocates pages from the memory map.\r | |
1249 | \r | |
1250 | @param Type The type of allocation to perform\r | |
1251 | @param MemoryType The type of memory to turn the allocated pages\r | |
1252 | into\r | |
1253 | @param NumberOfPages The number of pages to allocate\r | |
1254 | @param Memory A pointer to receive the base allocated memory\r | |
1255 | address\r | |
1256 | \r | |
1257 | @return Status. On success, Memory is filled in with the base address allocated\r | |
1258 | @retval EFI_INVALID_PARAMETER Parameters violate checking rules defined in\r | |
1259 | spec.\r | |
1260 | @retval EFI_NOT_FOUND Could not allocate pages match the requirement.\r | |
1261 | @retval EFI_OUT_OF_RESOURCES No enough pages to allocate.\r | |
1262 | @retval EFI_SUCCESS Pages successfully allocated.\r | |
28a00297 | 1263 | \r |
84edd20b SZ |
1264 | **/\r |
1265 | EFI_STATUS\r | |
1266 | EFIAPI\r | |
1267 | CoreInternalAllocatePages (\r | |
1268 | IN EFI_ALLOCATE_TYPE Type,\r | |
1269 | IN EFI_MEMORY_TYPE MemoryType,\r | |
1270 | IN UINTN NumberOfPages,\r | |
1271 | IN OUT EFI_PHYSICAL_ADDRESS *Memory\r | |
1272 | );\r | |
28a00297 | 1273 | \r |
162ed594 | 1274 | /**\r |
1275 | Frees previous allocated pages.\r | |
28a00297 | 1276 | \r |
022c6d45 | 1277 | @param Memory Base address of memory being freed\r |
1278 | @param NumberOfPages The number of pages to free\r | |
28a00297 | 1279 | \r |
022c6d45 | 1280 | @retval EFI_NOT_FOUND Could not find the entry that covers the range\r |
1281 | @retval EFI_INVALID_PARAMETER Address not aligned\r | |
162ed594 | 1282 | @return EFI_SUCCESS -Pages successfully freed.\r |
28a00297 | 1283 | \r |
162ed594 | 1284 | **/\r |
022c6d45 | 1285 | EFI_STATUS\r |
28a00297 | 1286 | EFIAPI\r |
1287 | CoreFreePages (\r | |
1288 | IN EFI_PHYSICAL_ADDRESS Memory,\r | |
1289 | IN UINTN NumberOfPages\r | |
23c98c94 | 1290 | );\r |
28a00297 | 1291 | \r |
84edd20b SZ |
1292 | /**\r |
1293 | Frees previous allocated pages.\r | |
1294 | \r | |
1295 | @param Memory Base address of memory being freed\r | |
1296 | @param NumberOfPages The number of pages to free\r | |
1297 | \r | |
1298 | @retval EFI_NOT_FOUND Could not find the entry that covers the range\r | |
1299 | @retval EFI_INVALID_PARAMETER Address not aligned\r | |
1300 | @return EFI_SUCCESS -Pages successfully freed.\r | |
28a00297 | 1301 | \r |
84edd20b SZ |
1302 | **/\r |
1303 | EFI_STATUS\r | |
1304 | EFIAPI\r | |
1305 | CoreInternalFreePages (\r | |
1306 | IN EFI_PHYSICAL_ADDRESS Memory,\r | |
1307 | IN UINTN NumberOfPages\r | |
1308 | );\r | |
28a00297 | 1309 | \r |
162ed594 | 1310 | /**\r |
1311 | This function returns a copy of the current memory map. The map is an array of\r | |
1312 | memory descriptors, each of which describes a contiguous block of memory.\r | |
28a00297 | 1313 | \r |
022c6d45 | 1314 | @param MemoryMapSize A pointer to the size, in bytes, of the\r |
1315 | MemoryMap buffer. On input, this is the size of\r | |
1316 | the buffer allocated by the caller. On output,\r | |
1317 | it is the size of the buffer returned by the\r | |
1318 | firmware if the buffer was large enough, or the\r | |
1319 | size of the buffer needed to contain the map if\r | |
1320 | the buffer was too small.\r | |
1321 | @param MemoryMap A pointer to the buffer in which firmware places\r | |
1322 | the current memory map.\r | |
1323 | @param MapKey A pointer to the location in which firmware\r | |
1324 | returns the key for the current memory map.\r | |
1325 | @param DescriptorSize A pointer to the location in which firmware\r | |
1326 | returns the size, in bytes, of an individual\r | |
1327 | EFI_MEMORY_DESCRIPTOR.\r | |
1328 | @param DescriptorVersion A pointer to the location in which firmware\r | |
1329 | returns the version number associated with the\r | |
1330 | EFI_MEMORY_DESCRIPTOR.\r | |
1331 | \r | |
1332 | @retval EFI_SUCCESS The memory map was returned in the MemoryMap\r | |
1333 | buffer.\r | |
1334 | @retval EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small. The current\r | |
1335 | buffer size needed to hold the memory map is\r | |
1336 | returned in MemoryMapSize.\r | |
162ed594 | 1337 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r |
28a00297 | 1338 | \r |
162ed594 | 1339 | **/\r |
28a00297 | 1340 | EFI_STATUS\r |
1341 | EFIAPI\r | |
1342 | CoreGetMemoryMap (\r | |
23c98c94 | 1343 | IN OUT UINTN *MemoryMapSize,\r |
1344 | IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,\r | |
1345 | OUT UINTN *MapKey,\r | |
1346 | OUT UINTN *DescriptorSize,\r | |
1347 | OUT UINT32 *DescriptorVersion\r | |
1348 | );\r | |
28a00297 | 1349 | \r |
28a00297 | 1350 | \r |
28a00297 | 1351 | \r |
162ed594 | 1352 | /**\r |
1353 | Allocate pool of a particular type.\r | |
28a00297 | 1354 | \r |
022c6d45 | 1355 | @param PoolType Type of pool to allocate\r |
1356 | @param Size The amount of pool to allocate\r | |
1357 | @param Buffer The address to return a pointer to the allocated\r | |
1358 | pool\r | |
28a00297 | 1359 | \r |
3e058701 | 1360 | @retval EFI_INVALID_PARAMETER PoolType not valid or Buffer is NULL\r |
022c6d45 | 1361 | @retval EFI_OUT_OF_RESOURCES Size exceeds max pool size or allocation failed.\r |
162ed594 | 1362 | @retval EFI_SUCCESS Pool successfully allocated.\r |
28a00297 | 1363 | \r |
162ed594 | 1364 | **/\r |
28a00297 | 1365 | EFI_STATUS\r |
1366 | EFIAPI\r | |
1367 | CoreAllocatePool (\r | |
23c98c94 | 1368 | IN EFI_MEMORY_TYPE PoolType,\r |
1369 | IN UINTN Size,\r | |
1370 | OUT VOID **Buffer\r | |
1371 | );\r | |
28a00297 | 1372 | \r |
84edd20b SZ |
1373 | /**\r |
1374 | Allocate pool of a particular type.\r | |
1375 | \r | |
1376 | @param PoolType Type of pool to allocate\r | |
1377 | @param Size The amount of pool to allocate\r | |
1378 | @param Buffer The address to return a pointer to the allocated\r | |
1379 | pool\r | |
28a00297 | 1380 | \r |
84edd20b SZ |
1381 | @retval EFI_INVALID_PARAMETER PoolType not valid or Buffer is NULL\r |
1382 | @retval EFI_OUT_OF_RESOURCES Size exceeds max pool size or allocation failed.\r | |
1383 | @retval EFI_SUCCESS Pool successfully allocated.\r | |
1384 | \r | |
1385 | **/\r | |
1386 | EFI_STATUS\r | |
1387 | EFIAPI\r | |
1388 | CoreInternalAllocatePool (\r | |
1389 | IN EFI_MEMORY_TYPE PoolType,\r | |
1390 | IN UINTN Size,\r | |
1391 | OUT VOID **Buffer\r | |
1392 | );\r | |
28a00297 | 1393 | \r |
162ed594 | 1394 | /**\r |
1395 | Frees pool.\r | |
28a00297 | 1396 | \r |
022c6d45 | 1397 | @param Buffer The allocated pool entry to free\r |
28a00297 | 1398 | \r |
022c6d45 | 1399 | @retval EFI_INVALID_PARAMETER Buffer is not a valid value.\r |
162ed594 | 1400 | @retval EFI_SUCCESS Pool successfully freed.\r |
28a00297 | 1401 | \r |
162ed594 | 1402 | **/\r |
28a00297 | 1403 | EFI_STATUS\r |
1404 | EFIAPI\r | |
1405 | CoreFreePool (\r | |
23c98c94 | 1406 | IN VOID *Buffer\r |
1407 | );\r | |
28a00297 | 1408 | \r |
84edd20b SZ |
1409 | /**\r |
1410 | Frees pool.\r | |
1411 | \r | |
1412 | @param Buffer The allocated pool entry to free\r | |
28a00297 | 1413 | \r |
84edd20b SZ |
1414 | @retval EFI_INVALID_PARAMETER Buffer is not a valid value.\r |
1415 | @retval EFI_SUCCESS Pool successfully freed.\r | |
1416 | \r | |
1417 | **/\r | |
1418 | EFI_STATUS\r | |
1419 | EFIAPI\r | |
1420 | CoreInternalFreePool (\r | |
1421 | IN VOID *Buffer\r | |
1422 | );\r | |
28a00297 | 1423 | \r |
162ed594 | 1424 | /**\r |
1425 | Loads an EFI image into memory and returns a handle to the image.\r | |
28a00297 | 1426 | \r |
022c6d45 | 1427 | @param BootPolicy If TRUE, indicates that the request originates\r |
1428 | from the boot manager, and that the boot\r | |
1429 | manager is attempting to load FilePath as a\r | |
1430 | boot selection.\r | |
1431 | @param ParentImageHandle The caller's image handle.\r | |
1432 | @param FilePath The specific file path from which the image is\r | |
1433 | loaded.\r | |
1434 | @param SourceBuffer If not NULL, a pointer to the memory location\r | |
1435 | containing a copy of the image to be loaded.\r | |
1436 | @param SourceSize The size in bytes of SourceBuffer.\r | |
1437 | @param ImageHandle Pointer to the returned image handle that is\r | |
1438 | created when the image is successfully loaded.\r | |
1439 | \r | |
1440 | @retval EFI_SUCCESS The image was loaded into memory.\r | |
1441 | @retval EFI_NOT_FOUND The FilePath was not found.\r | |
1442 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r | |
1443 | @retval EFI_UNSUPPORTED The image type is not supported, or the device\r | |
1444 | path cannot be parsed to locate the proper\r | |
1445 | protocol for loading the file.\r | |
1446 | @retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient\r | |
162ed594 | 1447 | resources.\r |
b695e7ff LG |
1448 | @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not\r |
1449 | understood.\r | |
1450 | @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error.\r | |
1451 | @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the \r | |
1452 | image from being loaded. NULL is returned in *ImageHandle.\r | |
1453 | @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a \r | |
1454 | valid EFI_LOADED_IMAGE_PROTOCOL. However, the current \r | |
1455 | platform policy specifies that the image should not be started.\r | |
28a00297 | 1456 | \r |
162ed594 | 1457 | **/\r |
28a00297 | 1458 | EFI_STATUS\r |
1459 | EFIAPI\r | |
1460 | CoreLoadImage (\r | |
23c98c94 | 1461 | IN BOOLEAN BootPolicy,\r |
1462 | IN EFI_HANDLE ParentImageHandle,\r | |
1463 | IN EFI_DEVICE_PATH_PROTOCOL *FilePath,\r | |
1464 | IN VOID *SourceBuffer OPTIONAL,\r | |
1465 | IN UINTN SourceSize,\r | |
1466 | OUT EFI_HANDLE *ImageHandle\r | |
1467 | );\r | |
28a00297 | 1468 | \r |
28a00297 | 1469 | \r |
28a00297 | 1470 | \r |
162ed594 | 1471 | /**\r |
1472 | Unloads an image.\r | |
28a00297 | 1473 | \r |
022c6d45 | 1474 | @param ImageHandle Handle that identifies the image to be\r |
1475 | unloaded.\r | |
28a00297 | 1476 | \r |
022c6d45 | 1477 | @retval EFI_SUCCESS The image has been unloaded.\r |
1478 | @retval EFI_UNSUPPORTED The image has been sarted, and does not support\r | |
1479 | unload.\r | |
162ed594 | 1480 | @retval EFI_INVALID_PARAMPETER ImageHandle is not a valid image handle.\r |
28a00297 | 1481 | \r |
162ed594 | 1482 | **/\r |
28a00297 | 1483 | EFI_STATUS\r |
1484 | EFIAPI\r | |
1485 | CoreUnloadImage (\r | |
1486 | IN EFI_HANDLE ImageHandle\r | |
23c98c94 | 1487 | );\r |
28a00297 | 1488 | \r |
28a00297 | 1489 | \r |
28a00297 | 1490 | \r |
162ed594 | 1491 | /**\r |
1492 | Transfer control to a loaded image's entry point.\r | |
28a00297 | 1493 | \r |
022c6d45 | 1494 | @param ImageHandle Handle of image to be started.\r |
1495 | @param ExitDataSize Pointer of the size to ExitData\r | |
1496 | @param ExitData Pointer to a pointer to a data buffer that\r | |
b695e7ff | 1497 | includes a Null-terminated string,\r |
022c6d45 | 1498 | optionally followed by additional binary data.\r |
1499 | The string is a description that the caller may\r | |
1500 | use to further indicate the reason for the\r | |
1501 | image's exit.\r | |
1502 | \r | |
1503 | @retval EFI_INVALID_PARAMETER Invalid parameter\r | |
1504 | @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r | |
bc2dfdbc | 1505 | @retval EFI_SECURITY_VIOLATION The current platform policy specifies that the image should not be started.\r |
022c6d45 | 1506 | @retval EFI_SUCCESS Successfully transfer control to the image's\r |
162ed594 | 1507 | entry point.\r |
28a00297 | 1508 | \r |
162ed594 | 1509 | **/\r |
28a00297 | 1510 | EFI_STATUS\r |
1511 | EFIAPI\r | |
1512 | CoreStartImage (\r | |
23c98c94 | 1513 | IN EFI_HANDLE ImageHandle,\r |
1514 | OUT UINTN *ExitDataSize,\r | |
1515 | OUT CHAR16 **ExitData OPTIONAL\r | |
1516 | );\r | |
28a00297 | 1517 | \r |
28a00297 | 1518 | \r |
28a00297 | 1519 | \r |
162ed594 | 1520 | /**\r |
1521 | Terminates the currently loaded EFI image and returns control to boot services.\r | |
28a00297 | 1522 | \r |
022c6d45 | 1523 | @param ImageHandle Handle that identifies the image. This\r |
1524 | parameter is passed to the image on entry.\r | |
1525 | @param Status The image's exit code.\r | |
1526 | @param ExitDataSize The size, in bytes, of ExitData. Ignored if\r | |
1527 | ExitStatus is EFI_SUCCESS.\r | |
1528 | @param ExitData Pointer to a data buffer that includes a\r | |
1529 | Null-terminated Unicode string, optionally\r | |
1530 | followed by additional binary data. The string\r | |
1531 | is a description that the caller may use to\r | |
1532 | further indicate the reason for the image's\r | |
1533 | exit.\r | |
1534 | \r | |
1535 | @retval EFI_INVALID_PARAMETER Image handle is NULL or it is not current\r | |
1536 | image.\r | |
1537 | @retval EFI_SUCCESS Successfully terminates the currently loaded\r | |
1538 | EFI image.\r | |
1539 | @retval EFI_ACCESS_DENIED Should never reach there.\r | |
162ed594 | 1540 | @retval EFI_OUT_OF_RESOURCES Could not allocate pool\r |
28a00297 | 1541 | \r |
162ed594 | 1542 | **/\r |
28a00297 | 1543 | EFI_STATUS\r |
1544 | EFIAPI\r | |
1545 | CoreExit (\r | |
1546 | IN EFI_HANDLE ImageHandle,\r | |
1547 | IN EFI_STATUS Status,\r | |
1548 | IN UINTN ExitDataSize,\r | |
1549 | IN CHAR16 *ExitData OPTIONAL\r | |
23c98c94 | 1550 | );\r |
28a00297 | 1551 | \r |
28a00297 | 1552 | \r |
28a00297 | 1553 | \r |
162ed594 | 1554 | /**\r |
670d4d88 | 1555 | Creates an event.\r |
28a00297 | 1556 | \r |
022c6d45 | 1557 | @param Type The type of event to create and its mode and\r |
1558 | attributes\r | |
1559 | @param NotifyTpl The task priority level of event notifications\r | |
1560 | @param NotifyFunction Pointer to the events notification function\r | |
1561 | @param NotifyContext Pointer to the notification functions context;\r | |
1562 | corresponds to parameter "Context" in the\r | |
1563 | notification function\r | |
1564 | @param Event Pointer to the newly created event if the call\r | |
1565 | succeeds; undefined otherwise\r | |
1566 | \r | |
1567 | @retval EFI_SUCCESS The event structure was created\r | |
1568 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value\r | |
162ed594 | 1569 | @retval EFI_OUT_OF_RESOURCES The event could not be allocated\r |
28a00297 | 1570 | \r |
162ed594 | 1571 | **/\r |
28a00297 | 1572 | EFI_STATUS\r |
1573 | EFIAPI\r | |
1574 | CoreCreateEvent (\r | |
23c98c94 | 1575 | IN UINT32 Type,\r |
1576 | IN EFI_TPL NotifyTpl,\r | |
1577 | IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL\r | |
1578 | IN VOID *NotifyContext, OPTIONAL\r | |
1579 | OUT EFI_EVENT *Event\r | |
1580 | );\r | |
28a00297 | 1581 | \r |
28a00297 | 1582 | \r |
28a00297 | 1583 | \r |
162ed594 | 1584 | /**\r |
670d4d88 | 1585 | Creates an event in a group.\r |
28a00297 | 1586 | \r |
022c6d45 | 1587 | @param Type The type of event to create and its mode and\r |
1588 | attributes\r | |
1589 | @param NotifyTpl The task priority level of event notifications\r | |
1590 | @param NotifyFunction Pointer to the events notification function\r | |
1591 | @param NotifyContext Pointer to the notification functions context;\r | |
1592 | corresponds to parameter "Context" in the\r | |
1593 | notification function\r | |
1594 | @param EventGroup GUID for EventGroup if NULL act the same as\r | |
1595 | gBS->CreateEvent().\r | |
1596 | @param Event Pointer to the newly created event if the call\r | |
1597 | succeeds; undefined otherwise\r | |
1598 | \r | |
1599 | @retval EFI_SUCCESS The event structure was created\r | |
1600 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value\r | |
162ed594 | 1601 | @retval EFI_OUT_OF_RESOURCES The event could not be allocated\r |
28a00297 | 1602 | \r |
162ed594 | 1603 | **/\r |
28a00297 | 1604 | EFI_STATUS\r |
1605 | EFIAPI\r | |
1606 | CoreCreateEventEx (\r | |
1607 | IN UINT32 Type,\r | |
1608 | IN EFI_TPL NotifyTpl,\r | |
1609 | IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL\r | |
1610 | IN CONST VOID *NotifyContext, OPTIONAL\r | |
1611 | IN CONST EFI_GUID *EventGroup, OPTIONAL\r | |
1612 | OUT EFI_EVENT *Event\r | |
23c98c94 | 1613 | );\r |
28a00297 | 1614 | \r |
670d4d88 SZ |
1615 | /**\r |
1616 | Creates a general-purpose event structure\r | |
1617 | \r | |
1618 | @param Type The type of event to create and its mode and\r | |
1619 | attributes\r | |
1620 | @param NotifyTpl The task priority level of event notifications\r | |
1621 | @param NotifyFunction Pointer to the events notification function\r | |
1622 | @param NotifyContext Pointer to the notification functions context;\r | |
1623 | corresponds to parameter "Context" in the\r | |
1624 | notification function\r | |
1625 | @param EventGroup GUID for EventGroup if NULL act the same as\r | |
1626 | gBS->CreateEvent().\r | |
1627 | @param Event Pointer to the newly created event if the call\r | |
1628 | succeeds; undefined otherwise\r | |
28a00297 | 1629 | \r |
670d4d88 SZ |
1630 | @retval EFI_SUCCESS The event structure was created\r |
1631 | @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value\r | |
1632 | @retval EFI_OUT_OF_RESOURCES The event could not be allocated\r | |
1633 | \r | |
1634 | **/\r | |
1635 | EFI_STATUS\r | |
1636 | EFIAPI\r | |
1637 | CoreCreateEventInternal (\r | |
1638 | IN UINT32 Type,\r | |
1639 | IN EFI_TPL NotifyTpl,\r | |
1640 | IN EFI_EVENT_NOTIFY NotifyFunction, OPTIONAL\r | |
1641 | IN CONST VOID *NotifyContext, OPTIONAL\r | |
1642 | IN CONST EFI_GUID *EventGroup, OPTIONAL\r | |
1643 | OUT EFI_EVENT *Event\r | |
1644 | );\r | |
28a00297 | 1645 | \r |
162ed594 | 1646 | /**\r |
1647 | Sets the type of timer and the trigger time for a timer event.\r | |
28a00297 | 1648 | \r |
022c6d45 | 1649 | @param UserEvent The timer event that is to be signaled at the\r |
1650 | specified time\r | |
1651 | @param Type The type of time that is specified in\r | |
1652 | TriggerTime\r | |
1653 | @param TriggerTime The number of 100ns units until the timer\r | |
1654 | expires\r | |
28a00297 | 1655 | \r |
022c6d45 | 1656 | @retval EFI_SUCCESS The event has been set to be signaled at the\r |
1657 | requested time\r | |
162ed594 | 1658 | @retval EFI_INVALID_PARAMETER Event or Type is not valid\r |
28a00297 | 1659 | \r |
162ed594 | 1660 | **/\r |
28a00297 | 1661 | EFI_STATUS\r |
1662 | EFIAPI\r | |
1663 | CoreSetTimer (\r | |
23c98c94 | 1664 | IN EFI_EVENT UserEvent,\r |
28a00297 | 1665 | IN EFI_TIMER_DELAY Type,\r |
1666 | IN UINT64 TriggerTime\r | |
23c98c94 | 1667 | );\r |
28a00297 | 1668 | \r |
28a00297 | 1669 | \r |
28a00297 | 1670 | \r |
162ed594 | 1671 | /**\r |
022c6d45 | 1672 | Signals the event. Queues the event to be notified if needed.\r |
28a00297 | 1673 | \r |
022c6d45 | 1674 | @param UserEvent The event to signal .\r |
28a00297 | 1675 | \r |
022c6d45 | 1676 | @retval EFI_INVALID_PARAMETER Parameters are not valid.\r |
162ed594 | 1677 | @retval EFI_SUCCESS The event was signaled.\r |
28a00297 | 1678 | \r |
162ed594 | 1679 | **/\r |
28a00297 | 1680 | EFI_STATUS\r |
1681 | EFIAPI\r | |
1682 | CoreSignalEvent (\r | |
23c98c94 | 1683 | IN EFI_EVENT UserEvent\r |
1684 | );\r | |
28a00297 | 1685 | \r |
28a00297 | 1686 | \r |
28a00297 | 1687 | \r |
162ed594 | 1688 | /**\r |
1689 | Stops execution until an event is signaled.\r | |
28a00297 | 1690 | \r |
022c6d45 | 1691 | @param NumberOfEvents The number of events in the UserEvents array\r |
1692 | @param UserEvents An array of EFI_EVENT\r | |
1693 | @param UserIndex Pointer to the index of the event which\r | |
1694 | satisfied the wait condition\r | |
28a00297 | 1695 | \r |
022c6d45 | 1696 | @retval EFI_SUCCESS The event indicated by Index was signaled.\r |
1697 | @retval EFI_INVALID_PARAMETER The event indicated by Index has a notification\r | |
1698 | function or Event was not a valid type\r | |
162ed594 | 1699 | @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION\r |
28a00297 | 1700 | \r |
162ed594 | 1701 | **/\r |
28a00297 | 1702 | EFI_STATUS\r |
1703 | EFIAPI\r | |
1704 | CoreWaitForEvent (\r | |
23c98c94 | 1705 | IN UINTN NumberOfEvents,\r |
1706 | IN EFI_EVENT *UserEvents,\r | |
1707 | OUT UINTN *UserIndex\r | |
1708 | );\r | |
28a00297 | 1709 | \r |
28a00297 | 1710 | \r |
28a00297 | 1711 | \r |
162ed594 | 1712 | /**\r |
1713 | Closes an event and frees the event structure.\r | |
28a00297 | 1714 | \r |
022c6d45 | 1715 | @param UserEvent Event to close\r |
28a00297 | 1716 | \r |
022c6d45 | 1717 | @retval EFI_INVALID_PARAMETER Parameters are not valid.\r |
162ed594 | 1718 | @retval EFI_SUCCESS The event has been closed\r |
28a00297 | 1719 | \r |
162ed594 | 1720 | **/\r |
28a00297 | 1721 | EFI_STATUS\r |
1722 | EFIAPI\r | |
1723 | CoreCloseEvent (\r | |
23c98c94 | 1724 | IN EFI_EVENT UserEvent\r |
1725 | );\r | |
28a00297 | 1726 | \r |
28a00297 | 1727 | \r |
28a00297 | 1728 | \r |
162ed594 | 1729 | /**\r |
1730 | Check the status of an event.\r | |
28a00297 | 1731 | \r |
022c6d45 | 1732 | @param UserEvent The event to check\r |
28a00297 | 1733 | \r |
022c6d45 | 1734 | @retval EFI_SUCCESS The event is in the signaled state\r |
1735 | @retval EFI_NOT_READY The event is not in the signaled state\r | |
162ed594 | 1736 | @retval EFI_INVALID_PARAMETER Event is of type EVT_NOTIFY_SIGNAL\r |
28a00297 | 1737 | \r |
162ed594 | 1738 | **/\r |
28a00297 | 1739 | EFI_STATUS\r |
1740 | EFIAPI\r | |
1741 | CoreCheckEvent (\r | |
23c98c94 | 1742 | IN EFI_EVENT UserEvent\r |
1743 | );\r | |
28a00297 | 1744 | \r |
28a00297 | 1745 | \r |
162ed594 | 1746 | /**\r |
1747 | Adds reserved memory, system memory, or memory-mapped I/O resources to the\r | |
1748 | global coherency domain of the processor.\r | |
28a00297 | 1749 | \r |
022c6d45 | 1750 | @param GcdMemoryType Memory type of the memory space.\r |
1751 | @param BaseAddress Base address of the memory space.\r | |
1752 | @param Length Length of the memory space.\r | |
1753 | @param Capabilities alterable attributes of the memory space.\r | |
28a00297 | 1754 | \r |
162ed594 | 1755 | @retval EFI_SUCCESS Merged this memory space into GCD map.\r |
28a00297 | 1756 | \r |
162ed594 | 1757 | **/\r |
28a00297 | 1758 | EFI_STATUS\r |
3b6ffb6a | 1759 | EFIAPI\r |
28a00297 | 1760 | CoreAddMemorySpace (\r |
1761 | IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r | |
1762 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1763 | IN UINT64 Length,\r | |
1764 | IN UINT64 Capabilities\r | |
23c98c94 | 1765 | );\r |
28a00297 | 1766 | \r |
28a00297 | 1767 | \r |
162ed594 | 1768 | /**\r |
1769 | Allocates nonexistent memory, reserved memory, system memory, or memorymapped\r | |
1770 | I/O resources from the global coherency domain of the processor.\r | |
28a00297 | 1771 | \r |
022c6d45 | 1772 | @param GcdAllocateType The type of allocate operation\r |
1773 | @param GcdMemoryType The desired memory type\r | |
1774 | @param Alignment Align with 2^Alignment\r | |
1775 | @param Length Length to allocate\r | |
1776 | @param BaseAddress Base address to allocate\r | |
1777 | @param ImageHandle The image handle consume the allocated space.\r | |
1778 | @param DeviceHandle The device handle consume the allocated space.\r | |
28a00297 | 1779 | \r |
022c6d45 | 1780 | @retval EFI_INVALID_PARAMETER Invalid parameter.\r |
1781 | @retval EFI_NOT_FOUND No descriptor contains the desired space.\r | |
162ed594 | 1782 | @retval EFI_SUCCESS Memory space successfully allocated.\r |
28a00297 | 1783 | \r |
162ed594 | 1784 | **/\r |
28a00297 | 1785 | EFI_STATUS\r |
3b6ffb6a | 1786 | EFIAPI\r |
28a00297 | 1787 | CoreAllocateMemorySpace (\r |
1788 | IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r | |
1789 | IN EFI_GCD_MEMORY_TYPE GcdMemoryType,\r | |
1790 | IN UINTN Alignment,\r | |
1791 | IN UINT64 Length,\r | |
1792 | IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r | |
1793 | IN EFI_HANDLE ImageHandle,\r | |
1794 | IN EFI_HANDLE DeviceHandle OPTIONAL\r | |
23c98c94 | 1795 | );\r |
28a00297 | 1796 | \r |
28a00297 | 1797 | \r |
162ed594 | 1798 | /**\r |
1799 | Frees nonexistent memory, reserved memory, system memory, or memory-mapped\r | |
1800 | I/O resources from the global coherency domain of the processor.\r | |
28a00297 | 1801 | \r |
022c6d45 | 1802 | @param BaseAddress Base address of the memory space.\r |
1803 | @param Length Length of the memory space.\r | |
28a00297 | 1804 | \r |
162ed594 | 1805 | @retval EFI_SUCCESS Space successfully freed.\r |
28a00297 | 1806 | \r |
162ed594 | 1807 | **/\r |
28a00297 | 1808 | EFI_STATUS\r |
3b6ffb6a | 1809 | EFIAPI\r |
28a00297 | 1810 | CoreFreeMemorySpace (\r |
1811 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1812 | IN UINT64 Length\r | |
23c98c94 | 1813 | );\r |
28a00297 | 1814 | \r |
28a00297 | 1815 | \r |
162ed594 | 1816 | /**\r |
1817 | Removes reserved memory, system memory, or memory-mapped I/O resources from\r | |
1818 | the global coherency domain of the processor.\r | |
28a00297 | 1819 | \r |
022c6d45 | 1820 | @param BaseAddress Base address of the memory space.\r |
1821 | @param Length Length of the memory space.\r | |
28a00297 | 1822 | \r |
162ed594 | 1823 | @retval EFI_SUCCESS Successfully remove a segment of memory space.\r |
28a00297 | 1824 | \r |
162ed594 | 1825 | **/\r |
28a00297 | 1826 | EFI_STATUS\r |
3b6ffb6a | 1827 | EFIAPI\r |
28a00297 | 1828 | CoreRemoveMemorySpace (\r |
1829 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1830 | IN UINT64 Length\r | |
23c98c94 | 1831 | );\r |
28a00297 | 1832 | \r |
28a00297 | 1833 | \r |
162ed594 | 1834 | /**\r |
1835 | Retrieves the descriptor for a memory region containing a specified address.\r | |
28a00297 | 1836 | \r |
022c6d45 | 1837 | @param BaseAddress Specified start address\r |
1838 | @param Descriptor Specified length\r | |
28a00297 | 1839 | \r |
022c6d45 | 1840 | @retval EFI_INVALID_PARAMETER Invalid parameter\r |
162ed594 | 1841 | @retval EFI_SUCCESS Successfully get memory space descriptor.\r |
28a00297 | 1842 | \r |
162ed594 | 1843 | **/\r |
28a00297 | 1844 | EFI_STATUS\r |
3b6ffb6a | 1845 | EFIAPI\r |
28a00297 | 1846 | CoreGetMemorySpaceDescriptor (\r |
1847 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1848 | OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Descriptor\r | |
23c98c94 | 1849 | );\r |
28a00297 | 1850 | \r |
28a00297 | 1851 | \r |
162ed594 | 1852 | /**\r |
1853 | Modifies the attributes for a memory region in the global coherency domain of the\r | |
1854 | processor.\r | |
28a00297 | 1855 | \r |
022c6d45 | 1856 | @param BaseAddress Specified start address\r |
1857 | @param Length Specified length\r | |
1858 | @param Attributes Specified attributes\r | |
28a00297 | 1859 | \r |
fc8ff20f | 1860 | @retval EFI_SUCCESS The attributes were set for the memory region.\r |
1861 | @retval EFI_INVALID_PARAMETER Length is zero. \r | |
1862 | @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory\r | |
1863 | resource range specified by BaseAddress and Length.\r | |
1864 | @retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource\r | |
1865 | range specified by BaseAddress and Length.\r | |
1866 | @retval EFI_ACCESS_DEFINED The attributes for the memory resource range specified by\r | |
1867 | BaseAddress and Length cannot be modified.\r | |
1868 | @retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of\r | |
1869 | the memory resource range.\r | |
1870 | @retval EFI_NOT_AVAILABLE_YET The attributes cannot be set because CPU architectural protocol is\r | |
1871 | not available yet.\r | |
28a00297 | 1872 | \r |
162ed594 | 1873 | **/\r |
28a00297 | 1874 | EFI_STATUS\r |
3b6ffb6a | 1875 | EFIAPI\r |
28a00297 | 1876 | CoreSetMemorySpaceAttributes (\r |
1877 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1878 | IN UINT64 Length,\r | |
1879 | IN UINT64 Attributes\r | |
23c98c94 | 1880 | );\r |
28a00297 | 1881 | \r |
28a00297 | 1882 | \r |
162ed594 | 1883 | /**\r |
1884 | Returns a map of the memory resources in the global coherency domain of the\r | |
1885 | processor.\r | |
28a00297 | 1886 | \r |
022c6d45 | 1887 | @param NumberOfDescriptors Number of descriptors.\r |
1888 | @param MemorySpaceMap Descriptor array\r | |
28a00297 | 1889 | \r |
022c6d45 | 1890 | @retval EFI_INVALID_PARAMETER Invalid parameter\r |
1891 | @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r | |
162ed594 | 1892 | @retval EFI_SUCCESS Successfully get memory space map.\r |
28a00297 | 1893 | \r |
162ed594 | 1894 | **/\r |
28a00297 | 1895 | EFI_STATUS\r |
3b6ffb6a | 1896 | EFIAPI\r |
28a00297 | 1897 | CoreGetMemorySpaceMap (\r |
1898 | OUT UINTN *NumberOfDescriptors,\r | |
1899 | OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR **MemorySpaceMap\r | |
23c98c94 | 1900 | );\r |
28a00297 | 1901 | \r |
28a00297 | 1902 | \r |
162ed594 | 1903 | /**\r |
1904 | Adds reserved I/O or I/O resources to the global coherency domain of the processor.\r | |
28a00297 | 1905 | \r |
022c6d45 | 1906 | @param GcdIoType IO type of the segment.\r |
1907 | @param BaseAddress Base address of the segment.\r | |
1908 | @param Length Length of the segment.\r | |
28a00297 | 1909 | \r |
022c6d45 | 1910 | @retval EFI_SUCCESS Merged this segment into GCD map.\r |
162ed594 | 1911 | @retval EFI_INVALID_PARAMETER Parameter not valid\r |
28a00297 | 1912 | \r |
162ed594 | 1913 | **/\r |
28a00297 | 1914 | EFI_STATUS\r |
3b6ffb6a | 1915 | EFIAPI\r |
28a00297 | 1916 | CoreAddIoSpace (\r |
1917 | IN EFI_GCD_IO_TYPE GcdIoType,\r | |
1918 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1919 | IN UINT64 Length\r | |
23c98c94 | 1920 | );\r |
28a00297 | 1921 | \r |
28a00297 | 1922 | \r |
162ed594 | 1923 | /**\r |
1924 | Allocates nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r | |
1925 | domain of the processor.\r | |
28a00297 | 1926 | \r |
022c6d45 | 1927 | @param GcdAllocateType The type of allocate operation\r |
1928 | @param GcdIoType The desired IO type\r | |
1929 | @param Alignment Align with 2^Alignment\r | |
1930 | @param Length Length to allocate\r | |
1931 | @param BaseAddress Base address to allocate\r | |
1932 | @param ImageHandle The image handle consume the allocated space.\r | |
1933 | @param DeviceHandle The device handle consume the allocated space.\r | |
28a00297 | 1934 | \r |
022c6d45 | 1935 | @retval EFI_INVALID_PARAMETER Invalid parameter.\r |
1936 | @retval EFI_NOT_FOUND No descriptor contains the desired space.\r | |
162ed594 | 1937 | @retval EFI_SUCCESS IO space successfully allocated.\r |
28a00297 | 1938 | \r |
162ed594 | 1939 | **/\r |
28a00297 | 1940 | EFI_STATUS\r |
3b6ffb6a | 1941 | EFIAPI\r |
28a00297 | 1942 | CoreAllocateIoSpace (\r |
1943 | IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType,\r | |
1944 | IN EFI_GCD_IO_TYPE GcdIoType,\r | |
1945 | IN UINTN Alignment,\r | |
1946 | IN UINT64 Length,\r | |
1947 | IN OUT EFI_PHYSICAL_ADDRESS *BaseAddress,\r | |
1948 | IN EFI_HANDLE ImageHandle,\r | |
1949 | IN EFI_HANDLE DeviceHandle OPTIONAL\r | |
23c98c94 | 1950 | );\r |
28a00297 | 1951 | \r |
28a00297 | 1952 | \r |
162ed594 | 1953 | /**\r |
1954 | Frees nonexistent I/O, reserved I/O, or I/O resources from the global coherency\r | |
1955 | domain of the processor.\r | |
28a00297 | 1956 | \r |
022c6d45 | 1957 | @param BaseAddress Base address of the segment.\r |
1958 | @param Length Length of the segment.\r | |
28a00297 | 1959 | \r |
162ed594 | 1960 | @retval EFI_SUCCESS Space successfully freed.\r |
28a00297 | 1961 | \r |
162ed594 | 1962 | **/\r |
28a00297 | 1963 | EFI_STATUS\r |
3b6ffb6a | 1964 | EFIAPI\r |
28a00297 | 1965 | CoreFreeIoSpace (\r |
1966 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1967 | IN UINT64 Length\r | |
23c98c94 | 1968 | );\r |
28a00297 | 1969 | \r |
28a00297 | 1970 | \r |
162ed594 | 1971 | /**\r |
1972 | Removes reserved I/O or I/O resources from the global coherency domain of the\r | |
1973 | processor.\r | |
28a00297 | 1974 | \r |
022c6d45 | 1975 | @param BaseAddress Base address of the segment.\r |
1976 | @param Length Length of the segment.\r | |
28a00297 | 1977 | \r |
162ed594 | 1978 | @retval EFI_SUCCESS Successfully removed a segment of IO space.\r |
28a00297 | 1979 | \r |
162ed594 | 1980 | **/\r |
28a00297 | 1981 | EFI_STATUS\r |
3b6ffb6a | 1982 | EFIAPI\r |
28a00297 | 1983 | CoreRemoveIoSpace (\r |
1984 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
1985 | IN UINT64 Length\r | |
23c98c94 | 1986 | );\r |
28a00297 | 1987 | \r |
28a00297 | 1988 | \r |
162ed594 | 1989 | /**\r |
1990 | Retrieves the descriptor for an I/O region containing a specified address.\r | |
28a00297 | 1991 | \r |
022c6d45 | 1992 | @param BaseAddress Specified start address\r |
1993 | @param Descriptor Specified length\r | |
28a00297 | 1994 | \r |
022c6d45 | 1995 | @retval EFI_INVALID_PARAMETER Descriptor is NULL.\r |
162ed594 | 1996 | @retval EFI_SUCCESS Successfully get the IO space descriptor.\r |
28a00297 | 1997 | \r |
162ed594 | 1998 | **/\r |
28a00297 | 1999 | EFI_STATUS\r |
3b6ffb6a | 2000 | EFIAPI\r |
28a00297 | 2001 | CoreGetIoSpaceDescriptor (\r |
2002 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
2003 | OUT EFI_GCD_IO_SPACE_DESCRIPTOR *Descriptor\r | |
23c98c94 | 2004 | );\r |
28a00297 | 2005 | \r |
28a00297 | 2006 | \r |
162ed594 | 2007 | /**\r |
2008 | Returns a map of the I/O resources in the global coherency domain of the processor.\r | |
28a00297 | 2009 | \r |
022c6d45 | 2010 | @param NumberOfDescriptors Number of descriptors.\r |
2011 | @param IoSpaceMap Descriptor array\r | |
28a00297 | 2012 | \r |
022c6d45 | 2013 | @retval EFI_INVALID_PARAMETER Invalid parameter\r |
2014 | @retval EFI_OUT_OF_RESOURCES No enough buffer to allocate\r | |
162ed594 | 2015 | @retval EFI_SUCCESS Successfully get IO space map.\r |
28a00297 | 2016 | \r |
162ed594 | 2017 | **/\r |
28a00297 | 2018 | EFI_STATUS\r |
3b6ffb6a | 2019 | EFIAPI\r |
28a00297 | 2020 | CoreGetIoSpaceMap (\r |
2021 | OUT UINTN *NumberOfDescriptors,\r | |
2022 | OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap\r | |
23c98c94 | 2023 | );\r |
28a00297 | 2024 | \r |
28a00297 | 2025 | \r |
162ed594 | 2026 | /**\r |
2027 | This is the main Dispatcher for DXE and it exits when there are no more\r | |
2028 | drivers to run. Drain the mScheduledQueue and load and start a PE\r | |
2029 | image for each driver. Search the mDiscoveredList to see if any driver can\r | |
2030 | be placed on the mScheduledQueue. If no drivers are placed on the\r | |
2031 | mScheduledQueue exit the function. On exit it is assumed the Bds()\r | |
2032 | will be called, and when the Bds() exits the Dispatcher will be called\r | |
2033 | again.\r | |
28a00297 | 2034 | \r |
022c6d45 | 2035 | @retval EFI_ALREADY_STARTED The DXE Dispatcher is already running\r |
2036 | @retval EFI_NOT_FOUND No DXE Drivers were dispatched\r | |
2037 | @retval EFI_SUCCESS One or more DXE Drivers were dispatched\r | |
28a00297 | 2038 | \r |
23c98c94 | 2039 | **/\r |
28a00297 | 2040 | EFI_STATUS\r |
2041 | EFIAPI\r | |
2042 | CoreDispatcher (\r | |
2043 | VOID\r | |
23c98c94 | 2044 | );\r |
28a00297 | 2045 | \r |
162ed594 | 2046 | /**\r |
2047 | Check every driver and locate a matching one. If the driver is found, the Unrequested\r | |
2048 | state flag is cleared.\r | |
28a00297 | 2049 | \r |
022c6d45 | 2050 | @param FirmwareVolumeHandle The handle of the Firmware Volume that contains\r |
2051 | the firmware file specified by DriverName.\r | |
2052 | @param DriverName The Driver name to put in the Dependent state.\r | |
28a00297 | 2053 | \r |
022c6d45 | 2054 | @retval EFI_SUCCESS The DriverName was found and it's SOR bit was\r |
2055 | cleared\r | |
2056 | @retval EFI_NOT_FOUND The DriverName does not exist or it's SOR bit was\r | |
2057 | not set.\r | |
28a00297 | 2058 | \r |
23c98c94 | 2059 | **/\r |
28a00297 | 2060 | EFI_STATUS\r |
2061 | EFIAPI\r | |
2062 | CoreSchedule (\r | |
2063 | IN EFI_HANDLE FirmwareVolumeHandle,\r | |
2064 | IN EFI_GUID *DriverName\r | |
23c98c94 | 2065 | );\r |
28a00297 | 2066 | \r |
28a00297 | 2067 | \r |
162ed594 | 2068 | /**\r |
022c6d45 | 2069 | Convert a driver from the Untrused back to the Scheduled state.\r |
28a00297 | 2070 | \r |
022c6d45 | 2071 | @param FirmwareVolumeHandle The handle of the Firmware Volume that contains\r |
2072 | the firmware file specified by DriverName.\r | |
2073 | @param DriverName The Driver name to put in the Scheduled state\r | |
28a00297 | 2074 | \r |
022c6d45 | 2075 | @retval EFI_SUCCESS The file was found in the untrusted state, and it\r |
2076 | was promoted to the trusted state.\r | |
2077 | @retval EFI_NOT_FOUND The file was not found in the untrusted state.\r | |
28a00297 | 2078 | \r |
23c98c94 | 2079 | **/\r |
28a00297 | 2080 | EFI_STATUS\r |
2081 | EFIAPI\r | |
2082 | CoreTrust (\r | |
2083 | IN EFI_HANDLE FirmwareVolumeHandle,\r | |
2084 | IN EFI_GUID *DriverName\r | |
23c98c94 | 2085 | );\r |
28a00297 | 2086 | \r |
28a00297 | 2087 | \r |
162ed594 | 2088 | /**\r |
2089 | This routine is the driver initialization entry point. It initializes the\r | |
2090 | libraries, and registers two notification functions. These notification\r | |
2091 | functions are responsible for building the FV stack dynamically.\r | |
28a00297 | 2092 | \r |
022c6d45 | 2093 | @param ImageHandle The image handle.\r |
2094 | @param SystemTable The system table.\r | |
28a00297 | 2095 | \r |
162ed594 | 2096 | @retval EFI_SUCCESS Function successfully returned.\r |
28a00297 | 2097 | \r |
162ed594 | 2098 | **/\r |
28a00297 | 2099 | EFI_STATUS\r |
2100 | EFIAPI\r | |
2101 | FwVolDriverInit (\r | |
2102 | IN EFI_HANDLE ImageHandle,\r | |
2103 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
23c98c94 | 2104 | );\r |
28a00297 | 2105 | \r |
28a00297 | 2106 | \r |
162ed594 | 2107 | /**\r |
2108 | Entry point of the section extraction code. Initializes an instance of the\r | |
2109 | section extraction interface and installs it on a new handle.\r | |
2110 | \r | |
2111 | @param ImageHandle A handle for the image that is initializing this driver\r | |
2112 | @param SystemTable A pointer to the EFI system table\r | |
28a00297 | 2113 | \r |
162ed594 | 2114 | @retval EFI_SUCCESS Driver initialized successfully\r |
2115 | @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources\r | |
2116 | \r | |
2117 | **/\r | |
28a00297 | 2118 | EFI_STATUS\r |
2119 | EFIAPI\r | |
2120 | InitializeSectionExtraction (\r | |
2121 | IN EFI_HANDLE ImageHandle,\r | |
2122 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
23c98c94 | 2123 | );\r |
28a00297 | 2124 | \r |
28a00297 | 2125 | \r |
162ed594 | 2126 | /**\r |
2127 | This DXE service routine is used to process a firmware volume. In\r | |
2128 | particular, it can be called by BDS to process a single firmware\r | |
2129 | volume found in a capsule.\r | |
28a00297 | 2130 | \r |
022c6d45 | 2131 | @param FvHeader pointer to a firmware volume header\r |
2132 | @param Size the size of the buffer pointed to by FvHeader\r | |
2133 | @param FVProtocolHandle the handle on which a firmware volume protocol\r | |
2134 | was produced for the firmware volume passed in.\r | |
28a00297 | 2135 | \r |
022c6d45 | 2136 | @retval EFI_OUT_OF_RESOURCES if an FVB could not be produced due to lack of\r |
2137 | system resources\r | |
2138 | @retval EFI_VOLUME_CORRUPTED if the volume was corrupted\r | |
2139 | @retval EFI_SUCCESS a firmware volume protocol was produced for the\r | |
162ed594 | 2140 | firmware volume\r |
28a00297 | 2141 | \r |
162ed594 | 2142 | **/\r |
28a00297 | 2143 | EFI_STATUS\r |
3b6ffb6a | 2144 | EFIAPI\r |
28a00297 | 2145 | CoreProcessFirmwareVolume (\r |
23c98c94 | 2146 | IN VOID *FvHeader,\r |
022c6d45 | 2147 | IN UINTN Size,\r |
23c98c94 | 2148 | OUT EFI_HANDLE *FVProtocolHandle\r |
2149 | );\r | |
28a00297 | 2150 | \r |
2151 | //\r | |
2152 | //Functions used during debug buils\r | |
2153 | //\r | |
162ed594 | 2154 | \r |
2155 | /**\r | |
2156 | Displays Architectural protocols that were not loaded and are required for DXE\r | |
23c98c94 | 2157 | core to function. Only used in Debug Builds.\r |
162ed594 | 2158 | \r |
2159 | **/\r | |
28a00297 | 2160 | VOID\r |
2161 | CoreDisplayMissingArchProtocols (\r | |
2162 | VOID\r | |
23c98c94 | 2163 | );\r |
022c6d45 | 2164 | \r |
28a00297 | 2165 | \r |
162ed594 | 2166 | /**\r |
2167 | Traverse the discovered list for any drivers that were discovered but not loaded\r | |
2168 | because the dependency experessions evaluated to false.\r | |
28a00297 | 2169 | \r |
162ed594 | 2170 | **/\r |
28a00297 | 2171 | VOID\r |
2172 | CoreDisplayDiscoveredNotDispatched (\r | |
2173 | VOID\r | |
23c98c94 | 2174 | );\r |
28a00297 | 2175 | \r |
28a00297 | 2176 | \r |
162ed594 | 2177 | /**\r |
23c98c94 | 2178 | Place holder function until all the Boot Services and Runtime Services are\r |
2179 | available.\r | |
28a00297 | 2180 | \r |
162ed594 | 2181 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2182 | \r |
162ed594 | 2183 | **/\r |
28a00297 | 2184 | EFI_STATUS\r |
2185 | EFIAPI\r | |
2186 | CoreEfiNotAvailableYetArg0 (\r | |
2187 | VOID\r | |
23c98c94 | 2188 | );\r |
28a00297 | 2189 | \r |
28a00297 | 2190 | \r |
162ed594 | 2191 | /**\r |
23c98c94 | 2192 | Place holder function until all the Boot Services and Runtime Services are\r |
2193 | available.\r | |
28a00297 | 2194 | \r |
022c6d45 | 2195 | @param Arg1 Undefined\r |
28a00297 | 2196 | \r |
162ed594 | 2197 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2198 | \r |
162ed594 | 2199 | **/\r |
28a00297 | 2200 | EFI_STATUS\r |
2201 | EFIAPI\r | |
2202 | CoreEfiNotAvailableYetArg1 (\r | |
2203 | UINTN Arg1\r | |
23c98c94 | 2204 | );\r |
28a00297 | 2205 | \r |
28a00297 | 2206 | \r |
162ed594 | 2207 | /**\r |
2208 | Place holder function until all the Boot Services and Runtime Services are available.\r | |
28a00297 | 2209 | \r |
022c6d45 | 2210 | @param Arg1 Undefined\r |
2211 | @param Arg2 Undefined\r | |
28a00297 | 2212 | \r |
162ed594 | 2213 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2214 | \r |
162ed594 | 2215 | **/\r |
28a00297 | 2216 | EFI_STATUS\r |
2217 | EFIAPI\r | |
2218 | CoreEfiNotAvailableYetArg2 (\r | |
2219 | UINTN Arg1,\r | |
2220 | UINTN Arg2\r | |
23c98c94 | 2221 | );\r |
28a00297 | 2222 | \r |
28a00297 | 2223 | \r |
162ed594 | 2224 | /**\r |
2225 | Place holder function until all the Boot Services and Runtime Services are available.\r | |
28a00297 | 2226 | \r |
022c6d45 | 2227 | @param Arg1 Undefined\r |
2228 | @param Arg2 Undefined\r | |
2229 | @param Arg3 Undefined\r | |
28a00297 | 2230 | \r |
162ed594 | 2231 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2232 | \r |
162ed594 | 2233 | **/\r |
28a00297 | 2234 | EFI_STATUS\r |
2235 | EFIAPI\r | |
2236 | CoreEfiNotAvailableYetArg3 (\r | |
2237 | UINTN Arg1,\r | |
2238 | UINTN Arg2,\r | |
2239 | UINTN Arg3\r | |
23c98c94 | 2240 | );\r |
28a00297 | 2241 | \r |
28a00297 | 2242 | \r |
162ed594 | 2243 | /**\r |
2244 | Place holder function until all the Boot Services and Runtime Services are available.\r | |
28a00297 | 2245 | \r |
022c6d45 | 2246 | @param Arg1 Undefined\r |
2247 | @param Arg2 Undefined\r | |
2248 | @param Arg3 Undefined\r | |
2249 | @param Arg4 Undefined\r | |
28a00297 | 2250 | \r |
162ed594 | 2251 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2252 | \r |
162ed594 | 2253 | **/\r |
28a00297 | 2254 | EFI_STATUS\r |
2255 | EFIAPI\r | |
2256 | CoreEfiNotAvailableYetArg4 (\r | |
2257 | UINTN Arg1,\r | |
2258 | UINTN Arg2,\r | |
2259 | UINTN Arg3,\r | |
2260 | UINTN Arg4\r | |
23c98c94 | 2261 | );\r |
28a00297 | 2262 | \r |
28a00297 | 2263 | \r |
162ed594 | 2264 | /**\r |
2265 | Place holder function until all the Boot Services and Runtime Services are available.\r | |
28a00297 | 2266 | \r |
022c6d45 | 2267 | @param Arg1 Undefined\r |
2268 | @param Arg2 Undefined\r | |
2269 | @param Arg3 Undefined\r | |
2270 | @param Arg4 Undefined\r | |
2271 | @param Arg5 Undefined\r | |
28a00297 | 2272 | \r |
162ed594 | 2273 | @return EFI_NOT_AVAILABLE_YET\r |
28a00297 | 2274 | \r |
162ed594 | 2275 | **/\r |
28a00297 | 2276 | EFI_STATUS\r |
2277 | EFIAPI\r | |
2278 | CoreEfiNotAvailableYetArg5 (\r | |
2279 | UINTN Arg1,\r | |
2280 | UINTN Arg2,\r | |
2281 | UINTN Arg3,\r | |
2282 | UINTN Arg4,\r | |
2283 | UINTN Arg5\r | |
23c98c94 | 2284 | );\r |
28a00297 | 2285 | \r |
28a00297 | 2286 | \r |
162ed594 | 2287 | /**\r |
2288 | Given a compressed source buffer, this function retrieves the size of the\r | |
2289 | uncompressed buffer and the size of the scratch buffer required to decompress\r | |
2290 | the compressed source buffer.\r | |
2291 | \r | |
2292 | The GetInfo() function retrieves the size of the uncompressed buffer and the\r | |
2293 | temporary scratch buffer required to decompress the buffer specified by Source\r | |
2294 | and SourceSize. If the size of the uncompressed buffer or the size of the\r | |
2295 | scratch buffer cannot be determined from the compressed data specified by\r | |
2296 | Source and SourceData, then EFI_INVALID_PARAMETER is returned. Otherwise, the\r | |
2297 | size of the uncompressed buffer is returned in DestinationSize, the size of\r | |
2298 | the scratch buffer is returned in ScratchSize, and EFI_SUCCESS is returned.\r | |
2299 | The GetInfo() function does not have scratch buffer available to perform a\r | |
2300 | thorough checking of the validity of the source data. It just retrieves the\r | |
2301 | "Original Size" field from the beginning bytes of the source data and output\r | |
2302 | it as DestinationSize. And ScratchSize is specific to the decompression\r | |
2303 | implementation.\r | |
2304 | \r | |
2305 | @param This A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\r | |
2306 | @param Source The source buffer containing the compressed data.\r | |
2307 | @param SourceSize The size, in bytes, of the source buffer.\r | |
2308 | @param DestinationSize A pointer to the size, in bytes, of the\r | |
2309 | uncompressed buffer that will be generated when the\r | |
2310 | compressed buffer specified by Source and\r | |
2311 | SourceSize is decompressed.\r | |
2312 | @param ScratchSize A pointer to the size, in bytes, of the scratch\r | |
2313 | buffer that is required to decompress the\r | |
2314 | compressed buffer specified by Source and\r | |
2315 | SourceSize.\r | |
022c6d45 | 2316 | \r |
162ed594 | 2317 | @retval EFI_SUCCESS The size of the uncompressed data was returned in\r |
2318 | DestinationSize and the size of the scratch buffer\r | |
2319 | was returned in ScratchSize.\r | |
2320 | @retval EFI_INVALID_PARAMETER The size of the uncompressed data or the size of\r | |
2321 | the scratch buffer cannot be determined from the\r | |
2322 | compressed data specified by Source and\r | |
2323 | SourceSize.\r | |
28a00297 | 2324 | \r |
162ed594 | 2325 | **/\r |
28a00297 | 2326 | EFI_STATUS\r |
23c98c94 | 2327 | EFIAPI\r |
28a00297 | 2328 | DxeMainUefiDecompressGetInfo (\r |
2329 | IN EFI_DECOMPRESS_PROTOCOL *This,\r | |
2330 | IN VOID *Source,\r | |
2331 | IN UINT32 SourceSize,\r | |
2332 | OUT UINT32 *DestinationSize,\r | |
2333 | OUT UINT32 *ScratchSize\r | |
2334 | );\r | |
2335 | \r | |
162ed594 | 2336 | \r |
2337 | /**\r | |
2338 | Decompresses a compressed source buffer.\r | |
2339 | \r | |
2340 | The Decompress() function extracts decompressed data to its original form.\r | |
2341 | This protocol is designed so that the decompression algorithm can be\r | |
2342 | implemented without using any memory services. As a result, the Decompress()\r | |
2343 | Function is not allowed to call AllocatePool() or AllocatePages() in its\r | |
db405d1b | 2344 | implementation. It is the caller's responsibility to allocate and free the\r |
162ed594 | 2345 | Destination and Scratch buffers.\r |
2346 | If the compressed source data specified by Source and SourceSize is\r | |
2347 | sucessfully decompressed into Destination, then EFI_SUCCESS is returned. If\r | |
2348 | the compressed source data specified by Source and SourceSize is not in a\r | |
2349 | valid compressed data format, then EFI_INVALID_PARAMETER is returned.\r | |
2350 | \r | |
2351 | @param This A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\r | |
2352 | @param Source The source buffer containing the compressed data.\r | |
2353 | @param SourceSize SourceSizeThe size of source data.\r | |
2354 | @param Destination On output, the destination buffer that contains\r | |
2355 | the uncompressed data.\r | |
2356 | @param DestinationSize The size of the destination buffer. The size of\r | |
2357 | the destination buffer needed is obtained from\r | |
2358 | EFI_DECOMPRESS_PROTOCOL.GetInfo().\r | |
2359 | @param Scratch A temporary scratch buffer that is used to perform\r | |
2360 | the decompression.\r | |
2361 | @param ScratchSize The size of scratch buffer. The size of the\r | |
2362 | scratch buffer needed is obtained from GetInfo().\r | |
022c6d45 | 2363 | \r |
162ed594 | 2364 | @retval EFI_SUCCESS Decompression completed successfully, and the\r |
2365 | uncompressed buffer is returned in Destination.\r | |
2366 | @retval EFI_INVALID_PARAMETER The source buffer specified by Source and\r | |
2367 | SourceSize is corrupted (not in a valid\r | |
2368 | compressed format).\r | |
2369 | \r | |
2370 | **/\r | |
28a00297 | 2371 | EFI_STATUS\r |
2372 | EFIAPI\r | |
2373 | DxeMainUefiDecompress (\r | |
022c6d45 | 2374 | IN EFI_DECOMPRESS_PROTOCOL *This,\r |
28a00297 | 2375 | IN VOID *Source,\r |
2376 | IN UINT32 SourceSize,\r | |
2377 | IN OUT VOID *Destination,\r | |
2378 | IN UINT32 DestinationSize,\r | |
2379 | IN OUT VOID *Scratch,\r | |
2380 | IN UINT32 ScratchSize\r | |
2381 | );\r | |
2382 | \r | |
162ed594 | 2383 | /**\r |
2384 | SEP member function. This function creates and returns a new section stream\r | |
2385 | handle to represent the new section stream.\r | |
28a00297 | 2386 | \r |
022c6d45 | 2387 | @param SectionStreamLength Size in bytes of the section stream.\r |
2388 | @param SectionStream Buffer containing the new section stream.\r | |
2389 | @param SectionStreamHandle A pointer to a caller allocated UINTN that on\r | |
2390 | output contains the new section stream handle.\r | |
28a00297 | 2391 | \r |
162ed594 | 2392 | @retval EFI_SUCCESS The section stream is created successfully.\r |
022c6d45 | 2393 | @retval EFI_OUT_OF_RESOURCES memory allocation failed.\r |
2394 | @retval EFI_INVALID_PARAMETER Section stream does not end concident with end\r | |
162ed594 | 2395 | of last section.\r |
28a00297 | 2396 | \r |
162ed594 | 2397 | **/\r |
797a9d67 | 2398 | EFI_STATUS\r |
2399 | EFIAPI\r | |
2400 | OpenSectionStream (\r | |
2401 | IN UINTN SectionStreamLength,\r | |
2402 | IN VOID *SectionStream,\r | |
2403 | OUT UINTN *SectionStreamHandle\r | |
2404 | );\r | |
2405 | \r | |
162ed594 | 2406 | \r |
2407 | \r | |
2408 | /**\r | |
2409 | SEP member function. Retrieves requested section from section stream.\r | |
2410 | \r | |
2411 | @param SectionStreamHandle The section stream from which to extract the\r | |
2412 | requested section.\r | |
2413 | @param SectionType A pointer to the type of section to search for.\r | |
2414 | @param SectionDefinitionGuid If the section type is EFI_SECTION_GUID_DEFINED,\r | |
2415 | then SectionDefinitionGuid indicates which of\r | |
2416 | these types of sections to search for.\r | |
2417 | @param SectionInstance Indicates which instance of the requested\r | |
2418 | section to return.\r | |
2419 | @param Buffer Double indirection to buffer. If *Buffer is\r | |
2420 | non-null on input, then the buffer is caller\r | |
2421 | allocated. If Buffer is NULL, then the buffer\r | |
2422 | is callee allocated. In either case, the\r | |
2423 | requried buffer size is returned in *BufferSize.\r | |
2424 | @param BufferSize On input, indicates the size of *Buffer if\r | |
2425 | *Buffer is non-null on input. On output,\r | |
2426 | indicates the required size (allocated size if\r | |
2427 | callee allocated) of *Buffer.\r | |
2428 | @param AuthenticationStatus A pointer to a caller-allocated UINT32 that\r | |
2429 | indicates the authentication status of the\r | |
db405d1b | 2430 | output buffer. If the input section's\r |
162ed594 | 2431 | GuidedSectionHeader.Attributes field\r |
2432 | has the EFI_GUIDED_SECTION_AUTH_STATUS_VALID\r | |
2433 | bit as clear, AuthenticationStatus must return\r | |
2434 | zero. Both local bits (19:16) and aggregate\r | |
2435 | bits (3:0) in AuthenticationStatus are returned\r | |
2436 | by ExtractSection(). These bits reflect the\r | |
2437 | status of the extraction operation. The bit\r | |
2438 | pattern in both regions must be the same, as\r | |
2439 | the local and aggregate authentication statuses\r | |
2440 | have equivalent meaning at this level. If the\r | |
2441 | function returns anything other than\r | |
2442 | EFI_SUCCESS, the value of *AuthenticationStatus\r | |
2443 | is undefined.\r | |
6c85d162 | 2444 | @param IsFfs3Fv Indicates the FV format.\r |
162ed594 | 2445 | \r |
2446 | @retval EFI_SUCCESS Section was retrieved successfully\r | |
2447 | @retval EFI_PROTOCOL_ERROR A GUID defined section was encountered in the\r | |
2448 | section stream with its\r | |
2449 | EFI_GUIDED_SECTION_PROCESSING_REQUIRED bit set,\r | |
2450 | but there was no corresponding GUIDed Section\r | |
2451 | Extraction Protocol in the handle database.\r | |
2452 | *Buffer is unmodified.\r | |
2453 | @retval EFI_NOT_FOUND An error was encountered when parsing the\r | |
2454 | SectionStream. This indicates the SectionStream\r | |
2455 | is not correctly formatted.\r | |
2456 | @retval EFI_NOT_FOUND The requested section does not exist.\r | |
2457 | @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process\r | |
2458 | the request.\r | |
2459 | @retval EFI_INVALID_PARAMETER The SectionStreamHandle does not exist.\r | |
2460 | @retval EFI_WARN_TOO_SMALL The size of the caller allocated input buffer is\r | |
2461 | insufficient to contain the requested section.\r | |
2462 | The input buffer is filled and section contents\r | |
2463 | are truncated.\r | |
2464 | \r | |
2465 | **/\r | |
797a9d67 | 2466 | EFI_STATUS\r |
2467 | EFIAPI\r | |
2468 | GetSection (\r | |
2469 | IN UINTN SectionStreamHandle,\r | |
2470 | IN EFI_SECTION_TYPE *SectionType,\r | |
2471 | IN EFI_GUID *SectionDefinitionGuid,\r | |
2472 | IN UINTN SectionInstance,\r | |
2473 | IN VOID **Buffer,\r | |
2474 | IN OUT UINTN *BufferSize,\r | |
6c85d162 SZ |
2475 | OUT UINT32 *AuthenticationStatus,\r |
2476 | IN BOOLEAN IsFfs3Fv\r | |
797a9d67 | 2477 | );\r |
2478 | \r | |
162ed594 | 2479 | \r |
2480 | /**\r | |
2481 | SEP member function. Deletes an existing section stream\r | |
2482 | \r | |
022c6d45 | 2483 | @param StreamHandleToClose Indicates the stream to close\r |
eb1cace2 SZ |
2484 | @param FreeStreamBuffer TRUE - Need to free stream buffer;\r |
2485 | FALSE - No need to free stream buffer.\r | |
162ed594 | 2486 | \r |
2487 | @retval EFI_SUCCESS The section stream is closed sucessfully.\r | |
022c6d45 | 2488 | @retval EFI_OUT_OF_RESOURCES Memory allocation failed.\r |
2489 | @retval EFI_INVALID_PARAMETER Section stream does not end concident with end\r | |
162ed594 | 2490 | of last section.\r |
2491 | \r | |
2492 | **/\r | |
797a9d67 | 2493 | EFI_STATUS\r |
2494 | EFIAPI\r | |
2495 | CloseSectionStream (\r | |
eb1cace2 SZ |
2496 | IN UINTN StreamHandleToClose,\r |
2497 | IN BOOLEAN FreeStreamBuffer\r | |
797a9d67 | 2498 | );\r |
2499 | \r | |
ec90508b | 2500 | /**\r |
2501 | Creates and initializes the DebugImageInfo Table. Also creates the configuration\r | |
2502 | table and registers it into the system table.\r | |
2503 | \r | |
2504 | Note:\r | |
2505 | This function allocates memory, frees it, and then allocates memory at an\r | |
2506 | address within the initial allocation. Since this function is called early\r | |
2507 | in DXE core initialization (before drivers are dispatched), this should not\r | |
2508 | be a problem.\r | |
2509 | \r | |
2510 | **/\r | |
2511 | VOID\r | |
2512 | CoreInitializeDebugImageInfoTable (\r | |
2513 | VOID\r | |
2514 | );\r | |
2515 | \r | |
2516 | \r | |
2517 | /**\r | |
2518 | Update the CRC32 in the Debug Table.\r | |
2519 | Since the CRC32 service is made available by the Runtime driver, we have to\r | |
2520 | wait for the Runtime Driver to be installed before the CRC32 can be computed.\r | |
2521 | This function is called elsewhere by the core when the runtime architectural\r | |
2522 | protocol is produced.\r | |
2523 | \r | |
2524 | **/\r | |
2525 | VOID\r | |
2526 | CoreUpdateDebugTableCrc32 (\r | |
2527 | VOID\r | |
2528 | );\r | |
2529 | \r | |
2530 | \r | |
2531 | /**\r | |
2532 | Adds a new DebugImageInfo structure to the DebugImageInfo Table. Re-Allocates\r | |
2533 | the table if it's not large enough to accomidate another entry.\r | |
2534 | \r | |
2535 | @param ImageInfoType type of debug image information\r | |
2536 | @param LoadedImage pointer to the loaded image protocol for the image being\r | |
2537 | loaded\r | |
2538 | @param ImageHandle image handle for the image being loaded\r | |
2539 | \r | |
2540 | **/\r | |
2541 | VOID\r | |
2542 | CoreNewDebugImageInfoEntry (\r | |
2543 | IN UINT32 ImageInfoType,\r | |
2544 | IN EFI_LOADED_IMAGE_PROTOCOL *LoadedImage,\r | |
2545 | IN EFI_HANDLE ImageHandle\r | |
2546 | );\r | |
2547 | \r | |
2548 | \r | |
2549 | /**\r | |
2550 | Removes and frees an entry from the DebugImageInfo Table.\r | |
2551 | \r | |
2552 | @param ImageHandle image handle for the image being unloaded\r | |
2553 | \r | |
2554 | **/\r | |
2555 | VOID\r | |
2556 | CoreRemoveDebugImageInfoEntry (\r | |
2557 | EFI_HANDLE ImageHandle\r | |
2558 | );\r | |
2559 | \r | |
2560 | \r | |
2561 | /**\r | |
2562 | This routine consumes FV hobs and produces instances of FW_VOL_BLOCK_PROTOCOL as appropriate.\r | |
2563 | \r | |
2564 | @param ImageHandle The image handle.\r | |
2565 | @param SystemTable The system table.\r | |
2566 | \r | |
2567 | @retval EFI_SUCCESS Successfully initialized firmware volume block\r | |
2568 | driver.\r | |
2569 | \r | |
2570 | **/\r | |
2571 | EFI_STATUS\r | |
2572 | EFIAPI\r | |
2573 | FwVolBlockDriverInit (\r | |
2574 | IN EFI_HANDLE ImageHandle,\r | |
2575 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
2576 | );\r | |
2577 | \r | |
0c3a1db4 SZ |
2578 | /**\r |
2579 | \r | |
2580 | Get FVB authentication status\r | |
2581 | \r | |
2582 | @param FvbProtocol FVB protocol.\r | |
2583 | \r | |
2584 | @return Authentication status.\r | |
2585 | \r | |
2586 | **/\r | |
2587 | UINT32\r | |
2588 | GetFvbAuthenticationStatus (\r | |
2589 | IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *FvbProtocol\r | |
2590 | );\r | |
ec90508b | 2591 | \r |
2592 | /**\r | |
2593 | This routine produces a firmware volume block protocol on a given\r | |
2594 | buffer.\r | |
2595 | \r | |
2596 | @param BaseAddress base address of the firmware volume image\r | |
2597 | @param Length length of the firmware volume image\r | |
2598 | @param ParentHandle handle of parent firmware volume, if this image\r | |
0c3a1db4 | 2599 | came from an FV image file and section in another firmware\r |
ec90508b | 2600 | volume (ala capsules)\r |
0c3a1db4 SZ |
2601 | @param AuthenticationStatus Authentication status inherited, if this image\r |
2602 | came from an FV image file and section in another firmware volume.\r | |
ec90508b | 2603 | @param FvProtocol Firmware volume block protocol produced.\r |
2604 | \r | |
2605 | @retval EFI_VOLUME_CORRUPTED Volume corrupted.\r | |
2606 | @retval EFI_OUT_OF_RESOURCES No enough buffer to be allocated.\r | |
2607 | @retval EFI_SUCCESS Successfully produced a FVB protocol on given\r | |
2608 | buffer.\r | |
2609 | \r | |
2610 | **/\r | |
2611 | EFI_STATUS\r | |
2612 | ProduceFVBProtocolOnBuffer (\r | |
2613 | IN EFI_PHYSICAL_ADDRESS BaseAddress,\r | |
2614 | IN UINT64 Length,\r | |
2615 | IN EFI_HANDLE ParentHandle,\r | |
0c3a1db4 | 2616 | IN UINT32 AuthenticationStatus,\r |
ec90508b | 2617 | OUT EFI_HANDLE *FvProtocol OPTIONAL\r |
2618 | );\r | |
2619 | \r | |
2620 | \r | |
2621 | /**\r | |
2622 | Raising to the task priority level of the mutual exclusion\r | |
2623 | lock, and then acquires ownership of the lock.\r | |
2624 | \r | |
2625 | @param Lock The lock to acquire\r | |
2626 | \r | |
2627 | @return Lock owned\r | |
2628 | \r | |
2629 | **/\r | |
2630 | VOID\r | |
2631 | CoreAcquireLock (\r | |
2632 | IN EFI_LOCK *Lock\r | |
2633 | );\r | |
2634 | \r | |
2635 | \r | |
2636 | /**\r | |
2637 | Initialize a basic mutual exclusion lock. Each lock\r | |
2638 | provides mutual exclusion access at it's task priority\r | |
2639 | level. Since there is no-premption (at any TPL) or\r | |
2640 | multiprocessor support, acquiring the lock only consists\r | |
2641 | of raising to the locks TPL.\r | |
2642 | \r | |
2643 | @param Lock The EFI_LOCK structure to initialize\r | |
2644 | \r | |
2645 | @retval EFI_SUCCESS Lock Owned.\r | |
2646 | @retval EFI_ACCESS_DENIED Reentrant Lock Acquisition, Lock not Owned.\r | |
2647 | \r | |
2648 | **/\r | |
2649 | EFI_STATUS\r | |
2650 | CoreAcquireLockOrFail (\r | |
2651 | IN EFI_LOCK *Lock\r | |
2652 | );\r | |
2653 | \r | |
2654 | \r | |
2655 | /**\r | |
2656 | Releases ownership of the mutual exclusion lock, and\r | |
2657 | restores the previous task priority level.\r | |
2658 | \r | |
2659 | @param Lock The lock to release\r | |
2660 | \r | |
2661 | @return Lock unowned\r | |
2662 | \r | |
2663 | **/\r | |
2664 | VOID\r | |
2665 | CoreReleaseLock (\r | |
2666 | IN EFI_LOCK *Lock\r | |
2667 | );\r | |
2668 | \r | |
54cd17e9 | 2669 | \r |
2670 | /**\r | |
2671 | An empty function to pass error checking of CreateEventEx ().\r | |
2672 | \r | |
2673 | @param Event Event whose notification function is being invoked.\r | |
2674 | @param Context Pointer to the notification function's context,\r | |
2675 | which is implementation-dependent.\r | |
2676 | \r | |
2677 | **/\r | |
2678 | VOID\r | |
2679 | EFIAPI\r | |
2680 | CoreEmptyCallbackFunction (\r | |
2681 | IN EFI_EVENT Event,\r | |
2682 | IN VOID *Context\r | |
2683 | );\r | |
2684 | \r | |
2fc46f86 LG |
2685 | /**\r |
2686 | Read data from Firmware Block by FVB protocol Read. \r | |
2687 | The data may cross the multi block ranges.\r | |
2688 | \r | |
2689 | @param Fvb The FW_VOL_BLOCK_PROTOCOL instance from which to read data.\r | |
2690 | @param StartLba Pointer to StartLba.\r | |
2691 | On input, the start logical block index from which to read.\r | |
2692 | On output,the end logical block index after reading.\r | |
2693 | @param Offset Pointer to Offset\r | |
2694 | On input, offset into the block at which to begin reading.\r | |
2695 | On output, offset into the end block after reading.\r | |
2696 | @param DataSize Size of data to be read.\r | |
2697 | @param Data Pointer to Buffer that the data will be read into.\r | |
2698 | \r | |
2699 | @retval EFI_SUCCESS Successfully read data from firmware block.\r | |
2700 | @retval others\r | |
2701 | **/\r | |
2702 | EFI_STATUS\r | |
2703 | ReadFvbData (\r | |
2704 | IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb,\r | |
2705 | IN OUT EFI_LBA *StartLba,\r | |
2706 | IN OUT UINTN *Offset,\r | |
2707 | IN UINTN DataSize,\r | |
2708 | OUT UINT8 *Data\r | |
2709 | );\r | |
2710 | \r | |
2711 | /**\r | |
2712 | Given the supplied FW_VOL_BLOCK_PROTOCOL, allocate a buffer for output and\r | |
2713 | copy the real length volume header into it.\r | |
2714 | \r | |
2715 | @param Fvb The FW_VOL_BLOCK_PROTOCOL instance from which to\r | |
2716 | read the volume header\r | |
2717 | @param FwVolHeader Pointer to pointer to allocated buffer in which\r | |
2718 | the volume header is returned.\r | |
2719 | \r | |
2720 | @retval EFI_OUT_OF_RESOURCES No enough buffer could be allocated.\r | |
2721 | @retval EFI_SUCCESS Successfully read volume header to the allocated\r | |
2722 | buffer.\r | |
4888d15e SZ |
2723 | @retval EFI_INVALID_PARAMETER The FV Header signature is not as expected or\r |
2724 | the file system could not be understood.\r | |
2fc46f86 LG |
2725 | \r |
2726 | **/\r | |
2727 | EFI_STATUS\r | |
2728 | GetFwVolHeader (\r | |
2729 | IN EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb,\r | |
2730 | OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader\r | |
2731 | );\r | |
2732 | \r | |
2733 | /**\r | |
2734 | Verify checksum of the firmware volume header.\r | |
2735 | \r | |
2736 | @param FvHeader Points to the firmware volume header to be checked\r | |
2737 | \r | |
2738 | @retval TRUE Checksum verification passed\r | |
2739 | @retval FALSE Checksum verification failed\r | |
2740 | \r | |
2741 | **/\r | |
2742 | BOOLEAN\r | |
2743 | VerifyFvHeaderChecksum (\r | |
2744 | IN EFI_FIRMWARE_VOLUME_HEADER *FvHeader\r | |
2745 | );\r | |
2746 | \r | |
84edd20b SZ |
2747 | /**\r |
2748 | Initialize memory profile.\r | |
2749 | \r | |
2750 | @param HobStart The start address of the HOB.\r | |
2751 | \r | |
2752 | **/\r | |
2753 | VOID\r | |
2754 | MemoryProfileInit (\r | |
2755 | IN VOID *HobStart\r | |
2756 | );\r | |
2757 | \r | |
2758 | /**\r | |
2759 | Install memory profile protocol.\r | |
2760 | \r | |
2761 | **/\r | |
2762 | VOID\r | |
2763 | MemoryProfileInstallProtocol (\r | |
2764 | VOID\r | |
2765 | );\r | |
2766 | \r | |
2767 | /**\r | |
2768 | Register image to memory profile.\r | |
2769 | \r | |
2770 | @param DriverEntry Image info.\r | |
2771 | @param FileType Image file type.\r | |
2772 | \r | |
2773 | @retval TRUE Register success.\r | |
2774 | @retval FALSE Register fail.\r | |
2775 | \r | |
2776 | **/\r | |
2777 | BOOLEAN\r | |
2778 | RegisterMemoryProfileImage (\r | |
2779 | IN LOADED_IMAGE_PRIVATE_DATA *DriverEntry,\r | |
2780 | IN EFI_FV_FILETYPE FileType\r | |
2781 | );\r | |
2782 | \r | |
2783 | /**\r | |
2784 | Unregister image from memory profile.\r | |
2785 | \r | |
2786 | @param DriverEntry Image info.\r | |
2787 | \r | |
2788 | @retval TRUE Unregister success. |