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