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
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.
28 #include <FrameworkPei.h>
30 #include <Protocol/LoadedImage.h>
31 #include <Protocol/GuidedSectionExtraction.h>
32 #include <Protocol/SectionExtraction.h>
33 #include <Guid/DebugImageInfoTable.h>
34 #include <Protocol/DevicePath.h>
35 #include <Protocol/Runtime.h>
36 #include <Protocol/LoadFile.h>
37 #include <Protocol/DriverBinding.h>
38 #include <Protocol/VariableWrite.h>
39 #include <Protocol/PlatformDriverOverride.h>
40 #include <Protocol/Variable.h>
41 #include <Guid/MemoryTypeInformation.h>
42 #include <Guid/FirmwareFileSystem2.h>
43 #include <Guid/HobList.h>
44 #include <Protocol/Timer.h>
45 #include <Protocol/SimpleFileSystem.h>
46 #include <Protocol/Bds.h>
47 #include <Guid/FileInfo.h>
48 #include <Protocol/RealTimeClock.h>
49 #include <Guid/Apriori.h>
50 #include <Protocol/WatchdogTimer.h>
51 #include <Protocol/FirmwareVolume.h>
52 #include <Protocol/MonotonicCounter.h>
53 #include <Guid/DxeServices.h>
54 #include <Guid/MemoryAllocationHob.h>
55 #include <Protocol/StatusCode.h>
56 #include <Protocol/CustomizedDecompress.h>
57 #include <Protocol/Decompress.h>
58 #include <Protocol/LoadPe32Image.h>
59 #include <Protocol/FirmwareVolumeDispatch.h>
60 #include <Protocol/Security.h>
61 #include <Protocol/Ebc.h>
62 #include <Guid/EventLegacyBios.h>
63 #include <Protocol/Reset.h>
64 #include <Protocol/EdkDecompress.h>
65 #include <Protocol/Cpu.h>
66 #include <Guid/EventGroup.h>
67 #include <Protocol/Metronome.h>
68 #include <Protocol/FirmwareVolumeBlock.h>
69 #include <Protocol/Capsule.h>
70 #include <Protocol/BusSpecificDriverOverride.h>
71 #include <Protocol/Performance.h>
72 #include <Guid/StatusCodeDataTypeId.h>
74 #include <Library/DxeCoreEntryPoint.h>
75 #include <Library/DebugLib.h>
76 #include <Library/UefiLib.h>
77 #include <Library/BaseLib.h>
78 #include <Library/HobLib.h>
79 #include <Library/PerformanceLib.h>
80 #include <Library/UefiDecompressLib.h>
81 #include <Library/CustomDecompressLib.h>
82 #include <Library/PeCoffLoaderLib.h>
83 #include <Library/CacheMaintenanceLib.h>
84 #include <Library/BaseMemoryLib.h>
86 #include "DebugImageInfo.h"
88 #include "FwVolBlock.h"
89 #include "FwVolDriver.h"
98 // Modifier for EFI DXE Services
100 #define EFI_DXESERVICE
103 // attributes for reserved memory before it is promoted to system memory
105 #define EFI_MEMORY_PRESENT 0x0100000000000000ULL
106 #define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL
107 #define EFI_MEMORY_TESTED 0x0400000000000000ULL
110 // range for memory mapped port I/O on IPF
112 #define EFI_MEMORY_PORT_IO 0x4000000000000000ULL
116 /// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependecy expression
117 /// to save time. A EFI_DEP_PUSH is evauated one an
118 /// replaced with EFI_DEP_REPLACE_TRUE
120 #define EFI_DEP_REPLACE_TRUE 0xff
123 /// Define the initial size of the dependency expression evaluation stack
125 #define DEPEX_STACK_SIZE_INCREMENT 0x1000
128 EFI_GUID
*ProtocolGuid
;
133 } ARCHITECTURAL_PROTOCOL_ENTRY
;
137 // DXE Dispatcher Data structures
140 #define KNOWN_HANDLE_SIGNATURE EFI_SIGNATURE_32('k','n','o','w')
143 LIST_ENTRY Link
; // mFvHandleList
148 #define EFI_CORE_DRIVER_ENTRY_SIGNATURE EFI_SIGNATURE_32('d','r','v','r')
151 LIST_ENTRY Link
; // mDriverList
153 LIST_ENTRY ScheduledLink
; // mScheduledQueue
157 EFI_DEVICE_PATH_PROTOCOL
*FvFileDevicePath
;
158 EFI_FIRMWARE_VOLUME_PROTOCOL
*Fv
;
165 EFI_GUID BeforeAfterGuid
;
172 BOOLEAN DepexProtocolError
;
174 EFI_HANDLE ImageHandle
;
176 } EFI_CORE_DRIVER_ENTRY
;
179 //The data structure of GCD memory map entry
181 #define EFI_GCD_MAP_SIGNATURE EFI_SIGNATURE_32('g','c','d','m')
185 EFI_PHYSICAL_ADDRESS BaseAddress
;
189 EFI_GCD_MEMORY_TYPE GcdMemoryType
;
190 EFI_GCD_IO_TYPE GcdIoType
;
191 EFI_HANDLE ImageHandle
;
192 EFI_HANDLE DeviceHandle
;
196 // DXE Core Global Variables
198 extern EFI_SYSTEM_TABLE
*gDxeCoreST
;
199 extern EFI_BOOT_SERVICES
*gDxeCoreBS
;
200 extern EFI_RUNTIME_SERVICES
*gDxeCoreRT
;
201 extern EFI_DXE_SERVICES
*gDxeCoreDS
;
202 extern EFI_HANDLE gDxeCoreImageHandle
;
204 extern EFI_DECOMPRESS_PROTOCOL gEfiDecompress
;
205 extern EFI_PEI_PE_COFF_LOADER_PROTOCOL
*gEfiPeiPeCoffLoader
;
207 extern EFI_RUNTIME_ARCH_PROTOCOL
*gRuntime
;
208 extern EFI_CPU_ARCH_PROTOCOL
*gCpu
;
209 extern EFI_WATCHDOG_TIMER_ARCH_PROTOCOL
*gWatchdogTimer
;
210 extern EFI_METRONOME_ARCH_PROTOCOL
*gMetronome
;
211 extern EFI_TIMER_ARCH_PROTOCOL
*gTimer
;
212 extern EFI_SECURITY_ARCH_PROTOCOL
*gSecurity
;
213 extern EFI_BDS_ARCH_PROTOCOL
*gBds
;
214 extern EFI_STATUS_CODE_PROTOCOL
*gStatusCode
;
216 extern EFI_TPL gEfiCurrentTpl
;
218 extern EFI_GUID
*gDxeCoreFileName
;
219 extern EFI_LOADED_IMAGE_PROTOCOL
*gDxeCoreLoadedImage
;
221 extern EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation
[EfiMaxMemoryType
+ 1];
223 extern BOOLEAN gDispatcherRunning
;
224 extern EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate
;
227 // Service Initialization Functions
239 Called to initialize the pool.
253 CoreAddMemoryDescriptor (
254 IN EFI_MEMORY_TYPE Type
,
255 IN EFI_PHYSICAL_ADDRESS Start
,
256 IN UINT64 NumberOfPages
,
263 Called to initialize the memory map and add descriptors to
264 the current descriptor list.
266 The first descriptor that is added must be general usable
267 memory as the addition allocates heap.
271 Type - The type of memory to add
273 Start - The starting address in the memory range
276 NumberOfPages - The number of pages in the range
278 Attribute - Attributes of the memory to add
282 None. The range is added to the memory map
288 CoreReleaseGcdMemoryLock (
294 Release memory lock on mGcdMemorySpaceLock
306 CoreAcquireGcdMemoryLock (
312 Acquire memory lock on mGcdMemorySpaceLock
324 CoreInitializeMemoryServices (
326 IN EFI_PHYSICAL_ADDRESS
*MemoryBaseAddress
,
327 IN UINT64
*MemoryLength
333 External function. Initializes the GCD and memory services based on the memory
334 descriptor HOBs. This function is responsible for priming the GCD map and the
335 memory map, so memory allocations and resource allocations can be made. The first
336 part of this function can not depend on any memory services until at least one
337 memory descriptor is provided to the memory services. Then the memory services
338 can be used to intialize the GCD map.
342 HobStart - The start address of the HOB.
344 MemoryBaseAddress - Start address of memory region found to init DXE core.
346 MemoryLength - Length of memory region found to init DXE core.
350 EFI_SUCCESS - Memory services successfully initialized.
357 CoreInitializeGcdServices (
359 IN EFI_PHYSICAL_ADDRESS MemoryBaseAddress
,
360 IN UINT64 MemoryLength
366 External function. Initializes the GCD and memory services based on the memory
367 descriptor HOBs. This function is responsible for priming the GCD map and the
368 memory map, so memory allocations and resource allocations can be made. The first
369 part of this function can not depend on any memory services until at least one
370 memory descriptor is provided to the memory services. Then the memory services
371 can be used to intialize the GCD map.
375 HobStart - The start address of the HOB
377 MemoryBaseAddress - Start address of memory region found to init DXE core.
379 MemoryLength - Length of memory region found to init DXE core.
384 EFI_SUCCESS - GCD services successfully initialized.
390 CoreInitializeEventServices (
397 Initializes "event" support and populates parts of the System and Runtime Table.
405 EFI_SUCCESS - Always return success
411 CoreInitializeImageServices (
418 Add the Image Services to EFI Boot Services Table and install the protocol
419 interfaces for this image.
423 HobStart - The HOB to initialize
433 CoreNotifyOnArchProtocolInstallation (
439 Creates an event that is fired everytime a Protocol of a specific type is installed
451 CoreAllEfiServicesAvailable (
457 Return TRUE if all AP services are availible.
463 EFI_SUCCESS - All AP services are available
464 EFI_NOT_FOUND - At least one AP service is not available
471 IN OUT EFI_TABLE_HEADER
*Hdr
477 Calcualte the 32-bit CRC in a EFI table using the service provided by the
482 Hdr - Pointer to an EFI standard header
500 Called by the platform code to process a tick.
504 Duration - The number of 100ns elasped since the last call to TimerTick
514 CoreInitializeDispatcher (
521 Initialize the dispatcher. Initialize the notification function that runs when
522 a FV protocol is added to the system.
537 IN EFI_CORE_DRIVER_ENTRY
*DriverEntry
543 This is the POSTFIX version of the dependency evaluator. This code does
544 not need to handle Before or After, as it is not valid to call this
545 routine in this case. The SOR is just ignored and is a nop in the grammer.
547 POSTFIX means all the math is done on top of the stack.
551 DriverEntry - DriverEntry element to update
555 TRUE - If driver is ready to run.
557 FALSE - If driver is not ready to run or some fatal error was found.
563 CorePreProcessDepex (
564 IN EFI_CORE_DRIVER_ENTRY
*DriverEntry
570 Preprocess dependency expression and update DriverEntry to reflect the
571 state of Before, After, and SOR dependencies. If DriverEntry->Before
572 or DriverEntry->After is set it will never be cleared. If SOR is set
573 it will be cleared by CoreSchedule(), and then the driver can be
578 DriverEntry - DriverEntry element to update
582 EFI_SUCCESS - It always works.
590 CoreExitBootServices (
591 IN EFI_HANDLE ImageHandle
,
598 EFI 1.0 API to terminate Boot Services
602 ImageHandle - Handle that represents the identity of the calling image
604 MapKey -Key to the latest memory map.
608 EFI_SUCCESS - Boot Services terminated
609 EFI_INVALID_PARAMETER - MapKey is incorrect.
615 CoreTerminateMemoryMap (
622 Make sure the memory map is following all the construction rules,
623 it is the last time to check memory map error before exit boot services.
627 MapKey - Memory map key
631 EFI_INVALID_PARAMETER - Memory map not consistent with construction rules.
633 EFI_SUCCESS - Valid memory map.
639 CoreNotifySignalList (
640 IN EFI_GUID
*EventGroup
646 Signals all events on the requested list
650 SignalType - The list to signal
662 CoreInstallConfigurationTable (
670 Boot Service called to add, modify, or remove a system configuration table from
671 the EFI System Table.
675 Guid: Pointer to the GUID for the entry to add, update, or remove
676 Table: Pointer to the configuration table for the entry to add, update, or
681 EFI_SUCCESS Guid, Table pair added, updated, or removed.
682 EFI_INVALID_PARAMETER Input GUID not valid.
683 EFI_NOT_FOUND Attempted to delete non-existant entry
684 EFI_OUT_OF_RESOURCES Not enough memory available
699 Raise the task priority level to the new level.
700 High level is implemented by disabling processor interrupts.
704 NewTpl - New task priority level
708 The previous task priority level
723 Lowers the task priority to the previous value. If the new
724 priority unmasks events at a higher priority, they are dispatched.
728 NewTpl - New, lower, task priority
741 IN UINTN Microseconds
747 Introduces a fine-grained stall.
751 Microseconds The number of microseconds to stall execution
755 EFI_SUCCESS - Execution was stalled for at least the requested amount
758 EFI_NOT_AVAILABLE_YET - gMetronome is not available yet
766 CoreSetWatchdogTimer (
768 IN UINT64 WatchdogCode
,
770 IN CHAR16
*WatchdogData OPTIONAL
776 Sets the system's watchdog timer.
780 Timeout The number of seconds. Zero disables the timer.
782 ///////following three parameters are left for platform specific using
784 WatchdogCode The numberic code to log. 0x0 to 0xffff are firmware
785 DataSize Size of the optional data
786 WatchdogData Optional Null terminated unicode string followed by binary
791 EFI_SUCCESS Timeout has been set
792 EFI_NOT_AVAILABLE_YET WatchdogTimer is not available yet
793 EFI_UNSUPPORTED System does not have a timer (currently not used)
794 EFI_DEVICE_ERROR Could not complete due to hardware error
802 CoreInstallProtocolInterface (
803 IN OUT EFI_HANDLE
*UserHandle
,
804 IN EFI_GUID
*Protocol
,
805 IN EFI_INTERFACE_TYPE InterfaceType
,
812 Wrapper function to CoreInstallProtocolInterfaceNotify. This is the public API which
813 Calls the private one which contains a BOOLEAN parameter for notifications
817 UserHandle - The handle to install the protocol handler on,
818 or NULL if a new handle is to be allocated
820 Protocol - The protocol to add to the handle
822 InterfaceType - Indicates whether Interface is supplied in native form.
824 Interface - The interface for the protocol being added
834 CoreInstallProtocolInterfaceNotify (
835 IN OUT EFI_HANDLE
*UserHandle
,
836 IN EFI_GUID
*Protocol
,
837 IN EFI_INTERFACE_TYPE InterfaceType
,
845 Installs a protocol interface into the boot services environment.
849 UserHandle - The handle to install the protocol handler on,
850 or NULL if a new handle is to be allocated
852 Protocol - The protocol to add to the handle
854 InterfaceType - Indicates whether Interface is supplied in native form.
856 Interface - The interface for the protocol being added
858 Notify - Whether to notify the notification list for this protocol
862 EFI_INVALID_PARAMETER - Invalid parameter
864 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
866 EFI_SUCCESS - Protocol interface successfully installed
874 CoreInstallMultipleProtocolInterfaces (
875 IN OUT EFI_HANDLE
*Handle
,
882 Installs a list of protocol interface into the boot services environment.
883 This function calls InstallProtocolInterface() in a loop. If any error
884 occures all the protocols added by this function are removed. This is
885 basically a lib function to save space.
889 Handle - The handle to install the protocol handlers on,
890 or NULL if a new handle is to be allocated
891 ... - EFI_GUID followed by protocol instance. A NULL terminates the
892 list. The pairs are the arguments to InstallProtocolInterface().
893 All the protocols are added to Handle.
897 EFI_INVALID_PARAMETER - Handle is NULL.
899 EFI_SUCCESS - Protocol interfaces successfully installed.
907 CoreUninstallMultipleProtocolInterfaces (
908 IN EFI_HANDLE Handle
,
915 Uninstalls a list of protocol interface in the boot services environment.
916 This function calls UnisatllProtocolInterface() in a loop. This is
917 basically a lib function to save space.
921 Handle - The handle to uninstall the protocol
923 ... - EFI_GUID followed by protocol instance. A NULL terminates the
924 list. The pairs are the arguments to UninstallProtocolInterface().
925 All the protocols are added to Handle.
937 CoreReinstallProtocolInterface (
938 IN EFI_HANDLE UserHandle
,
939 IN EFI_GUID
*Protocol
,
940 IN VOID
*OldInterface
,
941 IN VOID
*NewInterface
947 Reinstall a protocol interface on a device handle. The OldInterface for Protocol is replaced by the NewInterface.
951 UserHandle - Handle on which the interface is to be reinstalled
952 Protocol - The numeric ID of the interface
953 OldInterface - A pointer to the old interface
954 NewInterface - A pointer to the new interface
961 On EFI_SUCCESS The protocol interface was installed
962 On EFI_NOT_FOUND The OldInterface on the handle was not found
963 On EFI_INVALID_PARAMETER One of the parameters has an invalid value
971 CoreUninstallProtocolInterface (
972 IN EFI_HANDLE UserHandle
,
973 IN EFI_GUID
*Protocol
,
980 Uninstalls all instances of a protocol:interfacer from a handle.
981 If the last protocol interface is remove from the handle, the
986 UserHandle - The handle to remove the protocol handler from
988 Protocol - The protocol, of protocol:interface, to remove
990 Interface - The interface, of protocol:interface, to remove
994 EFI_INVALID_PARAMETER - Protocol is NULL.
996 EFI_SUCCESS - Protocol interface successfully uninstalled.
1004 CoreHandleProtocol (
1005 IN EFI_HANDLE UserHandle
,
1006 IN EFI_GUID
*Protocol
,
1007 OUT VOID
**Interface
1011 Routine Description:
1013 Queries a handle to determine if it supports a specified protocol.
1017 UserHandle - The handle being queried.
1019 Protocol - The published unique identifier of the protocol.
1021 Interface - Supplies the address where a pointer to the corresponding Protocol
1022 Interface is returned.
1026 The requested protocol interface for the handle
1035 IN EFI_HANDLE UserHandle
,
1036 IN EFI_GUID
*Protocol
,
1037 OUT VOID
**Interface OPTIONAL
,
1038 IN EFI_HANDLE ImageHandle
,
1039 IN EFI_HANDLE ControllerHandle
,
1040 IN UINT32 Attributes
1044 Routine Description:
1046 Locates the installed protocol handler for the handle, and
1047 invokes it to obtain the protocol interface. Usage information
1048 is registered in the protocol data base.
1052 UserHandle - The handle to obtain the protocol interface on
1054 Protocol - The ID of the protocol
1056 Interface - The location to return the protocol interface
1058 ImageHandle - The handle of the Image that is opening the protocol interface
1059 specified by Protocol and Interface.
1061 ControllerHandle - The controller handle that is requiring this interface.
1063 Attributes - The open mode of the protocol interface specified by Handle
1068 EFI_INVALID_PARAMETER - Protocol is NULL.
1070 EFI_SUCCESS - Get the protocol interface.
1078 CoreOpenProtocolInformation (
1079 IN EFI_HANDLE UserHandle
,
1080 IN EFI_GUID
*Protocol
,
1081 OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY
**EntryBuffer
,
1082 OUT UINTN
*EntryCount
1086 Routine Description:
1088 Return information about Opened protocols in the system
1092 UserHandle - The handle to close the protocol interface on
1094 Protocol - The ID of the protocol
1096 EntryBuffer - A pointer to a buffer of open protocol information in the form of
1097 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.
1099 EntryCount - Number of EntryBuffer entries
1111 IN EFI_HANDLE UserHandle
,
1112 IN EFI_GUID
*Protocol
,
1113 IN EFI_HANDLE ImageHandle
,
1114 IN EFI_HANDLE ControllerHandle
1118 Routine Description:
1124 UserHandle - The handle to close the protocol interface on
1126 Protocol - The ID of the protocol
1128 ImageHandle - The user of the protocol to close
1130 ControllerHandle - The user of the protocol to close
1134 EFI_INVALID_PARAMETER - Protocol is NULL.
1142 CoreProtocolsPerHandle (
1143 IN EFI_HANDLE UserHandle
,
1144 OUT EFI_GUID
***ProtocolBuffer
,
1145 OUT UINTN
*ProtocolBufferCount
1149 Routine Description:
1151 Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated
1156 UserHandle - The handle from which to retrieve the list of protocol interface
1159 ProtocolBuffer - A pointer to the list of protocol interface GUID pointers that are
1160 installed on Handle.
1162 ProtocolBufferCount - A pointer to the number of GUID pointers present in
1166 EFI_SUCCESS - The list of protocol interface GUIDs installed on Handle was returned in
1167 ProtocolBuffer. The number of protocol interface GUIDs was
1168 returned in ProtocolBufferCount.
1169 EFI_INVALID_PARAMETER - Handle is NULL.
1170 EFI_INVALID_PARAMETER - Handle is not a valid EFI_HANDLE.
1171 EFI_INVALID_PARAMETER - ProtocolBuffer is NULL.
1172 EFI_INVALID_PARAMETER - ProtocolBufferCount is NULL.
1173 EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the results.
1181 CoreRegisterProtocolNotify (
1182 IN EFI_GUID
*Protocol
,
1184 OUT VOID
**Registration
1188 Routine Description:
1190 Add a new protocol notification record for the request protocol.
1194 Protocol - The requested protocol to add the notify registration
1196 Event - The event to signal
1198 Registration - Returns the registration record
1203 EFI_INVALID_PARAMETER - Invalid parameter
1205 EFI_SUCCESS - Successfully returned the registration record that has been added
1214 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1215 IN EFI_GUID
*Protocol OPTIONAL
,
1216 IN VOID
*SearchKey OPTIONAL
,
1217 IN OUT UINTN
*BufferSize
,
1218 OUT EFI_HANDLE
*Buffer
1222 Routine Description:
1224 Locates the requested handle(s) and returns them in Buffer.
1228 SearchType - The type of search to perform to locate the handles
1230 Protocol - The protocol to search for
1232 SearchKey - Dependant on SearchType
1234 BufferSize - On input the size of Buffer. On output the
1235 size of data returned.
1237 Buffer - The buffer to return the results in
1242 EFI_BUFFER_TOO_SMALL - Buffer too small, required buffer size is returned in BufferSize.
1244 EFI_INVALID_PARAMETER - Invalid parameter
1246 EFI_SUCCESS - Successfully found the requested handle(s) and returns them in Buffer.
1254 CoreLocateDevicePath (
1255 IN EFI_GUID
*Protocol
,
1256 IN OUT EFI_DEVICE_PATH_PROTOCOL
**FilePath
,
1257 OUT EFI_HANDLE
*Device
1261 Routine Description:
1263 Locates the handle to a device on the device path that supports the specified protocol.
1267 Protocol - The protocol to search for.
1268 FilePath - On input, a pointer to a pointer to the device path. On output, the device
1269 path pointer is modified to point to the remaining part of the devicepath.
1270 Device - A pointer to the returned device handle.
1274 EFI_SUCCESS - The resulting handle was returned.
1275 EFI_NOT_FOUND - No handles matched the search.
1276 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
1284 CoreLocateHandleBuffer (
1285 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1286 IN EFI_GUID
*Protocol OPTIONAL
,
1287 IN VOID
*SearchKey OPTIONAL
,
1288 IN OUT UINTN
*NumberHandles
,
1289 OUT EFI_HANDLE
**Buffer
1293 Routine Description:
1295 Function returns an array of handles that support the requested protocol
1296 in a buffer allocated from pool. This is a version of CoreLocateHandle()
1297 that allocates a buffer for the caller.
1301 SearchType - Specifies which handle(s) are to be returned.
1302 Protocol - Provides the protocol to search by.
1303 This parameter is only valid for SearchType ByProtocol.
1304 SearchKey - Supplies the search key depending on the SearchType.
1305 NumberHandles - The number of handles returned in Buffer.
1306 Buffer - A pointer to the buffer to return the requested array of
1307 handles that support Protocol.
1311 EFI_SUCCESS - The result array of handles was returned.
1312 EFI_NOT_FOUND - No handles match the search.
1313 EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the matching results.
1314 EFI_INVALID_PARAMETER - Invalid parameter
1322 CoreLocateProtocol (
1323 IN EFI_GUID
*Protocol
,
1324 IN VOID
*Registration OPTIONAL
,
1325 OUT VOID
**Interface
1329 Routine Description:
1331 Return the first Protocol Interface that matches the Protocol GUID. If
1332 Registration is pasased in return a Protocol Instance that was just add
1333 to the system. If Retistration is NULL return the first Protocol Interface
1338 Protocol - The protocol to search for
1340 Registration - Optional Registration Key returned from RegisterProtocolNotify()
1342 Interface - Return the Protocol interface (instance).
1346 EFI_SUCCESS - If a valid Interface is returned
1348 EFI_INVALID_PARAMETER - Invalid parameter
1350 EFI_NOT_FOUND - Protocol interface not found
1356 CoreGetHandleDatabaseKey (
1361 Routine Description:
1363 return handle database key.
1371 Handle database key.
1377 CoreConnectHandlesByKey (
1382 Routine Description:
1384 Go connect any handles that were created or modified while a image executed.
1388 Key - The Key to show that the handle has been created/modified
1399 CoreConnectController (
1400 IN EFI_HANDLE ControllerHandle
,
1401 IN EFI_HANDLE
*DriverImageHandle OPTIONAL
,
1402 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
,
1403 IN BOOLEAN Recursive
1407 Routine Description:
1409 Connects one or more drivers to a controller.
1413 ControllerHandle - Handle of the controller to be connected.
1415 DriverImageHandle - DriverImageHandle A pointer to an ordered list of driver image handles.
1417 RemainingDevicePath - RemainingDevicePath A pointer to the device path that specifies a child of the
1418 controller specified by ControllerHandle.
1420 Recursive - - Whether the function would be called recursively or not.
1432 CoreDisconnectController (
1433 IN EFI_HANDLE ControllerHandle
,
1434 IN EFI_HANDLE DriverImageHandle OPTIONAL
,
1435 IN EFI_HANDLE ChildHandle OPTIONAL
1439 Routine Description:
1441 Disonnects a controller from a driver
1445 ControllerHandle - ControllerHandle The handle of the controller from which driver(s)
1446 are to be disconnected.
1447 DriverImageHandle - DriverImageHandle The driver to disconnect from ControllerHandle.
1448 ChildHandle - ChildHandle The handle of the child to destroy.
1452 EFI_SUCCESS - One or more drivers were disconnected from the controller.
1453 EFI_SUCCESS - On entry, no drivers are managing ControllerHandle.
1454 EFI_SUCCESS - DriverImageHandle is not NULL, and on entry DriverImageHandle is not managing ControllerHandle.
1455 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
1456 EFI_INVALID_PARAMETER - DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.
1457 EFI_INVALID_PARAMETER - ChildHandle is not NULL, and it is not a valid EFI_HANDLE.
1458 EFI_OUT_OF_RESOURCES - There are not enough resources available to disconnect any drivers from ControllerHandle.
1459 EFI_DEVICE_ERROR - The controller could not be disconnected because of a device error.
1468 IN EFI_ALLOCATE_TYPE Type
,
1469 IN EFI_MEMORY_TYPE MemoryType
,
1470 IN UINTN NumberOfPages
,
1471 IN OUT EFI_PHYSICAL_ADDRESS
*Memory
1475 Routine Description:
1477 Allocates pages from the memory map.
1481 Type - The type of allocation to perform
1483 MemoryType - The type of memory to turn the allocated pages into
1485 NumberOfPages - The number of pages to allocate
1487 Memory - A pointer to receive the base allocated memory address
1491 Status. On success, Memory is filled in with the base address allocated
1493 EFI_INVALID_PARAMETER - Parameters violate checking rules defined in spec.
1495 EFI_NOT_FOUND - Could not allocate pages match the requirement.
1497 EFI_OUT_OF_RESOURCES - No enough pages to allocate.
1499 EFI_SUCCESS - Pages successfully allocated.
1508 IN EFI_PHYSICAL_ADDRESS Memory
,
1509 IN UINTN NumberOfPages
1513 Routine Description:
1515 Frees previous allocated pages.
1519 Memory - Base address of memory being freed
1521 NumberOfPages - The number of pages to free
1525 EFI_NOT_FOUND - Could not find the entry that covers the range
1527 EFI_INVALID_PARAMETER - Address not aligned
1529 EFI_SUCCESS -Pages successfully freed.
1538 IN OUT UINTN
*MemoryMapSize
,
1539 IN OUT EFI_MEMORY_DESCRIPTOR
*Desc
,
1541 OUT UINTN
*DescriptorSize
,
1542 OUT UINT32
*DescriptorVersion
1546 Routine Description:
1548 Returns the current memory map.
1552 MemoryMapSize - On input the buffer size of MemoryMap allocated by caller
1553 On output the required buffer size to contain the memory map
1555 Desc - The buffer to return the current memory map
1557 MapKey - The address to return the current map key
1559 DescriptorSize - The size in bytes for an individual EFI_MEMORY_DESCRIPTOR
1561 DescriptorVersion - The version number associated with the EFI_MEMORY_DESCRIPTOR
1565 EFI_SUCCESS The current memory map was returned successfully
1567 EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small
1569 EFI_INVALID_PARAMETER One of the parameters has an invalid value
1578 IN EFI_MEMORY_TYPE PoolType
,
1584 Routine Description:
1586 Allocate pool of a particular type.
1590 PoolType - Type of pool to allocate
1592 Size - The amount of pool to allocate
1594 Buffer - The address to return a pointer to the allocated pool
1598 EFI_INVALID_PARAMETER - PoolType not valid
1600 EFI_OUT_OF_RESOURCES - Size exceeds max pool size or allocation failed.
1602 EFI_SUCCESS - Pool successfully allocated.
1615 Routine Description:
1621 Buffer - The allocated pool entry to free
1625 EFI_INVALID_PARAMETER - Buffer is not a valid value.
1627 EFI_SUCCESS - Pool successfully freed.
1636 IN BOOLEAN BootPolicy
,
1637 IN EFI_HANDLE ParentImageHandle
,
1638 IN EFI_DEVICE_PATH_PROTOCOL
*FilePath
,
1639 IN VOID
*SourceBuffer OPTIONAL
,
1640 IN UINTN SourceSize
,
1641 OUT EFI_HANDLE
*ImageHandle
1645 Routine Description:
1647 Loads an EFI image into memory and returns a handle to the image.
1651 BootPolicy - If TRUE, indicates that the request originates from the boot manager,
1652 and that the boot manager is attempting to load FilePath as a boot selection.
1653 ParentImageHandle - The caller's image handle.
1654 FilePath - The specific file path from which the image is loaded.
1655 SourceBuffer - If not NULL, a pointer to the memory location containing a copy of
1656 the image to be loaded.
1657 SourceSize - The size in bytes of SourceBuffer.
1658 ImageHandle - Pointer to the returned image handle that is created when the image
1659 is successfully loaded.
1663 EFI_SUCCESS - The image was loaded into memory.
1664 EFI_NOT_FOUND - The FilePath was not found.
1665 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
1666 EFI_UNSUPPORTED - The image type is not supported, or the device path cannot be
1667 parsed to locate the proper protocol for loading the file.
1668 EFI_OUT_OF_RESOURCES - Image was not loaded due to insufficient resources.
1676 IN EFI_HANDLE ImageHandle
1680 Routine Description:
1682 Unload the specified image.
1686 ImageHandle - The specified image handle.
1690 EFI_INVALID_PARAMETER - Image handle is NULL.
1692 EFI_UNSUPPORTED - Attempt to unload an unsupported image.
1694 EFI_SUCCESS - Image successfully unloaded.
1703 IN EFI_HANDLE ImageHandle
,
1704 OUT UINTN
*ExitDataSize
,
1705 OUT CHAR16
**ExitData OPTIONAL
1709 Routine Description:
1711 Transfer control to a loaded image's entry point.
1715 ImageHandle - Handle of image to be started.
1717 ExitDataSize - Pointer of the size to ExitData
1719 ExitData - Pointer to a pointer to a data buffer that includes a Null-terminated
1720 Unicode string, optionally followed by additional binary data. The string
1721 is a description that the caller may use to further indicate the reason for
1726 EFI_INVALID_PARAMETER - Invalid parameter
1728 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
1730 EFI_SUCCESS - Successfully transfer control to the image's entry point.
1739 IN EFI_HANDLE ImageHandle
,
1740 IN EFI_STATUS Status
,
1741 IN UINTN ExitDataSize
,
1742 IN CHAR16
*ExitData OPTIONAL
1746 Routine Description:
1748 Terminates the currently loaded EFI image and returns control to boot services.
1752 ImageHandle - Handle that identifies the image. This parameter is passed to the image
1754 Status - The image's exit code.
1755 ExitDataSize - The size, in bytes, of ExitData. Ignored if ExitStatus is
1757 ExitData - Pointer to a data buffer that includes a Null-terminated Unicode string,
1758 optionally followed by additional binary data. The string is a
1759 description that the caller may use to further indicate the reason for
1764 EFI_INVALID_PARAMETER - Image handle is NULL or it is not current image.
1766 EFI_SUCCESS - Successfully terminates the currently loaded EFI image.
1768 EFI_ACCESS_DENIED - Should never reach there.
1778 IN EFI_TPL NotifyTpl
,
1779 IN EFI_EVENT_NOTIFY NotifyFunction
,
1780 IN VOID
*NotifyContext
,
1781 OUT EFI_EVENT
*pEvent
1785 Routine Description:
1787 Creates a general-purpose event structure
1791 Type - The type of event to create and its mode and attributes
1792 NotifyTpl - The task priority level of event notifications
1793 NotifyFunction - Pointer to the event's notification function
1794 NotifyContext - Pointer to the notification function's context; corresponds to
1795 parameter "Context" in the notification function
1796 pEvent - Pointer to the newly created event if the call succeeds; undefined otherwise
1800 EFI_SUCCESS - The event structure was created
1801 EFI_INVALID_PARAMETER - One of the parameters has an invalid value
1802 EFI_OUT_OF_RESOURCES - The event could not be allocated
1812 IN EFI_TPL NotifyTpl
,
1813 IN EFI_EVENT_NOTIFY NotifyFunction
, OPTIONAL
1814 IN CONST VOID
*NotifyContext
, OPTIONAL
1815 IN CONST EFI_GUID
*EventGroup
, OPTIONAL
1816 OUT EFI_EVENT
*Event
1820 Routine Description:
1821 Creates a general-purpose event structure
1824 Type - The type of event to create and its mode and attributes
1825 NotifyTpl - The task priority level of event notifications
1826 NotifyFunction - Pointer to the events notification function
1827 NotifyContext - Pointer to the notification functions context; corresponds to
1828 parameter "Context" in the notification function
1829 EventGrout - GUID for EventGroup if NULL act the same as gBS->CreateEvent().
1830 Event - Pointer to the newly created event if the call succeeds; undefined otherwise
1833 EFI_SUCCESS - The event structure was created
1834 EFI_INVALID_PARAMETER - One of the parameters has an invalid value
1835 EFI_OUT_OF_RESOURCES - The event could not be allocated
1845 IN EFI_TIMER_DELAY Type
,
1846 IN UINT64 TriggerTime
1850 Routine Description:
1852 Sets the type of timer and the trigger time for a timer event.
1856 UserEvent - The timer event that is to be signaled at the specified time
1857 Type - The type of time that is specified in TriggerTime
1858 TriggerTime - The number of 100ns units until the timer expires
1862 EFI_SUCCESS - The event has been set to be signaled at the requested time
1863 EFI_INVALID_PARAMETER - Event or Type is not valid
1876 Routine Description:
1878 Signals the event. Queues the event to be notified if needed
1882 Event - The event to signal
1886 EFI_INVALID_PARAMETER - Parameters are not valid.
1888 EFI_SUCCESS - The event was signaled.
1897 IN UINTN NumberOfEvents
,
1898 IN EFI_EVENT
*UserEvents
,
1899 OUT UINTN
*UserIndex
1903 Routine Description:
1905 Stops execution until an event is signaled.
1909 NumberOfEvents - The number of events in the UserEvents array
1910 UserEvents - An array of EFI_EVENT
1911 UserIndex - Pointer to the index of the event which satisfied the wait condition
1915 EFI_SUCCESS - The event indicated by Index was signaled.
1916 EFI_INVALID_PARAMETER - The event indicated by Index has a notification function or
1917 Event was not a valid type
1918 EFI_UNSUPPORTED - The current TPL is not TPL_APPLICATION
1931 Routine Description:
1933 Closes an event and frees the event structure.
1937 UserEvent - Event to close
1941 EFI_INVALID_PARAMETER - Parameters are not valid.
1943 EFI_SUCCESS - The event has been closed
1956 Routine Description:
1958 Check the status of an event
1962 UserEvent - The event to check
1966 EFI_SUCCESS - The event is in the signaled state
1967 EFI_NOT_READY - The event is not in the signaled state
1968 EFI_INVALID_PARAMETER - Event is of type EVT_NOTIFY_SIGNAL
1974 CoreAddMemorySpace (
1975 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
1976 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
1978 IN UINT64 Capabilities
1982 Routine Description:
1984 Add a segment of memory space to GCD map and add all available pages in this segment
1985 as memory descriptors.
1989 GcdMemoryType - Memory type of the segment.
1991 BaseAddress - Base address of the segment.
1993 Length - Length of the segment.
1995 Capabilities - alterable attributes of the segment.
1999 EFI_SUCCESS - Merged this segment into GCD map.
2005 CoreAllocateMemorySpace (
2006 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
2007 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
2010 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
2011 IN EFI_HANDLE ImageHandle
,
2012 IN EFI_HANDLE DeviceHandle OPTIONAL
2016 Routine Description:
2018 Allocate memory space on GCD map.
2022 GcdAllocateType - The type of allocate operation
2024 GcdMemoryType - The desired memory type
2026 Alignment - Align with 2^Alignment
2028 Length - Length to allocate
2030 BaseAddress - Base address to allocate
2032 ImageHandle - The image handle consume the allocated space.
2034 DeviceHandle - The device handle consume the allocated space.
2038 EFI_INVALID_PARAMETER - Invalid parameter.
2040 EFI_NOT_FOUND - No descriptor contains the desired space.
2042 EFI_SUCCESS - Memory space successfully allocated.
2048 CoreFreeMemorySpace (
2049 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2054 Routine Description:Routine Description:
2056 Free a segment of memory space in GCD map.
2060 BaseAddress - Base address of the segment.
2062 Length - Length of the segment.
2066 EFI_SUCCESS - Space successfully freed.
2072 CoreRemoveMemorySpace (
2073 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2078 Routine Description:Routine Description:
2080 Remove a segment of memory space in GCD map.
2084 BaseAddress - Base address of the segment.
2086 Length - Length of the segment.
2090 EFI_SUCCESS - Successfully a segment of memory space.
2096 CoreGetMemorySpaceDescriptor (
2097 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2098 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
*Descriptor
2102 Routine Description:
2104 Search all entries in GCD map which contains specified segment and build it to a descriptor.
2108 BaseAddress - Specified start address
2110 Descriptor - Specified length
2114 EFI_INVALID_PARAMETER - Invalid parameter
2116 EFI_SUCCESS - Successfully get memory space descriptor.
2122 CoreSetMemorySpaceAttributes (
2123 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2125 IN UINT64 Attributes
2129 Routine Description:
2131 Set memory space with specified attributes.
2135 BaseAddress - Specified start address
2137 Length - Specified length
2139 Attributes - Specified attributes
2143 EFI_SUCCESS - Successfully set attribute of a segment of memory space.
2149 CoreGetMemorySpaceMap (
2150 OUT UINTN
*NumberOfDescriptors
,
2151 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
**MemorySpaceMap
2155 Routine Description:
2157 Transer all entries of GCD memory map into memory descriptors and pass to caller.
2161 NumberOfDescriptors - Number of descriptors.
2163 MemorySpaceMap - Descriptor array
2167 EFI_INVALID_PARAMETER - Invalid parameter
2169 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
2171 EFI_SUCCESS - Successfully get memory space map.
2178 IN EFI_GCD_IO_TYPE GcdIoType
,
2179 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2184 Routine Description:
2186 Add a segment of IO space to GCD map.
2190 GcdIoType - IO type of the segment.
2192 BaseAddress - Base address of the segment.
2194 Length - Length of the segment.
2198 EFI_SUCCESS - Merged this segment into GCD map.
2204 CoreAllocateIoSpace (
2205 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
2206 IN EFI_GCD_IO_TYPE GcdIoType
,
2209 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
2210 IN EFI_HANDLE ImageHandle
,
2211 IN EFI_HANDLE DeviceHandle OPTIONAL
2215 Routine Description:
2217 Allocate IO space on GCD map.
2221 GcdAllocateType - The type of allocate operation
2223 GcdIoType - The desired IO type
2225 Alignment - Align with 2^Alignment
2227 Length - Length to allocate
2229 BaseAddress - Base address to allocate
2231 ImageHandle - The image handle consume the allocated space.
2233 DeviceHandle - The device handle consume the allocated space.
2237 EFI_INVALID_PARAMETER - Invalid parameter.
2239 EFI_NOT_FOUND - No descriptor contains the desired space.
2241 EFI_SUCCESS - IO space successfully allocated.
2248 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2253 Routine Description:Routine Description:
2255 Free a segment of IO space in GCD map.
2259 BaseAddress - Base address of the segment.
2261 Length - Length of the segment.
2265 EFI_SUCCESS - Space successfully freed.
2272 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2277 Routine Description:Routine Description:
2279 Remove a segment of IO space in GCD map.
2283 BaseAddress - Base address of the segment.
2285 Length - Length of the segment.
2289 EFI_SUCCESS - Successfully removed a segment of IO space.
2295 CoreGetIoSpaceDescriptor (
2296 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2297 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
*Descriptor
2301 Routine Description:
2303 Search all entries in GCD map which contains specified segment and build it to a descriptor.
2307 BaseAddress - Specified start address
2309 Descriptor - Specified length
2313 EFI_INVALID_PARAMETER - Descriptor is NULL.
2315 EFI_SUCCESS - Successfully get the IO space descriptor.
2322 OUT UINTN
*NumberOfDescriptors
,
2323 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
**IoSpaceMap
2327 Routine Description:
2329 Transer all entries of GCD IO map into IO descriptors and pass to caller.
2333 NumberOfDescriptors - Number of descriptors.
2335 IoSpaceMap - Descriptor array
2339 EFI_INVALID_PARAMETER - Invalid parameter
2341 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
2343 EFI_SUCCESS - Successfully get IO space map.
2356 Routine Description:
2358 This is the main Dispatcher for DXE and it exits when there are no more
2359 drivers to run. Drain the mScheduledQueue and load and start a PE
2360 image for each driver. Search the mDiscoveredList to see if any driver can
2361 be placed on the mScheduledQueue. If no drivers are placed on the
2362 mScheduledQueue exit the function. On exit it is assumed the Bds()
2363 will be called, and when the Bds() exits the Dispatcher will be called
2372 EFI_ALREADY_STARTED - The DXE Dispatcher is already running
2374 EFI_NOT_FOUND - No DXE Drivers were dispatched
2376 EFI_SUCCESS - One or more DXE Drivers were dispatched
2384 IN EFI_HANDLE FirmwareVolumeHandle
,
2385 IN EFI_GUID
*DriverName
2389 Routine Description:
2391 Check every driver and locate a matching one. If the driver is found, the Unrequested
2392 state flag is cleared.
2396 FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware
2397 file specified by DriverName.
2399 DriverName - The Driver name to put in the Dependent state.
2403 EFI_SUCCESS - The DriverName was found and it's SOR bit was cleared
2405 EFI_NOT_FOUND - The DriverName does not exist or it's SOR bit was not set.
2414 IN EFI_HANDLE FirmwareVolumeHandle
,
2415 IN EFI_GUID
*DriverName
2419 Routine Description:
2421 Convert a driver from the Untrused back to the Scheduled state
2425 FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware
2426 file specified by DriverName.
2428 DriverName - The Driver name to put in the Scheduled state
2432 EFI_SUCCESS - The file was found in the untrusted state, and it was promoted
2433 to the trusted state.
2435 EFI_NOT_FOUND - The file was not found in the untrusted state.
2442 IN OUT EFI_STATUS
*Status
,
2443 IN OUT VOID
**Buffer
,
2448 Routine Description:
2450 Helper function called as part of the code needed
2451 to allocate the proper sized buffer for various
2456 Status - Current status
2458 Buffer - Current allocated buffer, or NULL
2460 BufferSize - Current buffer size needed
2464 TRUE - if the buffer was reallocated and the caller
2465 should try the API again.
2467 FALSE - buffer could not be allocated and the caller
2468 should not try the API again.
2476 IN EFI_HANDLE ImageHandle
,
2477 IN EFI_SYSTEM_TABLE
*SystemTable
2481 Routine Description:
2482 This routine is the driver initialization entry point. It initializes the
2483 libraries, and registers two notification functions. These notification
2484 functions are responsible for building the FV stack dynamically.
2487 ImageHandle - The image handle.
2488 SystemTable - The system table.
2491 EFI_SUCCESS - Function successfully returned.
2498 InitializeSectionExtraction (
2499 IN EFI_HANDLE ImageHandle
,
2500 IN EFI_SYSTEM_TABLE
*SystemTable
2504 Routine Description:
2505 Entry point of the section extraction code. Initializes an instance of the
2506 section extraction interface and installs it on a new handle.
2509 ImageHandle EFI_HANDLE: A handle for the image that is initializing this driver
2510 SystemTable EFI_SYSTEM_TABLE: A pointer to the EFI system table
2513 EFI_SUCCESS: Driver initialized successfully
2514 EFI_OUT_OF_RESOURCES: Could not allocate needed resources
2520 CoreProcessFirmwareVolume (
2523 OUT EFI_HANDLE
*FVProtocolHandle
2527 Routine Description:
2528 This DXE service routine is used to process a firmware volume. In
2529 particular, it can be called by BDS to process a single firmware
2530 volume found in a capsule.
2533 FvHeader - pointer to a firmware volume header
2534 Size - the size of the buffer pointed to by FvHeader
2535 FVProtocolHandle - the handle on which a firmware volume protocol
2536 was produced for the firmware volume passed in.
2539 EFI_OUT_OF_RESOURCES - if an FVB could not be produced due to lack of
2541 EFI_VOLUME_CORRUPTED - if the volume was corrupted
2542 EFI_SUCCESS - a firmware volume protocol was produced for the
2549 //Functions used during debug buils
2552 CoreDisplayMissingArchProtocols (
2557 Routine Description:
2558 Displays Architectural protocols that were not loaded and are required for DXE core to function
2559 Only used in Debug Builds
2570 CoreDisplayDiscoveredNotDispatched (
2575 Routine Description:
2577 Traverse the discovered list for any drivers that were discovered but not loaded
2578 because the dependency experessions evaluated to false
2592 CoreEfiNotAvailableYetArg0 (
2597 Routine Description:
2599 Place holder function until all the Boot Services and Runtime Services are available
2607 EFI_NOT_AVAILABLE_YET
2614 CoreEfiNotAvailableYetArg1 (
2619 Routine Description:
2621 Place holder function until all the Boot Services and Runtime Services are available
2629 EFI_NOT_AVAILABLE_YET
2636 CoreEfiNotAvailableYetArg2 (
2642 Routine Description:
2644 Place holder function until all the Boot Services and Runtime Services are available
2654 EFI_NOT_AVAILABLE_YET
2661 CoreEfiNotAvailableYetArg3 (
2668 Routine Description:
2670 Place holder function until all the Boot Services and Runtime Services are available
2682 EFI_NOT_AVAILABLE_YET
2689 CoreEfiNotAvailableYetArg4 (
2697 Routine Description:
2699 Place holder function until all the Boot Services and Runtime Services are available
2713 EFI_NOT_AVAILABLE_YET
2720 CoreEfiNotAvailableYetArg5 (
2729 Routine Description:
2731 Place holder function until all the Boot Services and Runtime Services are available
2747 EFI_NOT_AVAILABLE_YET
2753 CoreGetPeiProtocol (
2754 IN EFI_GUID
*ProtocolGuid
,
2759 Routine Description:
2761 Searches for a Protocol Interface passed from PEI through a HOB
2765 ProtocolGuid - The Protocol GUID to search for in the HOB List
2767 Interface - A pointer to the interface for the Protocol GUID
2771 EFI_SUCCESS - The Protocol GUID was found and its interface is returned in Interface
2773 EFI_NOT_FOUND - The Protocol GUID was not found in the HOB List
2779 DxeMainUefiDecompressGetInfo (
2780 IN EFI_DECOMPRESS_PROTOCOL
*This
,
2782 IN UINT32 SourceSize
,
2783 OUT UINT32
*DestinationSize
,
2784 OUT UINT32
*ScratchSize
2789 DxeMainUefiDecompress (
2790 IN EFI_DECOMPRESS_PROTOCOL
*This
,
2792 IN UINT32 SourceSize
,
2793 IN OUT VOID
*Destination
,
2794 IN UINT32 DestinationSize
,
2795 IN OUT VOID
*Scratch
,
2796 IN UINT32 ScratchSize
2800 DxeMainTianoDecompressGetInfo (
2801 IN EFI_TIANO_DECOMPRESS_PROTOCOL
*This
,
2803 IN UINT32 SourceSize
,
2804 OUT UINT32
*DestinationSize
,
2805 OUT UINT32
*ScratchSize
2810 DxeMainTianoDecompress (
2811 IN EFI_TIANO_DECOMPRESS_PROTOCOL
*This
,
2813 IN UINT32 SourceSize
,
2814 IN OUT VOID
*Destination
,
2815 IN UINT32 DestinationSize
,
2816 IN OUT VOID
*Scratch
,
2817 IN UINT32 ScratchSize
2821 DxeMainCustomDecompressGetInfo (
2822 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL
*This
,
2824 IN UINT32 SourceSize
,
2825 OUT UINT32
*DestinationSize
,
2826 OUT UINT32
*ScratchSize
2831 DxeMainCustomDecompress (
2832 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL
*This
,
2834 IN UINT32 SourceSize
,
2835 IN OUT VOID
*Destination
,
2836 IN UINT32 DestinationSize
,
2837 IN OUT VOID
*Scratch
,
2838 IN UINT32 ScratchSize