summaryrefslogtreecommitdiff
path: root/MdePkg/Include
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-18 11:15:26 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-18 11:15:26 +0000
commitca21f1a216d218fb3ff61940ce9a5605984350a1 (patch)
treec5f1addaa215a901152452ec299453c2b48d9ca1 /MdePkg/Include
parent76dbeb3b910133575ad03583f79dcd9443af06f5 (diff)
downloadedk2-platforms-ca21f1a216d218fb3ff61940ce9a5605984350a1.tar.xz
Add two useful functions in UefiLib for the implementation of Component Name, Driver Config, and Driver Diag protocols.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2267 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include')
-rw-r--r--MdePkg/Include/Library/UefiLib.h59
1 files changed, 58 insertions, 1 deletions
diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h
index 9eed35ba16..1f0b52b061 100644
--- a/MdePkg/Include/Library/UefiLib.h
+++ b/MdePkg/Include/Library/UefiLib.h
@@ -1,7 +1,7 @@
/** @file
MDE UEFI library functions and macros
- Copyright (c) 2006, Intel Corporation
+ Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -233,6 +233,63 @@ EfiReleaseLock (
IN EFI_LOCK *Lock
);
+/**
+ Tests whether a controller is managed by a specific driver.
+
+ This function tests whether a specific driver manages ControllerHandle by
+ opening on DriverBindingHandle a protocol specified by ProtocolGuid with
+ attribute EFI_OPEN_PROTOCOL_BY_DRIVER. This library function is used to
+ implement the Component Name Protocol for EFI Drivers.
+ If ProtocolGuid is NULL, then ASSERT().
+
+ @param ControllerHandle A handle for a controller to test.
+ @param DriverBindingHandle Specifies the driver binding handle for the
+ driver.
+ @param ProtocolGuid Supplies GUID for the protocol opened by the
+ driver on the controller.
+
+ @retval EFI_SUCCESS ControllerHandle is managed by the specific
+ driver.
+ @retval EFI_UNSUPPORTED ControllerHandle is not managed by the specific
+ driver.
+
+**/
+EFI_STATUS
+EFIAPI
+EfiTestManagedDevice (
+ IN CONST EFI_HANDLE ControllerHandle,
+ IN CONST EFI_HANDLE DriverBindingHandle,
+ IN CONST EFI_GUID *ProtocolGuid
+ );
+
+/**
+ Tests whether a child handle is a children device of the controller.
+
+ This function tests whether ChildHandle is one of the children of
+ ControllerHandle which are consuming a protocol specified by ProtocolGuid
+ with the attribute bit EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER set. This
+ library function is used to implement the Component Name Protocol for EFI
+ Drivers.
+ If ProtocolGuid is NULL, then ASSERT().
+
+ @param ControllerHandle A handle for a (parent) controller to test.
+ @param ChildHandle A child handle to test.
+ @param ConsumsedGuid Supplies GUID for the protocol consumed by
+ children from controller.
+
+ @retval EFI_SUCCESS ChildHandle is a child of the ControllerHandle.
+ @retval EFI_UNSUPPORTED ChildHandle is not a child of the
+ ControllerHandle.
+
+**/
+EFI_STATUS
+EFIAPI
+EfiTestChildHandle (
+ IN CONST EFI_HANDLE ControllerHandle,
+ IN CONST EFI_HANDLE ChildHandle,
+ IN CONST EFI_GUID *ProtocolGuid
+ );
+
/**
This function looks up a Unicode string in UnicodeStringTable. If Language is
a member of SupportedLanguages and a Unicode string is found in UnicodeStringTable