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