3 Copyright (c) 2006 - 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
28 #include <FrameworkPei.h>
30 #include <Protocol/LoadedImage.h>
31 #include <Protocol/GuidedSectionExtraction.h>
32 #include <Protocol/SectionExtraction.h>
33 #include <Guid/DebugImageInfoTable.h>
34 #include <Protocol/DevicePath.h>
35 #include <Protocol/Runtime.h>
36 #include <Protocol/LoadFile.h>
37 #include <Protocol/DriverBinding.h>
38 #include <Protocol/VariableWrite.h>
39 #include <Protocol/PlatformDriverOverride.h>
40 #include <Protocol/Variable.h>
41 #include <Guid/MemoryTypeInformation.h>
42 #include <Guid/FirmwareFileSystem2.h>
43 #include <Guid/HobList.h>
44 #include <Protocol/Timer.h>
45 #include <Protocol/SimpleFileSystem.h>
46 #include <Protocol/Bds.h>
47 #include <Guid/FileInfo.h>
48 #include <Protocol/RealTimeClock.h>
49 #include <Guid/Apriori.h>
50 #include <Protocol/WatchdogTimer.h>
51 #include <Protocol/FirmwareVolume2.h>
52 #include <Protocol/MonotonicCounter.h>
53 #include <Guid/DxeServices.h>
54 #include <Guid/MemoryAllocationHob.h>
55 #include <Protocol/StatusCode.h>
56 #include <Protocol/CustomizedDecompress.h>
57 #include <Protocol/Decompress.h>
58 #include <Protocol/LoadPe32Image.h>
59 #include <Protocol/FirmwareVolumeDispatch.h>
60 #include <Protocol/Security.h>
61 #include <Protocol/Ebc.h>
62 #include <Guid/EventLegacyBios.h>
63 #include <Protocol/Reset.h>
64 #include <Protocol/EdkDecompress.h>
65 #include <Protocol/Cpu.h>
66 #include <Guid/EventGroup.h>
67 #include <Protocol/Metronome.h>
68 #include <Protocol/FirmwareVolumeBlock.h>
69 #include <Protocol/Capsule.h>
70 #include <Protocol/BusSpecificDriverOverride.h>
71 #include <Protocol/Performance.h>
72 #include <Guid/StatusCodeDataTypeId.h>
74 #include <Library/DxeCoreEntryPoint.h>
75 #include <Library/DebugLib.h>
76 #include <Library/UefiLib.h>
77 #include <Library/BaseLib.h>
78 #include <Library/HobLib.h>
79 #include <Library/PerformanceLib.h>
80 #include <Library/UefiDecompressLib.h>
81 #include <Library/CustomDecompressLib.h>
82 #include <Library/CacheMaintenanceLib.h>
83 #include <Library/BaseMemoryLib.h>
84 #include <Library/PeCoffLib.h>
86 #include "DebugImageInfo.h"
88 #include "FwVolBlock.h"
89 #include "FwVolDriver.h"
98 // Modifier for EFI DXE Services
100 #define EFI_DXESERVICE
103 // attributes for reserved memory before it is promoted to system memory
105 #define EFI_MEMORY_PRESENT 0x0100000000000000ULL
106 #define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL
107 #define EFI_MEMORY_TESTED 0x0400000000000000ULL
110 // range for memory mapped port I/O on IPF
112 #define EFI_MEMORY_PORT_IO 0x4000000000000000ULL
116 /// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependecy expression
117 /// to save time. A EFI_DEP_PUSH is evauated one an
118 /// replaced with EFI_DEP_REPLACE_TRUE
120 #define EFI_DEP_REPLACE_TRUE 0xff
123 /// Define the initial size of the dependency expression evaluation stack
125 #define DEPEX_STACK_SIZE_INCREMENT 0x1000
128 EFI_GUID
*ProtocolGuid
;
133 } ARCHITECTURAL_PROTOCOL_ENTRY
;
137 // DXE Dispatcher Data structures
140 #define KNOWN_HANDLE_SIGNATURE EFI_SIGNATURE_32('k','n','o','w')
143 LIST_ENTRY Link
; // mFvHandleList
148 #define EFI_CORE_DRIVER_ENTRY_SIGNATURE EFI_SIGNATURE_32('d','r','v','r')
151 LIST_ENTRY Link
; // mDriverList
153 LIST_ENTRY ScheduledLink
; // mScheduledQueue
157 EFI_DEVICE_PATH_PROTOCOL
*FvFileDevicePath
;
158 EFI_FIRMWARE_VOLUME2_PROTOCOL
*Fv
;
165 EFI_GUID BeforeAfterGuid
;
172 BOOLEAN DepexProtocolError
;
174 EFI_HANDLE ImageHandle
;
176 } EFI_CORE_DRIVER_ENTRY
;
179 //The data structure of GCD memory map entry
181 #define EFI_GCD_MAP_SIGNATURE EFI_SIGNATURE_32('g','c','d','m')
185 EFI_PHYSICAL_ADDRESS BaseAddress
;
189 EFI_GCD_MEMORY_TYPE GcdMemoryType
;
190 EFI_GCD_IO_TYPE GcdIoType
;
191 EFI_HANDLE ImageHandle
;
192 EFI_HANDLE DeviceHandle
;
196 // DXE Core Global Variables
198 extern EFI_SYSTEM_TABLE
*gDxeCoreST
;
199 extern EFI_BOOT_SERVICES
*gDxeCoreBS
;
200 extern EFI_RUNTIME_SERVICES
*gDxeCoreRT
;
201 extern EFI_DXE_SERVICES
*gDxeCoreDS
;
202 extern EFI_HANDLE gDxeCoreImageHandle
;
204 extern EFI_DECOMPRESS_PROTOCOL gEfiDecompress
;
206 extern EFI_RUNTIME_ARCH_PROTOCOL
*gRuntime
;
207 extern EFI_CPU_ARCH_PROTOCOL
*gCpu
;
208 extern EFI_WATCHDOG_TIMER_ARCH_PROTOCOL
*gWatchdogTimer
;
209 extern EFI_METRONOME_ARCH_PROTOCOL
*gMetronome
;
210 extern EFI_TIMER_ARCH_PROTOCOL
*gTimer
;
211 extern EFI_SECURITY_ARCH_PROTOCOL
*gSecurity
;
212 extern EFI_BDS_ARCH_PROTOCOL
*gBds
;
213 extern EFI_STATUS_CODE_PROTOCOL
*gStatusCode
;
215 extern EFI_TPL gEfiCurrentTpl
;
217 extern EFI_GUID
*gDxeCoreFileName
;
218 extern EFI_LOADED_IMAGE_PROTOCOL
*gDxeCoreLoadedImage
;
220 extern EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation
[EfiMaxMemoryType
+ 1];
222 extern BOOLEAN gDispatcherRunning
;
223 extern EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate
;
226 // Service Initialization Functions
238 Called to initialize the pool.
252 CoreAddMemoryDescriptor (
253 IN EFI_MEMORY_TYPE Type
,
254 IN EFI_PHYSICAL_ADDRESS Start
,
255 IN UINT64 NumberOfPages
,
262 Called to initialize the memory map and add descriptors to
263 the current descriptor list.
265 The first descriptor that is added must be general usable
266 memory as the addition allocates heap.
270 Type - The type of memory to add
272 Start - The starting address in the memory range
275 NumberOfPages - The number of pages in the range
277 Attribute - Attributes of the memory to add
281 None. The range is added to the memory map
287 CoreReleaseGcdMemoryLock (
293 Release memory lock on mGcdMemorySpaceLock
305 CoreAcquireGcdMemoryLock (
311 Acquire memory lock on mGcdMemorySpaceLock
323 CoreInitializeMemoryServices (
325 IN EFI_PHYSICAL_ADDRESS
*MemoryBaseAddress
,
326 IN UINT64
*MemoryLength
332 External function. Initializes the GCD and memory services based on the memory
333 descriptor HOBs. This function is responsible for priming the GCD map and the
334 memory map, so memory allocations and resource allocations can be made. The first
335 part of this function can not depend on any memory services until at least one
336 memory descriptor is provided to the memory services. Then the memory services
337 can be used to intialize the GCD map.
341 HobStart - The start address of the HOB.
343 MemoryBaseAddress - Start address of memory region found to init DXE core.
345 MemoryLength - Length of memory region found to init DXE core.
349 EFI_SUCCESS - Memory services successfully initialized.
356 CoreInitializeGcdServices (
358 IN EFI_PHYSICAL_ADDRESS MemoryBaseAddress
,
359 IN UINT64 MemoryLength
365 External function. Initializes the GCD and memory services based on the memory
366 descriptor HOBs. This function is responsible for priming the GCD map and the
367 memory map, so memory allocations and resource allocations can be made. The first
368 part of this function can not depend on any memory services until at least one
369 memory descriptor is provided to the memory services. Then the memory services
370 can be used to intialize the GCD map.
374 HobStart - The start address of the HOB
376 MemoryBaseAddress - Start address of memory region found to init DXE core.
378 MemoryLength - Length of memory region found to init DXE core.
383 EFI_SUCCESS - GCD services successfully initialized.
389 CoreInitializeEventServices (
396 Initializes "event" support and populates parts of the System and Runtime Table.
404 EFI_SUCCESS - Always return success
410 CoreInitializeImageServices (
417 Add the Image Services to EFI Boot Services Table and install the protocol
418 interfaces for this image.
422 HobStart - The HOB to initialize
432 CoreNotifyOnArchProtocolInstallation (
438 Creates an event that is fired everytime a Protocol of a specific type is installed
450 CoreAllEfiServicesAvailable (
456 Return TRUE if all AP services are availible.
462 EFI_SUCCESS - All AP services are available
463 EFI_NOT_FOUND - At least one AP service is not available
470 IN OUT EFI_TABLE_HEADER
*Hdr
476 Calcualte the 32-bit CRC in a EFI table using the service provided by the
481 Hdr - Pointer to an EFI standard header
499 Called by the platform code to process a tick.
503 Duration - The number of 100ns elasped since the last call to TimerTick
513 CoreInitializeDispatcher (
520 Initialize the dispatcher. Initialize the notification function that runs when
521 a FV protocol is added to the system.
536 IN EFI_CORE_DRIVER_ENTRY
*DriverEntry
542 This is the POSTFIX version of the dependency evaluator. This code does
543 not need to handle Before or After, as it is not valid to call this
544 routine in this case. The SOR is just ignored and is a nop in the grammer.
546 POSTFIX means all the math is done on top of the stack.
550 DriverEntry - DriverEntry element to update
554 TRUE - If driver is ready to run.
556 FALSE - If driver is not ready to run or some fatal error was found.
562 CorePreProcessDepex (
563 IN EFI_CORE_DRIVER_ENTRY
*DriverEntry
569 Preprocess dependency expression and update DriverEntry to reflect the
570 state of Before, After, and SOR dependencies. If DriverEntry->Before
571 or DriverEntry->After is set it will never be cleared. If SOR is set
572 it will be cleared by CoreSchedule(), and then the driver can be
577 DriverEntry - DriverEntry element to update
581 EFI_SUCCESS - It always works.
589 CoreExitBootServices (
590 IN EFI_HANDLE ImageHandle
,
597 EFI 1.0 API to terminate Boot Services
601 ImageHandle - Handle that represents the identity of the calling image
603 MapKey -Key to the latest memory map.
607 EFI_SUCCESS - Boot Services terminated
608 EFI_INVALID_PARAMETER - MapKey is incorrect.
614 CoreTerminateMemoryMap (
621 Make sure the memory map is following all the construction rules,
622 it is the last time to check memory map error before exit boot services.
626 MapKey - Memory map key
630 EFI_INVALID_PARAMETER - Memory map not consistent with construction rules.
632 EFI_SUCCESS - Valid memory map.
638 CoreNotifySignalList (
639 IN EFI_GUID
*EventGroup
645 Signals all events on the requested list
649 SignalType - The list to signal
661 CoreInstallConfigurationTable (
669 Boot Service called to add, modify, or remove a system configuration table from
670 the EFI System Table.
674 Guid: Pointer to the GUID for the entry to add, update, or remove
675 Table: Pointer to the configuration table for the entry to add, update, or
680 EFI_SUCCESS Guid, Table pair added, updated, or removed.
681 EFI_INVALID_PARAMETER Input GUID not valid.
682 EFI_NOT_FOUND Attempted to delete non-existant entry
683 EFI_OUT_OF_RESOURCES Not enough memory available
698 Raise the task priority level to the new level.
699 High level is implemented by disabling processor interrupts.
703 NewTpl - New task priority level
707 The previous task priority level
722 Lowers the task priority to the previous value. If the new
723 priority unmasks events at a higher priority, they are dispatched.
727 NewTpl - New, lower, task priority
740 IN UINTN Microseconds
746 Introduces a fine-grained stall.
750 Microseconds The number of microseconds to stall execution
754 EFI_SUCCESS - Execution was stalled for at least the requested amount
757 EFI_NOT_AVAILABLE_YET - gMetronome is not available yet
765 CoreSetWatchdogTimer (
767 IN UINT64 WatchdogCode
,
769 IN CHAR16
*WatchdogData OPTIONAL
775 Sets the system's watchdog timer.
779 Timeout The number of seconds. Zero disables the timer.
781 ///////following three parameters are left for platform specific using
783 WatchdogCode The numberic code to log. 0x0 to 0xffff are firmware
784 DataSize Size of the optional data
785 WatchdogData Optional Null terminated unicode string followed by binary
790 EFI_SUCCESS Timeout has been set
791 EFI_NOT_AVAILABLE_YET WatchdogTimer is not available yet
792 EFI_UNSUPPORTED System does not have a timer (currently not used)
793 EFI_DEVICE_ERROR Could not complete due to hardware error
801 CoreInstallProtocolInterface (
802 IN OUT EFI_HANDLE
*UserHandle
,
803 IN EFI_GUID
*Protocol
,
804 IN EFI_INTERFACE_TYPE InterfaceType
,
811 Wrapper function to CoreInstallProtocolInterfaceNotify. This is the public API which
812 Calls the private one which contains a BOOLEAN parameter for notifications
816 UserHandle - The handle to install the protocol handler on,
817 or NULL if a new handle is to be allocated
819 Protocol - The protocol to add to the handle
821 InterfaceType - Indicates whether Interface is supplied in native form.
823 Interface - The interface for the protocol being added
833 CoreInstallProtocolInterfaceNotify (
834 IN OUT EFI_HANDLE
*UserHandle
,
835 IN EFI_GUID
*Protocol
,
836 IN EFI_INTERFACE_TYPE InterfaceType
,
844 Installs a protocol interface into the boot services environment.
848 UserHandle - The handle to install the protocol handler on,
849 or NULL if a new handle is to be allocated
851 Protocol - The protocol to add to the handle
853 InterfaceType - Indicates whether Interface is supplied in native form.
855 Interface - The interface for the protocol being added
857 Notify - Whether to notify the notification list for this protocol
861 EFI_INVALID_PARAMETER - Invalid parameter
863 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
865 EFI_SUCCESS - Protocol interface successfully installed
873 CoreInstallMultipleProtocolInterfaces (
874 IN OUT EFI_HANDLE
*Handle
,
881 Installs a list of protocol interface into the boot services environment.
882 This function calls InstallProtocolInterface() in a loop. If any error
883 occures all the protocols added by this function are removed. This is
884 basically a lib function to save space.
888 Handle - The handle to install the protocol handlers on,
889 or NULL if a new handle is to be allocated
890 ... - EFI_GUID followed by protocol instance. A NULL terminates the
891 list. The pairs are the arguments to InstallProtocolInterface().
892 All the protocols are added to Handle.
896 EFI_INVALID_PARAMETER - Handle is NULL.
898 EFI_SUCCESS - Protocol interfaces successfully installed.
906 CoreUninstallMultipleProtocolInterfaces (
907 IN EFI_HANDLE Handle
,
914 Uninstalls a list of protocol interface in the boot services environment.
915 This function calls UnisatllProtocolInterface() in a loop. This is
916 basically a lib function to save space.
920 Handle - The handle to uninstall the protocol
922 ... - EFI_GUID followed by protocol instance. A NULL terminates the
923 list. The pairs are the arguments to UninstallProtocolInterface().
924 All the protocols are added to Handle.
936 CoreReinstallProtocolInterface (
937 IN EFI_HANDLE UserHandle
,
938 IN EFI_GUID
*Protocol
,
939 IN VOID
*OldInterface
,
940 IN VOID
*NewInterface
946 Reinstall a protocol interface on a device handle. The OldInterface for Protocol is replaced by the NewInterface.
950 UserHandle - Handle on which the interface is to be reinstalled
951 Protocol - The numeric ID of the interface
952 OldInterface - A pointer to the old interface
953 NewInterface - A pointer to the new interface
960 On EFI_SUCCESS The protocol interface was installed
961 On EFI_NOT_FOUND The OldInterface on the handle was not found
962 On EFI_INVALID_PARAMETER One of the parameters has an invalid value
970 CoreUninstallProtocolInterface (
971 IN EFI_HANDLE UserHandle
,
972 IN EFI_GUID
*Protocol
,
979 Uninstalls all instances of a protocol:interfacer from a handle.
980 If the last protocol interface is remove from the handle, the
985 UserHandle - The handle to remove the protocol handler from
987 Protocol - The protocol, of protocol:interface, to remove
989 Interface - The interface, of protocol:interface, to remove
993 EFI_INVALID_PARAMETER - Protocol is NULL.
995 EFI_SUCCESS - Protocol interface successfully uninstalled.
1003 CoreHandleProtocol (
1004 IN EFI_HANDLE UserHandle
,
1005 IN EFI_GUID
*Protocol
,
1006 OUT VOID
**Interface
1010 Routine Description:
1012 Queries a handle to determine if it supports a specified protocol.
1016 UserHandle - The handle being queried.
1018 Protocol - The published unique identifier of the protocol.
1020 Interface - Supplies the address where a pointer to the corresponding Protocol
1021 Interface is returned.
1025 The requested protocol interface for the handle
1034 IN EFI_HANDLE UserHandle
,
1035 IN EFI_GUID
*Protocol
,
1036 OUT VOID
**Interface OPTIONAL
,
1037 IN EFI_HANDLE ImageHandle
,
1038 IN EFI_HANDLE ControllerHandle
,
1039 IN UINT32 Attributes
1043 Routine Description:
1045 Locates the installed protocol handler for the handle, and
1046 invokes it to obtain the protocol interface. Usage information
1047 is registered in the protocol data base.
1051 UserHandle - The handle to obtain the protocol interface on
1053 Protocol - The ID of the protocol
1055 Interface - The location to return the protocol interface
1057 ImageHandle - The handle of the Image that is opening the protocol interface
1058 specified by Protocol and Interface.
1060 ControllerHandle - The controller handle that is requiring this interface.
1062 Attributes - The open mode of the protocol interface specified by Handle
1067 EFI_INVALID_PARAMETER - Protocol is NULL.
1069 EFI_SUCCESS - Get the protocol interface.
1077 CoreOpenProtocolInformation (
1078 IN EFI_HANDLE UserHandle
,
1079 IN EFI_GUID
*Protocol
,
1080 OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY
**EntryBuffer
,
1081 OUT UINTN
*EntryCount
1085 Routine Description:
1087 Return information about Opened protocols in the system
1091 UserHandle - The handle to close the protocol interface on
1093 Protocol - The ID of the protocol
1095 EntryBuffer - A pointer to a buffer of open protocol information in the form of
1096 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.
1098 EntryCount - Number of EntryBuffer entries
1110 IN EFI_HANDLE UserHandle
,
1111 IN EFI_GUID
*Protocol
,
1112 IN EFI_HANDLE ImageHandle
,
1113 IN EFI_HANDLE ControllerHandle
1117 Routine Description:
1123 UserHandle - The handle to close the protocol interface on
1125 Protocol - The ID of the protocol
1127 ImageHandle - The user of the protocol to close
1129 ControllerHandle - The user of the protocol to close
1133 EFI_INVALID_PARAMETER - Protocol is NULL.
1141 CoreProtocolsPerHandle (
1142 IN EFI_HANDLE UserHandle
,
1143 OUT EFI_GUID
***ProtocolBuffer
,
1144 OUT UINTN
*ProtocolBufferCount
1148 Routine Description:
1150 Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated
1155 UserHandle - The handle from which to retrieve the list of protocol interface
1158 ProtocolBuffer - A pointer to the list of protocol interface GUID pointers that are
1159 installed on Handle.
1161 ProtocolBufferCount - A pointer to the number of GUID pointers present in
1165 EFI_SUCCESS - The list of protocol interface GUIDs installed on Handle was returned in
1166 ProtocolBuffer. The number of protocol interface GUIDs was
1167 returned in ProtocolBufferCount.
1168 EFI_INVALID_PARAMETER - Handle is NULL.
1169 EFI_INVALID_PARAMETER - Handle is not a valid EFI_HANDLE.
1170 EFI_INVALID_PARAMETER - ProtocolBuffer is NULL.
1171 EFI_INVALID_PARAMETER - ProtocolBufferCount is NULL.
1172 EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the results.
1180 CoreRegisterProtocolNotify (
1181 IN EFI_GUID
*Protocol
,
1183 OUT VOID
**Registration
1187 Routine Description:
1189 Add a new protocol notification record for the request protocol.
1193 Protocol - The requested protocol to add the notify registration
1195 Event - The event to signal
1197 Registration - Returns the registration record
1202 EFI_INVALID_PARAMETER - Invalid parameter
1204 EFI_SUCCESS - Successfully returned the registration record that has been added
1213 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1214 IN EFI_GUID
*Protocol OPTIONAL
,
1215 IN VOID
*SearchKey OPTIONAL
,
1216 IN OUT UINTN
*BufferSize
,
1217 OUT EFI_HANDLE
*Buffer
1221 Routine Description:
1223 Locates the requested handle(s) and returns them in Buffer.
1227 SearchType - The type of search to perform to locate the handles
1229 Protocol - The protocol to search for
1231 SearchKey - Dependant on SearchType
1233 BufferSize - On input the size of Buffer. On output the
1234 size of data returned.
1236 Buffer - The buffer to return the results in
1241 EFI_BUFFER_TOO_SMALL - Buffer too small, required buffer size is returned in BufferSize.
1243 EFI_INVALID_PARAMETER - Invalid parameter
1245 EFI_SUCCESS - Successfully found the requested handle(s) and returns them in Buffer.
1253 CoreLocateDevicePath (
1254 IN EFI_GUID
*Protocol
,
1255 IN OUT EFI_DEVICE_PATH_PROTOCOL
**FilePath
,
1256 OUT EFI_HANDLE
*Device
1260 Routine Description:
1262 Locates the handle to a device on the device path that supports the specified protocol.
1266 Protocol - The protocol to search for.
1267 FilePath - On input, a pointer to a pointer to the device path. On output, the device
1268 path pointer is modified to point to the remaining part of the devicepath.
1269 Device - A pointer to the returned device handle.
1273 EFI_SUCCESS - The resulting handle was returned.
1274 EFI_NOT_FOUND - No handles matched the search.
1275 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
1283 CoreLocateHandleBuffer (
1284 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1285 IN EFI_GUID
*Protocol OPTIONAL
,
1286 IN VOID
*SearchKey OPTIONAL
,
1287 IN OUT UINTN
*NumberHandles
,
1288 OUT EFI_HANDLE
**Buffer
1292 Routine Description:
1294 Function returns an array of handles that support the requested protocol
1295 in a buffer allocated from pool. This is a version of CoreLocateHandle()
1296 that allocates a buffer for the caller.
1300 SearchType - Specifies which handle(s) are to be returned.
1301 Protocol - Provides the protocol to search by.
1302 This parameter is only valid for SearchType ByProtocol.
1303 SearchKey - Supplies the search key depending on the SearchType.
1304 NumberHandles - The number of handles returned in Buffer.
1305 Buffer - A pointer to the buffer to return the requested array of
1306 handles that support Protocol.
1310 EFI_SUCCESS - The result array of handles was returned.
1311 EFI_NOT_FOUND - No handles match the search.
1312 EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the matching results.
1313 EFI_INVALID_PARAMETER - Invalid parameter
1321 CoreLocateProtocol (
1322 IN EFI_GUID
*Protocol
,
1323 IN VOID
*Registration OPTIONAL
,
1324 OUT VOID
**Interface
1328 Routine Description:
1330 Return the first Protocol Interface that matches the Protocol GUID. If
1331 Registration is pasased in return a Protocol Instance that was just add
1332 to the system. If Retistration is NULL return the first Protocol Interface
1337 Protocol - The protocol to search for
1339 Registration - Optional Registration Key returned from RegisterProtocolNotify()
1341 Interface - Return the Protocol interface (instance).
1345 EFI_SUCCESS - If a valid Interface is returned
1347 EFI_INVALID_PARAMETER - Invalid parameter
1349 EFI_NOT_FOUND - Protocol interface not found
1355 CoreGetHandleDatabaseKey (
1360 Routine Description:
1362 return handle database key.
1370 Handle database key.
1376 CoreConnectHandlesByKey (
1381 Routine Description:
1383 Go connect any handles that were created or modified while a image executed.
1387 Key - The Key to show that the handle has been created/modified
1398 CoreConnectController (
1399 IN EFI_HANDLE ControllerHandle
,
1400 IN EFI_HANDLE
*DriverImageHandle OPTIONAL
,
1401 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
,
1402 IN BOOLEAN Recursive
1406 Routine Description:
1408 Connects one or more drivers to a controller.
1412 ControllerHandle - Handle of the controller to be connected.
1414 DriverImageHandle - DriverImageHandle A pointer to an ordered list of driver image handles.
1416 RemainingDevicePath - RemainingDevicePath A pointer to the device path that specifies a child of the
1417 controller specified by ControllerHandle.
1419 Recursive - - Whether the function would be called recursively or not.
1431 CoreDisconnectController (
1432 IN EFI_HANDLE ControllerHandle
,
1433 IN EFI_HANDLE DriverImageHandle OPTIONAL
,
1434 IN EFI_HANDLE ChildHandle OPTIONAL
1438 Routine Description:
1440 Disonnects a controller from a driver
1444 ControllerHandle - ControllerHandle The handle of the controller from which driver(s)
1445 are to be disconnected.
1446 DriverImageHandle - DriverImageHandle The driver to disconnect from ControllerHandle.
1447 ChildHandle - ChildHandle The handle of the child to destroy.
1451 EFI_SUCCESS - One or more drivers were disconnected from the controller.
1452 EFI_SUCCESS - On entry, no drivers are managing ControllerHandle.
1453 EFI_SUCCESS - DriverImageHandle is not NULL, and on entry DriverImageHandle is not managing ControllerHandle.
1454 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
1455 EFI_INVALID_PARAMETER - DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.
1456 EFI_INVALID_PARAMETER - ChildHandle is not NULL, and it is not a valid EFI_HANDLE.
1457 EFI_OUT_OF_RESOURCES - There are not enough resources available to disconnect any drivers from ControllerHandle.
1458 EFI_DEVICE_ERROR - The controller could not be disconnected because of a device error.
1467 IN EFI_ALLOCATE_TYPE Type
,
1468 IN EFI_MEMORY_TYPE MemoryType
,
1469 IN UINTN NumberOfPages
,
1470 IN OUT EFI_PHYSICAL_ADDRESS
*Memory
1474 Routine Description:
1476 Allocates pages from the memory map.
1480 Type - The type of allocation to perform
1482 MemoryType - The type of memory to turn the allocated pages into
1484 NumberOfPages - The number of pages to allocate
1486 Memory - A pointer to receive the base allocated memory address
1490 Status. On success, Memory is filled in with the base address allocated
1492 EFI_INVALID_PARAMETER - Parameters violate checking rules defined in spec.
1494 EFI_NOT_FOUND - Could not allocate pages match the requirement.
1496 EFI_OUT_OF_RESOURCES - No enough pages to allocate.
1498 EFI_SUCCESS - Pages successfully allocated.
1507 IN EFI_PHYSICAL_ADDRESS Memory
,
1508 IN UINTN NumberOfPages
1512 Routine Description:
1514 Frees previous allocated pages.
1518 Memory - Base address of memory being freed
1520 NumberOfPages - The number of pages to free
1524 EFI_NOT_FOUND - Could not find the entry that covers the range
1526 EFI_INVALID_PARAMETER - Address not aligned
1528 EFI_SUCCESS -Pages successfully freed.
1537 IN OUT UINTN
*MemoryMapSize
,
1538 IN OUT EFI_MEMORY_DESCRIPTOR
*Desc
,
1540 OUT UINTN
*DescriptorSize
,
1541 OUT UINT32
*DescriptorVersion
1545 Routine Description:
1547 Returns the current memory map.
1551 MemoryMapSize - On input the buffer size of MemoryMap allocated by caller
1552 On output the required buffer size to contain the memory map
1554 Desc - The buffer to return the current memory map
1556 MapKey - The address to return the current map key
1558 DescriptorSize - The size in bytes for an individual EFI_MEMORY_DESCRIPTOR
1560 DescriptorVersion - The version number associated with the EFI_MEMORY_DESCRIPTOR
1564 EFI_SUCCESS The current memory map was returned successfully
1566 EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small
1568 EFI_INVALID_PARAMETER One of the parameters has an invalid value
1577 IN EFI_MEMORY_TYPE PoolType
,
1583 Routine Description:
1585 Allocate pool of a particular type.
1589 PoolType - Type of pool to allocate
1591 Size - The amount of pool to allocate
1593 Buffer - The address to return a pointer to the allocated pool
1597 EFI_INVALID_PARAMETER - PoolType not valid
1599 EFI_OUT_OF_RESOURCES - Size exceeds max pool size or allocation failed.
1601 EFI_SUCCESS - Pool successfully allocated.
1614 Routine Description:
1620 Buffer - The allocated pool entry to free
1624 EFI_INVALID_PARAMETER - Buffer is not a valid value.
1626 EFI_SUCCESS - Pool successfully freed.
1635 IN BOOLEAN BootPolicy
,
1636 IN EFI_HANDLE ParentImageHandle
,
1637 IN EFI_DEVICE_PATH_PROTOCOL
*FilePath
,
1638 IN VOID
*SourceBuffer OPTIONAL
,
1639 IN UINTN SourceSize
,
1640 OUT EFI_HANDLE
*ImageHandle
1644 Routine Description:
1646 Loads an EFI image into memory and returns a handle to the image.
1650 BootPolicy - If TRUE, indicates that the request originates from the boot manager,
1651 and that the boot manager is attempting to load FilePath as a boot selection.
1652 ParentImageHandle - The caller's image handle.
1653 FilePath - The specific file path from which the image is loaded.
1654 SourceBuffer - If not NULL, a pointer to the memory location containing a copy of
1655 the image to be loaded.
1656 SourceSize - The size in bytes of SourceBuffer.
1657 ImageHandle - Pointer to the returned image handle that is created when the image
1658 is successfully loaded.
1662 EFI_SUCCESS - The image was loaded into memory.
1663 EFI_NOT_FOUND - The FilePath was not found.
1664 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
1665 EFI_UNSUPPORTED - The image type is not supported, or the device path cannot be
1666 parsed to locate the proper protocol for loading the file.
1667 EFI_OUT_OF_RESOURCES - Image was not loaded due to insufficient resources.
1675 IN EFI_HANDLE ImageHandle
1679 Routine Description:
1681 Unload the specified image.
1685 ImageHandle - The specified image handle.
1689 EFI_INVALID_PARAMETER - Image handle is NULL.
1691 EFI_UNSUPPORTED - Attempt to unload an unsupported image.
1693 EFI_SUCCESS - Image successfully unloaded.
1702 IN EFI_HANDLE ImageHandle
,
1703 OUT UINTN
*ExitDataSize
,
1704 OUT CHAR16
**ExitData OPTIONAL
1708 Routine Description:
1710 Transfer control to a loaded image's entry point.
1714 ImageHandle - Handle of image to be started.
1716 ExitDataSize - Pointer of the size to ExitData
1718 ExitData - Pointer to a pointer to a data buffer that includes a Null-terminated
1719 Unicode string, optionally followed by additional binary data. The string
1720 is a description that the caller may use to further indicate the reason for
1725 EFI_INVALID_PARAMETER - Invalid parameter
1727 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
1729 EFI_SUCCESS - Successfully transfer control to the image's entry point.
1738 IN EFI_HANDLE ImageHandle
,
1739 IN EFI_STATUS Status
,
1740 IN UINTN ExitDataSize
,
1741 IN CHAR16
*ExitData OPTIONAL
1745 Routine Description:
1747 Terminates the currently loaded EFI image and returns control to boot services.
1751 ImageHandle - Handle that identifies the image. This parameter is passed to the image
1753 Status - The image's exit code.
1754 ExitDataSize - The size, in bytes, of ExitData. Ignored if ExitStatus is
1756 ExitData - Pointer to a data buffer that includes a Null-terminated Unicode string,
1757 optionally followed by additional binary data. The string is a
1758 description that the caller may use to further indicate the reason for
1763 EFI_INVALID_PARAMETER - Image handle is NULL or it is not current image.
1765 EFI_SUCCESS - Successfully terminates the currently loaded EFI image.
1767 EFI_ACCESS_DENIED - Should never reach there.
1777 IN EFI_TPL NotifyTpl
,
1778 IN EFI_EVENT_NOTIFY NotifyFunction
,
1779 IN VOID
*NotifyContext
,
1780 OUT EFI_EVENT
*pEvent
1784 Routine Description:
1786 Creates a general-purpose event structure
1790 Type - The type of event to create and its mode and attributes
1791 NotifyTpl - The task priority level of event notifications
1792 NotifyFunction - Pointer to the event's notification function
1793 NotifyContext - Pointer to the notification function's context; corresponds to
1794 parameter "Context" in the notification function
1795 pEvent - Pointer to the newly created event if the call succeeds; undefined otherwise
1799 EFI_SUCCESS - The event structure was created
1800 EFI_INVALID_PARAMETER - One of the parameters has an invalid value
1801 EFI_OUT_OF_RESOURCES - The event could not be allocated
1811 IN EFI_TPL NotifyTpl
,
1812 IN EFI_EVENT_NOTIFY NotifyFunction
, OPTIONAL
1813 IN CONST VOID
*NotifyContext
, OPTIONAL
1814 IN CONST EFI_GUID
*EventGroup
, OPTIONAL
1815 OUT EFI_EVENT
*Event
1819 Routine Description:
1820 Creates a general-purpose event structure
1823 Type - The type of event to create and its mode and attributes
1824 NotifyTpl - The task priority level of event notifications
1825 NotifyFunction - Pointer to the events notification function
1826 NotifyContext - Pointer to the notification functions context; corresponds to
1827 parameter "Context" in the notification function
1828 EventGrout - GUID for EventGroup if NULL act the same as gBS->CreateEvent().
1829 Event - Pointer to the newly created event if the call succeeds; undefined otherwise
1832 EFI_SUCCESS - The event structure was created
1833 EFI_INVALID_PARAMETER - One of the parameters has an invalid value
1834 EFI_OUT_OF_RESOURCES - The event could not be allocated
1844 IN EFI_TIMER_DELAY Type
,
1845 IN UINT64 TriggerTime
1849 Routine Description:
1851 Sets the type of timer and the trigger time for a timer event.
1855 UserEvent - The timer event that is to be signaled at the specified time
1856 Type - The type of time that is specified in TriggerTime
1857 TriggerTime - The number of 100ns units until the timer expires
1861 EFI_SUCCESS - The event has been set to be signaled at the requested time
1862 EFI_INVALID_PARAMETER - Event or Type is not valid
1875 Routine Description:
1877 Signals the event. Queues the event to be notified if needed
1881 Event - The event to signal
1885 EFI_INVALID_PARAMETER - Parameters are not valid.
1887 EFI_SUCCESS - The event was signaled.
1896 IN UINTN NumberOfEvents
,
1897 IN EFI_EVENT
*UserEvents
,
1898 OUT UINTN
*UserIndex
1902 Routine Description:
1904 Stops execution until an event is signaled.
1908 NumberOfEvents - The number of events in the UserEvents array
1909 UserEvents - An array of EFI_EVENT
1910 UserIndex - Pointer to the index of the event which satisfied the wait condition
1914 EFI_SUCCESS - The event indicated by Index was signaled.
1915 EFI_INVALID_PARAMETER - The event indicated by Index has a notification function or
1916 Event was not a valid type
1917 EFI_UNSUPPORTED - The current TPL is not TPL_APPLICATION
1930 Routine Description:
1932 Closes an event and frees the event structure.
1936 UserEvent - Event to close
1940 EFI_INVALID_PARAMETER - Parameters are not valid.
1942 EFI_SUCCESS - The event has been closed
1955 Routine Description:
1957 Check the status of an event
1961 UserEvent - The event to check
1965 EFI_SUCCESS - The event is in the signaled state
1966 EFI_NOT_READY - The event is not in the signaled state
1967 EFI_INVALID_PARAMETER - Event is of type EVT_NOTIFY_SIGNAL
1973 CoreAddMemorySpace (
1974 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
1975 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
1977 IN UINT64 Capabilities
1981 Routine Description:
1983 Add a segment of memory space to GCD map and add all available pages in this segment
1984 as memory descriptors.
1988 GcdMemoryType - Memory type of the segment.
1990 BaseAddress - Base address of the segment.
1992 Length - Length of the segment.
1994 Capabilities - alterable attributes of the segment.
1998 EFI_SUCCESS - Merged this segment into GCD map.
2004 CoreAllocateMemorySpace (
2005 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
2006 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
2009 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
2010 IN EFI_HANDLE ImageHandle
,
2011 IN EFI_HANDLE DeviceHandle OPTIONAL
2015 Routine Description:
2017 Allocate memory space on GCD map.
2021 GcdAllocateType - The type of allocate operation
2023 GcdMemoryType - The desired memory type
2025 Alignment - Align with 2^Alignment
2027 Length - Length to allocate
2029 BaseAddress - Base address to allocate
2031 ImageHandle - The image handle consume the allocated space.
2033 DeviceHandle - The device handle consume the allocated space.
2037 EFI_INVALID_PARAMETER - Invalid parameter.
2039 EFI_NOT_FOUND - No descriptor contains the desired space.
2041 EFI_SUCCESS - Memory space successfully allocated.
2047 CoreFreeMemorySpace (
2048 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2053 Routine Description:Routine Description:
2055 Free a segment of memory space in GCD map.
2059 BaseAddress - Base address of the segment.
2061 Length - Length of the segment.
2065 EFI_SUCCESS - Space successfully freed.
2071 CoreRemoveMemorySpace (
2072 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2077 Routine Description:Routine Description:
2079 Remove a segment of memory space in GCD map.
2083 BaseAddress - Base address of the segment.
2085 Length - Length of the segment.
2089 EFI_SUCCESS - Successfully a segment of memory space.
2095 CoreGetMemorySpaceDescriptor (
2096 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2097 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
*Descriptor
2101 Routine Description:
2103 Search all entries in GCD map which contains specified segment and build it to a descriptor.
2107 BaseAddress - Specified start address
2109 Descriptor - Specified length
2113 EFI_INVALID_PARAMETER - Invalid parameter
2115 EFI_SUCCESS - Successfully get memory space descriptor.
2121 CoreSetMemorySpaceAttributes (
2122 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2124 IN UINT64 Attributes
2128 Routine Description:
2130 Set memory space with specified attributes.
2134 BaseAddress - Specified start address
2136 Length - Specified length
2138 Attributes - Specified attributes
2142 EFI_SUCCESS - Successfully set attribute of a segment of memory space.
2148 CoreGetMemorySpaceMap (
2149 OUT UINTN
*NumberOfDescriptors
,
2150 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
**MemorySpaceMap
2154 Routine Description:
2156 Transer all entries of GCD memory map into memory descriptors and pass to caller.
2160 NumberOfDescriptors - Number of descriptors.
2162 MemorySpaceMap - Descriptor array
2166 EFI_INVALID_PARAMETER - Invalid parameter
2168 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
2170 EFI_SUCCESS - Successfully get memory space map.
2177 IN EFI_GCD_IO_TYPE GcdIoType
,
2178 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2183 Routine Description:
2185 Add a segment of IO space to GCD map.
2189 GcdIoType - IO type of the segment.
2191 BaseAddress - Base address of the segment.
2193 Length - Length of the segment.
2197 EFI_SUCCESS - Merged this segment into GCD map.
2203 CoreAllocateIoSpace (
2204 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
2205 IN EFI_GCD_IO_TYPE GcdIoType
,
2208 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
2209 IN EFI_HANDLE ImageHandle
,
2210 IN EFI_HANDLE DeviceHandle OPTIONAL
2214 Routine Description:
2216 Allocate IO space on GCD map.
2220 GcdAllocateType - The type of allocate operation
2222 GcdIoType - The desired IO type
2224 Alignment - Align with 2^Alignment
2226 Length - Length to allocate
2228 BaseAddress - Base address to allocate
2230 ImageHandle - The image handle consume the allocated space.
2232 DeviceHandle - The device handle consume the allocated space.
2236 EFI_INVALID_PARAMETER - Invalid parameter.
2238 EFI_NOT_FOUND - No descriptor contains the desired space.
2240 EFI_SUCCESS - IO space successfully allocated.
2247 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2252 Routine Description:Routine Description:
2254 Free a segment of IO space in GCD map.
2258 BaseAddress - Base address of the segment.
2260 Length - Length of the segment.
2264 EFI_SUCCESS - Space successfully freed.
2271 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2276 Routine Description:Routine Description:
2278 Remove a segment of IO space in GCD map.
2282 BaseAddress - Base address of the segment.
2284 Length - Length of the segment.
2288 EFI_SUCCESS - Successfully removed a segment of IO space.
2294 CoreGetIoSpaceDescriptor (
2295 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2296 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
*Descriptor
2300 Routine Description:
2302 Search all entries in GCD map which contains specified segment and build it to a descriptor.
2306 BaseAddress - Specified start address
2308 Descriptor - Specified length
2312 EFI_INVALID_PARAMETER - Descriptor is NULL.
2314 EFI_SUCCESS - Successfully get the IO space descriptor.
2321 OUT UINTN
*NumberOfDescriptors
,
2322 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
**IoSpaceMap
2326 Routine Description:
2328 Transer all entries of GCD IO map into IO descriptors and pass to caller.
2332 NumberOfDescriptors - Number of descriptors.
2334 IoSpaceMap - Descriptor array
2338 EFI_INVALID_PARAMETER - Invalid parameter
2340 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
2342 EFI_SUCCESS - Successfully get IO space map.
2355 Routine Description:
2357 This is the main Dispatcher for DXE and it exits when there are no more
2358 drivers to run. Drain the mScheduledQueue and load and start a PE
2359 image for each driver. Search the mDiscoveredList to see if any driver can
2360 be placed on the mScheduledQueue. If no drivers are placed on the
2361 mScheduledQueue exit the function. On exit it is assumed the Bds()
2362 will be called, and when the Bds() exits the Dispatcher will be called
2371 EFI_ALREADY_STARTED - The DXE Dispatcher is already running
2373 EFI_NOT_FOUND - No DXE Drivers were dispatched
2375 EFI_SUCCESS - One or more DXE Drivers were dispatched
2383 IN EFI_HANDLE FirmwareVolumeHandle
,
2384 IN EFI_GUID
*DriverName
2388 Routine Description:
2390 Check every driver and locate a matching one. If the driver is found, the Unrequested
2391 state flag is cleared.
2395 FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware
2396 file specified by DriverName.
2398 DriverName - The Driver name to put in the Dependent state.
2402 EFI_SUCCESS - The DriverName was found and it's SOR bit was cleared
2404 EFI_NOT_FOUND - The DriverName does not exist or it's SOR bit was not set.
2413 IN EFI_HANDLE FirmwareVolumeHandle
,
2414 IN EFI_GUID
*DriverName
2418 Routine Description:
2420 Convert a driver from the Untrused back to the Scheduled state
2424 FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware
2425 file specified by DriverName.
2427 DriverName - The Driver name to put in the Scheduled state
2431 EFI_SUCCESS - The file was found in the untrusted state, and it was promoted
2432 to the trusted state.
2434 EFI_NOT_FOUND - The file was not found in the untrusted state.
2441 IN OUT EFI_STATUS
*Status
,
2442 IN OUT VOID
**Buffer
,
2447 Routine Description:
2449 Helper function called as part of the code needed
2450 to allocate the proper sized buffer for various
2455 Status - Current status
2457 Buffer - Current allocated buffer, or NULL
2459 BufferSize - Current buffer size needed
2463 TRUE - if the buffer was reallocated and the caller
2464 should try the API again.
2466 FALSE - buffer could not be allocated and the caller
2467 should not try the API again.
2475 IN EFI_HANDLE ImageHandle
,
2476 IN EFI_SYSTEM_TABLE
*SystemTable
2480 Routine Description:
2481 This routine is the driver initialization entry point. It initializes the
2482 libraries, and registers two notification functions. These notification
2483 functions are responsible for building the FV stack dynamically.
2486 ImageHandle - The image handle.
2487 SystemTable - The system table.
2490 EFI_SUCCESS - Function successfully returned.
2497 InitializeSectionExtraction (
2498 IN EFI_HANDLE ImageHandle
,
2499 IN EFI_SYSTEM_TABLE
*SystemTable
2503 Routine Description:
2504 Entry point of the section extraction code. Initializes an instance of the
2505 section extraction interface and installs it on a new handle.
2508 ImageHandle EFI_HANDLE: A handle for the image that is initializing this driver
2509 SystemTable EFI_SYSTEM_TABLE: A pointer to the EFI system table
2512 EFI_SUCCESS: Driver initialized successfully
2513 EFI_OUT_OF_RESOURCES: Could not allocate needed resources
2519 CoreProcessFirmwareVolume (
2522 OUT EFI_HANDLE
*FVProtocolHandle
2526 Routine Description:
2527 This DXE service routine is used to process a firmware volume. In
2528 particular, it can be called by BDS to process a single firmware
2529 volume found in a capsule.
2532 FvHeader - pointer to a firmware volume header
2533 Size - the size of the buffer pointed to by FvHeader
2534 FVProtocolHandle - the handle on which a firmware volume protocol
2535 was produced for the firmware volume passed in.
2538 EFI_OUT_OF_RESOURCES - if an FVB could not be produced due to lack of
2540 EFI_VOLUME_CORRUPTED - if the volume was corrupted
2541 EFI_SUCCESS - a firmware volume protocol was produced for the
2548 //Functions used during debug buils
2551 CoreDisplayMissingArchProtocols (
2556 Routine Description:
2557 Displays Architectural protocols that were not loaded and are required for DXE core to function
2558 Only used in Debug Builds
2569 CoreDisplayDiscoveredNotDispatched (
2574 Routine Description:
2576 Traverse the discovered list for any drivers that were discovered but not loaded
2577 because the dependency experessions evaluated to false
2591 CoreEfiNotAvailableYetArg0 (
2596 Routine Description:
2598 Place holder function until all the Boot Services and Runtime Services are available
2606 EFI_NOT_AVAILABLE_YET
2613 CoreEfiNotAvailableYetArg1 (
2618 Routine Description:
2620 Place holder function until all the Boot Services and Runtime Services are available
2628 EFI_NOT_AVAILABLE_YET
2635 CoreEfiNotAvailableYetArg2 (
2641 Routine Description:
2643 Place holder function until all the Boot Services and Runtime Services are available
2653 EFI_NOT_AVAILABLE_YET
2660 CoreEfiNotAvailableYetArg3 (
2667 Routine Description:
2669 Place holder function until all the Boot Services and Runtime Services are available
2681 EFI_NOT_AVAILABLE_YET
2688 CoreEfiNotAvailableYetArg4 (
2696 Routine Description:
2698 Place holder function until all the Boot Services and Runtime Services are available
2712 EFI_NOT_AVAILABLE_YET
2719 CoreEfiNotAvailableYetArg5 (
2728 Routine Description:
2730 Place holder function until all the Boot Services and Runtime Services are available
2746 EFI_NOT_AVAILABLE_YET
2752 CoreGetPeiProtocol (
2753 IN EFI_GUID
*ProtocolGuid
,
2758 Routine Description:
2760 Searches for a Protocol Interface passed from PEI through a HOB
2764 ProtocolGuid - The Protocol GUID to search for in the HOB List
2766 Interface - A pointer to the interface for the Protocol GUID
2770 EFI_SUCCESS - The Protocol GUID was found and its interface is returned in Interface
2772 EFI_NOT_FOUND - The Protocol GUID was not found in the HOB List
2778 DxeMainUefiDecompressGetInfo (
2779 IN EFI_DECOMPRESS_PROTOCOL
*This
,
2781 IN UINT32 SourceSize
,
2782 OUT UINT32
*DestinationSize
,
2783 OUT UINT32
*ScratchSize
2788 DxeMainUefiDecompress (
2789 IN EFI_DECOMPRESS_PROTOCOL
*This
,
2791 IN UINT32 SourceSize
,
2792 IN OUT VOID
*Destination
,
2793 IN UINT32 DestinationSize
,
2794 IN OUT VOID
*Scratch
,
2795 IN UINT32 ScratchSize
2799 DxeMainTianoDecompressGetInfo (
2800 IN EFI_TIANO_DECOMPRESS_PROTOCOL
*This
,
2802 IN UINT32 SourceSize
,
2803 OUT UINT32
*DestinationSize
,
2804 OUT UINT32
*ScratchSize
2809 DxeMainTianoDecompress (
2810 IN EFI_TIANO_DECOMPRESS_PROTOCOL
*This
,
2812 IN UINT32 SourceSize
,
2813 IN OUT VOID
*Destination
,
2814 IN UINT32 DestinationSize
,
2815 IN OUT VOID
*Scratch
,
2816 IN UINT32 ScratchSize
2820 DxeMainCustomDecompressGetInfo (
2821 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL
*This
,
2823 IN UINT32 SourceSize
,
2824 OUT UINT32
*DestinationSize
,
2825 OUT UINT32
*ScratchSize
2830 DxeMainCustomDecompress (
2831 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL
*This
,
2833 IN UINT32 SourceSize
,
2834 IN OUT VOID
*Destination
,
2835 IN UINT32 DestinationSize
,
2836 IN OUT VOID
*Scratch
,
2837 IN UINT32 ScratchSize