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