-/*++\r
+/** @file \r
\r
-Copyright (c) 2006, Intel Corporation \r
+ Support functions for managing protocol.\r
+\r
+Copyright (c) 2006 - 2008, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- hand.h\r
-\r
-Abstract:\r
-\r
- EFI internal protocol definitions\r
-\r
-\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
\r
#ifndef _HAND_H_\r
#define _HAND_H_\r
//\r
\r
\r
-PROTOCOL_ENTRY *\r
-CoreFindProtocolEntry (\r
- IN EFI_GUID *Protocol,\r
- IN BOOLEAN Create\r
- )\r
-/*++\r
-\r
-Routine Description:\r
\r
+/**\r
Finds the protocol entry for the requested protocol.\r
- \r
The gProtocolDatabaseLock must be owned\r
\r
-Arguments:\r
- \r
- Protocol - The ID of the protocol \r
+ @param Protocol The ID of the protocol \r
+ @param Create Create a new entry if not found \r
\r
- Create - Create a new entry if not found\r
+ @return Protocol entry\r
\r
-Returns:\r
+**/\r
+PROTOCOL_ENTRY *\r
+CoreFindProtocolEntry (\r
+ IN EFI_GUID *Protocol,\r
+ IN BOOLEAN Create\r
+ )\r
+;\r
\r
- Protocol entry\r
\r
---*/\r
-;\r
+/**\r
+ Signal event for every protocol in protocol entry.\r
\r
+ @param ProtEntry Protocol entry\r
+\r
+**/\r
VOID\r
CoreNotifyProtocolEntry (\r
IN PROTOCOL_ENTRY *ProtEntry\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Signal event for every protocol in protocol entry.\r
+;\r
\r
-Arguments:\r
\r
- ProtEntry - Protocol entry\r
+/**\r
+ Finds the protocol instance for the requested handle and protocol.\r
+ Note: This function doesn't do parameters checking, it's caller's responsibility\r
+ to pass in valid parameters.\r
\r
-Returns:\r
+ @param Handle The handle to search the protocol on \r
+ @param Protocol GUID of the protocol \r
+ @param Interface The interface for the protocol being searched \r
\r
---*/\r
-;\r
+ @return Protocol instance (NULL: Not found)\r
\r
+**/\r
PROTOCOL_INTERFACE *\r
CoreFindProtocolInterface (\r
IN IHANDLE *Handle,\r
IN EFI_GUID *Protocol,\r
IN VOID *Interface\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Finds the protocol instance for the requested handle and protocol.\r
- \r
- Note: This function doesn't do parameters checking, it's caller's responsibility \r
- to pass in valid parameters.\r
- \r
-Arguments:\r
- \r
- Handle - The handle to search the protocol on\r
- \r
- Protocol - GUID of the protocol\r
+;\r
\r
- Interface - The interface for the protocol being searched\r
\r
-Returns:\r
+/**\r
+ Removes Protocol from the protocol list (but not the handle list).\r
\r
- Protocol instance (NULL: Not found)\r
+ @param Handle The handle to remove protocol on. \r
+ @param Protocol GUID of the protocol to be moved \r
+ @param Interface The interface of the protocol \r
\r
---*/\r
-;\r
+ @return Protocol Entry\r
\r
+**/\r
PROTOCOL_INTERFACE *\r
CoreRemoveInterfaceFromProtocol (\r
IN IHANDLE *Handle,\r
IN EFI_GUID *Protocol,\r
IN VOID *Interface\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Removes Protocol from the protocol list (but not the handle list).\r
-\r
-Arguments:\r
-\r
- Handle - The handle to remove protocol on.\r
-\r
- Protocol - GUID of the protocol to be moved\r
+;\r
\r
- Interface - The interface of the protocol\r
\r
-Returns:\r
+/**\r
+ Removes all the events in the protocol database that match Event.\r
\r
- Protocol Entry\r
+ @param Event The event to search for in the protocol \r
+ database. \r
\r
---*/\r
-;\r
+ @return EFI_SUCCESS when done searching the entire database.\r
\r
+**/\r
EFI_STATUS\r
CoreUnregisterProtocolNotify (\r
IN EFI_EVENT Event\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Removes all the events in the protocol database that match Event.\r
+;\r
\r
-Arguments:\r
- \r
- Event - The event to search for in the protocol database.\r
\r
-Returns:\r
+/**\r
+ Attempts to disconnect all drivers that are using the protocol interface being queried.\r
+ If failed, reconnect all drivers disconnected.\r
+ Note: This function doesn't do parameters checking, it's caller's responsibility\r
+ to pass in valid parameters.\r
\r
- EFI_SUCCESS when done searching the entire database.\r
+ @param UserHandle The handle on which the protocol is installed \r
+ @param Prot The protocol to disconnect drivers from \r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS Drivers using the protocol interface are all \r
+ disconnected \r
+ @retval EFI_ACCESS_DENIED Failed to disconnect one or all of the drivers\r
\r
+**/\r
EFI_STATUS\r
CoreDisconnectControllersUsingProtocolInterface (\r
IN EFI_HANDLE UserHandle,\r
IN PROTOCOL_INTERFACE *Prot\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Attempts to disconnect all drivers that are using the protocol interface being queried.\r
- If failed, reconnect all drivers disconnected.\r
- \r
- Note: This function doesn't do parameters checking, it's caller's responsibility \r
- to pass in valid parameters.\r
-\r
-Arguments:\r
-\r
- UserHandle - The handle on which the protocol is installed \r
- Prot - The protocol to disconnect drivers from\r
-\r
-Returns:\r
+;\r
\r
- EFI_SUCCESS - Drivers using the protocol interface are all disconnected\r
- EFI_ACCESS_DENIED - Failed to disconnect one or all of the drivers\r
\r
---*/\r
-;\r
+/**\r
+ Acquire lock on gProtocolDatabaseLock.\r
\r
+**/\r
VOID\r
CoreAcquireProtocolLock (\r
VOID\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Acquire lock on gProtocolDatabaseLock.\r
- \r
-Arguments:\r
-\r
- None\r
- \r
-Returns:\r
+;\r
\r
- None\r
\r
---*/\r
-;\r
+/**\r
+ Release lock on gProtocolDatabaseLock.\r
\r
+**/\r
VOID\r
CoreReleaseProtocolLock (\r
VOID\r
)\r
-/*++\r
-\r
-Routine Description:\r
+;\r
\r
- Release lock on gProtocolDatabaseLock.\r
- \r
-Arguments:\r
\r
- None\r
- \r
-Returns:\r
+/**\r
+ Check whether a handle is a valid EFI_HANDLE\r
\r
- None\r
+ @param UserHandle The handle to check \r
\r
---*/\r
-;\r
+ @retval EFI_INVALID_PARAMETER The handle is NULL or not a valid EFI_HANDLE. \r
+ @retval EFI_SUCCESS The handle is valid EFI_HANDLE.\r
\r
+**/\r
EFI_STATUS\r
CoreValidateHandle (\r
IN EFI_HANDLE UserHandle\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Check whether a handle is a valid EFI_HANDLE\r
- \r
-Arguments:\r
-\r
- UserHandle - The handle to check\r
- \r
-Returns:\r
-\r
- EFI_INVALID_PARAMETER - The handle is NULL or not a valid EFI_HANDLE.\r
- \r
- EFI_SUCCESS - The handle is valid EFI_HANDLE.\r
-\r
---*/\r
;\r
\r
//\r