atapiextpassthru.h
来自「EFI BIOS是Intel提出的下一代的BIOS标准。这里上传的Edk源代码是」· C头文件 代码 · 共 556 行 · 第 1/2 页
H
556 行
IN EFI_HANDLE Controller,
IN EFI_PCI_IO_PROTOCOL *PciIo
)
/*++
Routine Description:
Attaches SCSI Pass Thru Protocol for specified IDE channel.
Arguments:
This - Protocol instance pointer.
Controller - Parent device handle to the IDE channel.
PciIo - PCI I/O protocol attached on the "Controller".
Returns:
Always return EFI_SUCCESS unless installing SCSI Pass Thru Protocol failed.
--*/
;
EFI_STATUS
EFIAPI
AtapiExtScsiPassThruFunction (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet,
IN EFI_EVENT Event OPTIONAL
)
/*++
Routine Description:
Implements EFI_EXT_SCSI_PASS_THRU_PROTOCOL.PassThru() function.
Arguments:
This: The EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
Target: The Target ID of the ATAPI device to send the SCSI
Request Packet. To ATAPI devices attached on an IDE
Channel, Target ID 0 indicates Master device;Target
ID 1 indicates Slave device.
Lun: The LUN of the ATAPI device to send the SCSI Request
Packet. To the ATAPI device, Lun is always 0.
Packet: The SCSI Request Packet to send to the ATAPI device
specified by Target and Lun.
Event: If non-blocking I/O is not supported then Event is ignored,
and blocking I/O is performed.
If Event is NULL, then blocking I/O is performed.
If Event is not NULL and non blocking I/O is supported,
then non-blocking I/O is performed, and Event will be signaled
when the SCSI Request Packet completes.
Returns:
EFI_STATUS
--*/
;
EFI_STATUS
EFIAPI
AtapiExtScsiPassThruGetNextTargetLun (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target,
IN OUT UINT64 *Lun
)
/*++
Routine Description:
Used to retrieve the list of legal Target IDs for SCSI devices
on a SCSI channel.
Arguments:
This - Protocol instance pointer.
Target - On input, a pointer to the Target ID of a SCSI
device present on the SCSI channel. On output,
a pointer to the Target ID of the next SCSI device
present on a SCSI channel. An input value of
0xFFFFFFFF retrieves the Target ID of the first
SCSI device present on a SCSI channel.
Lun - On input, a pointer to the LUN of a SCSI device
present on the SCSI channel. On output, a pointer
to the LUN of the next SCSI device present on
a SCSI channel.
Returns:
EFI_SUCCESS - The Target ID and Lun of the next SCSI device
on the SCSI channel was returned in Target and Lun.
EFI_NOT_FOUND - There are no more SCSI devices on this SCSI channel.
EFI_INVALID_PARAMETER - Target is not 0xFFFFFFFF,and Target and Lun were not
returned on a previous call to GetNextDevice().
--*/
;
EFI_STATUS
EFIAPI
AtapiExtScsiPassThruBuildDevicePath (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun,
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
)
/*++
Routine Description:
Used to allocate and build a device path node for a SCSI device
on a SCSI channel. Would not build device path for a SCSI Host Controller.
Arguments:
This - Protocol instance pointer.
Target - The Target ID of the SCSI device for which
a device path node is to be allocated and built.
Lun - The LUN of the SCSI device for which a device
path node is to be allocated and built.
DevicePath - A pointer to a single device path node that
describes the SCSI device specified by
Target and Lun. This function is responsible
for allocating the buffer DevicePath with the boot
service AllocatePool(). It is the caller's
responsibility to free DevicePath when the caller
is finished with DevicePath.
Returns:
EFI_SUCCESS - The device path node that describes the SCSI device
specified by Target and Lun was allocated and
returned in DevicePath.
EFI_NOT_FOUND - The SCSI devices specified by Target and Lun does
not exist on the SCSI channel.
EFI_INVALID_PARAMETER - DevicePath is NULL.
EFI_OUT_OF_RESOURCES - There are not enough resources to allocate
DevicePath.
--*/
;
EFI_STATUS
EFIAPI
AtapiExtScsiPassThruGetTargetLun (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
OUT UINT8 **Target,
OUT UINT64 *Lun
)
/*++
Routine Description:
Used to translate a device path node to a Target ID and LUN.
Arguments:
This - Protocol instance pointer.
DevicePath - A pointer to the device path node that
describes a SCSI device on the SCSI channel.
Target - A pointer to the Target ID of a SCSI device
on the SCSI channel.
Lun - A pointer to the LUN of a SCSI device on
the SCSI channel.
Returns:
EFI_SUCCESS - DevicePath was successfully translated to a
Target ID and LUN, and they were returned
in Target and Lun.
EFI_INVALID_PARAMETER - DevicePath/Target/Lun is NULL.
EFI_UNSUPPORTED - This driver does not support the device path
node type in DevicePath.
EFI_NOT_FOUND - A valid translation from DevicePath to a
Target ID and LUN does not exist.
--*/
;
EFI_STATUS
EFIAPI
AtapiExtScsiPassThruResetChannel (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This
)
/*++
Routine Description:
Resets a SCSI channel.This operation resets all the
SCSI devices connected to the SCSI channel.
Arguments:
This - Protocol instance pointer.
Returns:
EFI_SUCCESS - The SCSI channel was reset.
EFI_UNSUPPORTED - The SCSI channel does not support
a channel reset operation.
EFI_DEVICE_ERROR - A device error occurred while
attempting to reset the SCSI channel.
EFI_TIMEOUT - A timeout occurred while attempting
to reset the SCSI channel.
--*/
;
EFI_STATUS
EFIAPI
AtapiExtScsiPassThruResetTarget (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN UINT8 *Target,
IN UINT64 Lun
)
/*++
Routine Description:
Resets a SCSI device that is connected to a SCSI channel.
Arguments:
This - Protocol instance pointer.
Target - The Target ID of the SCSI device to reset.
Lun - The LUN of the SCSI device to reset.
Returns:
EFI_SUCCESS - The SCSI device specified by Target and
Lun was reset.
EFI_UNSUPPORTED - The SCSI channel does not support a target
reset operation.
EFI_INVALID_PARAMETER - Target or Lun are invalid.
EFI_DEVICE_ERROR - A device error occurred while attempting
to reset the SCSI device specified by Target
and Lun.
EFI_TIMEOUT - A timeout occurred while attempting to reset
the SCSI device specified by Target and Lun.
--*/
;
EFI_STATUS
EFIAPI
AtapiExtScsiPassThruGetNextTarget (
IN EFI_EXT_SCSI_PASS_THRU_PROTOCOL *This,
IN OUT UINT8 **Target
)
/*++
Routine Description:
Used to retrieve the list of legal Target IDs for SCSI devices
on a SCSI channel.
Arguments:
This - Protocol instance pointer.
Target - On input, a pointer to the Target ID of a SCSI
device present on the SCSI channel. On output,
a pointer to the Target ID of the next SCSI device
present on a SCSI channel. An input value of
0xFFFFFFFF retrieves the Target ID of the first
SCSI device present on a SCSI channel.
Lun - On input, a pointer to the LUN of a SCSI device
present on the SCSI channel. On output, a pointer
to the LUN of the next SCSI device present on
a SCSI channel.
Returns:
EFI_SUCCESS - The Target ID and Lun of the next SCSI device
on the SCSI channel was returned in Target and Lun.
EFI_NOT_FOUND - There are no more SCSI devices on this SCSI channel.
EFI_INVALID_PARAMETER - Target is not 0xFFFFFFFF,and Target and Lun were not
returned on a previous call to GetNextDevice().
--*/
;
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?