]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004, 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 | |
7ccf38a3 | 29 | 0xd432a67f, 0x14dc, 0x484b, {0xb3, 0xbb, 0x3f, 0x2, 0x91, 0x84, 0x93, 0x27} \\r |
3eb9473e | 30 | }\r |
31 | \r | |
32 | EFI_FORWARD_DECLARATION (EFI_DISK_INFO_PROTOCOL);\r | |
33 | \r | |
34 | typedef\r | |
35 | EFI_STATUS\r | |
36 | (EFIAPI *EFI_DISK_INFO_INQUIRY) (\r | |
37 | IN EFI_DISK_INFO_PROTOCOL * This,\r | |
38 | IN OUT VOID *InquiryData,\r | |
39 | IN OUT UINT32 *IntquiryDataSize\r | |
40 | )\r | |
41 | /*++\r | |
42 | \r | |
43 | Routine Description:\r | |
44 | Return the results of the Inquiry command to a drive in InquiryData.\r | |
45 | Data format of Inquiry data is defined by the Interface GUID.\r | |
46 | \r | |
47 | Arguments:\r | |
48 | This - Protocol instance pointer.\r | |
49 | InquiryData - Results of Inquiry command to device\r | |
50 | InquiryDataSize - Size of InquiryData in bytes.\r | |
51 | \r | |
52 | Returns:\r | |
53 | EFI_SUCCESS - InquiryData valid\r | |
54 | EFI_NOT_FOUND - Device does not support this data class\r | |
55 | EFI_DEVICE_ERROR - Error reading InquiryData from device \r | |
56 | EFI_BUFFER_TOO_SMALL - IntquiryDataSize not big enough\r | |
57 | \r | |
58 | --*/\r | |
59 | ;\r | |
60 | \r | |
61 | typedef\r | |
62 | EFI_STATUS\r | |
63 | (EFIAPI *EFI_DISK_INFO_IDENTIFY) (\r | |
64 | IN EFI_DISK_INFO_PROTOCOL * This,\r | |
65 | IN OUT VOID *IdentifyData,\r | |
66 | IN OUT UINT32 *IdentifyDataSize\r | |
67 | )\r | |
68 | /*++\r | |
69 | \r | |
70 | Routine Description:\r | |
71 | Return the results of the Identify command to a drive in IdentifyData.\r | |
72 | Data format of Identify data is defined by the Interface GUID.\r | |
73 | \r | |
74 | Arguments:\r | |
75 | This - Protocol instance pointer.\r | |
76 | IdentifyData - Results of Identify command to device\r | |
77 | IdentifyDataSize - Size of IdentifyData in bytes.\r | |
78 | \r | |
79 | Returns:\r | |
80 | EFI_SUCCESS - IdentifyData valid\r | |
81 | EFI_NOT_FOUND - Device does not support this data class\r | |
82 | EFI_DEVICE_ERROR - Error reading IdentifyData from device \r | |
83 | EFI_BUFFER_TOO_SMALL - IdentifyDataSize not big enough\r | |
84 | \r | |
85 | --*/\r | |
86 | ;\r | |
87 | \r | |
88 | typedef\r | |
89 | EFI_STATUS\r | |
90 | (EFIAPI *EFI_DISK_INFO_SENSE_DATA) (\r | |
91 | IN EFI_DISK_INFO_PROTOCOL * This,\r | |
92 | IN OUT VOID *SenseData,\r | |
93 | IN OUT UINT32 *SenseDataSize,\r | |
94 | OUT UINT8 *SenseDataNumber\r | |
95 | )\r | |
96 | /*++\r | |
97 | \r | |
98 | Routine Description:\r | |
99 | Return the results of the Request Sense command to a drive in SenseData.\r | |
100 | Data format of Sense data is defined by the Interface GUID.\r | |
101 | \r | |
102 | Arguments:\r | |
103 | This - Protocol instance pointer.\r | |
104 | SenseData - Results of Request Sense command to device\r | |
105 | SenseDataSize - Size of SenseData in bytes.\r | |
106 | SenseDataNumber - Type of SenseData\r | |
107 | \r | |
108 | Returns:\r | |
109 | EFI_SUCCESS - InquiryData valid\r | |
110 | EFI_NOT_FOUND - Device does not support this data class\r | |
111 | EFI_DEVICE_ERROR - Error reading InquiryData from device \r | |
112 | EFI_BUFFER_TOO_SMALL - SenseDataSize not big enough\r | |
113 | \r | |
114 | --*/\r | |
115 | ;\r | |
116 | \r | |
117 | typedef\r | |
118 | EFI_STATUS\r | |
119 | (EFIAPI *EFI_DISK_INFO_WHICH_IDE) (\r | |
120 | IN EFI_DISK_INFO_PROTOCOL * This,\r | |
121 | OUT UINT32 *IdeChannel,\r | |
122 | OUT UINT32 *IdeDevice\r | |
123 | )\r | |
124 | /*++\r | |
125 | \r | |
126 | Routine Description:\r | |
127 | Return the results of the Request Sense command to a drive in SenseData.\r | |
128 | Data format of Sense data is defined by the Interface GUID.\r | |
129 | \r | |
130 | Arguments:\r | |
131 | This - Protocol instance pointer.\r | |
132 | IdeChannel - Primary or Secondary\r | |
133 | IdeDevice - Master or Slave\r | |
134 | \r | |
135 | Returns:\r | |
136 | EFI_SUCCESS - IdeChannel and IdeDevice are valid\r | |
137 | EFI_UNSUPPORTED - This is not an IDE device\r | |
138 | \r | |
139 | --*/\r | |
140 | ;\r | |
141 | \r | |
142 | //\r | |
143 | // GUIDs for EFI_DISK_INFO_PROTOCOL.Interface. Defines the format of the\r | |
144 | // buffers returned by member functions\r | |
145 | //\r | |
146 | #define EFI_DISK_INFO_IDE_INTERFACE_GUID \\r | |
147 | { \\r | |
7ccf38a3 | 148 | 0x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec} \\r |
3eb9473e | 149 | }\r |
150 | extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid;\r | |
151 | \r | |
152 | #define EFI_DISK_INFO_SCSI_INTERFACE_GUID \\r | |
153 | { \\r | |
7ccf38a3 | 154 | 0x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc} \\r |
3eb9473e | 155 | }\r |
156 | extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid;\r | |
157 | \r | |
158 | #define EFI_DISK_INFO_USB_INTERFACE_GUID \\r | |
159 | { \\r | |
7ccf38a3 | 160 | 0xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27} \\r |
3eb9473e | 161 | }\r |
162 | extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid;\r | |
163 | \r | |
c7f33ca4 | 164 | #define EFI_DISK_INFO_AHCI_INTERFACE_GUID \\r |
165 | { \\r | |
7ccf38a3 | 166 | 0x9e498932, 0x4abc, 0x45af, {0xa3, 0x4d, 0x2, 0x47, 0x78, 0x7b, 0xe7, 0xc6} \\r |
c7f33ca4 | 167 | }\r |
168 | extern EFI_GUID gEfiDiskInfoAhciInterfaceGuid;\r | |
169 | \r | |
9c092841 | 170 | struct _EFI_DISK_INFO_PROTOCOL {\r |
3eb9473e | 171 | EFI_GUID Interface;\r |
172 | EFI_DISK_INFO_INQUIRY Inquiry;\r | |
173 | EFI_DISK_INFO_IDENTIFY Identify;\r | |
174 | EFI_DISK_INFO_SENSE_DATA SenseData;\r | |
175 | EFI_DISK_INFO_WHICH_IDE WhichIde;\r | |
9c092841 | 176 | };\r |
3eb9473e | 177 | \r |
178 | extern EFI_GUID gEfiDiskInfoProtocolGuid;\r | |
179 | \r | |
180 | #endif\r |