Add doxygen style comments for functions in DxeMain.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5189 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8
2008-05-09 07:08:30 +00:00
parent dc2e539a34
commit 162ed59443
38 changed files with 6088 additions and 7797 deletions

View File

@@ -17,7 +17,28 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
// Driver Support Function Prototypes
//
//
/**
Connects a controller to a driver.
@param ControllerHandle Handle of the controller to be
connected.
@param ContextDriverImageHandles DriverImageHandle A pointer to an
ordered list of driver image
handles.
@param RemainingDevicePath RemainingDevicePath A pointer to
the device path that specifies a
child of the controller
specified by ControllerHandle.
@retval EFI_SUCCESS One or more drivers were
connected to ControllerHandle.
@retval EFI_OUT_OF_RESOURCES No enough system resources to
complete the request.
@retval EFI_NOT_FOUND No drivers were connected to
ControllerHandle.
**/
EFI_STATUS
CoreConnectSingleController (
IN EFI_HANDLE ControllerHandle,
@@ -28,6 +49,25 @@ CoreConnectSingleController (
//
// Driver Support Functions
//
/**
Connects one or more drivers to a controller.
@param ControllerHandle Handle of the controller to be
connected.
@param DriverImageHandle DriverImageHandle A pointer to an
ordered list of driver image
handles.
@param RemainingDevicePath RemainingDevicePath A pointer to
the device path that specifies a
child of the controller specified
by ControllerHandle.
@param Recursive Whether the function would be
called recursively or not.
@return Status code.
**/
EFI_STATUS
EFIAPI
CoreConnectController (
@@ -36,28 +76,6 @@ CoreConnectController (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL,
IN BOOLEAN Recursive
)
/*++
Routine Description:
Connects one or more drivers to a controller.
Arguments:
ControllerHandle - Handle of the controller to be connected.
DriverImageHandle - DriverImageHandle A pointer to an ordered list of driver image handles.
RemainingDevicePath - RemainingDevicePath A pointer to the device path that specifies a child of the
controller specified by ControllerHandle.
Recursive - Whether the function would be called recursively or not.
Returns:
Status code.
--*/
{
EFI_STATUS Status;
EFI_STATUS ReturnStatus;
@@ -195,6 +213,26 @@ Returns:
return ReturnStatus;
}
/**
Add Driver Binding Protocols from Context Driver Image Handles to sorted
Driver Binding Protocol list.
@param DriverBindingHandle Handle of the driver binding
protocol.
@param NumberOfSortedDriverBindingProtocols Number Of sorted driver binding
protocols
@param SortedDriverBindingProtocols The sorted protocol list.
@param DriverBindingHandleCount Driver Binding Handle Count.
@param DriverBindingHandleBuffer The buffer of driver binding
protocol to be modified.
@param IsImageHandle Indicate whether
DriverBindingHandle is an image
handle
@return None.
**/
VOID
AddSortedDriverBindingProtocol (
IN EFI_HANDLE DriverBindingHandle,
@@ -204,32 +242,6 @@ AddSortedDriverBindingProtocol (
IN OUT EFI_HANDLE *DriverBindingHandleBuffer,
IN BOOLEAN IsImageHandle
)
/*++
Routine Description:
Add Driver Binding Protocols from Context Driver Image Handles to sorted
Driver Binding Protocol list.
Arguments:
DriverBindingHandle - Handle of the driver binding protocol.
NumberOfSortedDriverBindingProtocols - Number Of sorted driver binding protocols
SortedDriverBindingProtocols - The sorted protocol list.
DriverBindingHandleCount - Driver Binding Handle Count.
DriverBindingHandleBuffer - The buffer of driver binding protocol to be modified.
IsImageHandle - Indicate whether DriverBindingHandle is an image handle
Returns:
None.
--*/
{
EFI_STATUS Status;
EFI_DRIVER_BINDING_PROTOCOL *DriverBinding;
@@ -324,32 +336,34 @@ Returns:
}
}
/**
Connects a controller to a driver.
@param ControllerHandle Handle of the controller to be
connected.
@param ContextDriverImageHandles DriverImageHandle A pointer to an
ordered list of driver image
handles.
@param RemainingDevicePath RemainingDevicePath A pointer to
the device path that specifies a
child of the controller
specified by ControllerHandle.
@retval EFI_SUCCESS One or more drivers were
connected to ControllerHandle.
@retval EFI_OUT_OF_RESOURCES No enough system resources to
complete the request.
@retval EFI_NOT_FOUND No drivers were connected to
ControllerHandle.
**/
EFI_STATUS
CoreConnectSingleController (
IN EFI_HANDLE ControllerHandle,
IN EFI_HANDLE *ContextDriverImageHandles OPTIONAL,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
)
/*++
Routine Description:
Connects a controller to a driver.
Arguments:
ControllerHandle - Handle of the controller to be connected.
ContextDriverImageHandles - DriverImageHandle A pointer to an ordered list of driver image handles.
RemainingDevicePath - RemainingDevicePath A pointer to the device path that specifies a child
of the controller specified by ControllerHandle.
Returns:
EFI_SUCCESS - One or more drivers were connected to ControllerHandle.
EFI_OUT_OF_RESOURCES - No enough system resources to complete the request.
EFI_NOT_FOUND - No drivers were connected to ControllerHandle.
--*/
{
EFI_STATUS Status;
UINTN Index;
@@ -610,6 +624,40 @@ Returns:
}
/**
Disonnects a controller from a driver
@param ControllerHandle ControllerHandle The handle of
the controller from which
driver(s) are to be
disconnected.
@param DriverImageHandle DriverImageHandle The driver to
disconnect from ControllerHandle.
@param ChildHandle ChildHandle The handle of the
child to destroy.
@retval EFI_SUCCESS One or more drivers were
disconnected from the controller.
@retval EFI_SUCCESS On entry, no drivers are managing
ControllerHandle.
@retval EFI_SUCCESS DriverImageHandle is not NULL,
and on entry DriverImageHandle is
not managing ControllerHandle.
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid
EFI_HANDLE.
@retval EFI_INVALID_PARAMETER DriverImageHandle is not NULL,
and it is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL, and it
is not a valid EFI_HANDLE.
@retval EFI_OUT_OF_RESOURCES There are not enough resources
available to disconnect any
drivers from ControllerHandle.
@retval EFI_DEVICE_ERROR The controller could not be
disconnected because of a device
error.
**/
EFI_STATUS
EFIAPI
CoreDisconnectController (
@@ -617,31 +665,6 @@ CoreDisconnectController (
IN EFI_HANDLE DriverImageHandle OPTIONAL,
IN EFI_HANDLE ChildHandle OPTIONAL
)
/*++
Routine Description:
Disonnects a controller from a driver
Arguments:
ControllerHandle - ControllerHandle The handle of the controller from which driver(s)
are to be disconnected.
DriverImageHandle - DriverImageHandle The driver to disconnect from ControllerHandle.
ChildHandle - ChildHandle The handle of the child to destroy.
Returns:
EFI_SUCCESS - One or more drivers were disconnected from the controller.
EFI_SUCCESS - On entry, no drivers are managing ControllerHandle.
EFI_SUCCESS - DriverImageHandle is not NULL, and on entry DriverImageHandle is not managing ControllerHandle.
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETER - DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETER - ChildHandle is not NULL, and it is not a valid EFI_HANDLE.
EFI_OUT_OF_RESOURCES - There are not enough resources available to disconnect any drivers from ControllerHandle.
EFI_DEVICE_ERROR - The controller could not be disconnected because of a device error.
--*/
{
EFI_STATUS Status;
IHANDLE *Handle;

View File

@@ -15,23 +15,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <DxeMain.h>
/**
Signal event for every protocol in protocol entry.
@param ProtEntry Protocol entry
**/
VOID
CoreNotifyProtocolEntry (
IN PROTOCOL_ENTRY *ProtEntry
)
/*++
Routine Description:
Signal event for every protocol in protocol entry.
Arguments:
ProtEntry - Protocol entry
Returns:
--*/
{
PROTOCOL_NOTIFY *ProtNotify;
LIST_ENTRY *Link;
@@ -45,31 +39,23 @@ Returns:
}
/**
Removes Protocol from the protocol list (but not the handle list).
@param Handle The handle to remove protocol on.
@param Protocol GUID of the protocol to be moved
@param Interface The interface of the protocol
@return Protocol Entry
**/
PROTOCOL_INTERFACE *
CoreRemoveInterfaceFromProtocol (
IN IHANDLE *Handle,
IN EFI_GUID *Protocol,
IN VOID *Interface
)
/*++
Routine Description:
Removes Protocol from the protocol list (but not the handle list).
Arguments:
Handle - The handle to remove protocol on.
Protocol - GUID of the protocol to be moved
Interface - The interface of the protocol
Returns:
Protocol Entry
--*/
{
PROTOCOL_INTERFACE *Prot;
PROTOCOL_NOTIFY *ProtNotify;
@@ -107,6 +93,20 @@ Returns:
/**
Add a new protocol notification record for the request protocol.
@param Protocol The requested protocol to add the notify
registration
@param Event The event to signal
@param Registration Returns the registration record
@retval EFI_INVALID_PARAMETER Invalid parameter
@retval EFI_SUCCESS Successfully returned the registration record
that has been added
**/
EFI_STATUS
EFIAPI
CoreRegisterProtocolNotify (
@@ -114,28 +114,6 @@ CoreRegisterProtocolNotify (
IN EFI_EVENT Event,
OUT VOID **Registration
)
/*++
Routine Description:
Add a new protocol notification record for the request protocol.
Arguments:
Protocol - The requested protocol to add the notify registration
Event - The event to signal
Registration - Returns the registration record
Returns:
EFI_INVALID_PARAMETER - Invalid parameter
EFI_SUCCESS - Successfully returned the registration record that has been added
--*/
{
PROTOCOL_ENTRY *ProtEntry;
PROTOCOL_NOTIFY *ProtNotify;
@@ -194,6 +172,21 @@ Returns:
/**
Reinstall a protocol interface on a device handle. The OldInterface for Protocol is replaced by the NewInterface.
@param UserHandle Handle on which the interface is to be
reinstalled
@param Protocol The numeric ID of the interface
@param OldInterface A pointer to the old interface
@param NewInterface A pointer to the new interface
@retval EFI_SUCCESS The protocol interface was installed
@retval EFI_NOT_FOUND The OldInterface on the handle was not found
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value
**/
EFI_STATUS
EFIAPI
CoreReinstallProtocolInterface (
@@ -202,29 +195,6 @@ CoreReinstallProtocolInterface (
IN VOID *OldInterface,
IN VOID *NewInterface
)
/*++
Routine Description:
Reinstall a protocol interface on a device handle. The OldInterface for Protocol is replaced by the NewInterface.
Arguments:
UserHandle - Handle on which the interface is to be reinstalled
Protocol - The numeric ID of the interface
OldInterface - A pointer to the old interface
NewInterface - A pointer to the new interface
Returns:
Status code.
On EFI_SUCCESS The protocol interface was installed
On EFI_NOT_FOUND The OldInterface on the handle was not found
On EFI_INVALID_PARAMETER One of the parameters has an invalid value
--*/
{
EFI_STATUS Status;
IHANDLE *Handle;

File diff suppressed because it is too large Load Diff

View File

@@ -38,6 +38,18 @@ IHANDLE *
OUT VOID **Interface
);
/**
Routine to get the next Handle, when you are searching for all handles.
@param Position Information about which Handle to seach for.
@param Interface Return the interface structure for the matching
protocol.
@retval IHANDLE An IHANDLE is returned if the next Position is
not the end of the list. A NULL_HANDLE is
returned if it's the end of the list.
**/
STATIC
IHANDLE *
CoreGetNextLocateAllHandles (
@@ -45,6 +57,19 @@ CoreGetNextLocateAllHandles (
OUT VOID **Interface
);
/**
Routine to get the next Handle, when you are searching for register protocol
notifies.
@param Position Information about which Handle to seach for.
@param Interface Return the interface structure for the matching
protocol.
@retval IHANDLE An IHANDLE is returned if the next Position is
not the end of the list. A NULL_HANDLE is
returned if it's the end of the list.
**/
STATIC
IHANDLE *
CoreGetNextLocateByRegisterNotify (
@@ -52,6 +77,18 @@ CoreGetNextLocateByRegisterNotify (
OUT VOID **Interface
);
/**
Routine to get the next Handle, when you are searching for a given protocol.
@param Position Information about which Handle to seach for.
@param Interface Return the interface structure for the matching
protocol.
@retval IHANDLE An IHANDLE is returned if the next Position is
not the end of the list. A NULL_HANDLE is
returned if it's the end of the list.
**/
STATIC
IHANDLE *
CoreGetNextLocateByProtocol (
@@ -59,13 +96,25 @@ CoreGetNextLocateByProtocol (
OUT VOID **Interface
);
//
//
//
/**
Locates the requested handle(s) and returns them in Buffer.
@param SearchType The type of search to perform to locate the
handles
@param Protocol The protocol to search for
@param SearchKey Dependant on SearchType
@param BufferSize On input the size of Buffer. On output the
size of data returned.
@param Buffer The buffer to return the results in
@retval EFI_BUFFER_TOO_SMALL Buffer too small, required buffer size is
returned in BufferSize.
@retval EFI_INVALID_PARAMETER Invalid parameter
@retval EFI_SUCCESS Successfully found the requested handle(s) and
returns them in Buffer.
**/
EFI_STATUS
EFIAPI
CoreLocateHandle (
@@ -75,35 +124,6 @@ CoreLocateHandle (
IN OUT UINTN *BufferSize,
OUT EFI_HANDLE *Buffer
)
/*++
Routine Description:
Locates the requested handle(s) and returns them in Buffer.
Arguments:
SearchType - The type of search to perform to locate the handles
Protocol - The protocol to search for
SearchKey - Dependant on SearchType
BufferSize - On input the size of Buffer. On output the
size of data returned.
Buffer - The buffer to return the results in
Returns:
EFI_BUFFER_TOO_SMALL - Buffer too small, required buffer size is returned in BufferSize.
EFI_INVALID_PARAMETER - Invalid parameter
EFI_SUCCESS - Successfully found the requested handle(s) and returns them in Buffer.
--*/
{
EFI_STATUS Status;
LOCATE_POSITION Position;
@@ -243,29 +263,25 @@ Returns:
}
/**
Routine to get the next Handle, when you are searching for all handles.
@param Position Information about which Handle to seach for.
@param Interface Return the interface structure for the matching
protocol.
@retval IHANDLE An IHANDLE is returned if the next Position is
not the end of the list. A NULL_HANDLE is
returned if it's the end of the list.
**/
STATIC
IHANDLE *
CoreGetNextLocateAllHandles (
IN OUT LOCATE_POSITION *Position,
OUT VOID **Interface
)
/*++
Routine Description:
Routine to get the next Handle, when you are searching for all handles.
Arguments:
Position - Information about which Handle to seach for.
Interface - Return the interface structure for the matching protocol.
Returns:
IHANDLE - An IHANDLE is returned if the next Position is not the end of the
list. A NULL_HANDLE is returned if it's the end of the list.
--*/
{
IHANDLE *Handle;
@@ -287,30 +303,26 @@ Returns:
}
/**
Routine to get the next Handle, when you are searching for register protocol
notifies.
@param Position Information about which Handle to seach for.
@param Interface Return the interface structure for the matching
protocol.
@retval IHANDLE An IHANDLE is returned if the next Position is
not the end of the list. A NULL_HANDLE is
returned if it's the end of the list.
**/
STATIC
IHANDLE *
CoreGetNextLocateByRegisterNotify (
IN OUT LOCATE_POSITION *Position,
OUT VOID **Interface
)
/*++
Routine Description:
Routine to get the next Handle, when you are searching for register protocol
notifies.
Arguments:
Position - Information about which Handle to seach for.
Interface - Return the interface structure for the matching protocol.
Returns:
IHANDLE - An IHANDLE is returned if the next Position is not the end of the
list. A NULL_HANDLE is returned if it's the end of the list.
--*/
{
IHANDLE *Handle;
PROTOCOL_NOTIFY *ProtNotify;
@@ -343,29 +355,25 @@ Returns:
}
/**
Routine to get the next Handle, when you are searching for a given protocol.
@param Position Information about which Handle to seach for.
@param Interface Return the interface structure for the matching
protocol.
@retval IHANDLE An IHANDLE is returned if the next Position is
not the end of the list. A NULL_HANDLE is
returned if it's the end of the list.
**/
STATIC
IHANDLE *
CoreGetNextLocateByProtocol (
IN OUT LOCATE_POSITION *Position,
OUT VOID **Interface
)
/*++
Routine Description:
Routine to get the next Handle, when you are searching for a given protocol.
Arguments:
Position - Information about which Handle to seach for.
Interface - Return the interface structure for the matching protocol.
Returns:
IHANDLE - An IHANDLE is returned if the next Position is not the end of the
list. A NULL_HANDLE is returned if it's the end of the list.
--*/
{
IHANDLE *Handle;
LIST_ENTRY *Link;
@@ -410,6 +418,22 @@ Returns:
/**
Locates the handle to a device on the device path that best matches the specified protocol.
@param Protocol The protocol to search for.
@param DevicePath On input, a pointer to a pointer to the device
path. On output, the device path pointer is
modified to point to the remaining part of the
devicepath.
@param Device A pointer to the returned device handle.
@retval EFI_SUCCESS The resulting handle was returned.
@retval EFI_NOT_FOUND No handles matched the search.
@retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
**/
EFI_STATUS
EFIAPI
CoreLocateDevicePath (
@@ -417,26 +441,6 @@ CoreLocateDevicePath (
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
OUT EFI_HANDLE *Device
)
/*++
Routine Description:
Locates the handle to a device on the device path that best matches the specified protocol.
Arguments:
Protocol - The protocol to search for.
DevicePath - On input, a pointer to a pointer to the device path. On output, the device
path pointer is modified to point to the remaining part of the devicepath.
Device - A pointer to the returned device handle.
Returns:
EFI_SUCCESS - The resulting handle was returned.
EFI_NOT_FOUND - No handles matched the search.
EFI_INVALID_PARAMETER - One of the parameters has an invalid value.
--*/
{
INTN SourceSize;
INTN Size;
@@ -469,7 +473,7 @@ Returns:
// The source path can only have 1 instance
//
if (CoreIsDevicePathMultiInstance (SourcePath)) {
DEBUG((EFI_D_ERROR, "LocateDevicePath: Device path has too many instances\n"));
DEBUG((DEBUG_ERROR, "LocateDevicePath: Device path has too many instances\n"));
return EFI_INVALID_PARAMETER;
}
@@ -533,6 +537,23 @@ Returns:
/**
Return the first Protocol Interface that matches the Protocol GUID. If
Registration is pasased in return a Protocol Instance that was just add
to the system. If Retistration is NULL return the first Protocol Interface
you find.
@param Protocol The protocol to search for
@param Registration Optional Registration Key returned from
RegisterProtocolNotify()
@param Interface Return the Protocol interface (instance).
@retval EFI_SUCCESS If a valid Interface is returned
@retval EFI_INVALID_PARAMETER Invalid parameter
@retval EFI_NOT_FOUND Protocol interface not found
**/
EFI_STATUS
EFIAPI
CoreLocateProtocol (
@@ -540,32 +561,6 @@ CoreLocateProtocol (
IN VOID *Registration OPTIONAL,
OUT VOID **Interface
)
/*++
Routine Description:
Return the first Protocol Interface that matches the Protocol GUID. If
Registration is pasased in return a Protocol Instance that was just add
to the system. If Retistration is NULL return the first Protocol Interface
you find.
Arguments:
Protocol - The protocol to search for
Registration - Optional Registration Key returned from RegisterProtocolNotify()
Interface - Return the Protocol interface (instance).
Returns:
EFI_SUCCESS - If a valid Interface is returned
EFI_INVALID_PARAMETER - Invalid parameter
EFI_NOT_FOUND - Protocol interface not found
--*/
{
EFI_STATUS Status;
LOCATE_POSITION Position;
@@ -631,6 +626,29 @@ Done:
/**
Function returns an array of handles that support the requested protocol
in a buffer allocated from pool. This is a version of CoreLocateHandle()
that allocates a buffer for the caller.
@param SearchType Specifies which handle(s) are to be returned.
@param Protocol Provides the protocol to search by. This
parameter is only valid for SearchType
ByProtocol.
@param SearchKey Supplies the search key depending on the
SearchType.
@param NumberHandles The number of handles returned in Buffer.
@param Buffer A pointer to the buffer to return the requested
array of handles that support Protocol.
@retval EFI_SUCCESS The result array of handles was returned.
@retval EFI_NOT_FOUND No handles match the search.
@retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the
matching results.
@retval EFI_INVALID_PARAMETER Invalid parameter
**/
EFI_STATUS
EFIAPI
CoreLocateHandleBuffer (
@@ -640,32 +658,6 @@ CoreLocateHandleBuffer (
IN OUT UINTN *NumberHandles,
OUT EFI_HANDLE **Buffer
)
/*++
Routine Description:
Function returns an array of handles that support the requested protocol
in a buffer allocated from pool. This is a version of CoreLocateHandle()
that allocates a buffer for the caller.
Arguments:
SearchType - Specifies which handle(s) are to be returned.
Protocol - Provides the protocol to search by.
This parameter is only valid for SearchType ByProtocol.
SearchKey - Supplies the search key depending on the SearchType.
NumberHandles - The number of handles returned in Buffer.
Buffer - A pointer to the buffer to return the requested array of
handles that support Protocol.
Returns:
EFI_SUCCESS - The result array of handles was returned.
EFI_NOT_FOUND - No handles match the search.
EFI_OUT_OF_RESOURCES - There is not enough pool memory to store the matching results.
EFI_INVALID_PARAMETER - Invalid parameter
--*/
{
EFI_STATUS Status;
UINTN BufferSize;
@@ -723,3 +715,4 @@ Returns:
}