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