88f20127 |
1 | /*++\r |
2 | \r |
3 | Copyright (c) 2006, Intel Corporation\r |
4 | All rights reserved. This program and the accompanying materials\r |
5 | are licensed and made available under the terms and conditions of the BSD License\r |
6 | which accompanies this distribution. The full text of the license may be found at\r |
7 | http://opensource.org/licenses/bsd-license.php\r |
8 | \r |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r |
11 | \r |
12 | Module Name:\r |
13 | \r |
14 | DiskInfo.h\r |
15 | \r |
16 | Abstract:\r |
17 | \r |
18 | Disk Info protocol is used to export Inquiry Data for a drive.\r |
19 | Its needed to support low level formating of drives in a mannor\r |
20 | thats DOS compatible.\r |
21 | \r |
22 | --*/\r |
23 | \r |
24 | #ifndef __DISK_INFO_H__\r |
25 | #define __DISK_INFO_H__\r |
26 | \r |
27 | #define EFI_DISK_INFO_PROTOCOL_GUID \\r |
28 | { \\r |
29 | 0xd432a67f, 0x14dc, 0x484b, {0xb3, 0xbb, 0x3f, 0x2, 0x91, 0x84, 0x93, 0x27 } \\r |
30 | }\r |
31 | \r |
32 | //\r |
33 | // Forward reference for pure ANSI compatability\r |
34 | //\r |
35 | typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL;\r |
36 | \r |
37 | typedef\r |
38 | EFI_STATUS\r |
39 | (EFIAPI *EFI_DISK_INFO_INQUIRY) (\r |
40 | IN EFI_DISK_INFO_PROTOCOL * This,\r |
41 | IN OUT VOID *InquiryData,\r |
42 | IN OUT UINT32 *IntquiryDataSize\r |
43 | )\r |
44 | /*++\r |
45 | \r |
46 | Routine Description:\r |
47 | Return the results of the Inquiry command to a drive in InquiryData.\r |
48 | Data format of Inquiry data is defined by the Interface GUID.\r |
49 | \r |
50 | Arguments:\r |
51 | This - Protocol instance pointer.\r |
52 | InquiryData - Results of Inquiry command to device\r |
53 | InquiryDataSize - Size of InquiryData in bytes.\r |
54 | \r |
55 | Returns:\r |
56 | EFI_SUCCESS - InquiryData valid\r |
57 | EFI_NOT_FOUND - Device does not support this data class\r |
58 | EFI_DEVICE_ERROR - Error reading InquiryData from device\r |
59 | EFI_BUFFER_TOO_SMALL - IntquiryDataSize not big enough\r |
60 | \r |
61 | --*/\r |
62 | ;\r |
63 | \r |
64 | typedef\r |
65 | EFI_STATUS\r |
66 | (EFIAPI *EFI_DISK_INFO_IDENTIFY) (\r |
67 | IN EFI_DISK_INFO_PROTOCOL * This,\r |
68 | IN OUT VOID *IdentifyData,\r |
69 | IN OUT UINT32 *IdentifyDataSize\r |
70 | )\r |
71 | /*++\r |
72 | \r |
73 | Routine Description:\r |
74 | Return the results of the Identify command to a drive in IdentifyData.\r |
75 | Data format of Identify data is defined by the Interface GUID.\r |
76 | \r |
77 | Arguments:\r |
78 | This - Protocol instance pointer.\r |
79 | IdentifyData - Results of Identify command to device\r |
80 | IdentifyDataSize - Size of IdentifyData in bytes.\r |
81 | \r |
82 | Returns:\r |
83 | EFI_SUCCESS - IdentifyData valid\r |
84 | EFI_NOT_FOUND - Device does not support this data class\r |
85 | EFI_DEVICE_ERROR - Error reading IdentifyData from device\r |
86 | EFI_BUFFER_TOO_SMALL - IdentifyDataSize not big enough\r |
87 | \r |
88 | --*/\r |
89 | ;\r |
90 | \r |
91 | typedef\r |
92 | EFI_STATUS\r |
93 | (EFIAPI *EFI_DISK_INFO_SENSE_DATA) (\r |
94 | IN EFI_DISK_INFO_PROTOCOL * This,\r |
95 | IN OUT VOID *SenseData,\r |
96 | IN OUT UINT32 *SenseDataSize,\r |
97 | OUT UINT8 *SenseDataNumber\r |
98 | )\r |
99 | /*++\r |
100 | \r |
101 | Routine Description:\r |
102 | Return the results of the Request Sense command to a drive in SenseData.\r |
103 | Data format of Sense data is defined by the Interface GUID.\r |
104 | \r |
105 | Arguments:\r |
106 | This - Protocol instance pointer.\r |
107 | SenseData - Results of Request Sense command to device\r |
108 | SenseDataSize - Size of SenseData in bytes.\r |
109 | SenseDataNumber - Type of SenseData\r |
110 | \r |
111 | Returns:\r |
112 | EFI_SUCCESS - InquiryData valid\r |
113 | EFI_NOT_FOUND - Device does not support this data class\r |
114 | EFI_DEVICE_ERROR - Error reading InquiryData from device\r |
115 | EFI_BUFFER_TOO_SMALL - SenseDataSize not big enough\r |
116 | \r |
117 | --*/\r |
118 | ;\r |
119 | \r |
120 | typedef\r |
121 | EFI_STATUS\r |
122 | (EFIAPI *EFI_DISK_INFO_WHICH_IDE) (\r |
123 | IN EFI_DISK_INFO_PROTOCOL * This,\r |
124 | OUT UINT32 *IdeChannel,\r |
125 | OUT UINT32 *IdeDevice\r |
126 | )\r |
127 | /*++\r |
128 | \r |
129 | Routine Description:\r |
130 | Return the results of the Request Sense command to a drive in SenseData.\r |
131 | Data format of Sense data is defined by the Interface GUID.\r |
132 | \r |
133 | Arguments:\r |
134 | This - Protocol instance pointer.\r |
135 | IdeChannel - Primary or Secondary\r |
136 | IdeDevice - Master or Slave\r |
137 | \r |
138 | Returns:\r |
139 | EFI_SUCCESS - IdeChannel and IdeDevice are valid\r |
140 | EFI_UNSUPPORTED - This is not an IDE device\r |
141 | \r |
142 | --*/\r |
143 | ;\r |
144 | \r |
145 | //\r |
146 | // GUIDs for EFI_DISK_INFO_PROTOCOL.Interface. Defines the format of the\r |
147 | // buffers returned by member functions\r |
148 | //\r |
149 | #define EFI_DISK_INFO_IDE_INTERFACE_GUID \\r |
150 | { \\r |
151 | 0x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec } \\r |
152 | }\r |
153 | extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid;\r |
154 | \r |
155 | #define EFI_DISK_INFO_SCSI_INTERFACE_GUID \\r |
156 | { \\r |
157 | 0x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc } \\r |
158 | }\r |
159 | extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid;\r |
160 | \r |
161 | #define EFI_DISK_INFO_USB_INTERFACE_GUID \\r |
162 | { \\r |
163 | 0xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27 } \\r |
164 | }\r |
165 | extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid;\r |
166 | \r |
167 | struct _EFI_DISK_INFO_PROTOCOL {\r |
168 | EFI_GUID Interface;\r |
169 | EFI_DISK_INFO_INQUIRY Inquiry;\r |
170 | EFI_DISK_INFO_IDENTIFY Identify;\r |
171 | EFI_DISK_INFO_SENSE_DATA SenseData;\r |
172 | EFI_DISK_INFO_WHICH_IDE WhichIde;\r |
173 | };\r |
174 | \r |
175 | extern EFI_GUID gEfiDiskInfoProtocolGuid;\r |
176 | \r |
177 | #endif\r |
178 | \r |
179 | \r |