TianoCore EDK2 master
Loading...
Searching...
No Matches
BotPeim.h
Go to the documentation of this file.
1
10#ifndef _PEI_BOT_PEIM_H_
11#define _PEI_BOT_PEIM_H_
12
13#include <PiPei.h>
14
15#include <Ppi/UsbIo.h>
17#include <Ppi/BlockIo.h>
18
19// #include <Library/DebugLib.h>
23
25
26#pragma pack(1)
27//
28// Bulk Only device protocol
29//
30typedef struct {
31 UINT32 Signature;
32 UINT32 Tag;
33 UINT32 DataTransferLength;
34 UINT8 Flags;
35 UINT8 Lun;
36 UINT8 CmdLen;
37 UINT8 CmdBlock[16];
38} CBW;
39
40typedef struct {
41 UINT32 Signature;
42 UINT32 Tag;
43 UINT32 DataResidue;
44 UINT8 Status;
45} CSW;
46
47#pragma pack()
48//
49// Status code, see Usb Bot device spec
50//
51#define CSWSIG 0x53425355
52#define CBWSIG 0x43425355
53
67 IN EFI_PEI_SERVICES **PeiServices,
68 IN PEI_BOT_DEVICE *PeiBotDevice
69 );
70
84 IN EFI_PEI_SERVICES **PeiServices,
85 IN PEI_BOT_DEVICE *PeiBotDevice
86 );
87
102 IN EFI_PEI_SERVICES **PeiServices,
103 IN PEI_BOT_DEVICE *PeiBotDevice,
104 OUT UINTN *SenseCounts,
105 IN UINT8 *SenseKeyBuffer
106 );
107
122 IN EFI_PEI_SERVICES **PeiServices,
123 IN PEI_BOT_DEVICE *PeiBotDevice
124 );
125
140 IN EFI_PEI_SERVICES **PeiServices,
141 IN PEI_BOT_DEVICE *PeiBotDevice
142 );
143
161 IN EFI_PEI_SERVICES **PeiServices,
162 IN PEI_BOT_DEVICE *PeiBotDevice,
163 IN VOID *Buffer,
164 IN EFI_PEI_LBA Lba,
165 IN UINTN NumberOfBlocks
166 );
167
178BOOLEAN
179IsNoMedia (
180 IN ATAPI_REQUEST_SENSE_DATA *SenseData,
181 IN UINTN SenseCounts
182 );
183
194BOOLEAN
196 IN ATAPI_REQUEST_SENSE_DATA *SenseData,
197 IN UINTN SenseCounts
198 );
199
210BOOLEAN
212 IN ATAPI_REQUEST_SENSE_DATA *SenseData,
213 IN UINTN SenseCounts
214 );
215
216#endif
UINT64 UINTN
EFI_STATUS PeiUsbReadCapacity(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice)
Definition: PeiAtapi.c:237
EFI_STATUS PeiUsbRequestSense(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice, OUT UINTN *SenseCounts, IN UINT8 *SenseKeyBuffer)
Definition: PeiAtapi.c:144
EFI_STATUS PeiUsbRead10(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice, IN VOID *Buffer, IN EFI_PEI_LBA Lba, IN UINTN NumberOfBlocks)
Definition: PeiAtapi.c:375
EFI_STATUS PeiUsbReadFormattedCapacity(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice)
Definition: PeiAtapi.c:298
EFI_STATUS PeiUsbTestUnitReady(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice)
Definition: PeiAtapi.c:96
EFI_STATUS PeiUsbInquiry(IN EFI_PEI_SERVICES **PeiServices, IN PEI_BOT_DEVICE *PeiBotDevice)
Definition: PeiAtapi.c:28
BOOLEAN IsNoMedia(IN ATAPI_REQUEST_SENSE_DATA *SenseData, IN UINTN SenseCounts)
Definition: AtapiPeim.c:2280
BOOLEAN IsMediaError(IN ATAPI_REQUEST_SENSE_DATA *SenseData, IN UINTN SenseCounts)
Definition: AtapiPeim.c:2355
BOOLEAN IsMediaChange(IN ATAPI_REQUEST_SENSE_DATA *SenseData, IN UINTN SenseCounts)
Definition: PeiAtapi.c:603
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
UINT64 EFI_PEI_LBA
Definition: BlockIo.h:41
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
Definition: BotPeim.h:30
Definition: BotPeim.h:40