4 Copyright (c) 2006 - 2007, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 #include <Protocol/LoadedImage.h>
23 #include <Protocol/GuidedSectionExtraction.h>
24 #include <Guid/DebugImageInfoTable.h>
25 #include <Protocol/DevicePath.h>
26 #include <Protocol/Runtime.h>
27 #include <Protocol/LoadFile.h>
28 #include <Protocol/DriverBinding.h>
29 #include <Protocol/VariableWrite.h>
30 #include <Protocol/PlatformDriverOverride.h>
31 #include <Protocol/Variable.h>
32 #include <Guid/MemoryTypeInformation.h>
33 #include <Guid/FirmwareFileSystem2.h>
34 #include <Guid/HobList.h>
35 #include <Protocol/Timer.h>
36 #include <Protocol/SimpleFileSystem.h>
37 #include <Protocol/Bds.h>
38 #include <Guid/FileInfo.h>
39 #include <Protocol/RealTimeClock.h>
40 #include <Guid/Apriori.h>
41 #include <Protocol/WatchdogTimer.h>
42 #include <Protocol/FirmwareVolume2.h>
43 #include <Protocol/MonotonicCounter.h>
44 #include <Guid/DxeServices.h>
45 #include <Guid/MemoryAllocationHob.h>
46 #include <Protocol/StatusCode.h>
47 #include <Protocol/CustomizedDecompress.h>
48 #include <Protocol/Decompress.h>
49 #include <Protocol/LoadPe32Image.h>
50 #include <Protocol/FirmwareVolumeDispatch.h>
51 #include <Protocol/Security.h>
52 #include <Protocol/Ebc.h>
53 #include <Guid/EventLegacyBios.h>
54 #include <Protocol/Reset.h>
55 #include <Protocol/EdkDecompress.h>
56 #include <Protocol/Cpu.h>
57 #include <Guid/EventGroup.h>
58 #include <Protocol/Metronome.h>
59 #include <Protocol/FirmwareVolumeBlock.h>
60 #include <Protocol/Capsule.h>
61 #include <Protocol/BusSpecificDriverOverride.h>
62 #include <Protocol/Performance.h>
63 #include <Uefi/UefiTcgPlatform.h>
64 #include <Protocol/TcgPlatform.h>
66 #include <Library/DxeCoreEntryPoint.h>
67 #include <Library/DebugLib.h>
68 #include <Library/UefiLib.h>
69 #include <Library/BaseLib.h>
70 #include <Library/HobLib.h>
71 #include <Library/PerformanceLib.h>
72 #include <Library/UefiDecompressLib.h>
73 #include <Library/ExtractGuidedSectionLib.h>
74 #include <Library/CacheMaintenanceLib.h>
75 #include <Library/BaseMemoryLib.h>
76 #include <Library/PeCoffLib.h>
77 #include <Library/PcdLib.h>
78 #include <Library/MemoryAllocationLib.h>
80 #include "DebugImageInfo.h"
82 #include "FwVolBlock.h"
83 #include "FwVolDriver.h"
92 // Modifier for EFI DXE Services
94 #define EFI_DXESERVICE
97 // attributes for reserved memory before it is promoted to system memory
99 #define EFI_MEMORY_PRESENT 0x0100000000000000ULL
100 #define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL
101 #define EFI_MEMORY_TESTED 0x0400000000000000ULL
104 // range for memory mapped port I/O on IPF
106 #define EFI_MEMORY_PORT_IO 0x4000000000000000ULL
110 /// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependecy expression
111 /// to save time. A EFI_DEP_PUSH is evauated one an
112 /// replaced with EFI_DEP_REPLACE_TRUE
114 #define EFI_DEP_REPLACE_TRUE 0xff
117 /// Define the initial size of the dependency expression evaluation stack
119 #define DEPEX_STACK_SIZE_INCREMENT 0x1000
122 EFI_GUID
*ProtocolGuid
;
127 } ARCHITECTURAL_PROTOCOL_ENTRY
;
130 EFI_STATUS_CODE_DATA DataHeader
;
132 } EFI_DXE_DEVICE_HANDLE_EXTENDED_DATA
;
134 #define EFI_STATUS_CODE_DXE_CORE_GUID \
135 { 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 } }
138 // DXE Dispatcher Data structures
141 #define KNOWN_HANDLE_SIGNATURE EFI_SIGNATURE_32('k','n','o','w')
144 LIST_ENTRY Link
; // mFvHandleList
149 #define EFI_CORE_DRIVER_ENTRY_SIGNATURE EFI_SIGNATURE_32('d','r','v','r')
152 LIST_ENTRY Link
; // mDriverList
154 LIST_ENTRY ScheduledLink
; // mScheduledQueue
158 EFI_DEVICE_PATH_PROTOCOL
*FvFileDevicePath
;
159 EFI_FIRMWARE_VOLUME2_PROTOCOL
*Fv
;
166 EFI_GUID BeforeAfterGuid
;
173 BOOLEAN DepexProtocolError
;
175 EFI_HANDLE ImageHandle
;
177 } EFI_CORE_DRIVER_ENTRY
;
180 //The data structure of GCD memory map entry
182 #define EFI_GCD_MAP_SIGNATURE EFI_SIGNATURE_32('g','c','d','m')
186 EFI_PHYSICAL_ADDRESS BaseAddress
;
190 EFI_GCD_MEMORY_TYPE GcdMemoryType
;
191 EFI_GCD_IO_TYPE GcdIoType
;
192 EFI_HANDLE ImageHandle
;
193 EFI_HANDLE DeviceHandle
;
197 // DXE Core Global Variables
199 extern EFI_SYSTEM_TABLE
*gDxeCoreST
;
200 extern EFI_BOOT_SERVICES
*gDxeCoreBS
;
201 extern EFI_RUNTIME_SERVICES
*gDxeCoreRT
;
202 extern EFI_DXE_SERVICES
*gDxeCoreDS
;
203 extern EFI_HANDLE gDxeCoreImageHandle
;
205 extern EFI_DECOMPRESS_PROTOCOL gEfiDecompress
;
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 (
358 IN OUT VOID
**HobStart
,
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. The HobStart will be relocated to a pool
376 HobStart - The start address of the HOB
378 MemoryBaseAddress - Start address of memory region found to init DXE core.
380 MemoryLength - Length of memory region found to init DXE core.
385 EFI_SUCCESS - GCD services successfully initialized.
391 CoreInitializeEventServices (
398 Initializes "event" support and populates parts of the System and Runtime Table.
406 EFI_SUCCESS - Always return success
412 CoreInitializeImageServices (
419 Add the Image Services to EFI Boot Services Table and install the protocol
420 interfaces for this image.
424 HobStart - The HOB to initialize
434 CoreNotifyOnArchProtocolInstallation (
440 Creates an event that is fired everytime a Protocol of a specific type is installed
452 CoreAllEfiServicesAvailable (
458 Return TRUE if all AP services are availible.
464 EFI_SUCCESS - All AP services are available
465 EFI_NOT_FOUND - At least one AP service is not available
472 IN OUT EFI_TABLE_HEADER
*Hdr
478 Calcualte the 32-bit CRC in a EFI table using the service provided by the
483 Hdr - Pointer to an EFI standard header
501 Called by the platform code to process a tick.
505 Duration - The number of 100ns elasped since the last call to TimerTick
515 CoreInitializeDispatcher (
522 Initialize the dispatcher. Initialize the notification function that runs when
523 a FV protocol is added to the system.
538 IN EFI_CORE_DRIVER_ENTRY
*DriverEntry
544 This is the POSTFIX version of the dependency evaluator. This code does
545 not need to handle Before or After, as it is not valid to call this
546 routine in this case. The SOR is just ignored and is a nop in the grammer.
548 POSTFIX means all the math is done on top of the stack.
552 DriverEntry - DriverEntry element to update
556 TRUE - If driver is ready to run.
558 FALSE - If driver is not ready to run or some fatal error was found.
564 CorePreProcessDepex (
565 IN EFI_CORE_DRIVER_ENTRY
*DriverEntry
571 Preprocess dependency expression and update DriverEntry to reflect the
572 state of Before, After, and SOR dependencies. If DriverEntry->Before
573 or DriverEntry->After is set it will never be cleared. If SOR is set
574 it will be cleared by CoreSchedule(), and then the driver can be
579 DriverEntry - DriverEntry element to update
583 EFI_SUCCESS - It always works.
591 CoreExitBootServices (
592 IN EFI_HANDLE ImageHandle
,
599 UEFI 2.0 API to terminate Boot Services
603 ImageHandle - Handle that represents the identity of the calling image
605 MapKey -Key to the latest memory map.
609 EFI_SUCCESS - Boot Services terminated
610 EFI_INVALID_PARAMETER - MapKey is incorrect.
616 CoreTerminateMemoryMap (
623 Make sure the memory map is following all the construction rules,
624 it is the last time to check memory map error before exit boot services.
628 MapKey - Memory map key
632 EFI_INVALID_PARAMETER - Memory map not consistent with construction rules.
634 EFI_SUCCESS - Valid memory map.
640 CoreNotifySignalList (
641 IN EFI_GUID
*EventGroup
647 Signals all events on the requested list
651 SignalType - The list to signal
663 CoreInstallConfigurationTable (
671 Boot Service called to add, modify, or remove a system configuration table from
672 the EFI System Table.
676 Guid: Pointer to the GUID for the entry to add, update, or remove
677 Table: Pointer to the configuration table for the entry to add, update, or
682 EFI_SUCCESS Guid, Table pair added, updated, or removed.
683 EFI_INVALID_PARAMETER Input GUID not valid.
684 EFI_NOT_FOUND Attempted to delete non-existant entry
685 EFI_OUT_OF_RESOURCES Not enough memory available
700 Raise the task priority level to the new level.
701 High level is implemented by disabling processor interrupts.
705 NewTpl - New task priority level
709 The previous task priority level
724 Lowers the task priority to the previous value. If the new
725 priority unmasks events at a higher priority, they are dispatched.
729 NewTpl - New, lower, task priority
742 IN UINTN Microseconds
748 Introduces a fine-grained stall.
752 Microseconds The number of microseconds to stall execution
756 EFI_SUCCESS - Execution was stalled for at least the requested amount
759 EFI_NOT_AVAILABLE_YET - gMetronome is not available yet
767 CoreSetWatchdogTimer (
769 IN UINT64 WatchdogCode
,
771 IN CHAR16
*WatchdogData OPTIONAL
777 Sets the system's watchdog timer.
781 Timeout The number of seconds. Zero disables the timer.
783 ///////following three parameters are left for platform specific using
785 WatchdogCode The numberic code to log. 0x0 to 0xffff are firmware
786 DataSize Size of the optional data
787 WatchdogData Optional Null terminated unicode string followed by binary
792 EFI_SUCCESS Timeout has been set
793 EFI_NOT_AVAILABLE_YET WatchdogTimer is not available yet
794 EFI_UNSUPPORTED System does not have a timer (currently not used)
795 EFI_DEVICE_ERROR Could not complete due to hardware error
803 CoreInstallProtocolInterface (
804 IN OUT EFI_HANDLE
*UserHandle
,
805 IN EFI_GUID
*Protocol
,
806 IN EFI_INTERFACE_TYPE InterfaceType
,
813 Wrapper function to CoreInstallProtocolInterfaceNotify. This is the public API which
814 Calls the private one which contains a BOOLEAN parameter for notifications
818 UserHandle - The handle to install the protocol handler on,
819 or NULL if a new handle is to be allocated
821 Protocol - The protocol to add to the handle
823 InterfaceType - Indicates whether Interface is supplied in native form.
825 Interface - The interface for the protocol being added
835 CoreInstallProtocolInterfaceNotify (
836 IN OUT EFI_HANDLE
*UserHandle
,
837 IN EFI_GUID
*Protocol
,
838 IN EFI_INTERFACE_TYPE InterfaceType
,
846 Installs a protocol interface into the boot services environment.
850 UserHandle - The handle to install the protocol handler on,
851 or NULL if a new handle is to be allocated
853 Protocol - The protocol to add to the handle
855 InterfaceType - Indicates whether Interface is supplied in native form.
857 Interface - The interface for the protocol being added
859 Notify - Whether to notify the notification list for this protocol
863 EFI_INVALID_PARAMETER - Invalid parameter
865 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
867 EFI_SUCCESS - Protocol interface successfully installed
875 CoreInstallMultipleProtocolInterfaces (
876 IN OUT EFI_HANDLE
*Handle
,
883 Installs a list of protocol interface into the boot services environment.
884 This function calls InstallProtocolInterface() in a loop. If any error
885 occures all the protocols added by this function are removed. This is
886 basically a lib function to save space.
890 Handle - The handle to install the protocol handlers on,
891 or NULL if a new handle is to be allocated
892 ... - EFI_GUID followed by protocol instance. A NULL terminates the
893 list. The pairs are the arguments to InstallProtocolInterface().
894 All the protocols are added to Handle.
898 EFI_INVALID_PARAMETER - Handle is NULL.
900 EFI_SUCCESS - Protocol interfaces successfully installed.
908 CoreUninstallMultipleProtocolInterfaces (
909 IN EFI_HANDLE Handle
,
916 Uninstalls a list of protocol interface in the boot services environment.
917 This function calls UnisatllProtocolInterface() in a loop. This is
918 basically a lib function to save space.
922 Handle - The handle to uninstall the protocol
924 ... - EFI_GUID followed by protocol instance. A NULL terminates the
925 list. The pairs are the arguments to UninstallProtocolInterface().
926 All the protocols are added to Handle.
938 CoreReinstallProtocolInterface (
939 IN EFI_HANDLE UserHandle
,
940 IN EFI_GUID
*Protocol
,
941 IN VOID
*OldInterface
,
942 IN VOID
*NewInterface
948 Reinstall a protocol interface on a device handle. The OldInterface for Protocol is replaced by the NewInterface.
952 UserHandle - Handle on which the interface is to be reinstalled
953 Protocol - The numeric ID of the interface
954 OldInterface - A pointer to the old interface
955 NewInterface - A pointer to the new interface
962 On EFI_SUCCESS The protocol interface was installed
963 On EFI_NOT_FOUND The OldInterface on the handle was not found
964 On EFI_INVALID_PARAMETER One of the parameters has an invalid value
972 CoreUninstallProtocolInterface (
973 IN EFI_HANDLE UserHandle
,
974 IN EFI_GUID
*Protocol
,
981 Uninstalls all instances of a protocol:interfacer from a handle.
982 If the last protocol interface is remove from the handle, the
987 UserHandle - The handle to remove the protocol handler from
989 Protocol - The protocol, of protocol:interface, to remove
991 Interface - The interface, of protocol:interface, to remove
995 EFI_INVALID_PARAMETER - Protocol is NULL.
997 EFI_SUCCESS - Protocol interface successfully uninstalled.
1005 CoreHandleProtocol (
1006 IN EFI_HANDLE UserHandle
,
1007 IN EFI_GUID
*Protocol
,
1008 OUT VOID
**Interface
1012 Routine Description:
1014 Queries a handle to determine if it supports a specified protocol.
1018 UserHandle - The handle being queried.
1020 Protocol - The published unique identifier of the protocol.
1022 Interface - Supplies the address where a pointer to the corresponding Protocol
1023 Interface is returned.
1027 The requested protocol interface for the handle
1036 IN EFI_HANDLE UserHandle
,
1037 IN EFI_GUID
*Protocol
,
1038 OUT VOID
**Interface OPTIONAL
,
1039 IN EFI_HANDLE ImageHandle
,
1040 IN EFI_HANDLE ControllerHandle
,
1041 IN UINT32 Attributes
1045 Routine Description:
1047 Locates the installed protocol handler for the handle, and
1048 invokes it to obtain the protocol interface. Usage information
1049 is registered in the protocol data base.
1053 UserHandle - The handle to obtain the protocol interface on
1055 Protocol - The ID of the protocol
1057 Interface - The location to return the protocol interface
1059 ImageHandle - The handle of the Image that is opening the protocol interface
1060 specified by Protocol and Interface.
1062 ControllerHandle - The controller handle that is requiring this interface.
1064 Attributes - The open mode of the protocol interface specified by Handle
1069 EFI_INVALID_PARAMETER - Protocol is NULL.
1071 EFI_SUCCESS - Get the protocol interface.
1079 CoreOpenProtocolInformation (
1080 IN EFI_HANDLE UserHandle
,
1081 IN EFI_GUID
*Protocol
,
1082 OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY
**EntryBuffer
,
1083 OUT UINTN
*EntryCount
1087 Routine Description:
1089 Return information about Opened protocols in the system
1093 UserHandle - The handle to close the protocol interface on
1095 Protocol - The ID of the protocol
1097 EntryBuffer - A pointer to a buffer of open protocol information in the form of
1098 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.
1100 EntryCount - Number of EntryBuffer entries
1112 IN EFI_HANDLE UserHandle
,
1113 IN EFI_GUID
*Protocol
,
1114 IN EFI_HANDLE ImageHandle
,
1115 IN EFI_HANDLE ControllerHandle
1119 Routine Description:
1125 UserHandle - The handle to close the protocol interface on
1127 Protocol - The ID of the protocol
1129 ImageHandle - The user of the protocol to close
1131 ControllerHandle - The user of the protocol to close
1135 EFI_INVALID_PARAMETER - Protocol is NULL.
1143 CoreProtocolsPerHandle (
1144 IN EFI_HANDLE UserHandle
,
1145 OUT EFI_GUID
***ProtocolBuffer
,
1146 OUT UINTN
*ProtocolBufferCount
1150 Routine Description:
1152 Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated
1157 UserHandle - The handle from which to retrieve the list of protocol interface
1160 ProtocolBuffer - A pointer to the list of protocol interface GUID pointers that are
1161 installed on Handle.
1163 ProtocolBufferCount - A pointer to the number of GUID pointers present in
1167 EFI_SUCCESS - The list of protocol interface GUIDs installed on Handle was returned in
1168 ProtocolBuffer. The number of protocol interface GUIDs was
1169 returned in ProtocolBufferCount.
1170 EFI_INVALID_PARAMETER - Handle is NULL.
1171 EFI_INVALID_PARAMETER - Handle is not a valid EFI_HANDLE.
1172 EFI_INVALID_PARAMETER - ProtocolBuffer is NULL.
1173 EFI_INVALID_PARAMETER - ProtocolBufferCount is NULL.
1174 EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the results.
1182 CoreRegisterProtocolNotify (
1183 IN EFI_GUID
*Protocol
,
1185 OUT VOID
**Registration
1189 Routine Description:
1191 Add a new protocol notification record for the request protocol.
1195 Protocol - The requested protocol to add the notify registration
1197 Event - The event to signal
1199 Registration - Returns the registration record
1204 EFI_INVALID_PARAMETER - Invalid parameter
1206 EFI_SUCCESS - Successfully returned the registration record that has been added
1215 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1216 IN EFI_GUID
*Protocol OPTIONAL
,
1217 IN VOID
*SearchKey OPTIONAL
,
1218 IN OUT UINTN
*BufferSize
,
1219 OUT EFI_HANDLE
*Buffer
1223 Routine Description:
1225 Locates the requested handle(s) and returns them in Buffer.
1229 SearchType - The type of search to perform to locate the handles
1231 Protocol - The protocol to search for
1233 SearchKey - Dependant on SearchType
1235 BufferSize - On input the size of Buffer. On output the
1236 size of data returned.
1238 Buffer - The buffer to return the results in
1243 EFI_BUFFER_TOO_SMALL - Buffer too small, required buffer size is returned in BufferSize.
1245 EFI_INVALID_PARAMETER - Invalid parameter
1247 EFI_SUCCESS - Successfully found the requested handle(s) and returns them in Buffer.
1255 CoreLocateDevicePath (
1256 IN EFI_GUID
*Protocol
,
1257 IN OUT EFI_DEVICE_PATH_PROTOCOL
**FilePath
,
1258 OUT EFI_HANDLE
*Device
1262 Routine Description:
1264 Locates the handle to a device on the device path that supports the specified protocol.
1268 Protocol - The protocol to search for.
1269 FilePath - On input, a pointer to a pointer to the device path. On output, the device
1270 path pointer is modified to point to the remaining part of the devicepath.
1271 Device - A pointer to the returned device handle.
1275 EFI_SUCCESS - The resulting handle was returned.
1276 EFI_NOT_FOUND - No handles matched the search.
1277 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
1285 CoreLocateHandleBuffer (
1286 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1287 IN EFI_GUID
*Protocol OPTIONAL
,
1288 IN VOID
*SearchKey OPTIONAL
,
1289 IN OUT UINTN
*NumberHandles
,
1290 OUT EFI_HANDLE
**Buffer
1294 Routine Description:
1296 Function returns an array of handles that support the requested protocol
1297 in a buffer allocated from pool. This is a version of CoreLocateHandle()
1298 that allocates a buffer for the caller.
1302 SearchType - Specifies which handle(s) are to be returned.
1303 Protocol - Provides the protocol to search by.
1304 This parameter is only valid for SearchType ByProtocol.
1305 SearchKey - Supplies the search key depending on the SearchType.
1306 NumberHandles - The number of handles returned in Buffer.
1307 Buffer - A pointer to the buffer to return the requested array of
1308 handles that support Protocol.
1312 EFI_SUCCESS - The result array of handles was returned.
1313 EFI_NOT_FOUND - No handles match the search.
1314 EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the matching results.
1315 EFI_INVALID_PARAMETER - Invalid parameter
1323 CoreLocateProtocol (
1324 IN EFI_GUID
*Protocol
,
1325 IN VOID
*Registration OPTIONAL
,
1326 OUT VOID
**Interface
1330 Routine Description:
1332 Return the first Protocol Interface that matches the Protocol GUID. If
1333 Registration is pasased in return a Protocol Instance that was just add
1334 to the system. If Retistration is NULL return the first Protocol Interface
1339 Protocol - The protocol to search for
1341 Registration - Optional Registration Key returned from RegisterProtocolNotify()
1343 Interface - Return the Protocol interface (instance).
1347 EFI_SUCCESS - If a valid Interface is returned
1349 EFI_INVALID_PARAMETER - Invalid parameter
1351 EFI_NOT_FOUND - Protocol interface not found
1357 CoreGetHandleDatabaseKey (
1362 Routine Description:
1364 return handle database key.
1372 Handle database key.
1378 CoreConnectHandlesByKey (
1383 Routine Description:
1385 Go connect any handles that were created or modified while a image executed.
1389 Key - The Key to show that the handle has been created/modified
1400 CoreConnectController (
1401 IN EFI_HANDLE ControllerHandle
,
1402 IN EFI_HANDLE
*DriverImageHandle OPTIONAL
,
1403 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
,
1404 IN BOOLEAN Recursive
1408 Routine Description:
1410 Connects one or more drivers to a controller.
1414 ControllerHandle - Handle of the controller to be connected.
1416 DriverImageHandle - DriverImageHandle A pointer to an ordered list of driver image handles.
1418 RemainingDevicePath - RemainingDevicePath A pointer to the device path that specifies a child of the
1419 controller specified by ControllerHandle.
1421 Recursive - - Whether the function would be called recursively or not.
1433 CoreDisconnectController (
1434 IN EFI_HANDLE ControllerHandle
,
1435 IN EFI_HANDLE DriverImageHandle OPTIONAL
,
1436 IN EFI_HANDLE ChildHandle OPTIONAL
1440 Routine Description:
1442 Disonnects a controller from a driver
1446 ControllerHandle - ControllerHandle The handle of the controller from which driver(s)
1447 are to be disconnected.
1448 DriverImageHandle - DriverImageHandle The driver to disconnect from ControllerHandle.
1449 ChildHandle - ChildHandle The handle of the child to destroy.
1453 EFI_SUCCESS - One or more drivers were disconnected from the controller.
1454 EFI_SUCCESS - On entry, no drivers are managing ControllerHandle.
1455 EFI_SUCCESS - DriverImageHandle is not NULL, and on entry DriverImageHandle is not managing ControllerHandle.
1456 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
1457 EFI_INVALID_PARAMETER - DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.
1458 EFI_INVALID_PARAMETER - ChildHandle is not NULL, and it is not a valid EFI_HANDLE.
1459 EFI_OUT_OF_RESOURCES - There are not enough resources available to disconnect any drivers from ControllerHandle.
1460 EFI_DEVICE_ERROR - The controller could not be disconnected because of a device error.
1469 IN EFI_ALLOCATE_TYPE Type
,
1470 IN EFI_MEMORY_TYPE MemoryType
,
1471 IN UINTN NumberOfPages
,
1472 IN OUT EFI_PHYSICAL_ADDRESS
*Memory
1476 Routine Description:
1478 Allocates pages from the memory map.
1482 Type - The type of allocation to perform
1484 MemoryType - The type of memory to turn the allocated pages into
1486 NumberOfPages - The number of pages to allocate
1488 Memory - A pointer to receive the base allocated memory address
1492 Status. On success, Memory is filled in with the base address allocated
1494 EFI_INVALID_PARAMETER - Parameters violate checking rules defined in spec.
1496 EFI_NOT_FOUND - Could not allocate pages match the requirement.
1498 EFI_OUT_OF_RESOURCES - No enough pages to allocate.
1500 EFI_SUCCESS - Pages successfully allocated.
1509 IN EFI_PHYSICAL_ADDRESS Memory
,
1510 IN UINTN NumberOfPages
1514 Routine Description:
1516 Frees previous allocated pages.
1520 Memory - Base address of memory being freed
1522 NumberOfPages - The number of pages to free
1526 EFI_NOT_FOUND - Could not find the entry that covers the range
1528 EFI_INVALID_PARAMETER - Address not aligned
1530 EFI_SUCCESS -Pages successfully freed.
1539 IN OUT UINTN
*MemoryMapSize
,
1540 IN OUT EFI_MEMORY_DESCRIPTOR
*Desc
,
1542 OUT UINTN
*DescriptorSize
,
1543 OUT UINT32
*DescriptorVersion
1547 Routine Description:
1549 Returns the current memory map.
1553 MemoryMapSize - On input the buffer size of MemoryMap allocated by caller
1554 On output the required buffer size to contain the memory map
1556 Desc - The buffer to return the current memory map
1558 MapKey - The address to return the current map key
1560 DescriptorSize - The size in bytes for an individual EFI_MEMORY_DESCRIPTOR
1562 DescriptorVersion - The version number associated with the EFI_MEMORY_DESCRIPTOR
1566 EFI_SUCCESS The current memory map was returned successfully
1568 EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small
1570 EFI_INVALID_PARAMETER One of the parameters has an invalid value
1579 IN EFI_MEMORY_TYPE PoolType
,
1585 Routine Description:
1587 Allocate pool of a particular type.
1591 PoolType - Type of pool to allocate
1593 Size - The amount of pool to allocate
1595 Buffer - The address to return a pointer to the allocated pool
1599 EFI_INVALID_PARAMETER - PoolType not valid
1601 EFI_OUT_OF_RESOURCES - Size exceeds max pool size or allocation failed.
1603 EFI_SUCCESS - Pool successfully allocated.
1616 Routine Description:
1622 Buffer - The allocated pool entry to free
1626 EFI_INVALID_PARAMETER - Buffer is not a valid value.
1628 EFI_SUCCESS - Pool successfully freed.
1637 IN BOOLEAN BootPolicy
,
1638 IN EFI_HANDLE ParentImageHandle
,
1639 IN EFI_DEVICE_PATH_PROTOCOL
*FilePath
,
1640 IN VOID
*SourceBuffer OPTIONAL
,
1641 IN UINTN SourceSize
,
1642 OUT EFI_HANDLE
*ImageHandle
1646 Routine Description:
1648 Loads an EFI image into memory and returns a handle to the image.
1652 BootPolicy - If TRUE, indicates that the request originates from the boot manager,
1653 and that the boot manager is attempting to load FilePath as a boot selection.
1654 ParentImageHandle - The caller's image handle.
1655 FilePath - The specific file path from which the image is loaded.
1656 SourceBuffer - If not NULL, a pointer to the memory location containing a copy of
1657 the image to be loaded.
1658 SourceSize - The size in bytes of SourceBuffer.
1659 ImageHandle - Pointer to the returned image handle that is created when the image
1660 is successfully loaded.
1664 EFI_SUCCESS - The image was loaded into memory.
1665 EFI_NOT_FOUND - The FilePath was not found.
1666 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
1667 EFI_UNSUPPORTED - The image type is not supported, or the device path cannot be
1668 parsed to locate the proper protocol for loading the file.
1669 EFI_OUT_OF_RESOURCES - Image was not loaded due to insufficient resources.
1677 IN EFI_HANDLE ImageHandle
1681 Routine Description:
1683 Unload the specified image.
1687 ImageHandle - The specified image handle.
1691 EFI_INVALID_PARAMETER - Image handle is NULL.
1693 EFI_UNSUPPORTED - Attempt to unload an unsupported image.
1695 EFI_SUCCESS - Image successfully unloaded.
1704 IN EFI_HANDLE ImageHandle
,
1705 OUT UINTN
*ExitDataSize
,
1706 OUT CHAR16
**ExitData OPTIONAL
1710 Routine Description:
1712 Transfer control to a loaded image's entry point.
1716 ImageHandle - Handle of image to be started.
1718 ExitDataSize - Pointer of the size to ExitData
1720 ExitData - Pointer to a pointer to a data buffer that includes a Null-terminated
1721 Unicode string, optionally followed by additional binary data. The string
1722 is a description that the caller may use to further indicate the reason for
1727 EFI_INVALID_PARAMETER - Invalid parameter
1729 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
1731 EFI_SUCCESS - Successfully transfer control to the image's entry point.
1740 IN EFI_HANDLE ImageHandle
,
1741 IN EFI_STATUS Status
,
1742 IN UINTN ExitDataSize
,
1743 IN CHAR16
*ExitData OPTIONAL
1747 Routine Description:
1749 Terminates the currently loaded EFI image and returns control to boot services.
1753 ImageHandle - Handle that identifies the image. This parameter is passed to the image
1755 Status - The image's exit code.
1756 ExitDataSize - The size, in bytes, of ExitData. Ignored if ExitStatus is
1758 ExitData - Pointer to a data buffer that includes a Null-terminated Unicode string,
1759 optionally followed by additional binary data. The string is a
1760 description that the caller may use to further indicate the reason for
1765 EFI_INVALID_PARAMETER - Image handle is NULL or it is not current image.
1767 EFI_SUCCESS - Successfully terminates the currently loaded EFI image.
1769 EFI_ACCESS_DENIED - Should never reach there.
1779 IN EFI_TPL NotifyTpl
,
1780 IN EFI_EVENT_NOTIFY NotifyFunction
,
1781 IN VOID
*NotifyContext
,
1782 OUT EFI_EVENT
*pEvent
1786 Routine Description:
1788 Creates a general-purpose event structure
1792 Type - The type of event to create and its mode and attributes
1793 NotifyTpl - The task priority level of event notifications
1794 NotifyFunction - Pointer to the event's notification function
1795 NotifyContext - Pointer to the notification function's context; corresponds to
1796 parameter "Context" in the notification function
1797 pEvent - Pointer to the newly created event if the call succeeds; undefined otherwise
1801 EFI_SUCCESS - The event structure was created
1802 EFI_INVALID_PARAMETER - One of the parameters has an invalid value
1803 EFI_OUT_OF_RESOURCES - The event could not be allocated
1813 IN EFI_TPL NotifyTpl
,
1814 IN EFI_EVENT_NOTIFY NotifyFunction
, OPTIONAL
1815 IN CONST VOID
*NotifyContext
, OPTIONAL
1816 IN CONST EFI_GUID
*EventGroup
, OPTIONAL
1817 OUT EFI_EVENT
*Event
1821 Routine Description:
1822 Creates a general-purpose event structure
1825 Type - The type of event to create and its mode and attributes
1826 NotifyTpl - The task priority level of event notifications
1827 NotifyFunction - Pointer to the events notification function
1828 NotifyContext - Pointer to the notification functions context; corresponds to
1829 parameter "Context" in the notification function
1830 EventGrout - GUID for EventGroup if NULL act the same as gBS->CreateEvent().
1831 Event - Pointer to the newly created event if the call succeeds; undefined otherwise
1834 EFI_SUCCESS - The event structure was created
1835 EFI_INVALID_PARAMETER - One of the parameters has an invalid value
1836 EFI_OUT_OF_RESOURCES - The event could not be allocated
1846 IN EFI_TIMER_DELAY Type
,
1847 IN UINT64 TriggerTime
1851 Routine Description:
1853 Sets the type of timer and the trigger time for a timer event.
1857 UserEvent - The timer event that is to be signaled at the specified time
1858 Type - The type of time that is specified in TriggerTime
1859 TriggerTime - The number of 100ns units until the timer expires
1863 EFI_SUCCESS - The event has been set to be signaled at the requested time
1864 EFI_INVALID_PARAMETER - Event or Type is not valid
1877 Routine Description:
1879 Signals the event. Queues the event to be notified if needed
1883 Event - The event to signal
1887 EFI_INVALID_PARAMETER - Parameters are not valid.
1889 EFI_SUCCESS - The event was signaled.
1898 IN UINTN NumberOfEvents
,
1899 IN EFI_EVENT
*UserEvents
,
1900 OUT UINTN
*UserIndex
1904 Routine Description:
1906 Stops execution until an event is signaled.
1910 NumberOfEvents - The number of events in the UserEvents array
1911 UserEvents - An array of EFI_EVENT
1912 UserIndex - Pointer to the index of the event which satisfied the wait condition
1916 EFI_SUCCESS - The event indicated by Index was signaled.
1917 EFI_INVALID_PARAMETER - The event indicated by Index has a notification function or
1918 Event was not a valid type
1919 EFI_UNSUPPORTED - The current TPL is not TPL_APPLICATION
1932 Routine Description:
1934 Closes an event and frees the event structure.
1938 UserEvent - Event to close
1942 EFI_INVALID_PARAMETER - Parameters are not valid.
1944 EFI_SUCCESS - The event has been closed
1957 Routine Description:
1959 Check the status of an event
1963 UserEvent - The event to check
1967 EFI_SUCCESS - The event is in the signaled state
1968 EFI_NOT_READY - The event is not in the signaled state
1969 EFI_INVALID_PARAMETER - Event is of type EVT_NOTIFY_SIGNAL
1975 CoreAddMemorySpace (
1976 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
1977 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
1979 IN UINT64 Capabilities
1983 Routine Description:
1985 Add a segment of memory space to GCD map and add all available pages in this segment
1986 as memory descriptors.
1990 GcdMemoryType - Memory type of the segment.
1992 BaseAddress - Base address of the segment.
1994 Length - Length of the segment.
1996 Capabilities - alterable attributes of the segment.
2000 EFI_SUCCESS - Merged this segment into GCD map.
2006 CoreAllocateMemorySpace (
2007 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
2008 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
2011 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
2012 IN EFI_HANDLE ImageHandle
,
2013 IN EFI_HANDLE DeviceHandle OPTIONAL
2017 Routine Description:
2019 Allocate memory space on GCD map.
2023 GcdAllocateType - The type of allocate operation
2025 GcdMemoryType - The desired memory type
2027 Alignment - Align with 2^Alignment
2029 Length - Length to allocate
2031 BaseAddress - Base address to allocate
2033 ImageHandle - The image handle consume the allocated space.
2035 DeviceHandle - The device handle consume the allocated space.
2039 EFI_INVALID_PARAMETER - Invalid parameter.
2041 EFI_NOT_FOUND - No descriptor contains the desired space.
2043 EFI_SUCCESS - Memory space successfully allocated.
2049 CoreFreeMemorySpace (
2050 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2055 Routine Description:Routine Description:
2057 Free a segment of memory space in GCD map.
2061 BaseAddress - Base address of the segment.
2063 Length - Length of the segment.
2067 EFI_SUCCESS - Space successfully freed.
2073 CoreRemoveMemorySpace (
2074 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2079 Routine Description:Routine Description:
2081 Remove a segment of memory space in GCD map.
2085 BaseAddress - Base address of the segment.
2087 Length - Length of the segment.
2091 EFI_SUCCESS - Successfully a segment of memory space.
2097 CoreGetMemorySpaceDescriptor (
2098 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2099 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
*Descriptor
2103 Routine Description:
2105 Search all entries in GCD map which contains specified segment and build it to a descriptor.
2109 BaseAddress - Specified start address
2111 Descriptor - Specified length
2115 EFI_INVALID_PARAMETER - Invalid parameter
2117 EFI_SUCCESS - Successfully get memory space descriptor.
2123 CoreSetMemorySpaceAttributes (
2124 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2126 IN UINT64 Attributes
2130 Routine Description:
2132 Set memory space with specified attributes.
2136 BaseAddress - Specified start address
2138 Length - Specified length
2140 Attributes - Specified attributes
2144 EFI_SUCCESS - Successfully set attribute of a segment of memory space.
2150 CoreGetMemorySpaceMap (
2151 OUT UINTN
*NumberOfDescriptors
,
2152 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
**MemorySpaceMap
2156 Routine Description:
2158 Transer all entries of GCD memory map into memory descriptors and pass to caller.
2162 NumberOfDescriptors - Number of descriptors.
2164 MemorySpaceMap - Descriptor array
2168 EFI_INVALID_PARAMETER - Invalid parameter
2170 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
2172 EFI_SUCCESS - Successfully get memory space map.
2179 IN EFI_GCD_IO_TYPE GcdIoType
,
2180 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2185 Routine Description:
2187 Add a segment of IO space to GCD map.
2191 GcdIoType - IO type of the segment.
2193 BaseAddress - Base address of the segment.
2195 Length - Length of the segment.
2199 EFI_SUCCESS - Merged this segment into GCD map.
2205 CoreAllocateIoSpace (
2206 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
2207 IN EFI_GCD_IO_TYPE GcdIoType
,
2210 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
2211 IN EFI_HANDLE ImageHandle
,
2212 IN EFI_HANDLE DeviceHandle OPTIONAL
2216 Routine Description:
2218 Allocate IO space on GCD map.
2222 GcdAllocateType - The type of allocate operation
2224 GcdIoType - The desired IO type
2226 Alignment - Align with 2^Alignment
2228 Length - Length to allocate
2230 BaseAddress - Base address to allocate
2232 ImageHandle - The image handle consume the allocated space.
2234 DeviceHandle - The device handle consume the allocated space.
2238 EFI_INVALID_PARAMETER - Invalid parameter.
2240 EFI_NOT_FOUND - No descriptor contains the desired space.
2242 EFI_SUCCESS - IO space successfully allocated.
2249 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2254 Routine Description:Routine Description:
2256 Free a segment of IO space in GCD map.
2260 BaseAddress - Base address of the segment.
2262 Length - Length of the segment.
2266 EFI_SUCCESS - Space successfully freed.
2273 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2278 Routine Description:Routine Description:
2280 Remove a segment of IO space in GCD map.
2284 BaseAddress - Base address of the segment.
2286 Length - Length of the segment.
2290 EFI_SUCCESS - Successfully removed a segment of IO space.
2296 CoreGetIoSpaceDescriptor (
2297 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2298 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
*Descriptor
2302 Routine Description:
2304 Search all entries in GCD map which contains specified segment and build it to a descriptor.
2308 BaseAddress - Specified start address
2310 Descriptor - Specified length
2314 EFI_INVALID_PARAMETER - Descriptor is NULL.
2316 EFI_SUCCESS - Successfully get the IO space descriptor.
2323 OUT UINTN
*NumberOfDescriptors
,
2324 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
**IoSpaceMap
2328 Routine Description:
2330 Transer all entries of GCD IO map into IO descriptors and pass to caller.
2334 NumberOfDescriptors - Number of descriptors.
2336 IoSpaceMap - Descriptor array
2340 EFI_INVALID_PARAMETER - Invalid parameter
2342 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
2344 EFI_SUCCESS - Successfully get IO space map.
2357 Routine Description:
2359 This is the main Dispatcher for DXE and it exits when there are no more
2360 drivers to run. Drain the mScheduledQueue and load and start a PE
2361 image for each driver. Search the mDiscoveredList to see if any driver can
2362 be placed on the mScheduledQueue. If no drivers are placed on the
2363 mScheduledQueue exit the function. On exit it is assumed the Bds()
2364 will be called, and when the Bds() exits the Dispatcher will be called
2373 EFI_ALREADY_STARTED - The DXE Dispatcher is already running
2375 EFI_NOT_FOUND - No DXE Drivers were dispatched
2377 EFI_SUCCESS - One or more DXE Drivers were dispatched
2385 IN EFI_HANDLE FirmwareVolumeHandle
,
2386 IN EFI_GUID
*DriverName
2390 Routine Description:
2392 Check every driver and locate a matching one. If the driver is found, the Unrequested
2393 state flag is cleared.
2397 FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware
2398 file specified by DriverName.
2400 DriverName - The Driver name to put in the Dependent state.
2404 EFI_SUCCESS - The DriverName was found and it's SOR bit was cleared
2406 EFI_NOT_FOUND - The DriverName does not exist or it's SOR bit was not set.
2415 IN EFI_HANDLE FirmwareVolumeHandle
,
2416 IN EFI_GUID
*DriverName
2420 Routine Description:
2422 Convert a driver from the Untrused back to the Scheduled state
2426 FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware
2427 file specified by DriverName.
2429 DriverName - The Driver name to put in the Scheduled state
2433 EFI_SUCCESS - The file was found in the untrusted state, and it was promoted
2434 to the trusted state.
2436 EFI_NOT_FOUND - The file was not found in the untrusted state.
2443 IN OUT EFI_STATUS
*Status
,
2444 IN OUT VOID
**Buffer
,
2449 Routine Description:
2451 Helper function called as part of the code needed
2452 to allocate the proper sized buffer for various
2457 Status - Current status
2459 Buffer - Current allocated buffer, or NULL
2461 BufferSize - Current buffer size needed
2465 TRUE - if the buffer was reallocated and the caller
2466 should try the API again.
2468 FALSE - buffer could not be allocated and the caller
2469 should not try the API again.
2477 IN EFI_HANDLE ImageHandle
,
2478 IN EFI_SYSTEM_TABLE
*SystemTable
2482 Routine Description:
2483 This routine is the driver initialization entry point. It initializes the
2484 libraries, and registers two notification functions. These notification
2485 functions are responsible for building the FV stack dynamically.
2488 ImageHandle - The image handle.
2489 SystemTable - The system table.
2492 EFI_SUCCESS - Function successfully returned.
2499 InitializeSectionExtraction (
2500 IN EFI_HANDLE ImageHandle
,
2501 IN EFI_SYSTEM_TABLE
*SystemTable
2505 Routine Description:
2506 Entry point of the section extraction code. Initializes an instance of the
2507 section extraction interface and installs it on a new handle.
2510 ImageHandle EFI_HANDLE: A handle for the image that is initializing this driver
2511 SystemTable EFI_SYSTEM_TABLE: A pointer to the EFI system table
2514 EFI_SUCCESS: Driver initialized successfully
2515 EFI_OUT_OF_RESOURCES: Could not allocate needed resources
2521 CoreProcessFirmwareVolume (
2524 OUT EFI_HANDLE
*FVProtocolHandle
2528 Routine Description:
2529 This DXE service routine is used to process a firmware volume. In
2530 particular, it can be called by BDS to process a single firmware
2531 volume found in a capsule.
2534 FvHeader - pointer to a firmware volume header
2535 Size - the size of the buffer pointed to by FvHeader
2536 FVProtocolHandle - the handle on which a firmware volume protocol
2537 was produced for the firmware volume passed in.
2540 EFI_OUT_OF_RESOURCES - if an FVB could not be produced due to lack of
2542 EFI_VOLUME_CORRUPTED - if the volume was corrupted
2543 EFI_SUCCESS - a firmware volume protocol was produced for the
2550 //Functions used during debug buils
2553 CoreDisplayMissingArchProtocols (
2558 Routine Description:
2559 Displays Architectural protocols that were not loaded and are required for DXE core to function
2560 Only used in Debug Builds
2571 CoreDisplayDiscoveredNotDispatched (
2576 Routine Description:
2578 Traverse the discovered list for any drivers that were discovered but not loaded
2579 because the dependency experessions evaluated to false
2593 CoreEfiNotAvailableYetArg0 (
2598 Routine Description:
2600 Place holder function until all the Boot Services and Runtime Services are available
2608 EFI_NOT_AVAILABLE_YET
2615 CoreEfiNotAvailableYetArg1 (
2620 Routine Description:
2622 Place holder function until all the Boot Services and Runtime Services are available
2630 EFI_NOT_AVAILABLE_YET
2637 CoreEfiNotAvailableYetArg2 (
2643 Routine Description:
2645 Place holder function until all the Boot Services and Runtime Services are available
2655 EFI_NOT_AVAILABLE_YET
2662 CoreEfiNotAvailableYetArg3 (
2669 Routine Description:
2671 Place holder function until all the Boot Services and Runtime Services are available
2683 EFI_NOT_AVAILABLE_YET
2690 CoreEfiNotAvailableYetArg4 (
2698 Routine Description:
2700 Place holder function until all the Boot Services and Runtime Services are available
2714 EFI_NOT_AVAILABLE_YET
2721 CoreEfiNotAvailableYetArg5 (
2730 Routine Description:
2732 Place holder function until all the Boot Services and Runtime Services are available
2748 EFI_NOT_AVAILABLE_YET
2754 CoreGetPeiProtocol (
2755 IN EFI_GUID
*ProtocolGuid
,
2760 Routine Description:
2762 Searches for a Protocol Interface passed from PEI through a HOB
2766 ProtocolGuid - The Protocol GUID to search for in the HOB List
2768 Interface - A pointer to the interface for the Protocol GUID
2772 EFI_SUCCESS - The Protocol GUID was found and its interface is returned in Interface
2774 EFI_NOT_FOUND - The Protocol GUID was not found in the HOB List
2780 DxeMainUefiDecompressGetInfo (
2781 IN EFI_DECOMPRESS_PROTOCOL
*This
,
2783 IN UINT32 SourceSize
,
2784 OUT UINT32
*DestinationSize
,
2785 OUT UINT32
*ScratchSize
2790 DxeMainUefiDecompress (
2791 IN EFI_DECOMPRESS_PROTOCOL
*This
,
2793 IN UINT32 SourceSize
,
2794 IN OUT VOID
*Destination
,
2795 IN UINT32 DestinationSize
,
2796 IN OUT VOID
*Scratch
,
2797 IN UINT32 ScratchSize
2801 DxeMainTianoDecompressGetInfo (
2802 IN EFI_TIANO_DECOMPRESS_PROTOCOL
*This
,
2804 IN UINT32 SourceSize
,
2805 OUT UINT32
*DestinationSize
,
2806 OUT UINT32
*ScratchSize
2811 DxeMainTianoDecompress (
2812 IN EFI_TIANO_DECOMPRESS_PROTOCOL
*This
,
2814 IN UINT32 SourceSize
,
2815 IN OUT VOID
*Destination
,
2816 IN UINT32 DestinationSize
,
2817 IN OUT VOID
*Scratch
,
2818 IN UINT32 ScratchSize
2822 DxeMainCustomDecompressGetInfo (
2823 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL
*This
,
2825 IN UINT32 SourceSize
,
2826 OUT UINT32
*DestinationSize
,
2827 OUT UINT32
*ScratchSize
2832 DxeMainCustomDecompress (
2833 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL
*This
,
2835 IN UINT32 SourceSize
,
2836 IN OUT VOID
*Destination
,
2837 IN UINT32 DestinationSize
,
2838 IN OUT VOID
*Scratch
,
2839 IN UINT32 ScratchSize
2845 IN UINTN SectionStreamLength
,
2846 IN VOID
*SectionStream
,
2847 OUT UINTN
*SectionStreamHandle
2853 IN UINTN SectionStreamHandle
,
2854 IN EFI_SECTION_TYPE
*SectionType
,
2855 IN EFI_GUID
*SectionDefinitionGuid
,
2856 IN UINTN SectionInstance
,
2858 IN OUT UINTN
*BufferSize
,
2859 OUT UINT32
*AuthenticationStatus
2864 CloseSectionStream (
2865 IN UINTN StreamHandleToClose