Code scrub for IdeBusDxe driver
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8636 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
UEFI Component Name(2) protocol implementation for ConPlatform driver.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
|
UEFI Component Name(2) protocol implementation header file for IDE Bus driver.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -13,7 +16,7 @@
|
|||||||
#ifndef _IDE_BUS_COMPONENT_NAME_H_
|
#ifndef _IDE_BUS_COMPONENT_NAME_H_
|
||||||
#define _IDE_BUS_COMPONENT_NAME_H_
|
#define _IDE_BUS_COMPONENT_NAME_H_
|
||||||
|
|
||||||
#define ADD_NAME(x) AddName ((x));
|
#define ADD_IDE_ATAPI_NAME(x) AddName ((x));
|
||||||
|
|
||||||
extern EFI_COMPONENT_NAME_PROTOCOL gIDEBusComponentName;
|
extern EFI_COMPONENT_NAME_PROTOCOL gIDEBusComponentName;
|
||||||
extern EFI_COMPONENT_NAME2_PROTOCOL gIDEBusComponentName2;
|
extern EFI_COMPONENT_NAME2_PROTOCOL gIDEBusComponentName2;
|
||||||
@@ -150,11 +153,9 @@ IDEBusComponentNameGetControllerName (
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Add the component name for the IDE/ATAPI device
|
||||||
|
|
||||||
@param IdeBlkIoDevicePtr TODO: add argument description
|
@param IdeBlkIoDevicePtr A pointer to the IDE_BLK_IO_DEV instance.
|
||||||
|
|
||||||
TODO: add return values.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
VOID
|
VOID
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
Implementation of UEFI Driver Configuration Protocol for IDE bus driver which
|
||||||
|
provides ability to set IDE bus controller specific options.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -31,11 +34,11 @@ EFI_DRIVER_CONFIGURATION_PROTOCOL gIDEBusDriverConfiguration = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Interprete keyboard input.
|
||||||
|
|
||||||
@retval EFI_ABORTED TODO: Add description for return value.
|
@retval EFI_ABORTED Get an 'ESC' key inputed.
|
||||||
@retval EFI_SUCCESS TODO: Add description for return value.
|
@retval EFI_SUCCESS Get an 'Y' or 'y' inputed.
|
||||||
@retval EFI_NOT_FOUND TODO: Add description for return value.
|
@retval EFI_NOT_FOUND Get an 'N' or 'n' inputed..
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -80,46 +83,35 @@ GetResponse (
|
|||||||
Allows the user to set controller specific options for a controller that a
|
Allows the user to set controller specific options for a controller that a
|
||||||
driver is currently managing.
|
driver is currently managing.
|
||||||
|
|
||||||
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL
|
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
|
||||||
instance.
|
@param ControllerHandle The handle of the controller to set options on.
|
||||||
@param ControllerHandle The handle of the controller to set options on.
|
@param ChildHandle The handle of the child controller to set options on.
|
||||||
@param ChildHandle The handle of the child controller to set options on.
|
This is an optional parameter that may be NULL.
|
||||||
This is an optional parameter that may be NULL.
|
It will be NULL for device drivers, and for a bus drivers
|
||||||
It will be NULL for device drivers, and for a bus drivers
|
that wish to set options for the bus controller.
|
||||||
that wish to set options for the bus controller.
|
It will not be NULL for a bus driver that wishes to set
|
||||||
It will not be NULL for a bus driver that wishes to set
|
options for one of its child controllers.
|
||||||
options for one of its child controllers.
|
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||||
@param Language A pointer to a three character ISO 639-2 language
|
This is the language of the user interface that should be presented
|
||||||
identifier. This is the language of the user interface
|
to the user, and it must match one of the languages specified in
|
||||||
that should be presented to the user, and it must match
|
SupportedLanguages. The number of languages supported by a driver is up to
|
||||||
one of the languages specified in SupportedLanguages.
|
the driver writer.
|
||||||
The number of languages supported by a driver is up to
|
@param ActionRequired A pointer to the action that the calling agent is required
|
||||||
the driver writer.
|
to perform when this function returns.
|
||||||
@param ActionRequired A pointer to the action that the calling agent is
|
|
||||||
required to perform when this function returns.
|
|
||||||
See "Related Definitions" for a list of the actions that
|
|
||||||
the calling agent is required to perform prior to
|
|
||||||
accessing ControllerHandle again.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The driver specified by This successfully set the
|
@retval EFI_SUCCESS The driver specified by This successfully set the configuration
|
||||||
configuration options for the controller specified
|
options for the controller specified by ControllerHandle..
|
||||||
by ControllerHandle..
|
|
||||||
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||||
valid EFI_HANDLE.
|
|
||||||
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
|
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
@retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for
|
||||||
setting configuration options for the controller
|
the controller specified by ControllerHandle and ChildHandle.
|
||||||
specified by ControllerHandle and ChildHandle.
|
@retval EFI_UNSUPPORTED The driver specified by This does not support the language specified by Language.
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the
|
@retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the
|
||||||
language specified by Language.
|
controller specified by ControllerHandle and ChildHandle.
|
||||||
@retval EFI_DEVICE_ERROR A device error occurred while attempt to set the
|
@retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the
|
||||||
configuration options for the controller specified
|
controller specified by ControllerHandle and ChildHandle
|
||||||
by ControllerHandle and ChildHandle.
|
|
||||||
@retval EFI_OUT_RESOURCES There are not enough resources available to set the
|
|
||||||
configuration options for the controller specified
|
|
||||||
by ControllerHandle and ChildHandle.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@@ -189,35 +181,25 @@ IDEBusDriverConfigurationSetOptions (
|
|||||||
/**
|
/**
|
||||||
Tests to see if a controller's current configuration options are valid.
|
Tests to see if a controller's current configuration options are valid.
|
||||||
|
|
||||||
@param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL
|
@param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
|
||||||
instance.
|
@param ControllerHandle The handle of the controller to test if it's current configuration options
|
||||||
@param ControllerHandle The handle of the controller to test if it's current
|
are valid.
|
||||||
configuration options are valid.
|
@param ChildHandle The handle of the child controller to test if it's current configuration
|
||||||
@param ChildHandle The handle of the child controller to test if it's
|
options are valid. This is an optional parameter that may be NULL. It will
|
||||||
current
|
be NULL for device drivers. It will also be NULL for a bus drivers that
|
||||||
configuration options are valid. This is an optional
|
wish to test the configuration options for the bus controller. It will
|
||||||
parameter that may be NULL. It will be NULL for device
|
not be NULL for a bus driver that wishes to test configuration options for
|
||||||
drivers. It will also be NULL for a bus drivers that
|
one of its child controllers.
|
||||||
wish to test the configuration options for the bus
|
@retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle that is being
|
||||||
controller. It will not be NULL for a bus driver that
|
managed by the driver specified by This has a valid set of configuration
|
||||||
wishes to test configuration options for one of
|
options.
|
||||||
its child controllers.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The controller specified by ControllerHandle and
|
|
||||||
ChildHandle that is being managed by the driver
|
|
||||||
specified by This has a valid set of configuration
|
|
||||||
options.
|
|
||||||
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||||
EFI_HANDLE.
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
specified by ControllerHandle and ChildHandle.
|
||||||
managing the controller specified by
|
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle that is being
|
||||||
ControllerHandle and ChildHandle.
|
managed by the driver specified by This has an invalid set of configuration
|
||||||
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and
|
options.
|
||||||
ChildHandle that is being managed by the driver
|
|
||||||
specified by This has an invalid set of
|
|
||||||
configuration options.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@@ -249,51 +231,37 @@ IDEBusDriverConfigurationOptionsValid (
|
|||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Forces a driver to set the default configuration options for a controller.
|
Forces a driver to set the default configuration options for a controller.
|
||||||
|
|
||||||
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL
|
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
|
||||||
instance.
|
@param ControllerHandle The handle of the controller to force default configuration options on.
|
||||||
@param ControllerHandle The handle of the controller to force default
|
@param ChildHandle The handle of the child controller to force default configuration
|
||||||
configuration options on.
|
options on This is an optional parameter that may be NULL. It
|
||||||
@param ChildHandle The handle of the child controller to force default
|
will be NULL for device drivers. It will also be NULL for a bus
|
||||||
configuration options on This is an optional parameter
|
drivers that wish to force default configuration options for the bus
|
||||||
that may be NULL. It will be NULL for device drivers.
|
controller. It will not be NULL for a bus driver that wishes to force
|
||||||
It will also be NULL for a bus drivers that wish to
|
default configuration options for one of its child controllers.
|
||||||
force default configuration options for the bus
|
@param DefaultType The type of default configuration options to force on the controller
|
||||||
controller. It will not be NULL for a bus driver that
|
specified by ControllerHandle and ChildHandle.
|
||||||
wishes to force default configuration options for one
|
@param ActionRequired A pointer to the action that the calling agent is required to perform
|
||||||
of its child controllers.
|
when this function returns.
|
||||||
@param DefaultType The type of default configuration options to force on
|
|
||||||
the controller specified by ControllerHandle and
|
|
||||||
ChildHandle. See Table 9-1 for legal values.
|
|
||||||
A DefaultType of 0x00000000 must be supported
|
|
||||||
by this protocol.
|
|
||||||
@param ActionRequired A pointer to the action that the calling agent
|
|
||||||
is required to perform when this function returns.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The driver specified by This successfully forced
|
@retval EFI_SUCCESS The driver specified by This successfully forced the
|
||||||
the default configuration options on the
|
default configuration options on the controller specified by
|
||||||
controller specified by ControllerHandle and
|
ControllerHandle and ChildHandle.
|
||||||
ChildHandle.
|
|
||||||
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||||
valid EFI_HANDLE.
|
|
||||||
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
|
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
@retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default
|
||||||
forcing the default configuration options on
|
configuration options on the controller specified by ControllerHandle
|
||||||
the controller specified by ControllerHandle
|
and ChildHandle.
|
||||||
and ChildHandle.
|
@retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
specified by DefaultType.
|
||||||
the configuration type specified by DefaultType.
|
@retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration
|
||||||
@retval EFI_DEVICE_ERROR A device error occurred while attempt to force
|
options on the controller specified by ControllerHandle and ChildHandle.
|
||||||
the default configuration options on the controller
|
@retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration
|
||||||
specified by ControllerHandle and ChildHandle.
|
options on the controller specified by ControllerHandle and ChildHandle.
|
||||||
@retval EFI_OUT_RESOURCES There are not enough resources available to force
|
|
||||||
the default configuration options on the controller
|
|
||||||
specified by ControllerHandle and ChildHandle.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
@@ -1,4 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
Implementation of UEFI driver Dialnostics protocol which to perform diagnostic on the IDE
|
||||||
|
Bus controller.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -34,59 +37,49 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_DRIVER_DIAGNOSTICS2_PROTOCOL gIDEBusDriverDiag
|
|||||||
/**
|
/**
|
||||||
Runs diagnostics on a controller.
|
Runs diagnostics on a controller.
|
||||||
|
|
||||||
@param This A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL
|
@param This A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOLinstance.
|
||||||
instance.
|
|
||||||
@param ControllerHandle The handle of the controller to run diagnostics on.
|
@param ControllerHandle The handle of the controller to run diagnostics on.
|
||||||
@param ChildHandle The handle of the child controller to run diagnostics on
|
@param ChildHandle The handle of the child controller to run diagnostics on
|
||||||
This is an optional parameter that may be NULL. It will
|
This is an optional parameter that may be NULL. It will
|
||||||
be NULL for device drivers. It will also be NULL for a
|
be NULL for device drivers. It will also be NULL for a
|
||||||
bus drivers that wish to run diagnostics on the bus
|
bus drivers that wish to run diagnostics on the bus controller.
|
||||||
controller. It will not be NULL for a bus driver that
|
It will not be NULL for a bus driver that wishes to run
|
||||||
wishes to run diagnostics on one of its child
|
diagnostics on one of its child controllers.
|
||||||
controllers.
|
@param DiagnosticType Indicates type of diagnostics to perform on the controller
|
||||||
@param DiagnosticType Indicates type of diagnostics to perform on the
|
specified by ControllerHandle and ChildHandle.
|
||||||
controller specified by ControllerHandle and ChildHandle.
|
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||||
See "Related Definitions" for the list of supported
|
This is the language in which the optional error message should
|
||||||
types.
|
be returned in Buffer, and it must match one of the languages
|
||||||
@param Language A pointer to a three character ISO 639-2 language
|
specified in SupportedLanguages. The number of languages supported by
|
||||||
identifier. This is the language in which the optional
|
a driver is up to the driver writer.
|
||||||
error message should be returned in Buffer, and it must
|
@param ErrorType A GUID that defines the format of the data returned in Buffer.
|
||||||
match one of the languages specified in
|
@param BufferSize The size, in bytes, of the data returned in Buffer.
|
||||||
SupportedLanguages. The number of languages supported by
|
@param Buffer A buffer that contains a Null-terminated Unicode string
|
||||||
a driver is up to the driver writer.
|
plus some additional data whose format is defined by ErrorType.
|
||||||
@param ErrorType A GUID that defines the format of the data returned in
|
Buffer is allocated by this function with AllocatePool(), and
|
||||||
Buffer.
|
it is the caller's responsibility to free it with a call to FreePool().
|
||||||
@param BufferSize The size, in bytes, of the data returned in Buffer.
|
|
||||||
@param Buffer A buffer that contains a Null-terminated Unicode string
|
|
||||||
plus some additional data whose format is defined by
|
|
||||||
ErrorType. Buffer is allocated by this function with
|
|
||||||
AllocatePool(), and it is the caller's responsibility
|
|
||||||
to free it with a call to FreePool().
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The controller specified by ControllerHandle and
|
@retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed
|
||||||
ChildHandle passed the diagnostic.
|
the diagnostic.
|
||||||
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||||
EFI_HANDLE.
|
|
||||||
@retval EFI_INVALID_PARAMETER Language is NULL.
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
@retval EFI_INVALID_PARAMETER ErrorType is NULL.
|
@retval EFI_INVALID_PARAMETER ErrorType is NULL.
|
||||||
@retval EFI_INVALID_PARAMETER BufferType is NULL.
|
@retval EFI_INVALID_PARAMETER BufferType is NULL.
|
||||||
@retval EFI_INVALID_PARAMETER Buffer is NULL.
|
@retval EFI_INVALID_PARAMETER Buffer is NULL.
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
@retval EFI_UNSUPPORTED The driver specified by This does not support running
|
||||||
running diagnostics for the controller specified
|
diagnostics for the controller specified by ControllerHandle
|
||||||
by ControllerHandle and ChildHandle.
|
and ChildHandle.
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the
|
@retval EFI_UNSUPPORTED The driver specified by This does not support the
|
||||||
type of diagnostic specified by DiagnosticType.
|
type of diagnostic specified by DiagnosticType.
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This does not support the
|
@retval EFI_UNSUPPORTED The driver specified by This does not support the language
|
||||||
language specified by Language.
|
specified by Language.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the
|
||||||
the diagnostics.
|
diagnostics.
|
||||||
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to return
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the
|
||||||
the status information in ErrorType, BufferSize,
|
status information in ErrorType, BufferSize,and Buffer.
|
||||||
and Buffer.
|
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle
|
||||||
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and
|
did not pass the diagnostic.
|
||||||
ChildHandle did not pass the diagnostic.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,8 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
This file implement UEFI driver for IDE Bus which includes device identification,
|
||||||
|
Child device(Disk, CDROM, etc) enumeration and child handler installation, and
|
||||||
|
driver stop.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2008, Intel Corporation
|
Copyright (c) 2006 - 2008, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@@ -30,21 +34,106 @@ EFI_DRIVER_BINDING_PROTOCOL gIDEBusDriverBinding = {
|
|||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
|
||||||
// ***********************************************************************************
|
|
||||||
// IDEBusDriverBindingSupported
|
|
||||||
// ***********************************************************************************
|
|
||||||
//
|
|
||||||
/**
|
/**
|
||||||
Register Driver Binding protocol for this driver.
|
Deregister an IDE device and free resources
|
||||||
|
|
||||||
@param[in] This -- A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
@param This Protocol instance pointer.
|
||||||
@param[in] ControllerHandle -- The handle of the controller to test.
|
@param Controller Ide device handle
|
||||||
@param[in] RemainingDevicePath -- A pointer to the remaining portion of a device path.
|
@param Handle Handle of device to deregister driver on
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Deregiter a specific IDE device successfully
|
||||||
|
|
||||||
|
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
DeRegisterIdeDevice (
|
||||||
|
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||||
|
IN EFI_HANDLE Controller,
|
||||||
|
IN EFI_HANDLE Handle
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_BLOCK_IO_PROTOCOL *BlkIo;
|
||||||
|
IDE_BLK_IO_DEV *IdeBlkIoDevice;
|
||||||
|
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||||
|
UINTN Index;
|
||||||
|
|
||||||
|
Status = gBS->OpenProtocol (
|
||||||
|
Handle,
|
||||||
|
&gEfiBlockIoProtocolGuid,
|
||||||
|
(VOID **) &BlkIo,
|
||||||
|
This->DriverBindingHandle,
|
||||||
|
Controller,
|
||||||
|
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||||
|
);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (BlkIo);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Report Status code: Device disabled
|
||||||
|
//
|
||||||
|
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||||
|
EFI_PROGRESS_CODE,
|
||||||
|
(EFI_IO_BUS_ATA_ATAPI | EFI_P_PC_DISABLE),
|
||||||
|
IdeBlkIoDevice->DevicePath
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Close the child handle
|
||||||
|
//
|
||||||
|
Status = gBS->CloseProtocol (
|
||||||
|
Controller,
|
||||||
|
&gEfiPciIoProtocolGuid,
|
||||||
|
This->DriverBindingHandle,
|
||||||
|
Handle
|
||||||
|
);
|
||||||
|
|
||||||
|
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||||
|
Handle,
|
||||||
|
&gEfiDevicePathProtocolGuid,
|
||||||
|
IdeBlkIoDevice->DevicePath,
|
||||||
|
&gEfiBlockIoProtocolGuid,
|
||||||
|
&IdeBlkIoDevice->BlkIo,
|
||||||
|
&gEfiDiskInfoProtocolGuid,
|
||||||
|
&IdeBlkIoDevice->DiskInfo,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
gBS->OpenProtocol (
|
||||||
|
Controller,
|
||||||
|
&gEfiPciIoProtocolGuid,
|
||||||
|
(VOID **) &PciIo,
|
||||||
|
This->DriverBindingHandle,
|
||||||
|
Handle,
|
||||||
|
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||||
|
);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Release allocated resources
|
||||||
|
//
|
||||||
|
Index = IdeBlkIoDevice->Channel * 2 + IdeBlkIoDevice->Device;
|
||||||
|
if (Index < MAX_IDE_DEVICE) {
|
||||||
|
IdeBlkIoDevice->IdeBusDriverPrivateData->HaveScannedDevice[Index] = FALSE;
|
||||||
|
}
|
||||||
|
ReleaseIdeResources (IdeBlkIoDevice);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
Supported function of Driver Binding protocol for this driver.
|
||||||
|
|
||||||
|
@param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
|
@param ControllerHandle The handle of the controller to test.
|
||||||
|
@param RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||||
|
|
||||||
@retval EFI_SUCCESS Driver loaded.
|
@retval EFI_SUCCESS Driver loaded.
|
||||||
@retval other Driver not loaded.
|
@retval other Driver not loaded.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -54,8 +143,6 @@ IDEBusDriverBindingSupported (
|
|||||||
IN EFI_HANDLE Controller,
|
IN EFI_HANDLE Controller,
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||||
)
|
)
|
||||||
// TODO: Controller - add argument and description to function comment
|
|
||||||
// TODO: EFI_UNSUPPORTED - add return value to function comment
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath;
|
||||||
@@ -134,22 +221,18 @@ IDEBusDriverBindingSupported (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// ***********************************************************************************
|
|
||||||
// IDEBusDriverBindingStart
|
|
||||||
// ***********************************************************************************
|
|
||||||
//
|
|
||||||
/**
|
/**
|
||||||
Start this driver on Controller by detecting all disks and installing
|
Start function of Driver binding protocol which start this driver on Controller
|
||||||
BlockIo protocol on them.
|
by detecting all disks and installing BlockIo protocol on them.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param This Protocol instance pointer.
|
||||||
@param Controller Handle of device to bind driver to.
|
@param Controller Handle of device to bind driver to.
|
||||||
@param RemainingDevicePath Not used, always produce all possible children.
|
@param RemainingDevicePath produce all possible children.
|
||||||
|
|
||||||
@retval EFI_SUCCESS This driver is added to ControllerHandle.
|
@retval EFI_SUCCESS This driver is added to ControllerHandle.
|
||||||
@retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.
|
@retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.
|
||||||
@retval other This driver does not support this device.
|
@retval other This driver does not support this device.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -698,7 +781,7 @@ IDEBusDriverBindingStart (
|
|||||||
// Add Component Name for the IDE/ATAPI device that was discovered.
|
// Add Component Name for the IDE/ATAPI device that was discovered.
|
||||||
//
|
//
|
||||||
IdeBlkIoDevicePtr->ControllerNameTable = NULL;
|
IdeBlkIoDevicePtr->ControllerNameTable = NULL;
|
||||||
ADD_NAME (IdeBlkIoDevicePtr);
|
ADD_IDE_ATAPI_NAME (IdeBlkIoDevicePtr);
|
||||||
|
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||||
&IdeBlkIoDevicePtr->Handle,
|
&IdeBlkIoDevicePtr->Handle,
|
||||||
@@ -821,14 +904,9 @@ ErrorExit:
|
|||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// ***********************************************************************************
|
|
||||||
// IDEBusDriverBindingStop
|
|
||||||
// ***********************************************************************************
|
|
||||||
//
|
|
||||||
/**
|
/**
|
||||||
Stop this driver on Controller Handle.
|
Stop function of Driver Binding Protocol which is to stop the driver on Controller Handle and all
|
||||||
|
child handle attached to the controller handle if there are.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param This Protocol instance pointer.
|
||||||
@param Controller Handle of device to stop driver on
|
@param Controller Handle of device to stop driver on
|
||||||
@@ -847,8 +925,6 @@ IDEBusDriverBindingStop (
|
|||||||
IN UINTN NumberOfChildren,
|
IN UINTN NumberOfChildren,
|
||||||
IN EFI_HANDLE *ChildHandleBuffer
|
IN EFI_HANDLE *ChildHandleBuffer
|
||||||
)
|
)
|
||||||
// TODO: Controller - add argument and description to function comment
|
|
||||||
// TODO: EFI_DEVICE_ERROR - add return value to function comment
|
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||||
@@ -949,115 +1025,15 @@ IDEBusDriverBindingStop (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// ***********************************************************************************
|
|
||||||
// DeRegisterIdeDevice
|
|
||||||
// ***********************************************************************************
|
|
||||||
//
|
|
||||||
/**
|
/**
|
||||||
Deregister an IDE device and free resources
|
issue ATA or ATAPI command to reset a block IO device.
|
||||||
|
@param This Block IO protocol instance pointer.
|
||||||
|
@param ExtendedVerification If FALSE,for ATAPI device, driver will only invoke ATAPI reset method
|
||||||
|
If TRUE, for ATAPI device, driver need invoke ATA reset method after
|
||||||
|
invoke ATAPI reset method
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@retval EFI_DEVICE_ERROR When the device is neighther ATA device or ATAPI device.
|
||||||
@param Controller Ide device handle
|
@retval EFI_SUCCESS The device reset successfully
|
||||||
@param Handle Handle of device to deregister driver on
|
|
||||||
|
|
||||||
@return EFI_STATUS
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
DeRegisterIdeDevice (
|
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
|
||||||
IN EFI_HANDLE Controller,
|
|
||||||
IN EFI_HANDLE Handle
|
|
||||||
)
|
|
||||||
// TODO: EFI_SUCCESS - add return value to function comment
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
EFI_BLOCK_IO_PROTOCOL *BlkIo;
|
|
||||||
IDE_BLK_IO_DEV *IdeBlkIoDevice;
|
|
||||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
|
||||||
UINTN Index;
|
|
||||||
|
|
||||||
Status = gBS->OpenProtocol (
|
|
||||||
Handle,
|
|
||||||
&gEfiBlockIoProtocolGuid,
|
|
||||||
(VOID **) &BlkIo,
|
|
||||||
This->DriverBindingHandle,
|
|
||||||
Controller,
|
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
IdeBlkIoDevice = IDE_BLOCK_IO_DEV_FROM_THIS (BlkIo);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Report Status code: Device disabled
|
|
||||||
//
|
|
||||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
|
||||||
EFI_PROGRESS_CODE,
|
|
||||||
(EFI_IO_BUS_ATA_ATAPI | EFI_P_PC_DISABLE),
|
|
||||||
IdeBlkIoDevice->DevicePath
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Close the child handle
|
|
||||||
//
|
|
||||||
Status = gBS->CloseProtocol (
|
|
||||||
Controller,
|
|
||||||
&gEfiPciIoProtocolGuid,
|
|
||||||
This->DriverBindingHandle,
|
|
||||||
Handle
|
|
||||||
);
|
|
||||||
|
|
||||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
|
||||||
Handle,
|
|
||||||
&gEfiDevicePathProtocolGuid,
|
|
||||||
IdeBlkIoDevice->DevicePath,
|
|
||||||
&gEfiBlockIoProtocolGuid,
|
|
||||||
&IdeBlkIoDevice->BlkIo,
|
|
||||||
&gEfiDiskInfoProtocolGuid,
|
|
||||||
&IdeBlkIoDevice->DiskInfo,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
gBS->OpenProtocol (
|
|
||||||
Controller,
|
|
||||||
&gEfiPciIoProtocolGuid,
|
|
||||||
(VOID **) &PciIo,
|
|
||||||
This->DriverBindingHandle,
|
|
||||||
Handle,
|
|
||||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
|
||||||
);
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Release allocated resources
|
|
||||||
//
|
|
||||||
Index = IdeBlkIoDevice->Channel * 2 + IdeBlkIoDevice->Device;
|
|
||||||
if (Index < MAX_IDE_DEVICE) {
|
|
||||||
IdeBlkIoDevice->IdeBusDriverPrivateData->HaveScannedDevice[Index] = FALSE;
|
|
||||||
}
|
|
||||||
ReleaseIdeResources (IdeBlkIoDevice);
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// ***********************************************************************************
|
|
||||||
// IDEBlkIoReset
|
|
||||||
// ***********************************************************************************
|
|
||||||
//
|
|
||||||
/**
|
|
||||||
GC_TODO: Add function description
|
|
||||||
|
|
||||||
@param This GC_TODO: add argument description.
|
|
||||||
@param ExtendedVerification GC_TODO: add argument description.
|
|
||||||
|
|
||||||
@retval EFI_DEVICE_ERROR GC_TODO: Add description for return value.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -1107,15 +1083,16 @@ Done:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Read data from block io device
|
Read data from a block IO device
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param This Block IO protocol instance pointer.
|
||||||
@param MediaId The media ID of the device
|
@param MediaId The media ID of the device
|
||||||
@param LBA Starting LBA address to read data
|
@param LBA Starting LBA address to read data
|
||||||
@param BufferSize The size of data to be read
|
@param BufferSize The size of data to be read
|
||||||
@param Buffer Caller supplied buffer to save data
|
@param Buffer Caller supplied buffer to save data
|
||||||
|
|
||||||
@return read data status
|
@retval EFI_DEVICE_ERROR unknown device type
|
||||||
|
@retval other read data status.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -1127,7 +1104,6 @@ IDEBlkIoReadBlocks (
|
|||||||
IN UINTN BufferSize,
|
IN UINTN BufferSize,
|
||||||
OUT VOID *Buffer
|
OUT VOID *Buffer
|
||||||
)
|
)
|
||||||
// TODO: EFI_DEVICE_ERROR - add return value to function comment
|
|
||||||
{
|
{
|
||||||
IDE_BLK_IO_DEV *IdeBlkIoDevice;
|
IDE_BLK_IO_DEV *IdeBlkIoDevice;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@@ -1182,13 +1158,14 @@ Done:
|
|||||||
/**
|
/**
|
||||||
Write data to block io device
|
Write data to block io device
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param This Protocol instance pointer.
|
||||||
@param MediaId The media ID of the device
|
@param MediaId The media ID of the device
|
||||||
@param LBA Starting LBA address to write data
|
@param LBA Starting LBA address to write data
|
||||||
@param BufferSize The size of data to be written
|
@param BufferSize The size of data to be written
|
||||||
@param Buffer Caller supplied buffer to save data
|
@param Buffer Caller supplied buffer to save data
|
||||||
|
|
||||||
@return write data status
|
@retval EFI_DEVICE_ERROR unknown device type
|
||||||
|
@retval other write data status
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -1200,7 +1177,6 @@ IDEBlkIoWriteBlocks (
|
|||||||
IN UINTN BufferSize,
|
IN UINTN BufferSize,
|
||||||
IN VOID *Buffer
|
IN VOID *Buffer
|
||||||
)
|
)
|
||||||
// TODO: EFI_DEVICE_ERROR - add return value to function comment
|
|
||||||
{
|
{
|
||||||
IDE_BLK_IO_DEV *IdeBlkIoDevice;
|
IDE_BLK_IO_DEV *IdeBlkIoDevice;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
@@ -1250,19 +1226,13 @@ Done:
|
|||||||
gBS->RestoreTPL (OldTpl);
|
gBS->RestoreTPL (OldTpl);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// ***********************************************************************************
|
|
||||||
// IDEBlkIoFlushBlocks
|
|
||||||
// ***********************************************************************************
|
|
||||||
//
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Flushes all modified data to a physical block devices
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This Indicates a pointer to the calling context which to sepcify a
|
||||||
|
sepcific block device
|
||||||
@retval EFI_SUCCESS GC_TODO: Add description for return value.
|
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Always return success.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@@ -1362,14 +1332,14 @@ IDEDiskInfoIdentify (
|
|||||||
Return the results of the Request Sense command to a drive in SenseData.
|
Return the results of the Request Sense command to a drive in SenseData.
|
||||||
Data format of Sense data is defined by the Interface GUID.
|
Data format of Sense data is defined by the Interface GUID.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param This Protocol instance pointer.
|
||||||
@param SenseData Results of Request Sense command to device
|
@param SenseData Results of Request Sense command to device
|
||||||
@param SenseDataSize Size of SenseData in bytes.
|
@param SenseDataSize Size of SenseData in bytes.
|
||||||
@param SenseDataNumber Type of SenseData
|
@param SenseDataNumber Type of SenseData
|
||||||
|
|
||||||
@retval EFI_SUCCESS InquiryData valid
|
@retval EFI_SUCCESS InquiryData valid
|
||||||
@retval EFI_NOT_FOUND Device does not support this data class
|
@retval EFI_NOT_FOUND Device does not support this data class
|
||||||
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
||||||
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough
|
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@@ -1389,11 +1359,11 @@ IDEDiskInfoSenseData (
|
|||||||
Return the results of the Request Sense command to a drive in SenseData.
|
Return the results of the Request Sense command to a drive in SenseData.
|
||||||
Data format of Sense data is defined by the Interface GUID.
|
Data format of Sense data is defined by the Interface GUID.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param This Protocol instance pointer.
|
||||||
@param IdeChannel Primary or Secondary
|
@param IdeChannel Primary or Secondary
|
||||||
@param IdeDevice Master or Slave
|
@param IdeDevice Master or Slave
|
||||||
|
|
||||||
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid
|
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid
|
||||||
@retval EFI_UNSUPPORTED This is not an IDE device
|
@retval EFI_UNSUPPORTED This is not an IDE device
|
||||||
|
|
||||||
**/
|
**/
|
||||||
@@ -1414,6 +1384,103 @@ IDEDiskInfoWhichIde (
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
The is an event(generally the event is exitBootService event) call back function.
|
||||||
|
Clear pending IDE interrupt before OS loader/kernel take control of the IDE device.
|
||||||
|
|
||||||
|
@param Event Pointer to this event
|
||||||
|
@param Context Event hanlder private data
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
ClearInterrupt (
|
||||||
|
IN EFI_EVENT Event,
|
||||||
|
IN VOID *Context
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINT64 IoPortForBmis;
|
||||||
|
UINT8 RegisterValue;
|
||||||
|
IDE_BLK_IO_DEV *IdeDev;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Get our context
|
||||||
|
//
|
||||||
|
IdeDev = (IDE_BLK_IO_DEV *) Context;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Obtain IDE IO port registers' base addresses
|
||||||
|
//
|
||||||
|
Status = ReassignIdeResources (IdeDev);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Check whether interrupt is pending
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// Reset IDE device to force it de-assert interrupt pin
|
||||||
|
// Note: this will reset all devices on this IDE channel
|
||||||
|
//
|
||||||
|
AtaSoftReset (IdeDev);
|
||||||
|
if (EFI_ERROR (Status)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Get base address of IDE Bus Master Status Regsiter
|
||||||
|
//
|
||||||
|
if (IdePrimary == IdeDev->Channel) {
|
||||||
|
IoPortForBmis = IdeDev->IoPort->BusMasterBaseAddr + BMISP_OFFSET;
|
||||||
|
} else {
|
||||||
|
if (IdeSecondary == IdeDev->Channel) {
|
||||||
|
IoPortForBmis = IdeDev->IoPort->BusMasterBaseAddr + BMISS_OFFSET;
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
// Read BMIS register and clear ERROR and INTR bit
|
||||||
|
//
|
||||||
|
IdeDev->PciIo->Io.Read (
|
||||||
|
IdeDev->PciIo,
|
||||||
|
EfiPciIoWidthUint8,
|
||||||
|
EFI_PCI_IO_PASS_THROUGH_BAR,
|
||||||
|
IoPortForBmis,
|
||||||
|
1,
|
||||||
|
&RegisterValue
|
||||||
|
);
|
||||||
|
|
||||||
|
RegisterValue |= (BMIS_INTERRUPT | BMIS_ERROR);
|
||||||
|
|
||||||
|
IdeDev->PciIo->Io.Write (
|
||||||
|
IdeDev->PciIo,
|
||||||
|
EfiPciIoWidthUint8,
|
||||||
|
EFI_PCI_IO_PASS_THROUGH_BAR,
|
||||||
|
IoPortForBmis,
|
||||||
|
1,
|
||||||
|
&RegisterValue
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Select the other device on this channel to ensure this device to release the interrupt pin
|
||||||
|
//
|
||||||
|
if (IdeDev->Device == 0) {
|
||||||
|
RegisterValue = (1 << 4) | 0xe0;
|
||||||
|
} else {
|
||||||
|
RegisterValue = (0 << 4) | 0xe0;
|
||||||
|
}
|
||||||
|
IDEWritePortB (
|
||||||
|
IdeDev->PciIo,
|
||||||
|
IdeDev->IoPort->Head,
|
||||||
|
RegisterValue
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The user Entry Point for module IdeBus. The user code starts with this function.
|
The user Entry Point for module IdeBus. The user code starts with this function.
|
||||||
|
|
||||||
|
@@ -119,34 +119,16 @@ typedef struct {
|
|||||||
|
|
||||||
#include "Ide.h"
|
#include "Ide.h"
|
||||||
|
|
||||||
//
|
|
||||||
// Prototypes
|
|
||||||
// Driver model protocol interface
|
|
||||||
//
|
|
||||||
/**
|
|
||||||
TODO: Add function description
|
|
||||||
|
|
||||||
@param ImageHandle TODO: add argument description
|
|
||||||
@param SystemTable TODO: add argument description
|
|
||||||
|
|
||||||
TODO: add return values.
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
IDEBusControllerDriverEntryPoint (
|
|
||||||
IN EFI_HANDLE ImageHandle,
|
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Supported function of Driver Binding protocol for this driver.
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||||
@param Controller TODO: add argument description
|
@param ControllerHandle The handle of the controller to test.
|
||||||
@param RemainingDevicePath TODO: add argument description
|
@param RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||||
|
|
||||||
TODO: add return values.
|
@retval EFI_SUCCESS Driver loaded.
|
||||||
|
@retval other Driver not loaded.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -158,13 +140,16 @@ IDEBusDriverBindingSupported (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Start function of Driver binding protocol which start this driver on Controller
|
||||||
|
by detecting all disks and installing BlockIo protocol on them.
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This Protocol instance pointer.
|
||||||
@param Controller TODO: add argument description
|
@param Controller Handle of device to bind driver to.
|
||||||
@param RemainingDevicePath TODO: add argument description
|
@param RemainingDevicePath produce all possible children.
|
||||||
|
|
||||||
TODO: add return values.
|
@retval EFI_SUCCESS This driver is added to ControllerHandle.
|
||||||
|
@retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle.
|
||||||
|
@retval other This driver does not support this device.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -176,14 +161,16 @@ IDEBusDriverBindingStart (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Stop function of Driver Binding Protocol which is to stop the driver on Controller Handle and all
|
||||||
|
child handle attached to the controller handle if there are.
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This Protocol instance pointer.
|
||||||
@param Controller TODO: add argument description
|
@param Controller Handle of device to stop driver on
|
||||||
@param NumberOfChildren TODO: add argument description
|
@param NumberOfChildren Not used
|
||||||
@param ChildHandleBuffer TODO: add argument description
|
@param ChildHandleBuffer Not used
|
||||||
|
|
||||||
TODO: add return values.
|
@retval EFI_SUCCESS This driver is removed DeviceHandle
|
||||||
|
@retval other This driver was not removed from this device
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -199,16 +186,38 @@ IDEBusDriverBindingStop (
|
|||||||
// EFI Driver Configuration Functions
|
// EFI Driver Configuration Functions
|
||||||
//
|
//
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Allows the user to set controller specific options for a controller that a
|
||||||
|
driver is currently managing.
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
|
||||||
@param ControllerHandle TODO: add argument description
|
@param ControllerHandle The handle of the controller to set options on.
|
||||||
@param ChildHandle TODO: add argument description
|
@param ChildHandle The handle of the child controller to set options on.
|
||||||
@param Language TODO: add argument description
|
This is an optional parameter that may be NULL.
|
||||||
@param ActionRequired TODO: add argument description
|
It will be NULL for device drivers, and for a bus drivers
|
||||||
|
that wish to set options for the bus controller.
|
||||||
TODO: add return values.
|
It will not be NULL for a bus driver that wishes to set
|
||||||
|
options for one of its child controllers.
|
||||||
|
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||||
|
This is the language of the user interface that should be presented
|
||||||
|
to the user, and it must match one of the languages specified in
|
||||||
|
SupportedLanguages. The number of languages supported by a driver is up to
|
||||||
|
the driver writer.
|
||||||
|
@param ActionRequired A pointer to the action that the calling agent is required
|
||||||
|
to perform when this function returns.
|
||||||
|
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The driver specified by This successfully set the configuration
|
||||||
|
options for the controller specified by ControllerHandle..
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||||
|
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support setting configuration options for
|
||||||
|
the controller specified by ControllerHandle and ChildHandle.
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support the language specified by Language.
|
||||||
|
@retval EFI_DEVICE_ERROR A device error occurred while attempt to set the configuration options for the
|
||||||
|
controller specified by ControllerHandle and ChildHandle.
|
||||||
|
@retval EFI_OUT_RESOURCES There are not enough resources available to set the configuration options for the
|
||||||
|
controller specified by ControllerHandle and ChildHandle
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@@ -221,14 +230,27 @@ IDEBusDriverConfigurationSetOptions (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Tests to see if a controller's current configuration options are valid.
|
||||||
|
|
||||||
@param This TODO: add argument description
|
|
||||||
@param ControllerHandle TODO: add argument description
|
|
||||||
@param ChildHandle TODO: add argument description
|
|
||||||
|
|
||||||
TODO: add return values.
|
|
||||||
|
|
||||||
|
@param This A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
|
||||||
|
@param ControllerHandle The handle of the controller to test if it's current configuration options
|
||||||
|
are valid.
|
||||||
|
@param ChildHandle The handle of the child controller to test if it's current configuration
|
||||||
|
options are valid. This is an optional parameter that may be NULL. It will
|
||||||
|
be NULL for device drivers. It will also be NULL for a bus drivers that
|
||||||
|
wish to test the configuration options for the bus controller. It will
|
||||||
|
not be NULL for a bus driver that wishes to test configuration options for
|
||||||
|
one of its child controllers.
|
||||||
|
@retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle that is being
|
||||||
|
managed by the driver specified by This has a valid set of configuration
|
||||||
|
options.
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This is not currently managing the controller
|
||||||
|
specified by ControllerHandle and ChildHandle.
|
||||||
|
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle that is being
|
||||||
|
managed by the driver specified by This has an invalid set of configuration
|
||||||
|
options.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@@ -239,16 +261,36 @@ IDEBusDriverConfigurationOptionsValid (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Forces a driver to set the default configuration options for a controller.
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
|
||||||
@param ControllerHandle TODO: add argument description
|
@param ControllerHandle The handle of the controller to force default configuration options on.
|
||||||
@param ChildHandle TODO: add argument description
|
@param ChildHandle The handle of the child controller to force default configuration
|
||||||
@param DefaultType TODO: add argument description
|
options on This is an optional parameter that may be NULL. It
|
||||||
@param ActionRequired TODO: add argument description
|
will be NULL for device drivers. It will also be NULL for a bus
|
||||||
|
drivers that wish to force default configuration options for the bus
|
||||||
TODO: add return values.
|
controller. It will not be NULL for a bus driver that wishes to force
|
||||||
|
default configuration options for one of its child controllers.
|
||||||
|
@param DefaultType The type of default configuration options to force on the controller
|
||||||
|
specified by ControllerHandle and ChildHandle.
|
||||||
|
@param ActionRequired A pointer to the action that the calling agent is required to perform
|
||||||
|
when this function returns.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The driver specified by This successfully forced the
|
||||||
|
default configuration options on the controller specified by
|
||||||
|
ControllerHandle and ChildHandle.
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||||
|
@retval EFI_INVALID_PARAMETER ActionRequired is NULL.
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support forcing the default
|
||||||
|
configuration options on the controller specified by ControllerHandle
|
||||||
|
and ChildHandle.
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support the configuration type
|
||||||
|
specified by DefaultType.
|
||||||
|
@retval EFI_DEVICE_ERROR A device error occurred while attempt to force the default configuration
|
||||||
|
options on the controller specified by ControllerHandle and ChildHandle.
|
||||||
|
@retval EFI_OUT_RESOURCES There are not enough resources available to force the default configuration
|
||||||
|
options on the controller specified by ControllerHandle and ChildHandle.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@@ -264,19 +306,51 @@ IDEBusDriverConfigurationForceDefaults (
|
|||||||
// EFI Driver Diagnostics Functions
|
// EFI Driver Diagnostics Functions
|
||||||
//
|
//
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Runs diagnostics on a controller.
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOLinstance.
|
||||||
@param ControllerHandle TODO: add argument description
|
@param ControllerHandle The handle of the controller to run diagnostics on.
|
||||||
@param ChildHandle TODO: add argument description
|
@param ChildHandle The handle of the child controller to run diagnostics on
|
||||||
@param DiagnosticType TODO: add argument description
|
This is an optional parameter that may be NULL. It will
|
||||||
@param Language TODO: add argument description
|
be NULL for device drivers. It will also be NULL for a
|
||||||
@param ErrorType TODO: add argument description
|
bus drivers that wish to run diagnostics on the bus controller.
|
||||||
@param BufferSize TODO: add argument description
|
It will not be NULL for a bus driver that wishes to run
|
||||||
@param Buffer TODO: add argument description
|
diagnostics on one of its child controllers.
|
||||||
|
@param DiagnosticType Indicates type of diagnostics to perform on the controller
|
||||||
TODO: add return values.
|
specified by ControllerHandle and ChildHandle.
|
||||||
|
@param Language A pointer to a three character ISO 639-2 language identifier.
|
||||||
|
This is the language in which the optional error message should
|
||||||
|
be returned in Buffer, and it must match one of the languages
|
||||||
|
specified in SupportedLanguages. The number of languages supported by
|
||||||
|
a driver is up to the driver writer.
|
||||||
|
@param ErrorType A GUID that defines the format of the data returned in Buffer.
|
||||||
|
@param BufferSize The size, in bytes, of the data returned in Buffer.
|
||||||
|
@param Buffer A buffer that contains a Null-terminated Unicode string
|
||||||
|
plus some additional data whose format is defined by ErrorType.
|
||||||
|
Buffer is allocated by this function with AllocatePool(), and
|
||||||
|
it is the caller's responsibility to free it with a call to FreePool().
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS The controller specified by ControllerHandle and ChildHandle passed
|
||||||
|
the diagnostic.
|
||||||
|
@retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
|
||||||
|
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||||
|
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||||
|
@retval EFI_INVALID_PARAMETER ErrorType is NULL.
|
||||||
|
@retval EFI_INVALID_PARAMETER BufferType is NULL.
|
||||||
|
@retval EFI_INVALID_PARAMETER Buffer is NULL.
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support running
|
||||||
|
diagnostics for the controller specified by ControllerHandle
|
||||||
|
and ChildHandle.
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support the
|
||||||
|
type of diagnostic specified by DiagnosticType.
|
||||||
|
@retval EFI_UNSUPPORTED The driver specified by This does not support the language
|
||||||
|
specified by Language.
|
||||||
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to complete the
|
||||||
|
diagnostics.
|
||||||
|
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to return the
|
||||||
|
status information in ErrorType, BufferSize,and Buffer.
|
||||||
|
@retval EFI_DEVICE_ERROR The controller specified by ControllerHandle and ChildHandle
|
||||||
|
did not pass the diagnostic.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@@ -291,16 +365,15 @@ IDEBusDriverDiagnosticsRunDiagnostics (
|
|||||||
OUT CHAR16 **Buffer
|
OUT CHAR16 **Buffer
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
|
||||||
// Block I/O Protocol Interface
|
|
||||||
//
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
issue ATA or ATAPI command to reset a block IO device.
|
||||||
|
@param This Block IO protocol instance pointer.
|
||||||
|
@param ExtendedVerification If FALSE,for ATAPI device, driver will only invoke ATAPI reset method
|
||||||
|
If TRUE, for ATAPI device, driver need invoke ATA reset method after
|
||||||
|
invoke ATAPI reset method
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@retval EFI_DEVICE_ERROR When the device is neighther ATA device or ATAPI device.
|
||||||
@param ExtendedVerification TODO: add argument description
|
@retval EFI_SUCCESS The device reset successfully
|
||||||
|
|
||||||
TODO: add return values.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -311,15 +384,16 @@ IDEBlkIoReset (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Read data from a block IO device
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This Block IO protocol instance pointer.
|
||||||
@param MediaId TODO: add argument description
|
@param MediaId The media ID of the device
|
||||||
@param Lba TODO: add argument description
|
@param LBA Starting LBA address to read data
|
||||||
@param BufferSize TODO: add argument description
|
@param BufferSize The size of data to be read
|
||||||
@param Buffer TODO: add argument description
|
@param Buffer Caller supplied buffer to save data
|
||||||
|
|
||||||
TODO: add return values.
|
@retval EFI_DEVICE_ERROR unknown device type
|
||||||
|
@retval EFI_SUCCESS read the data successfully.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -333,15 +407,16 @@ IDEBlkIoReadBlocks (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Write data to block io device
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This Protocol instance pointer.
|
||||||
@param MediaId TODO: add argument description
|
@param MediaId The media ID of the device
|
||||||
@param Lba TODO: add argument description
|
@param LBA Starting LBA address to write data
|
||||||
@param BufferSize TODO: add argument description
|
@param BufferSize The size of data to be written
|
||||||
@param Buffer TODO: add argument description
|
@param Buffer Caller supplied buffer to save data
|
||||||
|
|
||||||
TODO: add return values.
|
@retval EFI_DEVICE_ERROR unknown device type
|
||||||
|
@retval other write data status
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -355,42 +430,30 @@ IDEBlkIoWriteBlocks (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Flushes all modified data to a physical block devices
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This Indicates a pointer to the calling context which to sepcify a
|
||||||
|
sepcific block device
|
||||||
TODO: add return values.
|
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Always return success.
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
IDEBlkIoFlushBlocks (
|
IDEBlkIoFlushBlocks (
|
||||||
IN EFI_BLOCK_IO_PROTOCOL *This
|
IN EFI_BLOCK_IO_PROTOCOL *This
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Return the results of the Inquiry command to a drive in InquiryData.
|
||||||
|
Data format of Inquiry data is defined by the Interface GUID.
|
||||||
|
|
||||||
@param PciIo TODO: add argument description
|
@param This Protocol instance pointer.
|
||||||
@param Enable TODO: add argument description
|
@param InquiryData Results of Inquiry command to device
|
||||||
|
@param InquiryDataSize Size of InquiryData in bytes.
|
||||||
|
|
||||||
TODO: add return values.
|
@retval EFI_SUCCESS InquiryData valid
|
||||||
|
@retval EFI_NOT_FOUND Device does not support this data class
|
||||||
**/
|
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
||||||
EFI_STATUS
|
@retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough
|
||||||
IDERegisterDecodeEnableorDisable (
|
|
||||||
IN EFI_PCI_IO_PROTOCOL *PciIo,
|
|
||||||
IN BOOLEAN Enable
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
TODO: Add function description
|
|
||||||
|
|
||||||
@param This TODO: add argument description
|
|
||||||
@param InquiryData TODO: add argument description
|
|
||||||
@param IntquiryDataSize TODO: add argument description
|
|
||||||
|
|
||||||
TODO: add return values.
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -402,13 +465,17 @@ IDEDiskInfoInquiry (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Return the results of the Identify command to a drive in IdentifyData.
|
||||||
|
Data format of Identify data is defined by the Interface GUID.
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This Protocol instance pointer.
|
||||||
@param IdentifyData TODO: add argument description
|
@param IdentifyData Results of Identify command to device
|
||||||
@param IdentifyDataSize TODO: add argument description
|
@param IdentifyDataSize Size of IdentifyData in bytes.
|
||||||
|
|
||||||
TODO: add return values.
|
@retval EFI_SUCCESS IdentifyData valid
|
||||||
|
@retval EFI_NOT_FOUND Device does not support this data class
|
||||||
|
@retval EFI_DEVICE_ERROR Error reading IdentifyData from device
|
||||||
|
@retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -420,14 +487,18 @@ IDEDiskInfoIdentify (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Return the results of the Request Sense command to a drive in SenseData.
|
||||||
|
Data format of Sense data is defined by the Interface GUID.
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This Protocol instance pointer.
|
||||||
@param SenseData TODO: add argument description
|
@param SenseData Results of Request Sense command to device
|
||||||
@param SenseDataSize TODO: add argument description
|
@param SenseDataSize Size of SenseData in bytes.
|
||||||
@param SenseDataNumber TODO: add argument description
|
@param SenseDataNumber Type of SenseData
|
||||||
|
|
||||||
TODO: add return values.
|
@retval EFI_SUCCESS InquiryData valid
|
||||||
|
@retval EFI_NOT_FOUND Device does not support this data class
|
||||||
|
@retval EFI_DEVICE_ERROR Error reading InquiryData from device
|
||||||
|
@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -440,13 +511,15 @@ IDEDiskInfoSenseData (
|
|||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
TODO: Add function description
|
Return the results of the Request Sense command to a drive in SenseData.
|
||||||
|
Data format of Sense data is defined by the Interface GUID.
|
||||||
|
|
||||||
@param This TODO: add argument description
|
@param This Protocol instance pointer.
|
||||||
@param IdeChannel TODO: add argument description
|
@param IdeChannel Primary or Secondary
|
||||||
@param IdeDevice TODO: add argument description
|
@param IdeDevice Master or Slave
|
||||||
|
|
||||||
TODO: add return values.
|
@retval EFI_SUCCESS IdeChannel and IdeDevice are valid
|
||||||
|
@retval EFI_UNSUPPORTED This is not an IDE device
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@@ -456,5 +529,18 @@ IDEDiskInfoWhichIde (
|
|||||||
OUT UINT32 *IdeChannel,
|
OUT UINT32 *IdeChannel,
|
||||||
OUT UINT32 *IdeDevice
|
OUT UINT32 *IdeDevice
|
||||||
);
|
);
|
||||||
|
/**
|
||||||
|
The is an event(generally the event is exitBootService event) call back function.
|
||||||
|
Clear pending IDE interrupt before OS loader/kernel take control of the IDE device.
|
||||||
|
|
||||||
|
@param Event Pointer to this event
|
||||||
|
@param Context Event hanlder private data
|
||||||
|
|
||||||
|
**/
|
||||||
|
VOID
|
||||||
|
EFIAPI
|
||||||
|
ClearInterrupt (
|
||||||
|
IN EFI_EVENT Event,
|
||||||
|
IN VOID *Context
|
||||||
|
);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user