3 Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
4 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.
18 Light weight lib to support EFI drivers.
22 #ifndef _EFI_DRIVER_LIB_H_
23 #define _EFI_DRIVER_LIB_H_
25 #include "EfiStatusCode.h"
26 #include "EfiCommonLib.h"
28 #include "LinkedList.h"
30 #include "EfiImageFormat.h"
31 #include "EfiCompNameSupport.h"
33 #include EFI_GUID_DEFINITION (DxeServices)
34 #include EFI_GUID_DEFINITION (EventGroup)
35 #include EFI_GUID_DEFINITION (EventLegacyBios)
36 #include EFI_GUID_DEFINITION (FrameworkDevicePath)
37 #include EFI_PROTOCOL_DEFINITION (FirmwareVolume)
38 #include EFI_PROTOCOL_DEFINITION (FirmwareVolume2)
39 #include EFI_PROTOCOL_DEFINITION (DataHub)
40 #include EFI_PROTOCOL_DEFINITION (DriverBinding)
41 #include EFI_PROTOCOL_DEFINITION (ComponentName)
42 #include EFI_PROTOCOL_DEFINITION (ComponentName2)
43 #include EFI_PROTOCOL_DEFINITION (DriverConfiguration)
44 #include EFI_PROTOCOL_DEFINITION (DriverConfiguration2)
45 #include EFI_PROTOCOL_DEFINITION (DriverDiagnostics)
46 #include EFI_PROTOCOL_DEFINITION (DriverDiagnostics2)
48 #include EFI_PROTOCOL_DEFINITION (DebugMask)
50 #if defined(__GNUC__) && defined(ECP_CPU_IPF)
61 Generates a breakpoint on the CPU.
63 Generates a breakpoint on the CPU. The breakpoint must be implemented such
64 that code can resume normal execution after the breakpoint.
86 Used to serialize load and store operations.
88 All loads and stores that proceed calls to this function are guaranteed to be
89 globally visible when this function returns.
106 CHAR16
*UnicodeString
;
107 } EFI_UNICODE_STRING_TABLE
;
108 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
109 #define LANGUAGE_CODE_ENGLISH "en-US"
111 #define LANGUAGE_CODE_ENGLISH "eng"
115 // Macros for EFI Driver Library Functions that are really EFI Boot Services
117 #define EfiCopyMem(_Destination, _Source, _Length) gBS->CopyMem ((_Destination), (_Source), (_Length))
118 #define EfiSetMem(_Destination, _Length, _Value) gBS->SetMem ((_Destination), (_Length), (_Value))
119 #define EfiZeroMem(_Destination, _Length) gBS->SetMem ((_Destination), (_Length), 0)
122 // Driver Lib Globals.
124 extern EFI_BOOT_SERVICES
*gBS
;
125 extern EFI_DXE_SERVICES
*gDS
;
126 extern EFI_RUNTIME_SERVICES
*gRT
;
127 extern EFI_SYSTEM_TABLE
*gST
;
128 extern UINTN gErrorLevel
;
129 extern EFI_GUID gEfiCallerIdGuid
;
130 extern EFI_DEBUG_MASK_PROTOCOL
*gDebugMaskInterface
;
133 EfiInitializeDriverLib (
134 IN EFI_HANDLE ImageHandle
,
135 IN EFI_SYSTEM_TABLE
*SystemTable
141 Intialize Driver Lib if it has not yet been initialized.
145 ImageHandle - The firmware allocated handle for the EFI image.
147 SystemTable - A pointer to the EFI System Table.
152 EFI_STATUS always returns EFI_SUCCESS
158 DxeInitializeDriverLib (
159 IN EFI_HANDLE ImageHandle
,
160 IN EFI_SYSTEM_TABLE
*SystemTable
166 Intialize Driver Lib if it has not yet been initialized.
170 ImageHandle - The firmware allocated handle for the EFI image.
172 SystemTable - A pointer to the EFI System Table.
176 EFI_STATUS always returns EFI_SUCCESS
182 EfiLibInstallDriverBinding (
183 IN EFI_HANDLE ImageHandle
,
184 IN EFI_SYSTEM_TABLE
*SystemTable
,
185 IN EFI_DRIVER_BINDING_PROTOCOL
*DriverBinding
,
186 IN EFI_HANDLE DriverBindingHandle
192 Intialize a driver by installing the Driver Binding Protocol onto the
193 driver's DriverBindingHandle. This is typically the same as the driver's
194 ImageHandle, but it can be different if the driver produces multiple
195 DriverBinding Protocols. This function also initializes the EFI Driver
196 Library that initializes the global variables gST, gBS, gRT.
200 ImageHandle - The image handle of the driver
202 SystemTable - The EFI System Table that was passed to the driver's entry point
204 DriverBinding - A Driver Binding Protocol instance that this driver is producing
206 DriverBindingHandle - The handle that DriverBinding is to be installe onto. If this
207 parameter is NULL, then a new handle is created.
211 EFI_SUCCESS is DriverBinding is installed onto DriverBindingHandle
213 Otherwise, then return status from gBS->InstallProtocolInterface()
219 EfiLibInstallAllDriverProtocols (
220 IN EFI_HANDLE ImageHandle
,
221 IN EFI_SYSTEM_TABLE
*SystemTable
,
222 IN EFI_DRIVER_BINDING_PROTOCOL
*DriverBinding
,
223 IN EFI_HANDLE DriverBindingHandle
,
224 IN EFI_COMPONENT_NAME_PROTOCOL
*ComponentName
, OPTIONAL
225 IN EFI_DRIVER_CONFIGURATION_PROTOCOL
*DriverConfiguration
, OPTIONAL
226 IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL
*DriverDiagnostics OPTIONAL
232 Intialize a driver by installing the Driver Binding Protocol onto the
233 driver's DriverBindingHandle. This is typically the same as the driver's
234 ImageHandle, but it can be different if the driver produces multiple
235 DriverBinding Protocols. This function also initializes the EFI Driver
236 Library that initializes the global variables gST, gBS, gRT.
240 ImageHandle - The image handle of the driver
242 SystemTable - The EFI System Table that was passed to the driver's entry point
244 DriverBinding - A Driver Binding Protocol instance that this driver is producing
246 DriverBindingHandle - The handle that DriverBinding is to be installe onto. If this
247 parameter is NULL, then a new handle is created.
249 ComponentName - A Component Name Protocol instance that this driver is producing
251 DriverConfiguration - A Driver Configuration Protocol instance that this driver is producing
253 DriverDiagnostics - A Driver Diagnostics Protocol instance that this driver is producing
257 EFI_SUCCESS if all the protocols were installed onto DriverBindingHandle
259 Otherwise, then return status from gBS->InstallProtocolInterface()
265 EfiLibInstallAllDriverProtocols2 (
266 IN EFI_HANDLE ImageHandle
,
267 IN EFI_SYSTEM_TABLE
*SystemTable
,
268 IN EFI_DRIVER_BINDING_PROTOCOL
*DriverBinding
,
269 IN EFI_HANDLE DriverBindingHandle
,
270 IN EFI_COMPONENT_NAME2_PROTOCOL
*ComponentName2
, OPTIONAL
271 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL
*DriverConfiguration2
, OPTIONAL
272 IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL
*DriverDiagnostics2 OPTIONAL
278 Intialize a driver by installing the Driver Binding Protocol onto the
279 driver's DriverBindingHandle. This is typically the same as the driver's
280 ImageHandle, but it can be different if the driver produces multiple
281 DriverBinding Protocols. This function also initializes the EFI Driver
282 Library that initializes the global variables gST, gBS, gRT.
286 ImageHandle - The image handle of the driver
288 SystemTable - The EFI System Table that was passed to the driver's entry point
290 DriverBinding - A Driver Binding Protocol instance that this driver is producing
292 DriverBindingHandle - The handle that DriverBinding is to be installe onto. If this
293 parameter is NULL, then a new handle is created.
295 ComponentName2 - A Component Name2 Protocol instance that this driver is producing
297 DriverConfiguration2- A Driver Configuration2 Protocol instance that this driver is producing
299 DriverDiagnostics2 - A Driver Diagnostics2 Protocol instance that this driver is producing
303 EFI_SUCCESS if all the protocols were installed onto DriverBindingHandle
305 Otherwise, then return status from gBS->InstallProtocolInterface()
311 EfiLibGetSystemConfigurationTable (
312 IN EFI_GUID
*TableGuid
,
319 Return the EFI 1.0 System Tabl entry with TableGuid
323 TableGuid - Name of entry to return in the system table
324 Table - Pointer in EFI system table associated with TableGuid
328 EFI_SUCCESS - Table returned;
329 EFI_NOT_FOUND - TableGuid not in EFI system table
335 EfiLibCompareLanguage (
343 Compare two languages to say whether they are identical.
347 Language1 - first language
348 Language2 - second language
353 FALSE - not identical
362 EfiIsDevicePathMultiInstance (
363 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
368 Return TRUE is this is a multi instance device path.
371 DevicePath - A pointer to a device path data structure.
375 TRUE - If DevicePath is multi instance.
376 FALSE - If DevicePath is not multi instance.
381 EFI_DEVICE_PATH_PROTOCOL
*
382 EfiDevicePathInstance (
383 IN OUT EFI_DEVICE_PATH_PROTOCOL
**DevicePath
,
389 Function retrieves the next device path instance from a device path data structure.
392 DevicePath - A pointer to a device path data structure.
394 Size - A pointer to the size of a device path instance in bytes.
398 This function returns a pointer to the current device path instance.
399 In addition, it returns the size in bytes of the current device path instance in Size,
400 and a pointer to the next device path instance in DevicePath.
401 If there are no more device path instances in DevicePath, then DevicePath will be set to NULL.
408 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
414 Calculate the size of a whole device path.
418 DevPath - The pointer to the device path data.
422 Size of device path data structure..
427 EFI_DEVICE_PATH_PROTOCOL
*
428 EfiAppendDevicePath (
429 IN EFI_DEVICE_PATH_PROTOCOL
*Src1
,
430 IN EFI_DEVICE_PATH_PROTOCOL
*Src2
435 Function is used to append a Src1 and Src2 together.
438 Src1 - A pointer to a device path data structure.
440 Src2 - A pointer to a device path data structure.
444 A pointer to the new device path is returned.
445 NULL is returned if space for the new device path could not be allocated from pool.
446 It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.
451 EFI_DEVICE_PATH_PROTOCOL
*
452 EfiDevicePathFromHandle (
459 Locate device path protocol interface on a device handle.
463 Handle - The device handle
467 Device path protocol interface located.
472 EFI_DEVICE_PATH_PROTOCOL
*
473 EfiDuplicateDevicePath (
474 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
479 Duplicate a new device path data structure from the old one.
482 DevPath - A pointer to a device path data structure.
485 A pointer to the new allocated device path data.
486 Caller must free the memory used by DevicePath if it is no longer needed.
491 EFI_DEVICE_PATH_PROTOCOL
*
492 EfiAppendDevicePathNode (
493 IN EFI_DEVICE_PATH_PROTOCOL
*Src1
,
494 IN EFI_DEVICE_PATH_PROTOCOL
*Src2
499 Function is used to append a device path node to the end of another device path.
502 Src1 - A pointer to a device path data structure.
504 Src2 - A pointer to a device path data structure.
507 This function returns a pointer to the new device path.
508 If there is not enough temporary pool memory available to complete this function,
509 then NULL is returned.
515 EFI_DEVICE_PATH_PROTOCOL
*
517 IN EFI_HANDLE Device OPTIONAL
,
523 Create a device path that appends a MEDIA_DEVICE_PATH with
524 FileNameGuid to the device path of DeviceHandle.
527 Device - Optional Device Handle to use as Root of the Device Path
532 EFI_DEVICE_PATH_PROTOCOL that was allocated from dynamic memory
538 EFI_DEVICE_PATH_PROTOCOL
*
539 EfiAppendDevicePathInstance (
540 IN EFI_DEVICE_PATH_PROTOCOL
*Src
,
541 IN EFI_DEVICE_PATH_PROTOCOL
*Instance
547 Append a device path instance to another.
551 Src - The device path instance to be appended with.
552 Instance - The device path instance appending the other.
556 The contaction of these two.
572 IN OUT EFI_LOCK
*Lock
,
579 Initialize a basic mutual exclusion lock. Each lock
580 provides mutual exclusion access at it's task priority
581 level. Since there is no-premption (at any TPL) or
582 multiprocessor support, acquiring the lock only consists
583 of raising to the locks TPL.
585 Note on a check build ASSERT()s are used to ensure proper
590 Lock - The EFI_LOCK structure to initialize
592 Priority - The task priority level of the lock
597 An initialized Efi Lock structure.
603 // Macro to initialize the state of a lock when a lock variable is declared
605 #define EFI_INITIALIZE_LOCK_VARIABLE(Tpl) {Tpl,0,0}
615 Raising to the task priority level of the mutual exclusion
616 lock, and then acquires ownership of the lock.
620 Lock - The lock to acquire
630 EfiAcquireLockOrFail (
637 Initialize a basic mutual exclusion lock. Each lock
638 provides mutual exclusion access at it's task priority
639 level. Since there is no-premption (at any TPL) or
640 multiprocessor support, acquiring the lock only consists
641 of raising to the locks TPL.
645 Lock - The EFI_LOCK structure to initialize
649 EFI_SUCCESS - Lock Owned.
650 EFI_ACCESS_DENIED - Reentrant Lock Acquisition, Lock not Owned.
663 Releases ownership of the mutual exclusion lock, and
664 restores the previous task priority level.
668 Lock - The lock to release
679 IN UINTN AllocationSize
685 Allocate EfiBootServicesData pool of size AllocationSize
689 AllocationSize - Pool size
693 Pointer to the pool allocated
699 EfiLibAllocateRuntimePool (
700 IN UINTN AllocationSize
706 Allocate EfiRuntimeServicesData pool of size AllocationSize
710 AllocationSize - Pool size
714 Pointer to the pool allocated
720 EfiLibAllocateZeroPool (
721 IN UINTN AllocationSize
727 Allocate EfiBootServicesData pool of size AllocationSize and set memory to zero.
731 AllocationSize - Pool size
735 Pointer to the pool allocated
741 EfiLibAllocateRuntimeZeroPool (
742 IN UINTN AllocationSize
748 Allocate EfiRuntimeServicesData pool of size AllocationSize and set memory to zero.
752 AllocationSize - Pool size
756 Pointer to the pool allocated
762 EfiLibAllocateCopyPool (
763 IN UINTN AllocationSize
,
770 Allocate BootServicesData pool and use a buffer provided by
775 AllocationSize - The size to allocate
777 Buffer - Buffer that will be filled into the buffer allocated
781 Pointer of the buffer allocated.
787 EfiLibAllocateRuntimeCopyPool (
788 IN UINTN AllocationSize
,
795 Allocate RuntimeServicesData pool and use a buffer provided by
800 AllocationSize - The size to allocate
802 Buffer - Buffer that will be filled into the buffer allocated
806 Pointer of the buffer allocated.
815 EfiLibCreateProtocolNotifyEvent (
816 IN EFI_GUID
*ProtocolGuid
,
817 IN EFI_TPL NotifyTpl
,
818 IN EFI_EVENT_NOTIFY NotifyFunction
,
819 IN VOID
*NotifyContext
,
820 OUT VOID
**Registration
826 Create a protocol notification event and return it.
830 ProtocolGuid - Protocol to register notification event on.
832 NotifyTpl - Maximum TPL to single the NotifyFunction.
834 NotifyFunction - EFI notification routine.
836 NotifyContext - Context passed into Event when it is created.
838 Registration - Registration key returned from RegisterProtocolNotify().
842 The EFI_EVENT that has been registered to be signaled when a ProtocolGuid
843 is added to the system.
849 EfiLibNamedEventSignal (
855 Signals a named event. All registered listeners will run.
856 The listeners should register using EfiLibNamedEventListen() function.
858 NOTE: For now, the named listening/signalling is implemented
859 on a protocol interface being installed and uninstalled.
860 In the future, this maybe implemented based on a dedicated mechanism.
863 Name - Name to perform the signaling on. The name is a GUID.
866 EFI_SUCCESS if successfull.
872 EfiLibNamedEventListen (
874 IN EFI_TPL NotifyTpl
,
875 IN EFI_EVENT_NOTIFY NotifyFunction
,
876 IN VOID
*NotifyContext
881 Listenes to signals on the name.
882 EfiLibNamedEventSignal() signals the event.
884 NOTE: For now, the named listening/signalling is implemented
885 on a protocol interface being installed and uninstalled.
886 In the future, this maybe implemented based on a dedicated mechanism.
889 Name - Name to register the listener on.
890 NotifyTpl - Maximum TPL to singnal the NotifyFunction.
891 NotifyFunction - The listener routine.
892 NotifyContext - Context passed into the listener routine.
895 EFI_SUCCESS if successful.
904 EfiLibLocateHandleProtocolByProtocols (
905 IN OUT EFI_HANDLE
* Handle
, OPTIONAL
906 OUT VOID
**Interface
, OPTIONAL
912 Function locates Protocol and/or Handle on which all Protocols specified
913 as a variable list are installed.
914 It supports continued search. The caller must assure that no handles are added
915 or removed while performing continued search, by e.g., rising the TPL and not
916 calling any handle routines. Otherwise the behavior is undefined.
920 Handle - The address of handle to receive the handle on which protocols
921 indicated by the variable list are installed.
922 If points to NULL, all handles are searched. If pointing to a
923 handle returned from previous call, searches starting from next handle.
924 If NULL, the parameter is ignored.
926 Interface - The address of a pointer to a protocol interface that will receive
927 the interface indicated by first variable argument.
928 If NULL, the parameter is ignored.
930 ... - A variable argument list containing protocol GUIDs. Must end with NULL.
934 EFI_SUCCESS - All the protocols where found on same handle.
935 EFI_NOT_FOUND - A Handle with all the protocols installed was not found.
936 Other values as may be returned from LocateHandleBuffer() or HandleProtocol().
952 Locate Debug Assert Protocol and set as mDebugAssert
966 // Unicode String Support
969 EfiLibLookupUnicodeString (
971 CHAR8
*SupportedLanguages
,
972 EFI_UNICODE_STRING_TABLE
*UnicodeStringTable
,
973 CHAR16
**UnicodeString
979 Translate a unicode string to a specified language if supported.
983 Language - The name of language to translate to
984 SupportedLanguages - Supported languages set
985 UnicodeStringTable - Pointer of one item in translation dictionary
986 UnicodeString - The translated string
990 EFI_INVALID_PARAMETER - Invalid parameter
991 EFI_UNSUPPORTED - System not supported this language or this string translation
992 EFI_SUCCESS - String successfully translated
998 EfiLibAddUnicodeString (
1000 CHAR8
*SupportedLanguages
,
1001 EFI_UNICODE_STRING_TABLE
**UnicodeStringTable
,
1002 CHAR16
*UnicodeString
1006 Routine Description:
1008 Add an translation to the dictionary if this language if supported.
1012 Language - The name of language to translate to
1013 SupportedLanguages - Supported languages set
1014 UnicodeStringTable - Translation dictionary
1015 UnicodeString - The corresponding string for the language to be translated to
1019 EFI_INVALID_PARAMETER - Invalid parameter
1020 EFI_UNSUPPORTED - System not supported this language
1021 EFI_ALREADY_STARTED - Already has a translation item of this language
1022 EFI_OUT_OF_RESOURCES - No enough buffer to be allocated
1023 EFI_SUCCESS - String successfully translated
1029 EfiLibFreeUnicodeStringTable (
1030 EFI_UNICODE_STRING_TABLE
*UnicodeStringTable
1034 Routine Description:
1036 Free a string table.
1040 UnicodeStringTable - The string table to be freed.
1044 EFI_SUCCESS - The table successfully freed.
1050 EfiLibReportStatusCode (
1051 IN EFI_STATUS_CODE_TYPE Type
,
1052 IN EFI_STATUS_CODE_VALUE Value
,
1054 IN EFI_GUID
*CallerId OPTIONAL
,
1055 IN EFI_STATUS_CODE_DATA
*Data OPTIONAL
1059 Routine Description:
1067 Instance - Instance number
1068 CallerId - Caller name
1069 DevicePath - Device path that to be reported
1075 EFI_OUT_OF_RESOURCES - No enough buffer could be allocated
1081 ReportStatusCodeWithDevicePath (
1082 IN EFI_STATUS_CODE_TYPE Type
,
1083 IN EFI_STATUS_CODE_VALUE Value
,
1085 IN EFI_GUID
* CallerId OPTIONAL
,
1086 IN EFI_DEVICE_PATH_PROTOCOL
* DevicePath
1090 Routine Description:
1092 Report device path through status code.
1098 Instance - Instance number
1099 CallerId - Caller name
1100 DevicePath - Device path that to be reported
1106 EFI_OUT_OF_RESOURCES - No enough buffer could be allocated
1113 EfiCreateEventLegacyBoot (
1114 IN EFI_TPL NotifyTpl
,
1115 IN EFI_EVENT_NOTIFY NotifyFunction
,
1116 IN VOID
*NotifyContext
,
1117 OUT EFI_EVENT
*LegacyBootEvent
1121 Routine Description:
1122 Create a Legacy Boot Event.
1123 Tiano extended the CreateEvent Type enum to add a legacy boot event type.
1124 This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was
1125 added and now it's possible to not voilate the UEFI specification by
1126 declaring a GUID for the legacy boot event class. This library supports
1127 the R8.5/EFI 1.10 form and R8.6/UEFI 2.0 form and allows common code to
1131 LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex)
1134 EFI_SUCCESS Event was created.
1135 Other Event was not created.
1142 EfiCreateEventReadyToBoot (
1143 IN EFI_TPL NotifyTpl
,
1144 IN EFI_EVENT_NOTIFY NotifyFunction
,
1145 IN VOID
*NotifyContext
,
1146 OUT EFI_EVENT
*ReadyToBootEvent
1150 Routine Description:
1151 Create a Read to Boot Event.
1153 Tiano extended the CreateEvent Type enum to add a ready to boot event type.
1154 This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was
1155 added and now it's possible to not voilate the UEFI specification and use
1156 the ready to boot event class defined in UEFI 2.0. This library supports
1157 the R8.5/EFI 1.10 form and R8.6/UEFI 2.0 form and allows common code to
1161 @param LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex)
1164 EFI_SUCCESS - Event was created.
1165 Other - Event was not created.
1172 EfiInitializeFwVolDevicepathNode (
1173 IN MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
*FvDevicePathNode
,
1174 IN EFI_GUID
*NameGuid
1177 Routine Description:
1178 Initialize a Firmware Volume (FV) Media Device Path node.
1181 FvDevicePathNode - Pointer to a FV device path node to initialize
1182 NameGuid - FV file name to use in FvDevicePathNode
1189 EfiGetNameGuidFromFwVolDevicePathNode (
1190 IN MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
*FvDevicePathNode
1193 Routine Description:
1194 Check to see if the Firmware Volume (FV) Media Device Path is valid.
1197 FvDevicePathNode - Pointer to FV device path to check
1200 NULL - FvDevicePathNode is not valid.
1201 Other - FvDevicePathNode is valid and pointer to NameGuid was returned.
1207 EfiLibSafeFreePool (
1212 Routine Description:
1218 Buffer - The allocated pool entry to free
1222 Pointer of the buffer allocated.
1228 EfiLibTestManagedDevice (
1229 IN EFI_HANDLE ControllerHandle
,
1230 IN EFI_HANDLE DriverBindingHandle
,
1231 IN EFI_GUID
*ManagedProtocolGuid
1235 Routine Description:
1237 Test to see if the controller is managed by a specific driver.
1241 ControllerHandle - Handle for controller to test
1243 DriverBindingHandle - Driver binding handle for controller
1245 ManagedProtocolGuid - The protocol guid the driver opens on controller
1249 EFI_SUCCESS - The controller is managed by the driver
1251 EFI_UNSUPPORTED - The controller is not managed by the driver
1257 EfiLibTestChildHandle (
1258 IN EFI_HANDLE ControllerHandle
,
1259 IN EFI_HANDLE ChildHandle
,
1260 IN EFI_GUID
*ConsumedGuid
1264 Routine Description:
1266 Test to see if the child handle is the child of the controller
1270 ControllerHandle - Handle for controller (parent)
1272 ChildHandle - Child handle to test
1274 ConsumsedGuid - Protocol guid consumed by child from controller
1278 EFI_SUCCESS - The child handle is the child of the controller
1280 EFI_UNSUPPORTED - The child handle is not the child of the controller