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.
27 // The package level header files this module uses
30 #include <FrameworkPei.h>
32 // The protocols, PPI and GUID defintions for this module
34 #include <Protocol/LoadedImage.h>
35 #include <Protocol/GuidedSectionExtraction.h>
36 #include <Protocol/SectionExtraction.h>
37 #include <Guid/DebugImageInfoTable.h>
38 #include <Protocol/DevicePath.h>
39 #include <Protocol/Runtime.h>
40 #include <Protocol/LoadFile.h>
41 #include <Protocol/DriverBinding.h>
42 #include <Protocol/VariableWrite.h>
43 #include <Protocol/PlatformDriverOverride.h>
44 #include <Protocol/Variable.h>
45 #include <Guid/MemoryTypeInformation.h>
46 #include <Guid/FirmwareFileSystem2.h>
47 #include <Guid/HobList.h>
48 #include <Protocol/Timer.h>
49 #include <Protocol/SimpleFileSystem.h>
50 #include <Protocol/Bds.h>
51 #include <Guid/FileInfo.h>
52 #include <Protocol/RealTimeClock.h>
53 #include <Guid/Apriori.h>
54 #include <Protocol/WatchdogTimer.h>
55 #include <Protocol/FirmwareVolume.h>
56 #include <Protocol/MonotonicCounter.h>
57 #include <Guid/DxeServices.h>
58 #include <Guid/MemoryAllocationHob.h>
59 #include <Protocol/StatusCode.h>
60 #include <Protocol/CustomizedDecompress.h>
61 #include <Protocol/Decompress.h>
62 #include <Protocol/LoadPe32Image.h>
63 #include <Protocol/FirmwareVolumeDispatch.h>
64 #include <Protocol/Security.h>
65 #include <Protocol/Ebc.h>
66 #include <Guid/EventLegacyBios.h>
67 #include <Protocol/Reset.h>
68 #include <Protocol/EdkDecompress.h>
69 #include <Protocol/Cpu.h>
70 #include <Guid/EventGroup.h>
71 #include <Protocol/Metronome.h>
72 #include <Protocol/FirmwareVolumeBlock.h>
73 #include <Protocol/Capsule.h>
74 #include <Protocol/BusSpecificDriverOverride.h>
75 #include <Protocol/Performance.h>
76 #include <Guid/StatusCodeDataTypeId.h>
78 // The Library classes this module consumes
80 #include <Library/DxeCoreEntryPoint.h>
81 #include <Library/DebugLib.h>
82 #include <Library/UefiLib.h>
83 #include <Library/BaseLib.h>
84 #include <Library/HobLib.h>
85 #include <Library/PerformanceLib.h>
86 #include <Library/UefiDecompressLib.h>
87 #include <Library/CustomDecompressLib.h>
88 #include <Library/PeCoffLoaderLib.h>
89 #include <Library/CacheMaintenanceLib.h>
90 #include <Library/BaseMemoryLib.h>
92 #include "DebugImageInfo.h"
94 #include "FwVolBlock.h"
95 #include "FwVolDriver.h"
104 // Modifier for EFI DXE Services
106 #define EFI_DXESERVICE
109 // attributes for reserved memory before it is promoted to system memory
111 #define EFI_MEMORY_PRESENT 0x0100000000000000ULL
112 #define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL
113 #define EFI_MEMORY_TESTED 0x0400000000000000ULL
116 // range for memory mapped port I/O on IPF
118 #define EFI_MEMORY_PORT_IO 0x4000000000000000ULL
122 /// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependecy expression
123 /// to save time. A EFI_DEP_PUSH is evauated one an
124 /// replaced with EFI_DEP_REPLACE_TRUE
126 #define EFI_DEP_REPLACE_TRUE 0xff
129 /// Define the initial size of the dependency expression evaluation stack
131 #define DEPEX_STACK_SIZE_INCREMENT 0x1000
134 EFI_GUID
*ProtocolGuid
;
139 } ARCHITECTURAL_PROTOCOL_ENTRY
;
143 // DXE Dispatcher Data structures
146 #define KNOWN_HANDLE_SIGNATURE EFI_SIGNATURE_32('k','n','o','w')
149 LIST_ENTRY Link
; // mFvHandleList
154 #define EFI_CORE_DRIVER_ENTRY_SIGNATURE EFI_SIGNATURE_32('d','r','v','r')
157 LIST_ENTRY Link
; // mDriverList
159 LIST_ENTRY ScheduledLink
; // mScheduledQueue
163 EFI_DEVICE_PATH_PROTOCOL
*FvFileDevicePath
;
164 EFI_FIRMWARE_VOLUME_PROTOCOL
*Fv
;
171 EFI_GUID BeforeAfterGuid
;
178 BOOLEAN DepexProtocolError
;
180 EFI_HANDLE ImageHandle
;
182 } EFI_CORE_DRIVER_ENTRY
;
185 //The data structure of GCD memory map entry
187 #define EFI_GCD_MAP_SIGNATURE EFI_SIGNATURE_32('g','c','d','m')
191 EFI_PHYSICAL_ADDRESS BaseAddress
;
195 EFI_GCD_MEMORY_TYPE GcdMemoryType
;
196 EFI_GCD_IO_TYPE GcdIoType
;
197 EFI_HANDLE ImageHandle
;
198 EFI_HANDLE DeviceHandle
;
202 // DXE Core Global Variables
204 extern EFI_SYSTEM_TABLE
*gDxeCoreST
;
205 extern EFI_BOOT_SERVICES
*gDxeCoreBS
;
206 extern EFI_RUNTIME_SERVICES
*gDxeCoreRT
;
207 extern EFI_DXE_SERVICES
*gDxeCoreDS
;
208 extern EFI_HANDLE gDxeCoreImageHandle
;
210 extern EFI_DECOMPRESS_PROTOCOL gEfiDecompress
;
211 extern EFI_PEI_PE_COFF_LOADER_PROTOCOL
*gEfiPeiPeCoffLoader
;
213 extern EFI_RUNTIME_ARCH_PROTOCOL
*gRuntime
;
214 extern EFI_CPU_ARCH_PROTOCOL
*gCpu
;
215 extern EFI_WATCHDOG_TIMER_ARCH_PROTOCOL
*gWatchdogTimer
;
216 extern EFI_METRONOME_ARCH_PROTOCOL
*gMetronome
;
217 extern EFI_TIMER_ARCH_PROTOCOL
*gTimer
;
218 extern EFI_SECURITY_ARCH_PROTOCOL
*gSecurity
;
219 extern EFI_BDS_ARCH_PROTOCOL
*gBds
;
220 extern EFI_STATUS_CODE_PROTOCOL
*gStatusCode
;
222 extern EFI_TPL gEfiCurrentTpl
;
224 extern EFI_GUID
*gDxeCoreFileName
;
225 extern EFI_LOADED_IMAGE_PROTOCOL
*gDxeCoreLoadedImage
;
227 extern EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation
[EfiMaxMemoryType
+ 1];
229 extern BOOLEAN gDispatcherRunning
;
230 extern EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate
;
233 // Service Initialization Functions
245 Called to initialize the pool.
259 CoreAddMemoryDescriptor (
260 IN EFI_MEMORY_TYPE Type
,
261 IN EFI_PHYSICAL_ADDRESS Start
,
262 IN UINT64 NumberOfPages
,
269 Called to initialize the memory map and add descriptors to
270 the current descriptor list.
272 The first descriptor that is added must be general usable
273 memory as the addition allocates heap.
277 Type - The type of memory to add
279 Start - The starting address in the memory range
282 NumberOfPages - The number of pages in the range
284 Attribute - Attributes of the memory to add
288 None. The range is added to the memory map
294 CoreReleaseGcdMemoryLock (
300 Release memory lock on mGcdMemorySpaceLock
312 CoreAcquireGcdMemoryLock (
318 Acquire memory lock on mGcdMemorySpaceLock
330 CoreInitializeMemoryServices (
332 IN EFI_PHYSICAL_ADDRESS
*MemoryBaseAddress
,
333 IN UINT64
*MemoryLength
339 External function. Initializes the GCD and memory services based on the memory
340 descriptor HOBs. This function is responsible for priming the GCD map and the
341 memory map, so memory allocations and resource allocations can be made. The first
342 part of this function can not depend on any memory services until at least one
343 memory descriptor is provided to the memory services. Then the memory services
344 can be used to intialize the GCD map.
348 HobStart - The start address of the HOB.
350 MemoryBaseAddress - Start address of memory region found to init DXE core.
352 MemoryLength - Length of memory region found to init DXE core.
356 EFI_SUCCESS - Memory services successfully initialized.
363 CoreInitializeGcdServices (
365 IN EFI_PHYSICAL_ADDRESS MemoryBaseAddress
,
366 IN UINT64 MemoryLength
372 External function. Initializes the GCD and memory services based on the memory
373 descriptor HOBs. This function is responsible for priming the GCD map and the
374 memory map, so memory allocations and resource allocations can be made. The first
375 part of this function can not depend on any memory services until at least one
376 memory descriptor is provided to the memory services. Then the memory services
377 can be used to intialize the GCD map.
381 HobStart - The start address of the HOB
383 MemoryBaseAddress - Start address of memory region found to init DXE core.
385 MemoryLength - Length of memory region found to init DXE core.
390 EFI_SUCCESS - GCD services successfully initialized.
396 CoreInitializeEventServices (
403 Initializes "event" support and populates parts of the System and Runtime Table.
411 EFI_SUCCESS - Always return success
417 CoreInitializeImageServices (
424 Add the Image Services to EFI Boot Services Table and install the protocol
425 interfaces for this image.
429 HobStart - The HOB to initialize
439 CoreNotifyOnArchProtocolInstallation (
445 Creates an event that is fired everytime a Protocol of a specific type is installed
457 CoreAllEfiServicesAvailable (
463 Return TRUE if all AP services are availible.
469 EFI_SUCCESS - All AP services are available
470 EFI_NOT_FOUND - At least one AP service is not available
477 IN OUT EFI_TABLE_HEADER
*Hdr
483 Calcualte the 32-bit CRC in a EFI table using the service provided by the
488 Hdr - Pointer to an EFI standard header
506 Called by the platform code to process a tick.
510 Duration - The number of 100ns elasped since the last call to TimerTick
520 CoreInitializeDispatcher (
527 Initialize the dispatcher. Initialize the notification function that runs when
528 a FV protocol is added to the system.
543 IN EFI_CORE_DRIVER_ENTRY
*DriverEntry
549 This is the POSTFIX version of the dependency evaluator. This code does
550 not need to handle Before or After, as it is not valid to call this
551 routine in this case. The SOR is just ignored and is a nop in the grammer.
553 POSTFIX means all the math is done on top of the stack.
557 DriverEntry - DriverEntry element to update
561 TRUE - If driver is ready to run.
563 FALSE - If driver is not ready to run or some fatal error was found.
569 CorePreProcessDepex (
570 IN EFI_CORE_DRIVER_ENTRY
*DriverEntry
576 Preprocess dependency expression and update DriverEntry to reflect the
577 state of Before, After, and SOR dependencies. If DriverEntry->Before
578 or DriverEntry->After is set it will never be cleared. If SOR is set
579 it will be cleared by CoreSchedule(), and then the driver can be
584 DriverEntry - DriverEntry element to update
588 EFI_SUCCESS - It always works.
596 CoreExitBootServices (
597 IN EFI_HANDLE ImageHandle
,
604 EFI 1.0 API to terminate Boot Services
608 ImageHandle - Handle that represents the identity of the calling image
610 MapKey -Key to the latest memory map.
614 EFI_SUCCESS - Boot Services terminated
615 EFI_INVALID_PARAMETER - MapKey is incorrect.
621 CoreTerminateMemoryMap (
628 Make sure the memory map is following all the construction rules,
629 it is the last time to check memory map error before exit boot services.
633 MapKey - Memory map key
637 EFI_INVALID_PARAMETER - Memory map not consistent with construction rules.
639 EFI_SUCCESS - Valid memory map.
645 CoreNotifySignalList (
646 IN EFI_GUID
*EventGroup
652 Signals all events on the requested list
656 SignalType - The list to signal
668 CoreInstallConfigurationTable (
676 Boot Service called to add, modify, or remove a system configuration table from
677 the EFI System Table.
681 Guid: Pointer to the GUID for the entry to add, update, or remove
682 Table: Pointer to the configuration table for the entry to add, update, or
687 EFI_SUCCESS Guid, Table pair added, updated, or removed.
688 EFI_INVALID_PARAMETER Input GUID not valid.
689 EFI_NOT_FOUND Attempted to delete non-existant entry
690 EFI_OUT_OF_RESOURCES Not enough memory available
705 Raise the task priority level to the new level.
706 High level is implemented by disabling processor interrupts.
710 NewTpl - New task priority level
714 The previous task priority level
729 Lowers the task priority to the previous value. If the new
730 priority unmasks events at a higher priority, they are dispatched.
734 NewTpl - New, lower, task priority
747 IN UINTN Microseconds
753 Introduces a fine-grained stall.
757 Microseconds The number of microseconds to stall execution
761 EFI_SUCCESS - Execution was stalled for at least the requested amount
764 EFI_NOT_AVAILABLE_YET - gMetronome is not available yet
772 CoreSetWatchdogTimer (
774 IN UINT64 WatchdogCode
,
776 IN CHAR16
*WatchdogData OPTIONAL
782 Sets the system's watchdog timer.
786 Timeout The number of seconds. Zero disables the timer.
788 ///////following three parameters are left for platform specific using
790 WatchdogCode The numberic code to log. 0x0 to 0xffff are firmware
791 DataSize Size of the optional data
792 WatchdogData Optional Null terminated unicode string followed by binary
797 EFI_SUCCESS Timeout has been set
798 EFI_NOT_AVAILABLE_YET WatchdogTimer is not available yet
799 EFI_UNSUPPORTED System does not have a timer (currently not used)
800 EFI_DEVICE_ERROR Could not complete due to hardware error
808 CoreInstallProtocolInterface (
809 IN OUT EFI_HANDLE
*UserHandle
,
810 IN EFI_GUID
*Protocol
,
811 IN EFI_INTERFACE_TYPE InterfaceType
,
818 Wrapper function to CoreInstallProtocolInterfaceNotify. This is the public API which
819 Calls the private one which contains a BOOLEAN parameter for notifications
823 UserHandle - The handle to install the protocol handler on,
824 or NULL if a new handle is to be allocated
826 Protocol - The protocol to add to the handle
828 InterfaceType - Indicates whether Interface is supplied in native form.
830 Interface - The interface for the protocol being added
840 CoreInstallProtocolInterfaceNotify (
841 IN OUT EFI_HANDLE
*UserHandle
,
842 IN EFI_GUID
*Protocol
,
843 IN EFI_INTERFACE_TYPE InterfaceType
,
851 Installs a protocol interface into the boot services environment.
855 UserHandle - The handle to install the protocol handler on,
856 or NULL if a new handle is to be allocated
858 Protocol - The protocol to add to the handle
860 InterfaceType - Indicates whether Interface is supplied in native form.
862 Interface - The interface for the protocol being added
864 Notify - Whether to notify the notification list for this protocol
868 EFI_INVALID_PARAMETER - Invalid parameter
870 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
872 EFI_SUCCESS - Protocol interface successfully installed
880 CoreInstallMultipleProtocolInterfaces (
881 IN OUT EFI_HANDLE
*Handle
,
888 Installs a list of protocol interface into the boot services environment.
889 This function calls InstallProtocolInterface() in a loop. If any error
890 occures all the protocols added by this function are removed. This is
891 basically a lib function to save space.
895 Handle - The handle to install the protocol handlers on,
896 or NULL if a new handle is to be allocated
897 ... - EFI_GUID followed by protocol instance. A NULL terminates the
898 list. The pairs are the arguments to InstallProtocolInterface().
899 All the protocols are added to Handle.
903 EFI_INVALID_PARAMETER - Handle is NULL.
905 EFI_SUCCESS - Protocol interfaces successfully installed.
913 CoreUninstallMultipleProtocolInterfaces (
914 IN EFI_HANDLE Handle
,
921 Uninstalls a list of protocol interface in the boot services environment.
922 This function calls UnisatllProtocolInterface() in a loop. This is
923 basically a lib function to save space.
927 Handle - The handle to uninstall the protocol
929 ... - EFI_GUID followed by protocol instance. A NULL terminates the
930 list. The pairs are the arguments to UninstallProtocolInterface().
931 All the protocols are added to Handle.
943 CoreReinstallProtocolInterface (
944 IN EFI_HANDLE UserHandle
,
945 IN EFI_GUID
*Protocol
,
946 IN VOID
*OldInterface
,
947 IN VOID
*NewInterface
953 Reinstall a protocol interface on a device handle. The OldInterface for Protocol is replaced by the NewInterface.
957 UserHandle - Handle on which the interface is to be reinstalled
958 Protocol - The numeric ID of the interface
959 OldInterface - A pointer to the old interface
960 NewInterface - A pointer to the new interface
967 On EFI_SUCCESS The protocol interface was installed
968 On EFI_NOT_FOUND The OldInterface on the handle was not found
969 On EFI_INVALID_PARAMETER One of the parameters has an invalid value
977 CoreUninstallProtocolInterface (
978 IN EFI_HANDLE UserHandle
,
979 IN EFI_GUID
*Protocol
,
986 Uninstalls all instances of a protocol:interfacer from a handle.
987 If the last protocol interface is remove from the handle, the
992 UserHandle - The handle to remove the protocol handler from
994 Protocol - The protocol, of protocol:interface, to remove
996 Interface - The interface, of protocol:interface, to remove
1000 EFI_INVALID_PARAMETER - Protocol is NULL.
1002 EFI_SUCCESS - Protocol interface successfully uninstalled.
1010 CoreHandleProtocol (
1011 IN EFI_HANDLE UserHandle
,
1012 IN EFI_GUID
*Protocol
,
1013 OUT VOID
**Interface
1017 Routine Description:
1019 Queries a handle to determine if it supports a specified protocol.
1023 UserHandle - The handle being queried.
1025 Protocol - The published unique identifier of the protocol.
1027 Interface - Supplies the address where a pointer to the corresponding Protocol
1028 Interface is returned.
1032 The requested protocol interface for the handle
1041 IN EFI_HANDLE UserHandle
,
1042 IN EFI_GUID
*Protocol
,
1043 OUT VOID
**Interface OPTIONAL
,
1044 IN EFI_HANDLE ImageHandle
,
1045 IN EFI_HANDLE ControllerHandle
,
1046 IN UINT32 Attributes
1050 Routine Description:
1052 Locates the installed protocol handler for the handle, and
1053 invokes it to obtain the protocol interface. Usage information
1054 is registered in the protocol data base.
1058 UserHandle - The handle to obtain the protocol interface on
1060 Protocol - The ID of the protocol
1062 Interface - The location to return the protocol interface
1064 ImageHandle - The handle of the Image that is opening the protocol interface
1065 specified by Protocol and Interface.
1067 ControllerHandle - The controller handle that is requiring this interface.
1069 Attributes - The open mode of the protocol interface specified by Handle
1074 EFI_INVALID_PARAMETER - Protocol is NULL.
1076 EFI_SUCCESS - Get the protocol interface.
1084 CoreOpenProtocolInformation (
1085 IN EFI_HANDLE UserHandle
,
1086 IN EFI_GUID
*Protocol
,
1087 OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY
**EntryBuffer
,
1088 OUT UINTN
*EntryCount
1092 Routine Description:
1094 Return information about Opened protocols in the system
1098 UserHandle - The handle to close the protocol interface on
1100 Protocol - The ID of the protocol
1102 EntryBuffer - A pointer to a buffer of open protocol information in the form of
1103 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.
1105 EntryCount - Number of EntryBuffer entries
1117 IN EFI_HANDLE UserHandle
,
1118 IN EFI_GUID
*Protocol
,
1119 IN EFI_HANDLE ImageHandle
,
1120 IN EFI_HANDLE ControllerHandle
1124 Routine Description:
1130 UserHandle - The handle to close the protocol interface on
1132 Protocol - The ID of the protocol
1134 ImageHandle - The user of the protocol to close
1136 ControllerHandle - The user of the protocol to close
1140 EFI_INVALID_PARAMETER - Protocol is NULL.
1148 CoreProtocolsPerHandle (
1149 IN EFI_HANDLE UserHandle
,
1150 OUT EFI_GUID
***ProtocolBuffer
,
1151 OUT UINTN
*ProtocolBufferCount
1155 Routine Description:
1157 Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated
1162 UserHandle - The handle from which to retrieve the list of protocol interface
1165 ProtocolBuffer - A pointer to the list of protocol interface GUID pointers that are
1166 installed on Handle.
1168 ProtocolBufferCount - A pointer to the number of GUID pointers present in
1172 EFI_SUCCESS - The list of protocol interface GUIDs installed on Handle was returned in
1173 ProtocolBuffer. The number of protocol interface GUIDs was
1174 returned in ProtocolBufferCount.
1175 EFI_INVALID_PARAMETER - Handle is NULL.
1176 EFI_INVALID_PARAMETER - Handle is not a valid EFI_HANDLE.
1177 EFI_INVALID_PARAMETER - ProtocolBuffer is NULL.
1178 EFI_INVALID_PARAMETER - ProtocolBufferCount is NULL.
1179 EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the results.
1187 CoreRegisterProtocolNotify (
1188 IN EFI_GUID
*Protocol
,
1190 OUT VOID
**Registration
1194 Routine Description:
1196 Add a new protocol notification record for the request protocol.
1200 Protocol - The requested protocol to add the notify registration
1202 Event - The event to signal
1204 Registration - Returns the registration record
1209 EFI_INVALID_PARAMETER - Invalid parameter
1211 EFI_SUCCESS - Successfully returned the registration record that has been added
1220 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1221 IN EFI_GUID
*Protocol OPTIONAL
,
1222 IN VOID
*SearchKey OPTIONAL
,
1223 IN OUT UINTN
*BufferSize
,
1224 OUT EFI_HANDLE
*Buffer
1228 Routine Description:
1230 Locates the requested handle(s) and returns them in Buffer.
1234 SearchType - The type of search to perform to locate the handles
1236 Protocol - The protocol to search for
1238 SearchKey - Dependant on SearchType
1240 BufferSize - On input the size of Buffer. On output the
1241 size of data returned.
1243 Buffer - The buffer to return the results in
1248 EFI_BUFFER_TOO_SMALL - Buffer too small, required buffer size is returned in BufferSize.
1250 EFI_INVALID_PARAMETER - Invalid parameter
1252 EFI_SUCCESS - Successfully found the requested handle(s) and returns them in Buffer.
1260 CoreLocateDevicePath (
1261 IN EFI_GUID
*Protocol
,
1262 IN OUT EFI_DEVICE_PATH_PROTOCOL
**FilePath
,
1263 OUT EFI_HANDLE
*Device
1267 Routine Description:
1269 Locates the handle to a device on the device path that supports the specified protocol.
1273 Protocol - The protocol to search for.
1274 FilePath - On input, a pointer to a pointer to the device path. On output, the device
1275 path pointer is modified to point to the remaining part of the devicepath.
1276 Device - A pointer to the returned device handle.
1280 EFI_SUCCESS - The resulting handle was returned.
1281 EFI_NOT_FOUND - No handles matched the search.
1282 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
1290 CoreLocateHandleBuffer (
1291 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1292 IN EFI_GUID
*Protocol OPTIONAL
,
1293 IN VOID
*SearchKey OPTIONAL
,
1294 IN OUT UINTN
*NumberHandles
,
1295 OUT EFI_HANDLE
**Buffer
1299 Routine Description:
1301 Function returns an array of handles that support the requested protocol
1302 in a buffer allocated from pool. This is a version of CoreLocateHandle()
1303 that allocates a buffer for the caller.
1307 SearchType - Specifies which handle(s) are to be returned.
1308 Protocol - Provides the protocol to search by.
1309 This parameter is only valid for SearchType ByProtocol.
1310 SearchKey - Supplies the search key depending on the SearchType.
1311 NumberHandles - The number of handles returned in Buffer.
1312 Buffer - A pointer to the buffer to return the requested array of
1313 handles that support Protocol.
1317 EFI_SUCCESS - The result array of handles was returned.
1318 EFI_NOT_FOUND - No handles match the search.
1319 EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the matching results.
1320 EFI_INVALID_PARAMETER - Invalid parameter
1328 CoreLocateProtocol (
1329 IN EFI_GUID
*Protocol
,
1330 IN VOID
*Registration OPTIONAL
,
1331 OUT VOID
**Interface
1335 Routine Description:
1337 Return the first Protocol Interface that matches the Protocol GUID. If
1338 Registration is pasased in return a Protocol Instance that was just add
1339 to the system. If Retistration is NULL return the first Protocol Interface
1344 Protocol - The protocol to search for
1346 Registration - Optional Registration Key returned from RegisterProtocolNotify()
1348 Interface - Return the Protocol interface (instance).
1352 EFI_SUCCESS - If a valid Interface is returned
1354 EFI_INVALID_PARAMETER - Invalid parameter
1356 EFI_NOT_FOUND - Protocol interface not found
1362 CoreGetHandleDatabaseKey (
1367 Routine Description:
1369 return handle database key.
1377 Handle database key.
1383 CoreConnectHandlesByKey (
1388 Routine Description:
1390 Go connect any handles that were created or modified while a image executed.
1394 Key - The Key to show that the handle has been created/modified
1405 CoreConnectController (
1406 IN EFI_HANDLE ControllerHandle
,
1407 IN EFI_HANDLE
*DriverImageHandle OPTIONAL
,
1408 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
,
1409 IN BOOLEAN Recursive
1413 Routine Description:
1415 Connects one or more drivers to a controller.
1419 ControllerHandle - Handle of the controller to be connected.
1421 DriverImageHandle - DriverImageHandle A pointer to an ordered list of driver image handles.
1423 RemainingDevicePath - RemainingDevicePath A pointer to the device path that specifies a child of the
1424 controller specified by ControllerHandle.
1426 Recursive - - Whether the function would be called recursively or not.
1438 CoreDisconnectController (
1439 IN EFI_HANDLE ControllerHandle
,
1440 IN EFI_HANDLE DriverImageHandle OPTIONAL
,
1441 IN EFI_HANDLE ChildHandle OPTIONAL
1445 Routine Description:
1447 Disonnects a controller from a driver
1451 ControllerHandle - ControllerHandle The handle of the controller from which driver(s)
1452 are to be disconnected.
1453 DriverImageHandle - DriverImageHandle The driver to disconnect from ControllerHandle.
1454 ChildHandle - ChildHandle The handle of the child to destroy.
1458 EFI_SUCCESS - One or more drivers were disconnected from the controller.
1459 EFI_SUCCESS - On entry, no drivers are managing ControllerHandle.
1460 EFI_SUCCESS - DriverImageHandle is not NULL, and on entry DriverImageHandle is not managing ControllerHandle.
1461 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
1462 EFI_INVALID_PARAMETER - DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.
1463 EFI_INVALID_PARAMETER - ChildHandle is not NULL, and it is not a valid EFI_HANDLE.
1464 EFI_OUT_OF_RESOURCES - There are not enough resources available to disconnect any drivers from ControllerHandle.
1465 EFI_DEVICE_ERROR - The controller could not be disconnected because of a device error.
1474 IN EFI_ALLOCATE_TYPE Type
,
1475 IN EFI_MEMORY_TYPE MemoryType
,
1476 IN UINTN NumberOfPages
,
1477 IN OUT EFI_PHYSICAL_ADDRESS
*Memory
1481 Routine Description:
1483 Allocates pages from the memory map.
1487 Type - The type of allocation to perform
1489 MemoryType - The type of memory to turn the allocated pages into
1491 NumberOfPages - The number of pages to allocate
1493 Memory - A pointer to receive the base allocated memory address
1497 Status. On success, Memory is filled in with the base address allocated
1499 EFI_INVALID_PARAMETER - Parameters violate checking rules defined in spec.
1501 EFI_NOT_FOUND - Could not allocate pages match the requirement.
1503 EFI_OUT_OF_RESOURCES - No enough pages to allocate.
1505 EFI_SUCCESS - Pages successfully allocated.
1514 IN EFI_PHYSICAL_ADDRESS Memory
,
1515 IN UINTN NumberOfPages
1519 Routine Description:
1521 Frees previous allocated pages.
1525 Memory - Base address of memory being freed
1527 NumberOfPages - The number of pages to free
1531 EFI_NOT_FOUND - Could not find the entry that covers the range
1533 EFI_INVALID_PARAMETER - Address not aligned
1535 EFI_SUCCESS -Pages successfully freed.
1544 IN OUT UINTN
*MemoryMapSize
,
1545 IN OUT EFI_MEMORY_DESCRIPTOR
*Desc
,
1547 OUT UINTN
*DescriptorSize
,
1548 OUT UINT32
*DescriptorVersion
1552 Routine Description:
1554 Returns the current memory map.
1558 MemoryMapSize - On input the buffer size of MemoryMap allocated by caller
1559 On output the required buffer size to contain the memory map
1561 Desc - The buffer to return the current memory map
1563 MapKey - The address to return the current map key
1565 DescriptorSize - The size in bytes for an individual EFI_MEMORY_DESCRIPTOR
1567 DescriptorVersion - The version number associated with the EFI_MEMORY_DESCRIPTOR
1571 EFI_SUCCESS The current memory map was returned successfully
1573 EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small
1575 EFI_INVALID_PARAMETER One of the parameters has an invalid value
1584 IN EFI_MEMORY_TYPE PoolType
,
1590 Routine Description:
1592 Allocate pool of a particular type.
1596 PoolType - Type of pool to allocate
1598 Size - The amount of pool to allocate
1600 Buffer - The address to return a pointer to the allocated pool
1604 EFI_INVALID_PARAMETER - PoolType not valid
1606 EFI_OUT_OF_RESOURCES - Size exceeds max pool size or allocation failed.
1608 EFI_SUCCESS - Pool successfully allocated.
1621 Routine Description:
1627 Buffer - The allocated pool entry to free
1631 EFI_INVALID_PARAMETER - Buffer is not a valid value.
1633 EFI_SUCCESS - Pool successfully freed.
1642 IN BOOLEAN BootPolicy
,
1643 IN EFI_HANDLE ParentImageHandle
,
1644 IN EFI_DEVICE_PATH_PROTOCOL
*FilePath
,
1645 IN VOID
*SourceBuffer OPTIONAL
,
1646 IN UINTN SourceSize
,
1647 OUT EFI_HANDLE
*ImageHandle
1651 Routine Description:
1653 Loads an EFI image into memory and returns a handle to the image.
1657 BootPolicy - If TRUE, indicates that the request originates from the boot manager,
1658 and that the boot manager is attempting to load FilePath as a boot selection.
1659 ParentImageHandle - The caller's image handle.
1660 FilePath - The specific file path from which the image is loaded.
1661 SourceBuffer - If not NULL, a pointer to the memory location containing a copy of
1662 the image to be loaded.
1663 SourceSize - The size in bytes of SourceBuffer.
1664 ImageHandle - Pointer to the returned image handle that is created when the image
1665 is successfully loaded.
1669 EFI_SUCCESS - The image was loaded into memory.
1670 EFI_NOT_FOUND - The FilePath was not found.
1671 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
1672 EFI_UNSUPPORTED - The image type is not supported, or the device path cannot be
1673 parsed to locate the proper protocol for loading the file.
1674 EFI_OUT_OF_RESOURCES - Image was not loaded due to insufficient resources.
1682 IN EFI_HANDLE ImageHandle
1686 Routine Description:
1688 Unload the specified image.
1692 ImageHandle - The specified image handle.
1696 EFI_INVALID_PARAMETER - Image handle is NULL.
1698 EFI_UNSUPPORTED - Attempt to unload an unsupported image.
1700 EFI_SUCCESS - Image successfully unloaded.
1709 IN EFI_HANDLE ImageHandle
,
1710 OUT UINTN
*ExitDataSize
,
1711 OUT CHAR16
**ExitData OPTIONAL
1715 Routine Description:
1717 Transfer control to a loaded image's entry point.
1721 ImageHandle - Handle of image to be started.
1723 ExitDataSize - Pointer of the size to ExitData
1725 ExitData - Pointer to a pointer to a data buffer that includes a Null-terminated
1726 Unicode string, optionally followed by additional binary data. The string
1727 is a description that the caller may use to further indicate the reason for
1732 EFI_INVALID_PARAMETER - Invalid parameter
1734 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
1736 EFI_SUCCESS - Successfully transfer control to the image's entry point.
1745 IN EFI_HANDLE ImageHandle
,
1746 IN EFI_STATUS Status
,
1747 IN UINTN ExitDataSize
,
1748 IN CHAR16
*ExitData OPTIONAL
1752 Routine Description:
1754 Terminates the currently loaded EFI image and returns control to boot services.
1758 ImageHandle - Handle that identifies the image. This parameter is passed to the image
1760 Status - The image's exit code.
1761 ExitDataSize - The size, in bytes, of ExitData. Ignored if ExitStatus is
1763 ExitData - Pointer to a data buffer that includes a Null-terminated Unicode string,
1764 optionally followed by additional binary data. The string is a
1765 description that the caller may use to further indicate the reason for
1770 EFI_INVALID_PARAMETER - Image handle is NULL or it is not current image.
1772 EFI_SUCCESS - Successfully terminates the currently loaded EFI image.
1774 EFI_ACCESS_DENIED - Should never reach there.
1784 IN EFI_TPL NotifyTpl
,
1785 IN EFI_EVENT_NOTIFY NotifyFunction
,
1786 IN VOID
*NotifyContext
,
1787 OUT EFI_EVENT
*pEvent
1791 Routine Description:
1793 Creates a general-purpose event structure
1797 Type - The type of event to create and its mode and attributes
1798 NotifyTpl - The task priority level of event notifications
1799 NotifyFunction - Pointer to the event's notification function
1800 NotifyContext - Pointer to the notification function's context; corresponds to
1801 parameter "Context" in the notification function
1802 pEvent - Pointer to the newly created event if the call succeeds; undefined otherwise
1806 EFI_SUCCESS - The event structure was created
1807 EFI_INVALID_PARAMETER - One of the parameters has an invalid value
1808 EFI_OUT_OF_RESOURCES - The event could not be allocated
1818 IN EFI_TPL NotifyTpl
,
1819 IN EFI_EVENT_NOTIFY NotifyFunction
, OPTIONAL
1820 IN CONST VOID
*NotifyContext
, OPTIONAL
1821 IN CONST EFI_GUID
*EventGroup
, OPTIONAL
1822 OUT EFI_EVENT
*Event
1826 Routine Description:
1827 Creates a general-purpose event structure
1830 Type - The type of event to create and its mode and attributes
1831 NotifyTpl - The task priority level of event notifications
1832 NotifyFunction - Pointer to the events notification function
1833 NotifyContext - Pointer to the notification functions context; corresponds to
1834 parameter "Context" in the notification function
1835 EventGrout - GUID for EventGroup if NULL act the same as gBS->CreateEvent().
1836 Event - Pointer to the newly created event if the call succeeds; undefined otherwise
1839 EFI_SUCCESS - The event structure was created
1840 EFI_INVALID_PARAMETER - One of the parameters has an invalid value
1841 EFI_OUT_OF_RESOURCES - The event could not be allocated
1851 IN EFI_TIMER_DELAY Type
,
1852 IN UINT64 TriggerTime
1856 Routine Description:
1858 Sets the type of timer and the trigger time for a timer event.
1862 UserEvent - The timer event that is to be signaled at the specified time
1863 Type - The type of time that is specified in TriggerTime
1864 TriggerTime - The number of 100ns units until the timer expires
1868 EFI_SUCCESS - The event has been set to be signaled at the requested time
1869 EFI_INVALID_PARAMETER - Event or Type is not valid
1882 Routine Description:
1884 Signals the event. Queues the event to be notified if needed
1888 Event - The event to signal
1892 EFI_INVALID_PARAMETER - Parameters are not valid.
1894 EFI_SUCCESS - The event was signaled.
1903 IN UINTN NumberOfEvents
,
1904 IN EFI_EVENT
*UserEvents
,
1905 OUT UINTN
*UserIndex
1909 Routine Description:
1911 Stops execution until an event is signaled.
1915 NumberOfEvents - The number of events in the UserEvents array
1916 UserEvents - An array of EFI_EVENT
1917 UserIndex - Pointer to the index of the event which satisfied the wait condition
1921 EFI_SUCCESS - The event indicated by Index was signaled.
1922 EFI_INVALID_PARAMETER - The event indicated by Index has a notification function or
1923 Event was not a valid type
1924 EFI_UNSUPPORTED - The current TPL is not TPL_APPLICATION
1937 Routine Description:
1939 Closes an event and frees the event structure.
1943 UserEvent - Event to close
1947 EFI_INVALID_PARAMETER - Parameters are not valid.
1949 EFI_SUCCESS - The event has been closed
1962 Routine Description:
1964 Check the status of an event
1968 UserEvent - The event to check
1972 EFI_SUCCESS - The event is in the signaled state
1973 EFI_NOT_READY - The event is not in the signaled state
1974 EFI_INVALID_PARAMETER - Event is of type EVT_NOTIFY_SIGNAL
1980 CoreAddMemorySpace (
1981 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
1982 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
1984 IN UINT64 Capabilities
1988 Routine Description:
1990 Add a segment of memory space to GCD map and add all available pages in this segment
1991 as memory descriptors.
1995 GcdMemoryType - Memory type of the segment.
1997 BaseAddress - Base address of the segment.
1999 Length - Length of the segment.
2001 Capabilities - alterable attributes of the segment.
2005 EFI_SUCCESS - Merged this segment into GCD map.
2011 CoreAllocateMemorySpace (
2012 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
2013 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
2016 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
2017 IN EFI_HANDLE ImageHandle
,
2018 IN EFI_HANDLE DeviceHandle OPTIONAL
2022 Routine Description:
2024 Allocate memory space on GCD map.
2028 GcdAllocateType - The type of allocate operation
2030 GcdMemoryType - The desired memory type
2032 Alignment - Align with 2^Alignment
2034 Length - Length to allocate
2036 BaseAddress - Base address to allocate
2038 ImageHandle - The image handle consume the allocated space.
2040 DeviceHandle - The device handle consume the allocated space.
2044 EFI_INVALID_PARAMETER - Invalid parameter.
2046 EFI_NOT_FOUND - No descriptor contains the desired space.
2048 EFI_SUCCESS - Memory space successfully allocated.
2054 CoreFreeMemorySpace (
2055 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2060 Routine Description:Routine Description:
2062 Free a segment of memory space in GCD map.
2066 BaseAddress - Base address of the segment.
2068 Length - Length of the segment.
2072 EFI_SUCCESS - Space successfully freed.
2078 CoreRemoveMemorySpace (
2079 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2084 Routine Description:Routine Description:
2086 Remove a segment of memory space in GCD map.
2090 BaseAddress - Base address of the segment.
2092 Length - Length of the segment.
2096 EFI_SUCCESS - Successfully a segment of memory space.
2102 CoreGetMemorySpaceDescriptor (
2103 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2104 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
*Descriptor
2108 Routine Description:
2110 Search all entries in GCD map which contains specified segment and build it to a descriptor.
2114 BaseAddress - Specified start address
2116 Descriptor - Specified length
2120 EFI_INVALID_PARAMETER - Invalid parameter
2122 EFI_SUCCESS - Successfully get memory space descriptor.
2128 CoreSetMemorySpaceAttributes (
2129 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2131 IN UINT64 Attributes
2135 Routine Description:
2137 Set memory space with specified attributes.
2141 BaseAddress - Specified start address
2143 Length - Specified length
2145 Attributes - Specified attributes
2149 EFI_SUCCESS - Successfully set attribute of a segment of memory space.
2155 CoreGetMemorySpaceMap (
2156 OUT UINTN
*NumberOfDescriptors
,
2157 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
**MemorySpaceMap
2161 Routine Description:
2163 Transer all entries of GCD memory map into memory descriptors and pass to caller.
2167 NumberOfDescriptors - Number of descriptors.
2169 MemorySpaceMap - Descriptor array
2173 EFI_INVALID_PARAMETER - Invalid parameter
2175 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
2177 EFI_SUCCESS - Successfully get memory space map.
2184 IN EFI_GCD_IO_TYPE GcdIoType
,
2185 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2190 Routine Description:
2192 Add a segment of IO space to GCD map.
2196 GcdIoType - IO type of the segment.
2198 BaseAddress - Base address of the segment.
2200 Length - Length of the segment.
2204 EFI_SUCCESS - Merged this segment into GCD map.
2210 CoreAllocateIoSpace (
2211 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
2212 IN EFI_GCD_IO_TYPE GcdIoType
,
2215 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
2216 IN EFI_HANDLE ImageHandle
,
2217 IN EFI_HANDLE DeviceHandle OPTIONAL
2221 Routine Description:
2223 Allocate IO space on GCD map.
2227 GcdAllocateType - The type of allocate operation
2229 GcdIoType - The desired IO type
2231 Alignment - Align with 2^Alignment
2233 Length - Length to allocate
2235 BaseAddress - Base address to allocate
2237 ImageHandle - The image handle consume the allocated space.
2239 DeviceHandle - The device handle consume the allocated space.
2243 EFI_INVALID_PARAMETER - Invalid parameter.
2245 EFI_NOT_FOUND - No descriptor contains the desired space.
2247 EFI_SUCCESS - IO space successfully allocated.
2254 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2259 Routine Description:Routine Description:
2261 Free a segment of IO space in GCD map.
2265 BaseAddress - Base address of the segment.
2267 Length - Length of the segment.
2271 EFI_SUCCESS - Space successfully freed.
2278 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2283 Routine Description:Routine Description:
2285 Remove a segment of IO space in GCD map.
2289 BaseAddress - Base address of the segment.
2291 Length - Length of the segment.
2295 EFI_SUCCESS - Successfully removed a segment of IO space.
2301 CoreGetIoSpaceDescriptor (
2302 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2303 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
*Descriptor
2307 Routine Description:
2309 Search all entries in GCD map which contains specified segment and build it to a descriptor.
2313 BaseAddress - Specified start address
2315 Descriptor - Specified length
2319 EFI_INVALID_PARAMETER - Descriptor is NULL.
2321 EFI_SUCCESS - Successfully get the IO space descriptor.
2328 OUT UINTN
*NumberOfDescriptors
,
2329 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
**IoSpaceMap
2333 Routine Description:
2335 Transer all entries of GCD IO map into IO descriptors and pass to caller.
2339 NumberOfDescriptors - Number of descriptors.
2341 IoSpaceMap - Descriptor array
2345 EFI_INVALID_PARAMETER - Invalid parameter
2347 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
2349 EFI_SUCCESS - Successfully get IO space map.
2362 Routine Description:
2364 This is the main Dispatcher for DXE and it exits when there are no more
2365 drivers to run. Drain the mScheduledQueue and load and start a PE
2366 image for each driver. Search the mDiscoveredList to see if any driver can
2367 be placed on the mScheduledQueue. If no drivers are placed on the
2368 mScheduledQueue exit the function. On exit it is assumed the Bds()
2369 will be called, and when the Bds() exits the Dispatcher will be called
2378 EFI_ALREADY_STARTED - The DXE Dispatcher is already running
2380 EFI_NOT_FOUND - No DXE Drivers were dispatched
2382 EFI_SUCCESS - One or more DXE Drivers were dispatched
2390 IN EFI_HANDLE FirmwareVolumeHandle
,
2391 IN EFI_GUID
*DriverName
2395 Routine Description:
2397 Check every driver and locate a matching one. If the driver is found, the Unrequested
2398 state flag is cleared.
2402 FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware
2403 file specified by DriverName.
2405 DriverName - The Driver name to put in the Dependent state.
2409 EFI_SUCCESS - The DriverName was found and it's SOR bit was cleared
2411 EFI_NOT_FOUND - The DriverName does not exist or it's SOR bit was not set.
2420 IN EFI_HANDLE FirmwareVolumeHandle
,
2421 IN EFI_GUID
*DriverName
2425 Routine Description:
2427 Convert a driver from the Untrused back to the Scheduled state
2431 FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware
2432 file specified by DriverName.
2434 DriverName - The Driver name to put in the Scheduled state
2438 EFI_SUCCESS - The file was found in the untrusted state, and it was promoted
2439 to the trusted state.
2441 EFI_NOT_FOUND - The file was not found in the untrusted state.
2448 IN OUT EFI_STATUS
*Status
,
2449 IN OUT VOID
**Buffer
,
2454 Routine Description:
2456 Helper function called as part of the code needed
2457 to allocate the proper sized buffer for various
2462 Status - Current status
2464 Buffer - Current allocated buffer, or NULL
2466 BufferSize - Current buffer size needed
2470 TRUE - if the buffer was reallocated and the caller
2471 should try the API again.
2473 FALSE - buffer could not be allocated and the caller
2474 should not try the API again.
2482 IN EFI_HANDLE ImageHandle
,
2483 IN EFI_SYSTEM_TABLE
*SystemTable
2487 Routine Description:
2488 This routine is the driver initialization entry point. It initializes the
2489 libraries, and registers two notification functions. These notification
2490 functions are responsible for building the FV stack dynamically.
2493 ImageHandle - The image handle.
2494 SystemTable - The system table.
2497 EFI_SUCCESS - Function successfully returned.
2504 InitializeSectionExtraction (
2505 IN EFI_HANDLE ImageHandle
,
2506 IN EFI_SYSTEM_TABLE
*SystemTable
2510 Routine Description:
2511 Entry point of the section extraction code. Initializes an instance of the
2512 section extraction interface and installs it on a new handle.
2515 ImageHandle EFI_HANDLE: A handle for the image that is initializing this driver
2516 SystemTable EFI_SYSTEM_TABLE: A pointer to the EFI system table
2519 EFI_SUCCESS: Driver initialized successfully
2520 EFI_OUT_OF_RESOURCES: Could not allocate needed resources
2526 CoreProcessFirmwareVolume (
2529 OUT EFI_HANDLE
*FVProtocolHandle
2533 Routine Description:
2534 This DXE service routine is used to process a firmware volume. In
2535 particular, it can be called by BDS to process a single firmware
2536 volume found in a capsule.
2539 FvHeader - pointer to a firmware volume header
2540 Size - the size of the buffer pointed to by FvHeader
2541 FVProtocolHandle - the handle on which a firmware volume protocol
2542 was produced for the firmware volume passed in.
2545 EFI_OUT_OF_RESOURCES - if an FVB could not be produced due to lack of
2547 EFI_VOLUME_CORRUPTED - if the volume was corrupted
2548 EFI_SUCCESS - a firmware volume protocol was produced for the
2555 //Functions used during debug buils
2558 CoreDisplayMissingArchProtocols (
2563 Routine Description:
2564 Displays Architectural protocols that were not loaded and are required for DXE core to function
2565 Only used in Debug Builds
2576 CoreDisplayDiscoveredNotDispatched (
2581 Routine Description:
2583 Traverse the discovered list for any drivers that were discovered but not loaded
2584 because the dependency experessions evaluated to false
2598 CoreEfiNotAvailableYetArg0 (
2603 Routine Description:
2605 Place holder function until all the Boot Services and Runtime Services are available
2613 EFI_NOT_AVAILABLE_YET
2620 CoreEfiNotAvailableYetArg1 (
2625 Routine Description:
2627 Place holder function until all the Boot Services and Runtime Services are available
2635 EFI_NOT_AVAILABLE_YET
2642 CoreEfiNotAvailableYetArg2 (
2648 Routine Description:
2650 Place holder function until all the Boot Services and Runtime Services are available
2660 EFI_NOT_AVAILABLE_YET
2667 CoreEfiNotAvailableYetArg3 (
2674 Routine Description:
2676 Place holder function until all the Boot Services and Runtime Services are available
2688 EFI_NOT_AVAILABLE_YET
2695 CoreEfiNotAvailableYetArg4 (
2703 Routine Description:
2705 Place holder function until all the Boot Services and Runtime Services are available
2719 EFI_NOT_AVAILABLE_YET
2726 CoreEfiNotAvailableYetArg5 (
2735 Routine Description:
2737 Place holder function until all the Boot Services and Runtime Services are available
2753 EFI_NOT_AVAILABLE_YET
2759 CoreGetPeiProtocol (
2760 IN EFI_GUID
*ProtocolGuid
,
2765 Routine Description:
2767 Searches for a Protocol Interface passed from PEI through a HOB
2771 ProtocolGuid - The Protocol GUID to search for in the HOB List
2773 Interface - A pointer to the interface for the Protocol GUID
2777 EFI_SUCCESS - The Protocol GUID was found and its interface is returned in Interface
2779 EFI_NOT_FOUND - The Protocol GUID was not found in the HOB List
2785 DxeMainUefiDecompressGetInfo (
2786 IN EFI_DECOMPRESS_PROTOCOL
*This
,
2788 IN UINT32 SourceSize
,
2789 OUT UINT32
*DestinationSize
,
2790 OUT UINT32
*ScratchSize
2795 DxeMainUefiDecompress (
2796 IN EFI_DECOMPRESS_PROTOCOL
*This
,
2798 IN UINT32 SourceSize
,
2799 IN OUT VOID
*Destination
,
2800 IN UINT32 DestinationSize
,
2801 IN OUT VOID
*Scratch
,
2802 IN UINT32 ScratchSize
2806 DxeMainTianoDecompressGetInfo (
2807 IN EFI_TIANO_DECOMPRESS_PROTOCOL
*This
,
2809 IN UINT32 SourceSize
,
2810 OUT UINT32
*DestinationSize
,
2811 OUT UINT32
*ScratchSize
2816 DxeMainTianoDecompress (
2817 IN EFI_TIANO_DECOMPRESS_PROTOCOL
*This
,
2819 IN UINT32 SourceSize
,
2820 IN OUT VOID
*Destination
,
2821 IN UINT32 DestinationSize
,
2822 IN OUT VOID
*Scratch
,
2823 IN UINT32 ScratchSize
2827 DxeMainCustomDecompressGetInfo (
2828 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL
*This
,
2830 IN UINT32 SourceSize
,
2831 OUT UINT32
*DestinationSize
,
2832 OUT UINT32
*ScratchSize
2837 DxeMainCustomDecompress (
2838 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL
*This
,
2840 IN UINT32 SourceSize
,
2841 IN OUT VOID
*Destination
,
2842 IN UINT32 DestinationSize
,
2843 IN OUT VOID
*Scratch
,
2844 IN UINT32 ScratchSize