3 Copyright (c) 2004 - 2008, 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.
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)
52 CHAR16
*UnicodeString
;
53 } EFI_UNICODE_STRING_TABLE
;
54 #if (EFI_SPECIFICATION_VERSION >= 0x00020000)
55 #define LANGUAGE_RFC_3066
56 #define LANGUAGE_CODE_ENGLISH "en-US"
58 #define LANGUAGE_ISO_639_2
59 #define LANGUAGE_CODE_ENGLISH "eng"
63 // Macros for EFI Driver Library Functions that are really EFI Boot Services
65 #define EfiCopyMem(_Destination, _Source, _Length) gBS->CopyMem ((_Destination), (_Source), (_Length))
66 #define EfiSetMem(_Destination, _Length, _Value) gBS->SetMem ((_Destination), (_Length), (_Value))
67 #define EfiZeroMem(_Destination, _Length) gBS->SetMem ((_Destination), (_Length), 0)
70 // Driver Lib Globals.
72 extern EFI_BOOT_SERVICES
*gBS
;
73 extern EFI_DXE_SERVICES
*gDS
;
74 extern EFI_RUNTIME_SERVICES
*gRT
;
75 extern EFI_SYSTEM_TABLE
*gST
;
76 extern UINTN gErrorLevel
;
77 extern EFI_GUID gEfiCallerIdGuid
;
78 extern EFI_DEBUG_MASK_PROTOCOL
*gDebugMaskInterface
;
81 EfiInitializeDriverLib (
82 IN EFI_HANDLE ImageHandle
,
83 IN EFI_SYSTEM_TABLE
*SystemTable
89 Intialize Driver Lib if it has not yet been initialized.
93 ImageHandle - The firmware allocated handle for the EFI image.
95 SystemTable - A pointer to the EFI System Table.
100 EFI_STATUS always returns EFI_SUCCESS
106 DxeInitializeDriverLib (
107 IN EFI_HANDLE ImageHandle
,
108 IN EFI_SYSTEM_TABLE
*SystemTable
114 Intialize Driver Lib if it has not yet been initialized.
118 ImageHandle - The firmware allocated handle for the EFI image.
120 SystemTable - A pointer to the EFI System Table.
124 EFI_STATUS always returns EFI_SUCCESS
130 EfiLibInstallDriverBinding (
131 IN EFI_HANDLE ImageHandle
,
132 IN EFI_SYSTEM_TABLE
*SystemTable
,
133 IN EFI_DRIVER_BINDING_PROTOCOL
*DriverBinding
,
134 IN EFI_HANDLE DriverBindingHandle
140 Intialize a driver by installing the Driver Binding Protocol onto the
141 driver's DriverBindingHandle. This is typically the same as the driver's
142 ImageHandle, but it can be different if the driver produces multiple
143 DriverBinding Protocols. This function also initializes the EFI Driver
144 Library that initializes the global variables gST, gBS, gRT.
148 ImageHandle - The image handle of the driver
150 SystemTable - The EFI System Table that was passed to the driver's entry point
152 DriverBinding - A Driver Binding Protocol instance that this driver is producing
154 DriverBindingHandle - The handle that DriverBinding is to be installe onto. If this
155 parameter is NULL, then a new handle is created.
159 EFI_SUCCESS is DriverBinding is installed onto DriverBindingHandle
161 Otherwise, then return status from gBS->InstallProtocolInterface()
167 EfiLibInstallAllDriverProtocols (
168 IN EFI_HANDLE ImageHandle
,
169 IN EFI_SYSTEM_TABLE
*SystemTable
,
170 IN EFI_DRIVER_BINDING_PROTOCOL
*DriverBinding
,
171 IN EFI_HANDLE DriverBindingHandle
,
172 IN EFI_COMPONENT_NAME_PROTOCOL
*ComponentName
, OPTIONAL
173 IN EFI_DRIVER_CONFIGURATION_PROTOCOL
*DriverConfiguration
, OPTIONAL
174 IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL
*DriverDiagnostics OPTIONAL
180 Intialize a driver by installing the Driver Binding Protocol onto the
181 driver's DriverBindingHandle. This is typically the same as the driver's
182 ImageHandle, but it can be different if the driver produces multiple
183 DriverBinding Protocols. This function also initializes the EFI Driver
184 Library that initializes the global variables gST, gBS, gRT.
188 ImageHandle - The image handle of the driver
190 SystemTable - The EFI System Table that was passed to the driver's entry point
192 DriverBinding - A Driver Binding Protocol instance that this driver is producing
194 DriverBindingHandle - The handle that DriverBinding is to be installe onto. If this
195 parameter is NULL, then a new handle is created.
197 ComponentName - A Component Name Protocol instance that this driver is producing
199 DriverConfiguration - A Driver Configuration Protocol instance that this driver is producing
201 DriverDiagnostics - A Driver Diagnostics Protocol instance that this driver is producing
205 EFI_SUCCESS if all the protocols were installed onto DriverBindingHandle
207 Otherwise, then return status from gBS->InstallProtocolInterface()
213 EfiLibInstallAllDriverProtocols2 (
214 IN EFI_HANDLE ImageHandle
,
215 IN EFI_SYSTEM_TABLE
*SystemTable
,
216 IN EFI_DRIVER_BINDING_PROTOCOL
*DriverBinding
,
217 IN EFI_HANDLE DriverBindingHandle
,
218 IN EFI_COMPONENT_NAME2_PROTOCOL
*ComponentName2
, OPTIONAL
219 IN EFI_DRIVER_CONFIGURATION2_PROTOCOL
*DriverConfiguration2
, OPTIONAL
220 IN EFI_DRIVER_DIAGNOSTICS2_PROTOCOL
*DriverDiagnostics2 OPTIONAL
226 Intialize a driver by installing the Driver Binding Protocol onto the
227 driver's DriverBindingHandle. This is typically the same as the driver's
228 ImageHandle, but it can be different if the driver produces multiple
229 DriverBinding Protocols. This function also initializes the EFI Driver
230 Library that initializes the global variables gST, gBS, gRT.
234 ImageHandle - The image handle of the driver
236 SystemTable - The EFI System Table that was passed to the driver's entry point
238 DriverBinding - A Driver Binding Protocol instance that this driver is producing
240 DriverBindingHandle - The handle that DriverBinding is to be installe onto. If this
241 parameter is NULL, then a new handle is created.
243 ComponentName2 - A Component Name2 Protocol instance that this driver is producing
245 DriverConfiguration2- A Driver Configuration2 Protocol instance that this driver is producing
247 DriverDiagnostics2 - A Driver Diagnostics2 Protocol instance that this driver is producing
251 EFI_SUCCESS if all the protocols were installed onto DriverBindingHandle
253 Otherwise, then return status from gBS->InstallProtocolInterface()
259 EfiLibGetSystemConfigurationTable (
260 IN EFI_GUID
*TableGuid
,
267 Return the EFI 1.0 System Tabl entry with TableGuid
271 TableGuid - Name of entry to return in the system table
272 Table - Pointer in EFI system table associated with TableGuid
276 EFI_SUCCESS - Table returned;
277 EFI_NOT_FOUND - TableGuid not in EFI system table
283 EfiLibCompareLanguage (
291 Compare two languages to say whether they are identical.
295 Language1 - first language
296 Language2 - second language
301 FALSE - not identical
310 EfiIsDevicePathMultiInstance (
311 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
316 Return TRUE is this is a multi instance device path.
319 DevicePath - A pointer to a device path data structure.
323 TRUE - If DevicePath is multi instance.
324 FALSE - If DevicePath is not multi instance.
329 EFI_DEVICE_PATH_PROTOCOL
*
330 EfiDevicePathInstance (
331 IN OUT EFI_DEVICE_PATH_PROTOCOL
**DevicePath
,
337 Function retrieves the next device path instance from a device path data structure.
340 DevicePath - A pointer to a device path data structure.
342 Size - A pointer to the size of a device path instance in bytes.
346 This function returns a pointer to the current device path instance.
347 In addition, it returns the size in bytes of the current device path instance in Size,
348 and a pointer to the next device path instance in DevicePath.
349 If there are no more device path instances in DevicePath, then DevicePath will be set to NULL.
356 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
362 Calculate the size of a whole device path.
366 DevPath - The pointer to the device path data.
370 Size of device path data structure..
375 EFI_DEVICE_PATH_PROTOCOL
*
376 EfiAppendDevicePath (
377 IN EFI_DEVICE_PATH_PROTOCOL
*Src1
,
378 IN EFI_DEVICE_PATH_PROTOCOL
*Src2
383 Function is used to append a Src1 and Src2 together.
386 Src1 - A pointer to a device path data structure.
388 Src2 - A pointer to a device path data structure.
392 A pointer to the new device path is returned.
393 NULL is returned if space for the new device path could not be allocated from pool.
394 It is up to the caller to free the memory used by Src1 and Src2 if they are no longer needed.
399 EFI_DEVICE_PATH_PROTOCOL
*
400 EfiDevicePathFromHandle (
407 Locate device path protocol interface on a device handle.
411 Handle - The device handle
415 Device path protocol interface located.
420 EFI_DEVICE_PATH_PROTOCOL
*
421 EfiDuplicateDevicePath (
422 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath
427 Duplicate a new device path data structure from the old one.
430 DevPath - A pointer to a device path data structure.
433 A pointer to the new allocated device path data.
434 Caller must free the memory used by DevicePath if it is no longer needed.
439 EFI_DEVICE_PATH_PROTOCOL
*
440 EfiAppendDevicePathNode (
441 IN EFI_DEVICE_PATH_PROTOCOL
*Src1
,
442 IN EFI_DEVICE_PATH_PROTOCOL
*Src2
447 Function is used to append a device path node to the end of another device path.
450 Src1 - A pointer to a device path data structure.
452 Src2 - A pointer to a device path data structure.
455 This function returns a pointer to the new device path.
456 If there is not enough temporary pool memory available to complete this function,
457 then NULL is returned.
463 EFI_DEVICE_PATH_PROTOCOL
*
465 IN EFI_HANDLE Device OPTIONAL
,
471 Create a device path that appends a MEDIA_DEVICE_PATH with
472 FileNameGuid to the device path of DeviceHandle.
475 Device - Optional Device Handle to use as Root of the Device Path
480 EFI_DEVICE_PATH_PROTOCOL that was allocated from dynamic memory
486 EFI_DEVICE_PATH_PROTOCOL
*
487 EfiAppendDevicePathInstance (
488 IN EFI_DEVICE_PATH_PROTOCOL
*Src
,
489 IN EFI_DEVICE_PATH_PROTOCOL
*Instance
495 Append a device path instance to another.
499 Src - The device path instance to be appended with.
500 Instance - The device path instance appending the other.
504 The contaction of these two.
520 IN OUT EFI_LOCK
*Lock
,
527 Initialize a basic mutual exclusion lock. Each lock
528 provides mutual exclusion access at it's task priority
529 level. Since there is no-premption (at any TPL) or
530 multiprocessor support, acquiring the lock only consists
531 of raising to the locks TPL.
533 Note on a check build ASSERT()s are used to ensure proper
538 Lock - The EFI_LOCK structure to initialize
540 Priority - The task priority level of the lock
545 An initialized Efi Lock structure.
551 // Macro to initialize the state of a lock when a lock variable is declared
553 #define EFI_INITIALIZE_LOCK_VARIABLE(Tpl) {Tpl,0,0}
563 Raising to the task priority level of the mutual exclusion
564 lock, and then acquires ownership of the lock.
568 Lock - The lock to acquire
578 EfiAcquireLockOrFail (
585 Initialize a basic mutual exclusion lock. Each lock
586 provides mutual exclusion access at it's task priority
587 level. Since there is no-premption (at any TPL) or
588 multiprocessor support, acquiring the lock only consists
589 of raising to the locks TPL.
593 Lock - The EFI_LOCK structure to initialize
597 EFI_SUCCESS - Lock Owned.
598 EFI_ACCESS_DENIED - Reentrant Lock Acquisition, Lock not Owned.
611 Releases ownership of the mutual exclusion lock, and
612 restores the previous task priority level.
616 Lock - The lock to release
627 IN UINTN AllocationSize
633 Allocate EfiBootServicesData pool of size AllocationSize
637 AllocationSize - Pool size
641 Pointer to the pool allocated
647 EfiLibAllocateRuntimePool (
648 IN UINTN AllocationSize
654 Allocate EfiRuntimeServicesData pool of size AllocationSize
658 AllocationSize - Pool size
662 Pointer to the pool allocated
668 EfiLibAllocateZeroPool (
669 IN UINTN AllocationSize
675 Allocate EfiBootServicesData pool of size AllocationSize and set memory to zero.
679 AllocationSize - Pool size
683 Pointer to the pool allocated
689 EfiLibAllocateRuntimeZeroPool (
690 IN UINTN AllocationSize
696 Allocate EfiRuntimeServicesData pool of size AllocationSize and set memory to zero.
700 AllocationSize - Pool size
704 Pointer to the pool allocated
710 EfiLibAllocateCopyPool (
711 IN UINTN AllocationSize
,
718 Allocate BootServicesData pool and use a buffer provided by
723 AllocationSize - The size to allocate
725 Buffer - Buffer that will be filled into the buffer allocated
729 Pointer of the buffer allocated.
735 EfiLibAllocateRuntimeCopyPool (
736 IN UINTN AllocationSize
,
743 Allocate RuntimeServicesData pool and use a buffer provided by
748 AllocationSize - The size to allocate
750 Buffer - Buffer that will be filled into the buffer allocated
754 Pointer of the buffer allocated.
763 EfiLibCreateProtocolNotifyEvent (
764 IN EFI_GUID
*ProtocolGuid
,
765 IN EFI_TPL NotifyTpl
,
766 IN EFI_EVENT_NOTIFY NotifyFunction
,
767 IN VOID
*NotifyContext
,
768 OUT VOID
**Registration
774 Create a protocol notification event and return it.
778 ProtocolGuid - Protocol to register notification event on.
780 NotifyTpl - Maximum TPL to single the NotifyFunction.
782 NotifyFunction - EFI notification routine.
784 NotifyContext - Context passed into Event when it is created.
786 Registration - Registration key returned from RegisterProtocolNotify().
790 The EFI_EVENT that has been registered to be signaled when a ProtocolGuid
791 is added to the system.
797 EfiLibNamedEventSignal (
803 Signals a named event. All registered listeners will run.
804 The listeners should register using EfiLibNamedEventListen() function.
806 NOTE: For now, the named listening/signalling is implemented
807 on a protocol interface being installed and uninstalled.
808 In the future, this maybe implemented based on a dedicated mechanism.
811 Name - Name to perform the signaling on. The name is a GUID.
814 EFI_SUCCESS if successfull.
820 EfiLibNamedEventListen (
822 IN EFI_TPL NotifyTpl
,
823 IN EFI_EVENT_NOTIFY NotifyFunction
,
824 IN VOID
*NotifyContext
829 Listenes to signals on the name.
830 EfiLibNamedEventSignal() signals the event.
832 NOTE: For now, the named listening/signalling is implemented
833 on a protocol interface being installed and uninstalled.
834 In the future, this maybe implemented based on a dedicated mechanism.
837 Name - Name to register the listener on.
838 NotifyTpl - Maximum TPL to singnal the NotifyFunction.
839 NotifyFunction - The listener routine.
840 NotifyContext - Context passed into the listener routine.
843 EFI_SUCCESS if successful.
852 EfiLibLocateHandleProtocolByProtocols (
853 IN OUT EFI_HANDLE
* Handle
, OPTIONAL
854 OUT VOID
**Interface
, OPTIONAL
860 Function locates Protocol and/or Handle on which all Protocols specified
861 as a variable list are installed.
862 It supports continued search. The caller must assure that no handles are added
863 or removed while performing continued search, by e.g., rising the TPL and not
864 calling any handle routines. Otherwise the behavior is undefined.
868 Handle - The address of handle to receive the handle on which protocols
869 indicated by the variable list are installed.
870 If points to NULL, all handles are searched. If pointing to a
871 handle returned from previous call, searches starting from next handle.
872 If NULL, the parameter is ignored.
874 Interface - The address of a pointer to a protocol interface that will receive
875 the interface indicated by first variable argument.
876 If NULL, the parameter is ignored.
878 ... - A variable argument list containing protocol GUIDs. Must end with NULL.
882 EFI_SUCCESS - All the protocols where found on same handle.
883 EFI_NOT_FOUND - A Handle with all the protocols installed was not found.
884 Other values as may be returned from LocateHandleBuffer() or HandleProtocol().
900 Locate Debug Assert Protocol and set as mDebugAssert
914 // Unicode String Support
917 EfiLibLookupUnicodeString (
919 CHAR8
*SupportedLanguages
,
920 EFI_UNICODE_STRING_TABLE
*UnicodeStringTable
,
921 CHAR16
**UnicodeString
927 Translate a unicode string to a specified language if supported.
931 Language - The name of language to translate to
932 SupportedLanguages - Supported languages set
933 UnicodeStringTable - Pointer of one item in translation dictionary
934 UnicodeString - The translated string
938 EFI_INVALID_PARAMETER - Invalid parameter
939 EFI_UNSUPPORTED - System not supported this language or this string translation
940 EFI_SUCCESS - String successfully translated
946 EfiLibAddUnicodeString (
948 CHAR8
*SupportedLanguages
,
949 EFI_UNICODE_STRING_TABLE
**UnicodeStringTable
,
950 CHAR16
*UnicodeString
956 Add an translation to the dictionary if this language if supported.
960 Language - The name of language to translate to
961 SupportedLanguages - Supported languages set
962 UnicodeStringTable - Translation dictionary
963 UnicodeString - The corresponding string for the language to be translated to
967 EFI_INVALID_PARAMETER - Invalid parameter
968 EFI_UNSUPPORTED - System not supported this language
969 EFI_ALREADY_STARTED - Already has a translation item of this language
970 EFI_OUT_OF_RESOURCES - No enough buffer to be allocated
971 EFI_SUCCESS - String successfully translated
977 EfiLibFreeUnicodeStringTable (
978 EFI_UNICODE_STRING_TABLE
*UnicodeStringTable
988 UnicodeStringTable - The string table to be freed.
992 EFI_SUCCESS - The table successfully freed.
998 EfiLibReportStatusCode (
999 IN EFI_STATUS_CODE_TYPE Type
,
1000 IN EFI_STATUS_CODE_VALUE Value
,
1002 IN EFI_GUID
*CallerId OPTIONAL
,
1003 IN EFI_STATUS_CODE_DATA
*Data OPTIONAL
1007 Routine Description:
1015 Instance - Instance number
1016 CallerId - Caller name
1017 DevicePath - Device path that to be reported
1023 EFI_OUT_OF_RESOURCES - No enough buffer could be allocated
1029 ReportStatusCodeWithDevicePath (
1030 IN EFI_STATUS_CODE_TYPE Type
,
1031 IN EFI_STATUS_CODE_VALUE Value
,
1033 IN EFI_GUID
* CallerId OPTIONAL
,
1034 IN EFI_DEVICE_PATH_PROTOCOL
* DevicePath
1038 Routine Description:
1040 Report device path through status code.
1046 Instance - Instance number
1047 CallerId - Caller name
1048 DevicePath - Device path that to be reported
1054 EFI_OUT_OF_RESOURCES - No enough buffer could be allocated
1061 EfiCreateEventLegacyBoot (
1062 IN EFI_TPL NotifyTpl
,
1063 IN EFI_EVENT_NOTIFY NotifyFunction
,
1064 IN VOID
*NotifyContext
,
1065 OUT EFI_EVENT
*LegacyBootEvent
1069 Routine Description:
1070 Create a Legacy Boot Event.
1071 Tiano extended the CreateEvent Type enum to add a legacy boot event type.
1072 This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was
1073 added and now it's possible to not voilate the UEFI specification by
1074 declaring a GUID for the legacy boot event class. This library supports
1075 the R8.5/EFI 1.10 form and R8.6/UEFI 2.0 form and allows common code to
1079 LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex)
1082 EFI_SUCCESS Event was created.
1083 Other Event was not created.
1090 EfiCreateEventReadyToBoot (
1091 IN EFI_TPL NotifyTpl
,
1092 IN EFI_EVENT_NOTIFY NotifyFunction
,
1093 IN VOID
*NotifyContext
,
1094 OUT EFI_EVENT
*ReadyToBootEvent
1098 Routine Description:
1099 Create a Read to Boot Event.
1101 Tiano extended the CreateEvent Type enum to add a ready to boot event type.
1102 This was bad as Tiano did not own the enum. In UEFI 2.0 CreateEventEx was
1103 added and now it's possible to not voilate the UEFI specification and use
1104 the ready to boot event class defined in UEFI 2.0. This library supports
1105 the R8.5/EFI 1.10 form and R8.6/UEFI 2.0 form and allows common code to
1109 @param LegacyBootEvent Returns the EFI event returned from gBS->CreateEvent(Ex)
1112 EFI_SUCCESS - Event was created.
1113 Other - Event was not created.
1120 EfiInitializeFwVolDevicepathNode (
1121 IN MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
*FvDevicePathNode
,
1122 IN EFI_GUID
*NameGuid
1125 Routine Description:
1126 Initialize a Firmware Volume (FV) Media Device Path node.
1128 Tiano extended the EFI 1.10 device path nodes. Tiano does not own this enum
1129 so as we move to UEFI 2.0 support we must use a mechanism that conforms with
1130 the UEFI 2.0 specification to define the FV device path. An UEFI GUIDed
1131 device path is defined for PIWG extensions of device path. If the code
1132 is compiled to conform with the UEFI 2.0 specification use the new device path
1133 else use the old form for backwards compatability.
1136 FvDevicePathNode - Pointer to a FV device path node to initialize
1137 NameGuid - FV file name to use in FvDevicePathNode
1144 EfiGetNameGuidFromFwVolDevicePathNode (
1145 IN MEDIA_FW_VOL_FILEPATH_DEVICE_PATH
*FvDevicePathNode
1148 Routine Description:
1149 Check to see if the Firmware Volume (FV) Media Device Path is valid.
1151 Tiano extended the EFI 1.10 device path nodes. Tiano does not own this enum
1152 so as we move to UEFI 2.0 support we must use a mechanism that conforms with
1153 the UEFI 2.0 specification to define the FV device path. An UEFI GUIDed
1154 device path is defined for PIWG extensions of device path. If the code
1155 is compiled to conform with the UEFI 2.0 specification use the new device path
1156 else use the old form for backwards compatability. The return value to this
1157 function points to a location in FvDevicePathNode and it does not allocate
1158 new memory for the GUID pointer that is returned.
1161 FvDevicePathNode - Pointer to FV device path to check
1164 NULL - FvDevicePathNode is not valid.
1165 Other - FvDevicePathNode is valid and pointer to NameGuid was returned.
1171 EfiLibSafeFreePool (
1176 Routine Description:
1182 Buffer - The allocated pool entry to free
1186 Pointer of the buffer allocated.
1192 EfiLibTestManagedDevice (
1193 IN EFI_HANDLE ControllerHandle
,
1194 IN EFI_HANDLE DriverBindingHandle
,
1195 IN EFI_GUID
*ManagedProtocolGuid
1199 Routine Description:
1201 Test to see if the controller is managed by a specific driver.
1205 ControllerHandle - Handle for controller to test
1207 DriverBindingHandle - Driver binding handle for controller
1209 ManagedProtocolGuid - The protocol guid the driver opens on controller
1213 EFI_SUCCESS - The controller is managed by the driver
1215 EFI_UNSUPPORTED - The controller is not managed by the driver
1221 EfiLibTestChildHandle (
1222 IN EFI_HANDLE ControllerHandle
,
1223 IN EFI_HANDLE ChildHandle
,
1224 IN EFI_GUID
*ConsumedGuid
1228 Routine Description:
1230 Test to see if the child handle is the child of the controller
1234 ControllerHandle - Handle for controller (parent)
1236 ChildHandle - Child handle to test
1238 ConsumsedGuid - Protocol guid consumed by child from controller
1242 EFI_SUCCESS - The child handle is the child of the controller
1244 EFI_UNSUPPORTED - The child handle is not the child of the controller