1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
//**********************************************************************
//**********************************************************************
//** **
//** (C)Copyright 1985-2007, American Megatrends, Inc. **
//** **
//** All Rights Reserved. **
//** **
//** 5555 Oakbrook Pkwy, Suite 200, Norcross, GA 30093 **
//** **
//** Phone: (770)-246-8600 **
//** **
//**********************************************************************
//**********************************************************************
//**********************************************************************
//
// $Header: /Alaska/SOURCE/Modules/USBRecovery/UsbBotPeimSrc/BotPeim.h 5 11/24/12 5:47a Ryanchou $
//
// $Revision: 5 $
//
// $Date: 11/24/12 5:47a $
//
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/USBRecovery/UsbBotPeimSrc/BotPeim.h $
//
// 5 11/24/12 5:47a Ryanchou
// [TAG] EIP103990
// [Category] Improvement
// [Description] Synchronized with USB PEI module 4.6.3_USB_08.10.24.
// [Files] EhciPei.c, EhciPei.h, OhciPei.c, OhciPei.h, UhcPeim.c,
// BotPeim.c, BotPeim.h, PeiAtapi.c, UsbBotPeim.c, UsbBotPeim.h,
// HubPeim.c, UsbPeim.c, XhciPei.c, XhciPei.h, HubPeim.h, PeiUsbLib.c,
// PeiUsbLib.h, UsbPeim.h
//
// 4 7/10/08 6:38p Michaela
// Updated to support OHCI controllers
//
// 3 4/16/07 12:46p Sivagarn
// - Updated as per coding standard review
// - In previous check-in, TIANO.H file is removed and AMIMAPPING.H file
// is included
//
// 2 3/28/07 3:40a Meenakshim
//
// 1 9/22/06 12:17p Sivagarn
// - Included Recovery code in Source
//
// 1 9/22/06 12:14p Sivagarn
// - Initial checkin
// - Included Recovery code in Source
//
//*****************************************************************************
//<AMI_FHDR_START>
//----------------------------------------------------------------------------
//
// Name: BotPeim.h
//
// Description: This file belongs to "Framework".
// This file is modified by AMI to include copyright message,
// appropriate header and integration code.
//
//----------------------------------------------------------------------------
//<AMI_FHDR_END>
//
// This file contains a 'Sample Driver' and is licensed as such
// under the terms of your license agreement with Intel or your
// vendor. This file may be modified by the user, subject to
// the additional terms of the license agreement
//
/*++
Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
This software and associated documentation (if any) is furnished
under a license and may only be used or copied in accordance
with the terms of the license. Except as permitted by such
license, no part of this software or documentation may be
reproduced, stored in a retrieval system, or transmitted in any
form or by any means without the express written consent of
Intel Corporation.
Module Name:
BotPeim.h
Abstract:
BOT Transportation implementation
--*/
#ifndef _PEI_BOT_PEIM_H
#define _PEI_BOT_PEIM_H
#define STATIC static
#include "Atapi.h"
#include "AmiPeiLib.h"
#pragma pack(1)
//
//Bulk Only device protocol
//
typedef struct
{
UINT32 dCBWSignature;
UINT32 dCBWTag;
UINT32 dCBWDataTransferLength;
UINT8 bmCBWFlags;
UINT8 bCBWLUN;
UINT8 bCBWCBLength;
UINT8 CBWCB[16];
} CBW;
typedef struct
{
UINT32 dCSWSignature;
UINT32 dCSWTag;
UINT32 dCSWDataResidue;
UINT8 bCSWStatus;
UINT8 Filler[18];
} CSW;
#pragma pack()
//
// Status code, see Usb Bot device spec
//
#define CSWSIG 0x53425355
#define CBWSIG 0x43425355
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,
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 REQUEST_SENSE_DATA *SenseData,
IN UINTN SenseCounts );
BOOLEAN
IsMediaError (
IN REQUEST_SENSE_DATA *SenseData,
IN UINTN SenseCounts );
BOOLEAN
IsMediaChange (
IN REQUEST_SENSE_DATA *SenseData,
IN UINTN SenseCounts );
#endif
//**********************************************************************
//**********************************************************************
//** **
//** (C)Copyright 1985-2007, American Megatrends, Inc. **
//** **
//** All Rights Reserved. **
//** **
//** 5555 Oakbrook Pkwy, Suite 200, Norcross, GA 30093 **
//** **
//** Phone: (770)-246-8600 **
//** **
//**********************************************************************
//**********************************************************************
//**********************************************************************
|