3 The internal header file includes the common header files, defines
4 internal structure and functions used by DxeCore module.
6 Copyright (c) 2006 - 2007, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
24 #include <Protocol/LoadedImage.h>
25 #include <Protocol/GuidedSectionExtraction.h>
26 #include <Guid/DebugImageInfoTable.h>
27 #include <Protocol/DevicePath.h>
28 #include <Protocol/Runtime.h>
29 #include <Protocol/LoadFile.h>
30 #include <Protocol/DriverBinding.h>
31 #include <Protocol/VariableWrite.h>
32 #include <Protocol/PlatformDriverOverride.h>
33 #include <Protocol/Variable.h>
34 #include <Guid/MemoryTypeInformation.h>
35 #include <Guid/FirmwareFileSystem2.h>
36 #include <Guid/HobList.h>
37 #include <Protocol/Timer.h>
38 #include <Protocol/SimpleFileSystem.h>
39 #include <Protocol/Bds.h>
40 #include <Guid/FileInfo.h>
41 #include <Protocol/RealTimeClock.h>
42 #include <Guid/Apriori.h>
43 #include <Protocol/WatchdogTimer.h>
44 #include <Protocol/FirmwareVolume2.h>
45 #include <Protocol/MonotonicCounter.h>
46 #include <Guid/DxeServices.h>
47 #include <Guid/MemoryAllocationHob.h>
48 #include <Protocol/StatusCode.h>
49 #include <Protocol/CustomizedDecompress.h>
50 #include <Protocol/Decompress.h>
51 #include <Protocol/LoadPe32Image.h>
52 #include <Protocol/FirmwareVolumeDispatch.h>
53 #include <Protocol/Security.h>
54 #include <Protocol/Ebc.h>
55 #include <Guid/EventLegacyBios.h>
56 #include <Protocol/Reset.h>
57 #include <Protocol/EdkDecompress.h>
58 #include <Protocol/Cpu.h>
59 #include <Guid/EventGroup.h>
60 #include <Protocol/Metronome.h>
61 #include <Protocol/FirmwareVolumeBlock.h>
62 #include <Protocol/Capsule.h>
63 #include <Protocol/BusSpecificDriverOverride.h>
64 #include <Protocol/Performance.h>
65 #include <Uefi/UefiTcgPlatform.h>
66 #include <Protocol/TcgPlatform.h>
68 #include <Library/DxeCoreEntryPoint.h>
69 #include <Library/DebugLib.h>
70 #include <Library/UefiLib.h>
71 #include <Library/BaseLib.h>
72 #include <Library/HobLib.h>
73 #include <Library/PerformanceLib.h>
74 #include <Library/UefiDecompressLib.h>
75 #include <Library/ExtractGuidedSectionLib.h>
76 #include <Library/CacheMaintenanceLib.h>
77 #include <Library/BaseMemoryLib.h>
78 #include <Library/PeCoffLib.h>
79 #include <Library/PcdLib.h>
80 #include <Library/MemoryAllocationLib.h>
82 #include "DebugImageInfo.h"
84 #include "FwVolBlock.h"
85 #include "FwVolDriver.h"
94 // Modifier for EFI DXE Services
96 #define EFI_DXESERVICE
99 // attributes for reserved memory before it is promoted to system memory
101 #define EFI_MEMORY_PRESENT 0x0100000000000000ULL
102 #define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL
103 #define EFI_MEMORY_TESTED 0x0400000000000000ULL
106 // range for memory mapped port I/O on IPF
108 #define EFI_MEMORY_PORT_IO 0x4000000000000000ULL
112 /// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependecy expression
113 /// to save time. A EFI_DEP_PUSH is evauated one an
114 /// replaced with EFI_DEP_REPLACE_TRUE
116 #define EFI_DEP_REPLACE_TRUE 0xff
119 /// Define the initial size of the dependency expression evaluation stack
121 #define DEPEX_STACK_SIZE_INCREMENT 0x1000
124 EFI_GUID
*ProtocolGuid
;
129 } ARCHITECTURAL_PROTOCOL_ENTRY
;
132 EFI_STATUS_CODE_DATA DataHeader
;
134 } EFI_DXE_DEVICE_HANDLE_EXTENDED_DATA
;
136 #define EFI_STATUS_CODE_DXE_CORE_GUID \
137 { 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 } }
140 // DXE Dispatcher Data structures
143 #define KNOWN_HANDLE_SIGNATURE EFI_SIGNATURE_32('k','n','o','w')
146 LIST_ENTRY Link
; // mFvHandleList
151 #define EFI_CORE_DRIVER_ENTRY_SIGNATURE EFI_SIGNATURE_32('d','r','v','r')
154 LIST_ENTRY Link
; // mDriverList
156 LIST_ENTRY ScheduledLink
; // mScheduledQueue
160 EFI_DEVICE_PATH_PROTOCOL
*FvFileDevicePath
;
161 EFI_FIRMWARE_VOLUME2_PROTOCOL
*Fv
;
168 EFI_GUID BeforeAfterGuid
;
175 BOOLEAN DepexProtocolError
;
177 EFI_HANDLE ImageHandle
;
179 } EFI_CORE_DRIVER_ENTRY
;
182 //The data structure of GCD memory map entry
184 #define EFI_GCD_MAP_SIGNATURE EFI_SIGNATURE_32('g','c','d','m')
188 EFI_PHYSICAL_ADDRESS BaseAddress
;
192 EFI_GCD_MEMORY_TYPE GcdMemoryType
;
193 EFI_GCD_IO_TYPE GcdIoType
;
194 EFI_HANDLE ImageHandle
;
195 EFI_HANDLE DeviceHandle
;
199 // DXE Core Global Variables
201 extern EFI_SYSTEM_TABLE
*gDxeCoreST
;
202 extern EFI_BOOT_SERVICES
*gDxeCoreBS
;
203 extern EFI_RUNTIME_SERVICES
*gDxeCoreRT
;
204 extern EFI_DXE_SERVICES
*gDxeCoreDS
;
205 extern EFI_HANDLE gDxeCoreImageHandle
;
207 extern EFI_DECOMPRESS_PROTOCOL gEfiDecompress
;
209 extern EFI_RUNTIME_ARCH_PROTOCOL
*gRuntime
;
210 extern EFI_CPU_ARCH_PROTOCOL
*gCpu
;
211 extern EFI_WATCHDOG_TIMER_ARCH_PROTOCOL
*gWatchdogTimer
;
212 extern EFI_METRONOME_ARCH_PROTOCOL
*gMetronome
;
213 extern EFI_TIMER_ARCH_PROTOCOL
*gTimer
;
214 extern EFI_SECURITY_ARCH_PROTOCOL
*gSecurity
;
215 extern EFI_BDS_ARCH_PROTOCOL
*gBds
;
216 extern EFI_STATUS_CODE_PROTOCOL
*gStatusCode
;
218 extern EFI_TPL gEfiCurrentTpl
;
220 extern EFI_GUID
*gDxeCoreFileName
;
221 extern EFI_LOADED_IMAGE_PROTOCOL
*gDxeCoreLoadedImage
;
223 extern EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation
[EfiMaxMemoryType
+ 1];
225 extern BOOLEAN gDispatcherRunning
;
226 extern EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate
;
229 // Service Initialization Functions
241 Called to initialize the pool.
255 CoreAddMemoryDescriptor (
256 IN EFI_MEMORY_TYPE Type
,
257 IN EFI_PHYSICAL_ADDRESS Start
,
258 IN UINT64 NumberOfPages
,
265 Called to initialize the memory map and add descriptors to
266 the current descriptor list.
268 The first descriptor that is added must be general usable
269 memory as the addition allocates heap.
273 Type - The type of memory to add
275 Start - The starting address in the memory range
278 NumberOfPages - The number of pages in the range
280 Attribute - Attributes of the memory to add
284 None. The range is added to the memory map
290 CoreReleaseGcdMemoryLock (
296 Release memory lock on mGcdMemorySpaceLock
308 CoreAcquireGcdMemoryLock (
314 Acquire memory lock on mGcdMemorySpaceLock
326 CoreInitializeMemoryServices (
328 IN EFI_PHYSICAL_ADDRESS
*MemoryBaseAddress
,
329 IN UINT64
*MemoryLength
335 External function. Initializes the GCD and memory services based on the memory
336 descriptor HOBs. This function is responsible for priming the GCD map and the
337 memory map, so memory allocations and resource allocations can be made. The first
338 part of this function can not depend on any memory services until at least one
339 memory descriptor is provided to the memory services. Then the memory services
340 can be used to intialize the GCD map.
344 HobStart - The start address of the HOB.
346 MemoryBaseAddress - Start address of memory region found to init DXE core.
348 MemoryLength - Length of memory region found to init DXE core.
352 EFI_SUCCESS - Memory services successfully initialized.
359 CoreInitializeGcdServices (
360 IN OUT VOID
**HobStart
,
361 IN EFI_PHYSICAL_ADDRESS MemoryBaseAddress
,
362 IN UINT64 MemoryLength
368 External function. Initializes the GCD and memory services based on the memory
369 descriptor HOBs. This function is responsible for priming the GCD map and the
370 memory map, so memory allocations and resource allocations can be made. The first
371 part of this function can not depend on any memory services until at least one
372 memory descriptor is provided to the memory services. Then the memory services
373 can be used to intialize the GCD map. The HobStart will be relocated to a pool
378 HobStart - The start address of the HOB
380 MemoryBaseAddress - Start address of memory region found to init DXE core.
382 MemoryLength - Length of memory region found to init DXE core.
387 EFI_SUCCESS - GCD services successfully initialized.
393 CoreInitializeEventServices (
400 Initializes "event" support and populates parts of the System and Runtime Table.
408 EFI_SUCCESS - Always return success
414 CoreInitializeImageServices (
421 Add the Image Services to EFI Boot Services Table and install the protocol
422 interfaces for this image.
426 HobStart - The HOB to initialize
436 CoreNotifyOnArchProtocolInstallation (
442 Creates an event that is fired everytime a Protocol of a specific type is installed
454 CoreAllEfiServicesAvailable (
460 Return TRUE if all AP services are availible.
466 EFI_SUCCESS - All AP services are available
467 EFI_NOT_FOUND - At least one AP service is not available
474 IN OUT EFI_TABLE_HEADER
*Hdr
480 Calcualte the 32-bit CRC in a EFI table using the service provided by the
485 Hdr - Pointer to an EFI standard header
503 Called by the platform code to process a tick.
507 Duration - The number of 100ns elasped since the last call to TimerTick
517 CoreInitializeDispatcher (
524 Initialize the dispatcher. Initialize the notification function that runs when
525 a FV protocol is added to the system.
540 IN EFI_CORE_DRIVER_ENTRY
*DriverEntry
546 This is the POSTFIX version of the dependency evaluator. This code does
547 not need to handle Before or After, as it is not valid to call this
548 routine in this case. The SOR is just ignored and is a nop in the grammer.
550 POSTFIX means all the math is done on top of the stack.
554 DriverEntry - DriverEntry element to update
558 TRUE - If driver is ready to run.
560 FALSE - If driver is not ready to run or some fatal error was found.
566 CorePreProcessDepex (
567 IN EFI_CORE_DRIVER_ENTRY
*DriverEntry
573 Preprocess dependency expression and update DriverEntry to reflect the
574 state of Before, After, and SOR dependencies. If DriverEntry->Before
575 or DriverEntry->After is set it will never be cleared. If SOR is set
576 it will be cleared by CoreSchedule(), and then the driver can be
581 DriverEntry - DriverEntry element to update
585 EFI_SUCCESS - It always works.
593 CoreExitBootServices (
594 IN EFI_HANDLE ImageHandle
,
601 UEFI 2.0 API to terminate Boot Services
605 ImageHandle - Handle that represents the identity of the calling image
607 MapKey -Key to the latest memory map.
611 EFI_SUCCESS - Boot Services terminated
612 EFI_INVALID_PARAMETER - MapKey is incorrect.
618 CoreTerminateMemoryMap (
625 Make sure the memory map is following all the construction rules,
626 it is the last time to check memory map error before exit boot services.
630 MapKey - Memory map key
634 EFI_INVALID_PARAMETER - Memory map not consistent with construction rules.
636 EFI_SUCCESS - Valid memory map.
642 CoreNotifySignalList (
643 IN EFI_GUID
*EventGroup
649 Signals all events on the requested list
653 SignalType - The list to signal
665 CoreInstallConfigurationTable (
673 Boot Service called to add, modify, or remove a system configuration table from
674 the EFI System Table.
678 Guid: Pointer to the GUID for the entry to add, update, or remove
679 Table: Pointer to the configuration table for the entry to add, update, or
684 EFI_SUCCESS Guid, Table pair added, updated, or removed.
685 EFI_INVALID_PARAMETER Input GUID not valid.
686 EFI_NOT_FOUND Attempted to delete non-existant entry
687 EFI_OUT_OF_RESOURCES Not enough memory available
702 Raise the task priority level to the new level.
703 High level is implemented by disabling processor interrupts.
707 NewTpl - New task priority level
711 The previous task priority level
726 Lowers the task priority to the previous value. If the new
727 priority unmasks events at a higher priority, they are dispatched.
731 NewTpl - New, lower, task priority
744 IN UINTN Microseconds
750 Introduces a fine-grained stall.
754 Microseconds The number of microseconds to stall execution
758 EFI_SUCCESS - Execution was stalled for at least the requested amount
761 EFI_NOT_AVAILABLE_YET - gMetronome is not available yet
769 CoreSetWatchdogTimer (
771 IN UINT64 WatchdogCode
,
773 IN CHAR16
*WatchdogData OPTIONAL
779 Sets the system's watchdog timer.
783 Timeout The number of seconds. Zero disables the timer.
785 ///////following three parameters are left for platform specific using
787 WatchdogCode The numberic code to log. 0x0 to 0xffff are firmware
788 DataSize Size of the optional data
789 WatchdogData Optional Null terminated unicode string followed by binary
794 EFI_SUCCESS Timeout has been set
795 EFI_NOT_AVAILABLE_YET WatchdogTimer is not available yet
796 EFI_UNSUPPORTED System does not have a timer (currently not used)
797 EFI_DEVICE_ERROR Could not complete due to hardware error
805 CoreInstallProtocolInterface (
806 IN OUT EFI_HANDLE
*UserHandle
,
807 IN EFI_GUID
*Protocol
,
808 IN EFI_INTERFACE_TYPE InterfaceType
,
815 Wrapper function to CoreInstallProtocolInterfaceNotify. This is the public API which
816 Calls the private one which contains a BOOLEAN parameter for notifications
820 UserHandle - The handle to install the protocol handler on,
821 or NULL if a new handle is to be allocated
823 Protocol - The protocol to add to the handle
825 InterfaceType - Indicates whether Interface is supplied in native form.
827 Interface - The interface for the protocol being added
837 CoreInstallProtocolInterfaceNotify (
838 IN OUT EFI_HANDLE
*UserHandle
,
839 IN EFI_GUID
*Protocol
,
840 IN EFI_INTERFACE_TYPE InterfaceType
,
848 Installs a protocol interface into the boot services environment.
852 UserHandle - The handle to install the protocol handler on,
853 or NULL if a new handle is to be allocated
855 Protocol - The protocol to add to the handle
857 InterfaceType - Indicates whether Interface is supplied in native form.
859 Interface - The interface for the protocol being added
861 Notify - Whether to notify the notification list for this protocol
865 EFI_INVALID_PARAMETER - Invalid parameter
867 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
869 EFI_SUCCESS - Protocol interface successfully installed
877 CoreInstallMultipleProtocolInterfaces (
878 IN OUT EFI_HANDLE
*Handle
,
885 Installs a list of protocol interface into the boot services environment.
886 This function calls InstallProtocolInterface() in a loop. If any error
887 occures all the protocols added by this function are removed. This is
888 basically a lib function to save space.
892 Handle - The handle to install the protocol handlers on,
893 or NULL if a new handle is to be allocated
894 ... - EFI_GUID followed by protocol instance. A NULL terminates the
895 list. The pairs are the arguments to InstallProtocolInterface().
896 All the protocols are added to Handle.
900 EFI_INVALID_PARAMETER - Handle is NULL.
902 EFI_SUCCESS - Protocol interfaces successfully installed.
910 CoreUninstallMultipleProtocolInterfaces (
911 IN EFI_HANDLE Handle
,
918 Uninstalls a list of protocol interface in the boot services environment.
919 This function calls UnisatllProtocolInterface() in a loop. This is
920 basically a lib function to save space.
924 Handle - The handle to uninstall the protocol
926 ... - EFI_GUID followed by protocol instance. A NULL terminates the
927 list. The pairs are the arguments to UninstallProtocolInterface().
928 All the protocols are added to Handle.
940 CoreReinstallProtocolInterface (
941 IN EFI_HANDLE UserHandle
,
942 IN EFI_GUID
*Protocol
,
943 IN VOID
*OldInterface
,
944 IN VOID
*NewInterface
950 Reinstall a protocol interface on a device handle. The OldInterface for Protocol is replaced by the NewInterface.
954 UserHandle - Handle on which the interface is to be reinstalled
955 Protocol - The numeric ID of the interface
956 OldInterface - A pointer to the old interface
957 NewInterface - A pointer to the new interface
964 On EFI_SUCCESS The protocol interface was installed
965 On EFI_NOT_FOUND The OldInterface on the handle was not found
966 On EFI_INVALID_PARAMETER One of the parameters has an invalid value
974 CoreUninstallProtocolInterface (
975 IN EFI_HANDLE UserHandle
,
976 IN EFI_GUID
*Protocol
,
983 Uninstalls all instances of a protocol:interfacer from a handle.
984 If the last protocol interface is remove from the handle, the
989 UserHandle - The handle to remove the protocol handler from
991 Protocol - The protocol, of protocol:interface, to remove
993 Interface - The interface, of protocol:interface, to remove
997 EFI_INVALID_PARAMETER - Protocol is NULL.
999 EFI_SUCCESS - Protocol interface successfully uninstalled.
1007 CoreHandleProtocol (
1008 IN EFI_HANDLE UserHandle
,
1009 IN EFI_GUID
*Protocol
,
1010 OUT VOID
**Interface
1014 Routine Description:
1016 Queries a handle to determine if it supports a specified protocol.
1020 UserHandle - The handle being queried.
1022 Protocol - The published unique identifier of the protocol.
1024 Interface - Supplies the address where a pointer to the corresponding Protocol
1025 Interface is returned.
1029 The requested protocol interface for the handle
1038 IN EFI_HANDLE UserHandle
,
1039 IN EFI_GUID
*Protocol
,
1040 OUT VOID
**Interface OPTIONAL
,
1041 IN EFI_HANDLE ImageHandle
,
1042 IN EFI_HANDLE ControllerHandle
,
1043 IN UINT32 Attributes
1047 Routine Description:
1049 Locates the installed protocol handler for the handle, and
1050 invokes it to obtain the protocol interface. Usage information
1051 is registered in the protocol data base.
1055 UserHandle - The handle to obtain the protocol interface on
1057 Protocol - The ID of the protocol
1059 Interface - The location to return the protocol interface
1061 ImageHandle - The handle of the Image that is opening the protocol interface
1062 specified by Protocol and Interface.
1064 ControllerHandle - The controller handle that is requiring this interface.
1066 Attributes - The open mode of the protocol interface specified by Handle
1071 EFI_INVALID_PARAMETER - Protocol is NULL.
1073 EFI_SUCCESS - Get the protocol interface.
1081 CoreOpenProtocolInformation (
1082 IN EFI_HANDLE UserHandle
,
1083 IN EFI_GUID
*Protocol
,
1084 OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY
**EntryBuffer
,
1085 OUT UINTN
*EntryCount
1089 Routine Description:
1091 Return information about Opened protocols in the system
1095 UserHandle - The handle to close the protocol interface on
1097 Protocol - The ID of the protocol
1099 EntryBuffer - A pointer to a buffer of open protocol information in the form of
1100 EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures.
1102 EntryCount - Number of EntryBuffer entries
1114 IN EFI_HANDLE UserHandle
,
1115 IN EFI_GUID
*Protocol
,
1116 IN EFI_HANDLE ImageHandle
,
1117 IN EFI_HANDLE ControllerHandle
1121 Routine Description:
1127 UserHandle - The handle to close the protocol interface on
1129 Protocol - The ID of the protocol
1131 ImageHandle - The user of the protocol to close
1133 ControllerHandle - The user of the protocol to close
1137 EFI_INVALID_PARAMETER - Protocol is NULL.
1145 CoreProtocolsPerHandle (
1146 IN EFI_HANDLE UserHandle
,
1147 OUT EFI_GUID
***ProtocolBuffer
,
1148 OUT UINTN
*ProtocolBufferCount
1152 Routine Description:
1154 Retrieves the list of protocol interface GUIDs that are installed on a handle in a buffer allocated
1159 UserHandle - The handle from which to retrieve the list of protocol interface
1162 ProtocolBuffer - A pointer to the list of protocol interface GUID pointers that are
1163 installed on Handle.
1165 ProtocolBufferCount - A pointer to the number of GUID pointers present in
1169 EFI_SUCCESS - The list of protocol interface GUIDs installed on Handle was returned in
1170 ProtocolBuffer. The number of protocol interface GUIDs was
1171 returned in ProtocolBufferCount.
1172 EFI_INVALID_PARAMETER - Handle is NULL.
1173 EFI_INVALID_PARAMETER - Handle is not a valid EFI_HANDLE.
1174 EFI_INVALID_PARAMETER - ProtocolBuffer is NULL.
1175 EFI_INVALID_PARAMETER - ProtocolBufferCount is NULL.
1176 EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the results.
1184 CoreRegisterProtocolNotify (
1185 IN EFI_GUID
*Protocol
,
1187 OUT VOID
**Registration
1191 Routine Description:
1193 Add a new protocol notification record for the request protocol.
1197 Protocol - The requested protocol to add the notify registration
1199 Event - The event to signal
1201 Registration - Returns the registration record
1206 EFI_INVALID_PARAMETER - Invalid parameter
1208 EFI_SUCCESS - Successfully returned the registration record that has been added
1217 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1218 IN EFI_GUID
*Protocol OPTIONAL
,
1219 IN VOID
*SearchKey OPTIONAL
,
1220 IN OUT UINTN
*BufferSize
,
1221 OUT EFI_HANDLE
*Buffer
1225 Routine Description:
1227 Locates the requested handle(s) and returns them in Buffer.
1231 SearchType - The type of search to perform to locate the handles
1233 Protocol - The protocol to search for
1235 SearchKey - Dependant on SearchType
1237 BufferSize - On input the size of Buffer. On output the
1238 size of data returned.
1240 Buffer - The buffer to return the results in
1245 EFI_BUFFER_TOO_SMALL - Buffer too small, required buffer size is returned in BufferSize.
1247 EFI_INVALID_PARAMETER - Invalid parameter
1249 EFI_SUCCESS - Successfully found the requested handle(s) and returns them in Buffer.
1257 CoreLocateDevicePath (
1258 IN EFI_GUID
*Protocol
,
1259 IN OUT EFI_DEVICE_PATH_PROTOCOL
**FilePath
,
1260 OUT EFI_HANDLE
*Device
1264 Routine Description:
1266 Locates the handle to a device on the device path that supports the specified protocol.
1270 Protocol - The protocol to search for.
1271 FilePath - On input, a pointer to a pointer to the device path. On output, the device
1272 path pointer is modified to point to the remaining part of the devicepath.
1273 Device - A pointer to the returned device handle.
1277 EFI_SUCCESS - The resulting handle was returned.
1278 EFI_NOT_FOUND - No handles matched the search.
1279 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
1287 CoreLocateHandleBuffer (
1288 IN EFI_LOCATE_SEARCH_TYPE SearchType
,
1289 IN EFI_GUID
*Protocol OPTIONAL
,
1290 IN VOID
*SearchKey OPTIONAL
,
1291 IN OUT UINTN
*NumberHandles
,
1292 OUT EFI_HANDLE
**Buffer
1296 Routine Description:
1298 Function returns an array of handles that support the requested protocol
1299 in a buffer allocated from pool. This is a version of CoreLocateHandle()
1300 that allocates a buffer for the caller.
1304 SearchType - Specifies which handle(s) are to be returned.
1305 Protocol - Provides the protocol to search by.
1306 This parameter is only valid for SearchType ByProtocol.
1307 SearchKey - Supplies the search key depending on the SearchType.
1308 NumberHandles - The number of handles returned in Buffer.
1309 Buffer - A pointer to the buffer to return the requested array of
1310 handles that support Protocol.
1314 EFI_SUCCESS - The result array of handles was returned.
1315 EFI_NOT_FOUND - No handles match the search.
1316 EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the matching results.
1317 EFI_INVALID_PARAMETER - Invalid parameter
1325 CoreLocateProtocol (
1326 IN EFI_GUID
*Protocol
,
1327 IN VOID
*Registration OPTIONAL
,
1328 OUT VOID
**Interface
1332 Routine Description:
1334 Return the first Protocol Interface that matches the Protocol GUID. If
1335 Registration is pasased in return a Protocol Instance that was just add
1336 to the system. If Retistration is NULL return the first Protocol Interface
1341 Protocol - The protocol to search for
1343 Registration - Optional Registration Key returned from RegisterProtocolNotify()
1345 Interface - Return the Protocol interface (instance).
1349 EFI_SUCCESS - If a valid Interface is returned
1351 EFI_INVALID_PARAMETER - Invalid parameter
1353 EFI_NOT_FOUND - Protocol interface not found
1359 CoreGetHandleDatabaseKey (
1364 Routine Description:
1366 return handle database key.
1374 Handle database key.
1380 CoreConnectHandlesByKey (
1385 Routine Description:
1387 Go connect any handles that were created or modified while a image executed.
1391 Key - The Key to show that the handle has been created/modified
1402 CoreConnectController (
1403 IN EFI_HANDLE ControllerHandle
,
1404 IN EFI_HANDLE
*DriverImageHandle OPTIONAL
,
1405 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath OPTIONAL
,
1406 IN BOOLEAN Recursive
1410 Routine Description:
1412 Connects one or more drivers to a controller.
1416 ControllerHandle - Handle of the controller to be connected.
1418 DriverImageHandle - DriverImageHandle A pointer to an ordered list of driver image handles.
1420 RemainingDevicePath - RemainingDevicePath A pointer to the device path that specifies a child of the
1421 controller specified by ControllerHandle.
1423 Recursive - - Whether the function would be called recursively or not.
1435 CoreDisconnectController (
1436 IN EFI_HANDLE ControllerHandle
,
1437 IN EFI_HANDLE DriverImageHandle OPTIONAL
,
1438 IN EFI_HANDLE ChildHandle OPTIONAL
1442 Routine Description:
1444 Disonnects a controller from a driver
1448 ControllerHandle - ControllerHandle The handle of the controller from which driver(s)
1449 are to be disconnected.
1450 DriverImageHandle - DriverImageHandle The driver to disconnect from ControllerHandle.
1451 ChildHandle - ChildHandle The handle of the child to destroy.
1455 EFI_SUCCESS - One or more drivers were disconnected from the controller.
1456 EFI_SUCCESS - On entry, no drivers are managing ControllerHandle.
1457 EFI_SUCCESS - DriverImageHandle is not NULL, and on entry DriverImageHandle is not managing ControllerHandle.
1458 EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
1459 EFI_INVALID_PARAMETER - DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.
1460 EFI_INVALID_PARAMETER - ChildHandle is not NULL, and it is not a valid EFI_HANDLE.
1461 EFI_OUT_OF_RESOURCES - There are not enough resources available to disconnect any drivers from ControllerHandle.
1462 EFI_DEVICE_ERROR - The controller could not be disconnected because of a device error.
1471 IN EFI_ALLOCATE_TYPE Type
,
1472 IN EFI_MEMORY_TYPE MemoryType
,
1473 IN UINTN NumberOfPages
,
1474 IN OUT EFI_PHYSICAL_ADDRESS
*Memory
1478 Routine Description:
1480 Allocates pages from the memory map.
1484 Type - The type of allocation to perform
1486 MemoryType - The type of memory to turn the allocated pages into
1488 NumberOfPages - The number of pages to allocate
1490 Memory - A pointer to receive the base allocated memory address
1494 Status. On success, Memory is filled in with the base address allocated
1496 EFI_INVALID_PARAMETER - Parameters violate checking rules defined in spec.
1498 EFI_NOT_FOUND - Could not allocate pages match the requirement.
1500 EFI_OUT_OF_RESOURCES - No enough pages to allocate.
1502 EFI_SUCCESS - Pages successfully allocated.
1511 IN EFI_PHYSICAL_ADDRESS Memory
,
1512 IN UINTN NumberOfPages
1516 Routine Description:
1518 Frees previous allocated pages.
1522 Memory - Base address of memory being freed
1524 NumberOfPages - The number of pages to free
1528 EFI_NOT_FOUND - Could not find the entry that covers the range
1530 EFI_INVALID_PARAMETER - Address not aligned
1532 EFI_SUCCESS -Pages successfully freed.
1541 IN OUT UINTN
*MemoryMapSize
,
1542 IN OUT EFI_MEMORY_DESCRIPTOR
*Desc
,
1544 OUT UINTN
*DescriptorSize
,
1545 OUT UINT32
*DescriptorVersion
1549 Routine Description:
1551 Returns the current memory map.
1555 MemoryMapSize - On input the buffer size of MemoryMap allocated by caller
1556 On output the required buffer size to contain the memory map
1558 Desc - The buffer to return the current memory map
1560 MapKey - The address to return the current map key
1562 DescriptorSize - The size in bytes for an individual EFI_MEMORY_DESCRIPTOR
1564 DescriptorVersion - The version number associated with the EFI_MEMORY_DESCRIPTOR
1568 EFI_SUCCESS The current memory map was returned successfully
1570 EFI_BUFFER_TOO_SMALL The MemoryMap buffer was too small
1572 EFI_INVALID_PARAMETER One of the parameters has an invalid value
1581 IN EFI_MEMORY_TYPE PoolType
,
1587 Routine Description:
1589 Allocate pool of a particular type.
1593 PoolType - Type of pool to allocate
1595 Size - The amount of pool to allocate
1597 Buffer - The address to return a pointer to the allocated pool
1601 EFI_INVALID_PARAMETER - PoolType not valid
1603 EFI_OUT_OF_RESOURCES - Size exceeds max pool size or allocation failed.
1605 EFI_SUCCESS - Pool successfully allocated.
1618 Routine Description:
1624 Buffer - The allocated pool entry to free
1628 EFI_INVALID_PARAMETER - Buffer is not a valid value.
1630 EFI_SUCCESS - Pool successfully freed.
1639 IN BOOLEAN BootPolicy
,
1640 IN EFI_HANDLE ParentImageHandle
,
1641 IN EFI_DEVICE_PATH_PROTOCOL
*FilePath
,
1642 IN VOID
*SourceBuffer OPTIONAL
,
1643 IN UINTN SourceSize
,
1644 OUT EFI_HANDLE
*ImageHandle
1648 Routine Description:
1650 Loads an EFI image into memory and returns a handle to the image.
1654 BootPolicy - If TRUE, indicates that the request originates from the boot manager,
1655 and that the boot manager is attempting to load FilePath as a boot selection.
1656 ParentImageHandle - The caller's image handle.
1657 FilePath - The specific file path from which the image is loaded.
1658 SourceBuffer - If not NULL, a pointer to the memory location containing a copy of
1659 the image to be loaded.
1660 SourceSize - The size in bytes of SourceBuffer.
1661 ImageHandle - Pointer to the returned image handle that is created when the image
1662 is successfully loaded.
1666 EFI_SUCCESS - The image was loaded into memory.
1667 EFI_NOT_FOUND - The FilePath was not found.
1668 EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
1669 EFI_UNSUPPORTED - The image type is not supported, or the device path cannot be
1670 parsed to locate the proper protocol for loading the file.
1671 EFI_OUT_OF_RESOURCES - Image was not loaded due to insufficient resources.
1679 IN EFI_HANDLE ImageHandle
1683 Routine Description:
1685 Unload the specified image.
1689 ImageHandle - The specified image handle.
1693 EFI_INVALID_PARAMETER - Image handle is NULL.
1695 EFI_UNSUPPORTED - Attempt to unload an unsupported image.
1697 EFI_SUCCESS - Image successfully unloaded.
1706 IN EFI_HANDLE ImageHandle
,
1707 OUT UINTN
*ExitDataSize
,
1708 OUT CHAR16
**ExitData OPTIONAL
1712 Routine Description:
1714 Transfer control to a loaded image's entry point.
1718 ImageHandle - Handle of image to be started.
1720 ExitDataSize - Pointer of the size to ExitData
1722 ExitData - Pointer to a pointer to a data buffer that includes a Null-terminated
1723 Unicode string, optionally followed by additional binary data. The string
1724 is a description that the caller may use to further indicate the reason for
1729 EFI_INVALID_PARAMETER - Invalid parameter
1731 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
1733 EFI_SUCCESS - Successfully transfer control to the image's entry point.
1742 IN EFI_HANDLE ImageHandle
,
1743 IN EFI_STATUS Status
,
1744 IN UINTN ExitDataSize
,
1745 IN CHAR16
*ExitData OPTIONAL
1749 Routine Description:
1751 Terminates the currently loaded EFI image and returns control to boot services.
1755 ImageHandle - Handle that identifies the image. This parameter is passed to the image
1757 Status - The image's exit code.
1758 ExitDataSize - The size, in bytes, of ExitData. Ignored if ExitStatus is
1760 ExitData - Pointer to a data buffer that includes a Null-terminated Unicode string,
1761 optionally followed by additional binary data. The string is a
1762 description that the caller may use to further indicate the reason for
1767 EFI_INVALID_PARAMETER - Image handle is NULL or it is not current image.
1769 EFI_SUCCESS - Successfully terminates the currently loaded EFI image.
1771 EFI_ACCESS_DENIED - Should never reach there.
1781 IN EFI_TPL NotifyTpl
,
1782 IN EFI_EVENT_NOTIFY NotifyFunction
,
1783 IN VOID
*NotifyContext
,
1784 OUT EFI_EVENT
*pEvent
1788 Routine Description:
1790 Creates a general-purpose event structure
1794 Type - The type of event to create and its mode and attributes
1795 NotifyTpl - The task priority level of event notifications
1796 NotifyFunction - Pointer to the event's notification function
1797 NotifyContext - Pointer to the notification function's context; corresponds to
1798 parameter "Context" in the notification function
1799 pEvent - Pointer to the newly created event if the call succeeds; undefined otherwise
1803 EFI_SUCCESS - The event structure was created
1804 EFI_INVALID_PARAMETER - One of the parameters has an invalid value
1805 EFI_OUT_OF_RESOURCES - The event could not be allocated
1815 IN EFI_TPL NotifyTpl
,
1816 IN EFI_EVENT_NOTIFY NotifyFunction
, OPTIONAL
1817 IN CONST VOID
*NotifyContext
, OPTIONAL
1818 IN CONST EFI_GUID
*EventGroup
, OPTIONAL
1819 OUT EFI_EVENT
*Event
1823 Routine Description:
1824 Creates a general-purpose event structure
1827 Type - The type of event to create and its mode and attributes
1828 NotifyTpl - The task priority level of event notifications
1829 NotifyFunction - Pointer to the events notification function
1830 NotifyContext - Pointer to the notification functions context; corresponds to
1831 parameter "Context" in the notification function
1832 EventGrout - GUID for EventGroup if NULL act the same as gBS->CreateEvent().
1833 Event - Pointer to the newly created event if the call succeeds; undefined otherwise
1836 EFI_SUCCESS - The event structure was created
1837 EFI_INVALID_PARAMETER - One of the parameters has an invalid value
1838 EFI_OUT_OF_RESOURCES - The event could not be allocated
1848 IN EFI_TIMER_DELAY Type
,
1849 IN UINT64 TriggerTime
1853 Routine Description:
1855 Sets the type of timer and the trigger time for a timer event.
1859 UserEvent - The timer event that is to be signaled at the specified time
1860 Type - The type of time that is specified in TriggerTime
1861 TriggerTime - The number of 100ns units until the timer expires
1865 EFI_SUCCESS - The event has been set to be signaled at the requested time
1866 EFI_INVALID_PARAMETER - Event or Type is not valid
1879 Routine Description:
1881 Signals the event. Queues the event to be notified if needed
1885 Event - The event to signal
1889 EFI_INVALID_PARAMETER - Parameters are not valid.
1891 EFI_SUCCESS - The event was signaled.
1900 IN UINTN NumberOfEvents
,
1901 IN EFI_EVENT
*UserEvents
,
1902 OUT UINTN
*UserIndex
1906 Routine Description:
1908 Stops execution until an event is signaled.
1912 NumberOfEvents - The number of events in the UserEvents array
1913 UserEvents - An array of EFI_EVENT
1914 UserIndex - Pointer to the index of the event which satisfied the wait condition
1918 EFI_SUCCESS - The event indicated by Index was signaled.
1919 EFI_INVALID_PARAMETER - The event indicated by Index has a notification function or
1920 Event was not a valid type
1921 EFI_UNSUPPORTED - The current TPL is not TPL_APPLICATION
1934 Routine Description:
1936 Closes an event and frees the event structure.
1940 UserEvent - Event to close
1944 EFI_INVALID_PARAMETER - Parameters are not valid.
1946 EFI_SUCCESS - The event has been closed
1959 Routine Description:
1961 Check the status of an event
1965 UserEvent - The event to check
1969 EFI_SUCCESS - The event is in the signaled state
1970 EFI_NOT_READY - The event is not in the signaled state
1971 EFI_INVALID_PARAMETER - Event is of type EVT_NOTIFY_SIGNAL
1977 CoreAddMemorySpace (
1978 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
1979 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
1981 IN UINT64 Capabilities
1985 Routine Description:
1987 Add a segment of memory space to GCD map and add all available pages in this segment
1988 as memory descriptors.
1992 GcdMemoryType - Memory type of the segment.
1994 BaseAddress - Base address of the segment.
1996 Length - Length of the segment.
1998 Capabilities - alterable attributes of the segment.
2002 EFI_SUCCESS - Merged this segment into GCD map.
2008 CoreAllocateMemorySpace (
2009 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
2010 IN EFI_GCD_MEMORY_TYPE GcdMemoryType
,
2013 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
2014 IN EFI_HANDLE ImageHandle
,
2015 IN EFI_HANDLE DeviceHandle OPTIONAL
2019 Routine Description:
2021 Allocate memory space on GCD map.
2025 GcdAllocateType - The type of allocate operation
2027 GcdMemoryType - The desired memory type
2029 Alignment - Align with 2^Alignment
2031 Length - Length to allocate
2033 BaseAddress - Base address to allocate
2035 ImageHandle - The image handle consume the allocated space.
2037 DeviceHandle - The device handle consume the allocated space.
2041 EFI_INVALID_PARAMETER - Invalid parameter.
2043 EFI_NOT_FOUND - No descriptor contains the desired space.
2045 EFI_SUCCESS - Memory space successfully allocated.
2051 CoreFreeMemorySpace (
2052 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2057 Routine Description:Routine Description:
2059 Free a segment of memory space in GCD map.
2063 BaseAddress - Base address of the segment.
2065 Length - Length of the segment.
2069 EFI_SUCCESS - Space successfully freed.
2075 CoreRemoveMemorySpace (
2076 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2081 Routine Description:Routine Description:
2083 Remove a segment of memory space in GCD map.
2087 BaseAddress - Base address of the segment.
2089 Length - Length of the segment.
2093 EFI_SUCCESS - Successfully a segment of memory space.
2099 CoreGetMemorySpaceDescriptor (
2100 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2101 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
*Descriptor
2105 Routine Description:
2107 Search all entries in GCD map which contains specified segment and build it to a descriptor.
2111 BaseAddress - Specified start address
2113 Descriptor - Specified length
2117 EFI_INVALID_PARAMETER - Invalid parameter
2119 EFI_SUCCESS - Successfully get memory space descriptor.
2125 CoreSetMemorySpaceAttributes (
2126 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2128 IN UINT64 Attributes
2132 Routine Description:
2134 Set memory space with specified attributes.
2138 BaseAddress - Specified start address
2140 Length - Specified length
2142 Attributes - Specified attributes
2146 EFI_SUCCESS - Successfully set attribute of a segment of memory space.
2152 CoreGetMemorySpaceMap (
2153 OUT UINTN
*NumberOfDescriptors
,
2154 OUT EFI_GCD_MEMORY_SPACE_DESCRIPTOR
**MemorySpaceMap
2158 Routine Description:
2160 Transer all entries of GCD memory map into memory descriptors and pass to caller.
2164 NumberOfDescriptors - Number of descriptors.
2166 MemorySpaceMap - Descriptor array
2170 EFI_INVALID_PARAMETER - Invalid parameter
2172 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
2174 EFI_SUCCESS - Successfully get memory space map.
2181 IN EFI_GCD_IO_TYPE GcdIoType
,
2182 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2187 Routine Description:
2189 Add a segment of IO space to GCD map.
2193 GcdIoType - IO type of the segment.
2195 BaseAddress - Base address of the segment.
2197 Length - Length of the segment.
2201 EFI_SUCCESS - Merged this segment into GCD map.
2207 CoreAllocateIoSpace (
2208 IN EFI_GCD_ALLOCATE_TYPE GcdAllocateType
,
2209 IN EFI_GCD_IO_TYPE GcdIoType
,
2212 IN OUT EFI_PHYSICAL_ADDRESS
*BaseAddress
,
2213 IN EFI_HANDLE ImageHandle
,
2214 IN EFI_HANDLE DeviceHandle OPTIONAL
2218 Routine Description:
2220 Allocate IO space on GCD map.
2224 GcdAllocateType - The type of allocate operation
2226 GcdIoType - The desired IO type
2228 Alignment - Align with 2^Alignment
2230 Length - Length to allocate
2232 BaseAddress - Base address to allocate
2234 ImageHandle - The image handle consume the allocated space.
2236 DeviceHandle - The device handle consume the allocated space.
2240 EFI_INVALID_PARAMETER - Invalid parameter.
2242 EFI_NOT_FOUND - No descriptor contains the desired space.
2244 EFI_SUCCESS - IO space successfully allocated.
2251 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2256 Routine Description:Routine Description:
2258 Free a segment of IO space in GCD map.
2262 BaseAddress - Base address of the segment.
2264 Length - Length of the segment.
2268 EFI_SUCCESS - Space successfully freed.
2275 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2280 Routine Description:Routine Description:
2282 Remove a segment of IO space in GCD map.
2286 BaseAddress - Base address of the segment.
2288 Length - Length of the segment.
2292 EFI_SUCCESS - Successfully removed a segment of IO space.
2298 CoreGetIoSpaceDescriptor (
2299 IN EFI_PHYSICAL_ADDRESS BaseAddress
,
2300 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
*Descriptor
2304 Routine Description:
2306 Search all entries in GCD map which contains specified segment and build it to a descriptor.
2310 BaseAddress - Specified start address
2312 Descriptor - Specified length
2316 EFI_INVALID_PARAMETER - Descriptor is NULL.
2318 EFI_SUCCESS - Successfully get the IO space descriptor.
2325 OUT UINTN
*NumberOfDescriptors
,
2326 OUT EFI_GCD_IO_SPACE_DESCRIPTOR
**IoSpaceMap
2330 Routine Description:
2332 Transer all entries of GCD IO map into IO descriptors and pass to caller.
2336 NumberOfDescriptors - Number of descriptors.
2338 IoSpaceMap - Descriptor array
2342 EFI_INVALID_PARAMETER - Invalid parameter
2344 EFI_OUT_OF_RESOURCES - No enough buffer to allocate
2346 EFI_SUCCESS - Successfully get IO space map.
2359 Routine Description:
2361 This is the main Dispatcher for DXE and it exits when there are no more
2362 drivers to run. Drain the mScheduledQueue and load and start a PE
2363 image for each driver. Search the mDiscoveredList to see if any driver can
2364 be placed on the mScheduledQueue. If no drivers are placed on the
2365 mScheduledQueue exit the function. On exit it is assumed the Bds()
2366 will be called, and when the Bds() exits the Dispatcher will be called
2375 EFI_ALREADY_STARTED - The DXE Dispatcher is already running
2377 EFI_NOT_FOUND - No DXE Drivers were dispatched
2379 EFI_SUCCESS - One or more DXE Drivers were dispatched
2387 IN EFI_HANDLE FirmwareVolumeHandle
,
2388 IN EFI_GUID
*DriverName
2392 Routine Description:
2394 Check every driver and locate a matching one. If the driver is found, the Unrequested
2395 state flag is cleared.
2399 FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware
2400 file specified by DriverName.
2402 DriverName - The Driver name to put in the Dependent state.
2406 EFI_SUCCESS - The DriverName was found and it's SOR bit was cleared
2408 EFI_NOT_FOUND - The DriverName does not exist or it's SOR bit was not set.
2417 IN EFI_HANDLE FirmwareVolumeHandle
,
2418 IN EFI_GUID
*DriverName
2422 Routine Description:
2424 Convert a driver from the Untrused back to the Scheduled state
2428 FirmwareVolumeHandle - The handle of the Firmware Volume that contains the firmware
2429 file specified by DriverName.
2431 DriverName - The Driver name to put in the Scheduled state
2435 EFI_SUCCESS - The file was found in the untrusted state, and it was promoted
2436 to the trusted state.
2438 EFI_NOT_FOUND - The file was not found in the untrusted state.
2445 IN OUT EFI_STATUS
*Status
,
2446 IN OUT VOID
**Buffer
,
2451 Routine Description:
2453 Helper function called as part of the code needed
2454 to allocate the proper sized buffer for various
2459 Status - Current status
2461 Buffer - Current allocated buffer, or NULL
2463 BufferSize - Current buffer size needed
2467 TRUE - if the buffer was reallocated and the caller
2468 should try the API again.
2470 FALSE - buffer could not be allocated and the caller
2471 should not try the API again.
2479 IN EFI_HANDLE ImageHandle
,
2480 IN EFI_SYSTEM_TABLE
*SystemTable
2484 Routine Description:
2485 This routine is the driver initialization entry point. It initializes the
2486 libraries, and registers two notification functions. These notification
2487 functions are responsible for building the FV stack dynamically.
2490 ImageHandle - The image handle.
2491 SystemTable - The system table.
2494 EFI_SUCCESS - Function successfully returned.
2501 InitializeSectionExtraction (
2502 IN EFI_HANDLE ImageHandle
,
2503 IN EFI_SYSTEM_TABLE
*SystemTable
2507 Routine Description:
2508 Entry point of the section extraction code. Initializes an instance of the
2509 section extraction interface and installs it on a new handle.
2512 ImageHandle EFI_HANDLE: A handle for the image that is initializing this driver
2513 SystemTable EFI_SYSTEM_TABLE: A pointer to the EFI system table
2516 EFI_SUCCESS: Driver initialized successfully
2517 EFI_OUT_OF_RESOURCES: Could not allocate needed resources
2523 CoreProcessFirmwareVolume (
2526 OUT EFI_HANDLE
*FVProtocolHandle
2530 Routine Description:
2531 This DXE service routine is used to process a firmware volume. In
2532 particular, it can be called by BDS to process a single firmware
2533 volume found in a capsule.
2536 FvHeader - pointer to a firmware volume header
2537 Size - the size of the buffer pointed to by FvHeader
2538 FVProtocolHandle - the handle on which a firmware volume protocol
2539 was produced for the firmware volume passed in.
2542 EFI_OUT_OF_RESOURCES - if an FVB could not be produced due to lack of
2544 EFI_VOLUME_CORRUPTED - if the volume was corrupted
2545 EFI_SUCCESS - a firmware volume protocol was produced for the
2552 //Functions used during debug buils
2555 CoreDisplayMissingArchProtocols (
2560 Routine Description:
2561 Displays Architectural protocols that were not loaded and are required for DXE core to function
2562 Only used in Debug Builds
2573 CoreDisplayDiscoveredNotDispatched (
2578 Routine Description:
2580 Traverse the discovered list for any drivers that were discovered but not loaded
2581 because the dependency experessions evaluated to false
2595 CoreEfiNotAvailableYetArg0 (
2600 Routine Description:
2602 Place holder function until all the Boot Services and Runtime Services are available
2610 EFI_NOT_AVAILABLE_YET
2617 CoreEfiNotAvailableYetArg1 (
2622 Routine Description:
2624 Place holder function until all the Boot Services and Runtime Services are available
2632 EFI_NOT_AVAILABLE_YET
2639 CoreEfiNotAvailableYetArg2 (
2645 Routine Description:
2647 Place holder function until all the Boot Services and Runtime Services are available
2657 EFI_NOT_AVAILABLE_YET
2664 CoreEfiNotAvailableYetArg3 (
2671 Routine Description:
2673 Place holder function until all the Boot Services and Runtime Services are available
2685 EFI_NOT_AVAILABLE_YET
2692 CoreEfiNotAvailableYetArg4 (
2700 Routine Description:
2702 Place holder function until all the Boot Services and Runtime Services are available
2716 EFI_NOT_AVAILABLE_YET
2723 CoreEfiNotAvailableYetArg5 (
2732 Routine Description:
2734 Place holder function until all the Boot Services and Runtime Services are available
2750 EFI_NOT_AVAILABLE_YET
2756 CoreGetPeiProtocol (
2757 IN EFI_GUID
*ProtocolGuid
,
2762 Routine Description:
2764 Searches for a Protocol Interface passed from PEI through a HOB
2768 ProtocolGuid - The Protocol GUID to search for in the HOB List
2770 Interface - A pointer to the interface for the Protocol GUID
2774 EFI_SUCCESS - The Protocol GUID was found and its interface is returned in Interface
2776 EFI_NOT_FOUND - The Protocol GUID was not found in the HOB List
2782 DxeMainUefiDecompressGetInfo (
2783 IN EFI_DECOMPRESS_PROTOCOL
*This
,
2785 IN UINT32 SourceSize
,
2786 OUT UINT32
*DestinationSize
,
2787 OUT UINT32
*ScratchSize
2792 DxeMainUefiDecompress (
2793 IN EFI_DECOMPRESS_PROTOCOL
*This
,
2795 IN UINT32 SourceSize
,
2796 IN OUT VOID
*Destination
,
2797 IN UINT32 DestinationSize
,
2798 IN OUT VOID
*Scratch
,
2799 IN UINT32 ScratchSize
2803 DxeMainTianoDecompressGetInfo (
2804 IN EFI_TIANO_DECOMPRESS_PROTOCOL
*This
,
2806 IN UINT32 SourceSize
,
2807 OUT UINT32
*DestinationSize
,
2808 OUT UINT32
*ScratchSize
2813 DxeMainTianoDecompress (
2814 IN EFI_TIANO_DECOMPRESS_PROTOCOL
*This
,
2816 IN UINT32 SourceSize
,
2817 IN OUT VOID
*Destination
,
2818 IN UINT32 DestinationSize
,
2819 IN OUT VOID
*Scratch
,
2820 IN UINT32 ScratchSize
2824 DxeMainCustomDecompressGetInfo (
2825 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL
*This
,
2827 IN UINT32 SourceSize
,
2828 OUT UINT32
*DestinationSize
,
2829 OUT UINT32
*ScratchSize
2834 DxeMainCustomDecompress (
2835 IN EFI_CUSTOMIZED_DECOMPRESS_PROTOCOL
*This
,
2837 IN UINT32 SourceSize
,
2838 IN OUT VOID
*Destination
,
2839 IN UINT32 DestinationSize
,
2840 IN OUT VOID
*Scratch
,
2841 IN UINT32 ScratchSize
2847 IN UINTN SectionStreamLength
,
2848 IN VOID
*SectionStream
,
2849 OUT UINTN
*SectionStreamHandle
2855 IN UINTN SectionStreamHandle
,
2856 IN EFI_SECTION_TYPE
*SectionType
,
2857 IN EFI_GUID
*SectionDefinitionGuid
,
2858 IN UINTN SectionInstance
,
2860 IN OUT UINTN
*BufferSize
,
2861 OUT UINT32
*AuthenticationStatus
2866 CloseSectionStream (
2867 IN UINTN StreamHandleToClose