TianoCore EDK2 master
|
Go to the source code of this file.
Macros | |
#define | MAXSENSEKEY 5 |
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) |
Pei USB ATAPI command implementations.
Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PeiAtapi.c.
#define MAXSENSEKEY 5 |
Definition at line 14 of file PeiAtapi.c.
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 |
Definition at line 526 of file PeiAtapi.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 |
Definition at line 476 of file PeiAtapi.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.