TianoCore EDK2 master
|
#include <PiPei.h>
#include <Ppi/UsbIo.h>
#include <Ppi/UsbHostController.h>
#include <Ppi/BlockIo.h>
#include <Library/PeimEntryPoint.h>
#include <Library/PeiServicesLib.h>
#include <Library/BaseMemoryLib.h>
#include <IndustryStandard/Atapi.h>
Go to the source code of this file.
Data Structures | |
struct | CBW |
struct | CSW |
Macros | |
#define | CSWSIG 0x53425355 |
#define | CBWSIG 0x43425355 |
Functions | |
EFI_STATUS | PeiUsbInquiry (IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice) |
EFI_STATUS | PeiUsbTestUnitReady (IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice) |
EFI_STATUS | PeiUsbRequestSense (IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice, OUT UINTN *SenseCounts, IN UINT8 *SenseKeyBuffer) |
EFI_STATUS | PeiUsbReadCapacity (IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice) |
EFI_STATUS | PeiUsbReadFormattedCapacity (IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice) |
EFI_STATUS | PeiUsbRead10 (IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice, IN VOID *Buffer, IN EFI_PEI_LBA Lba, IN UINTN NumberOfBlocks) |
BOOLEAN | IsNoMedia (IN ATAPI_REQUEST_SENSE_DATA *SenseData, IN UINTN SenseCounts) |
BOOLEAN | IsMediaError (IN ATAPI_REQUEST_SENSE_DATA *SenseData, IN UINTN SenseCounts) |
BOOLEAN | IsMediaChange (IN ATAPI_REQUEST_SENSE_DATA *SenseData, IN UINTN SenseCounts) |
BOT Transportation implementation.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file BotPeim.h.
BOOLEAN IsMediaChange | ( | IN ATAPI_REQUEST_SENSE_DATA * | SenseData, |
IN UINTN | SenseCounts | ||
) |
Check if media is changed according to sense data.
SenseData | Pointer to sense data. |
SenseCounts | Count of sense data. |
TRUE | There is media change event. |
FALSE | media is NOT changed. |
Definition at line 603 of file PeiAtapi.c.
BOOLEAN IsMediaError | ( | IN ATAPI_REQUEST_SENSE_DATA * | SenseData, |
IN UINTN | SenseCounts | ||
) |
Check if there is media error according to sense data.
SenseData | Pointer to sense data. |
SenseCounts | Count of sense data. |
TRUE | Media error |
FALSE | No media error |
Check if there is media error according to sense data.
[in] | SenseData | Pointer to sense data. |
[in] | SenseCounts | Count of sense data. |
TRUE | Media error |
FALSE | No media error |
Definition at line 2355 of file AtapiPeim.c.
BOOLEAN IsNoMedia | ( | IN ATAPI_REQUEST_SENSE_DATA * | SenseData, |
IN UINTN | SenseCounts | ||
) |
Check if there is media according to sense data.
SenseData | Pointer to sense data. |
SenseCounts | Count of sense data. |
TRUE | No media |
FALSE | Media exists |
Check if there is media according to sense data.
[in] | SenseData | Pointer to sense data. |
[in] | SenseCounts | Count of sense data. |
TRUE | No media |
FALSE | Media exists |
Definition at line 2280 of file AtapiPeim.c.
EFI_STATUS PeiUsbInquiry | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_BOT_DEVICE * | PeiBotDevice | ||
) |
Sends out ATAPI Inquiry Packet Command to the specified device. This command will return INQUIRY data of the device.
PeiServices | The pointer of EFI_PEI_SERVICES. |
PeiBotDevice | The pointer to PEI_BOT_DEVICE instance. |
EFI_SUCCESS | Inquiry command completes successfully. |
EFI_DEVICE_ERROR | Inquiry command failed. |
Definition at line 28 of file PeiAtapi.c.
EFI_STATUS PeiUsbRead10 | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_BOT_DEVICE * | PeiBotDevice, | ||
IN VOID * | Buffer, | ||
IN EFI_PEI_LBA | Lba, | ||
IN UINTN | NumberOfBlocks | ||
) |
Execute Read(10) ATAPI command on a specific SCSI target.
Executes the ATAPI Read(10) command on the ATAPI target specified by PeiBotDevice.
PeiServices | The pointer of EFI_PEI_SERVICES. |
PeiBotDevice | The pointer to PEI_BOT_DEVICE instance. |
Buffer | The pointer to data buffer. |
Lba | The start logic block address of reading. |
NumberOfBlocks | The block number of reading. |
EFI_SUCCESS | Command executed successfully. |
EFI_DEVICE_ERROR | Some device errors happen. |
Definition at line 375 of file PeiAtapi.c.
EFI_STATUS PeiUsbReadCapacity | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_BOT_DEVICE * | PeiBotDevice | ||
) |
Sends out ATAPI Read Capacity Packet Command to the specified device. This command will return the information regarding the capacity of the media in the device.
PeiServices | The pointer of EFI_PEI_SERVICES. |
PeiBotDevice | The pointer to PEI_BOT_DEVICE instance. |
EFI_SUCCESS | Command executed successfully. |
EFI_DEVICE_ERROR | Some device errors happen. |
Definition at line 237 of file PeiAtapi.c.
EFI_STATUS PeiUsbReadFormattedCapacity | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_BOT_DEVICE * | PeiBotDevice | ||
) |
Sends out ATAPI Read Format Capacity Data Command to the specified device. This command will return the information regarding the capacity of the media in the device.
PeiServices | The pointer of EFI_PEI_SERVICES. |
PeiBotDevice | The pointer to PEI_BOT_DEVICE instance. |
EFI_SUCCESS | Command executed successfully. |
EFI_DEVICE_ERROR | Some device errors happen. |
Definition at line 298 of file PeiAtapi.c.
EFI_STATUS PeiUsbRequestSense | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_BOT_DEVICE * | PeiBotDevice, | ||
OUT UINTN * | SenseCounts, | ||
IN UINT8 * | SenseKeyBuffer | ||
) |
Sends out ATAPI Request Sense Packet Command to the specified device.
PeiServices | The pointer of EFI_PEI_SERVICES. |
PeiBotDevice | The pointer to PEI_BOT_DEVICE instance. |
SenseCounts | Length of sense buffer. |
SenseKeyBuffer | Pointer to sense buffer. |
EFI_SUCCESS | Command executed successfully. |
EFI_DEVICE_ERROR | Some device errors happen. |
Definition at line 144 of file PeiAtapi.c.
EFI_STATUS PeiUsbTestUnitReady | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_BOT_DEVICE * | PeiBotDevice | ||
) |
Sends out ATAPI Test Unit Ready Packet Command to the specified device to find out whether device is accessible.
PeiServices | The pointer of EFI_PEI_SERVICES. |
PeiBotDevice | The pointer to PEI_BOT_DEVICE instance. |
EFI_SUCCESS | TestUnit command executed successfully. |
EFI_DEVICE_ERROR | Device cannot be executed TestUnit command successfully. |
Definition at line 96 of file PeiAtapi.c.