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