]>
Commit | Line | Data |
---|---|---|
0a6f7170 | 1 | /** @file\r |
20774adc LG |
2 | Disk Info protocol Provides the basic interfaces to abstract \r |
3 | platform information regarding an IDE controller.\r | |
0a6f7170 | 4 | \r |
20774adc | 5 | Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r |
0a6f7170 LG |
6 | All rights reserved. This program and the accompanying materials\r |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef __DISK_INFO_H__\r | |
17 | #define __DISK_INFO_H__\r | |
18 | \r | |
19 | #define EFI_DISK_INFO_PROTOCOL_GUID \\r | |
20 | { \\r | |
21 | 0xd432a67f, 0x14dc, 0x484b, {0xb3, 0xbb, 0x3f, 0x2, 0x91, 0x84, 0x93, 0x27 } \\r | |
22 | }\r | |
23 | \r | |
24 | //\r | |
25 | // Forward reference for pure ANSI compatability\r | |
26 | //\r | |
27 | typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL;\r | |
28 | \r | |
29 | /**\r | |
20774adc LG |
30 | This function is used by the IDE bus driver to get inquiry data. \r |
31 | Data format of Identify data is defined by the Interface GUID.\r | |
0a6f7170 LG |
32 | \r |
33 | @param This Protocol instance pointer. \r | |
20774adc LG |
34 | @param InquiryData Pointer to a buffer for the inquiry data.\r |
35 | @param InquiryDataSize Pointer to the value for the inquiry data size.\r | |
0a6f7170 | 36 | \r |
20774adc | 37 | @retval EFI_SUCCESS The command was accepted without any errors.\r |
0a6f7170 LG |
38 | @retval EFI_NOT_FOUND Device does not support this data class \r |
39 | @retval EFI_DEVICE_ERROR Error reading InquiryData from device \r | |
40 | @retval EFI_BUFFER_TOO_SMALL IntquiryDataSize not big enough \r | |
41 | \r | |
42 | **/\r | |
43 | typedef\r | |
44 | EFI_STATUS\r | |
45 | (EFIAPI *EFI_DISK_INFO_INQUIRY)(\r | |
46 | IN EFI_DISK_INFO_PROTOCOL * This,\r | |
47 | IN OUT VOID *InquiryData,\r | |
48 | IN OUT UINT32 *InquiryDataSize\r | |
49 | );\r | |
50 | \r | |
51 | \r | |
52 | /**\r | |
20774adc | 53 | This function is used by the IDE bus driver to get identify data. \r |
0a6f7170 LG |
54 | Data format of Identify data is defined by the Interface GUID.\r |
55 | \r | |
56 | @param This Protocol instance pointer. \r | |
20774adc LG |
57 | @param IdentifyData Pointer to a buffer for the identify data.\r |
58 | @param IdentifyDataSize Pointer to the value for the identify data size.\r | |
0a6f7170 | 59 | \r |
20774adc | 60 | @retval EFI_SUCCESS The command was accepted without any errors.\r |
0a6f7170 LG |
61 | @retval EFI_NOT_FOUND Device does not support this data class \r |
62 | @retval EFI_DEVICE_ERROR Error reading IdentifyData from device \r | |
63 | @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough \r | |
64 | \r | |
65 | **/\r | |
66 | typedef\r | |
67 | EFI_STATUS\r | |
68 | (EFIAPI *EFI_DISK_INFO_IDENTIFY)(\r | |
69 | IN EFI_DISK_INFO_PROTOCOL * This,\r | |
70 | IN OUT VOID *IdentifyData,\r | |
71 | IN OUT UINT32 *IdentifyDataSize\r | |
72 | );\r | |
73 | \r | |
74 | \r | |
75 | /**\r | |
20774adc | 76 | This function is used by the IDE bus driver to get sense data. \r |
0a6f7170 LG |
77 | Data format of Sense data is defined by the Interface GUID.\r |
78 | \r | |
79 | @param This Protocol instance pointer. \r | |
20774adc | 80 | @param SenseData Pointer to the SenseData. \r |
0a6f7170 | 81 | @param SenseDataSize Size of SenseData in bytes. \r |
20774adc | 82 | @param SenseDataNumber Pointer to the value for the identify data size.\r |
0a6f7170 | 83 | \r |
20774adc | 84 | @retval EFI_SUCCESS The command was accepted without any errors.\r |
0a6f7170 LG |
85 | @retval EFI_NOT_FOUND Device does not support this data class \r |
86 | @retval EFI_DEVICE_ERROR Error reading InquiryData from device \r | |
87 | @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough \r | |
88 | \r | |
89 | **/\r | |
90 | typedef\r | |
91 | EFI_STATUS\r | |
92 | (EFIAPI *EFI_DISK_INFO_SENSE_DATA)(\r | |
93 | IN EFI_DISK_INFO_PROTOCOL * This,\r | |
94 | IN OUT VOID *SenseData,\r | |
95 | IN OUT UINT32 *SenseDataSize,\r | |
96 | OUT UINT8 *SenseDataNumber\r | |
97 | );\r | |
98 | \r | |
99 | /**\r | |
20774adc | 100 | This function is used by the IDE bus driver to get controller information.\r |
0a6f7170 LG |
101 | \r |
102 | @param This Protocol instance pointer. \r | |
20774adc LG |
103 | @param IdeChannel Pointer to the Ide Channel number. Primary or secondary.\r |
104 | @param IdeDevice Pointer to the Ide Device number. Master or slave.\r | |
0a6f7170 LG |
105 | \r |
106 | @retval EFI_SUCCESS IdeChannel and IdeDevice are valid \r | |
107 | @retval EFI_UNSUPPORTED This is not an IDE device \r | |
108 | \r | |
109 | **/\r | |
110 | typedef\r | |
111 | EFI_STATUS\r | |
112 | (EFIAPI *EFI_DISK_INFO_WHICH_IDE)(\r | |
113 | IN EFI_DISK_INFO_PROTOCOL * This,\r | |
114 | OUT UINT32 *IdeChannel,\r | |
115 | OUT UINT32 *IdeDevice\r | |
116 | );\r | |
117 | \r | |
118 | //\r | |
20774adc | 119 | // GUID of the type of interfaces\r |
0a6f7170 LG |
120 | //\r |
121 | #define EFI_DISK_INFO_IDE_INTERFACE_GUID \\r | |
122 | { \\r | |
123 | 0x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec } \\r | |
124 | }\r | |
125 | extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid;\r | |
126 | \r | |
127 | #define EFI_DISK_INFO_SCSI_INTERFACE_GUID \\r | |
128 | { \\r | |
129 | 0x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc } \\r | |
130 | }\r | |
131 | extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid;\r | |
132 | \r | |
133 | #define EFI_DISK_INFO_USB_INTERFACE_GUID \\r | |
134 | { \\r | |
135 | 0xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27 } \\r | |
136 | }\r | |
137 | extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid;\r | |
138 | \r | |
139 | #define EFI_DISK_INFO_AHCI_INTERFACE_GUID \\r | |
140 | { \\r | |
141 | 0x9e498932, 0x4abc, 0x45af, {0xa3, 0x4d, 0x2, 0x47, 0x78, 0x7b, 0xe7, 0xc6} \\r | |
142 | }\r | |
143 | extern EFI_GUID gEfiDiskInfoAhciInterfaceGuid;\r | |
144 | \r | |
145 | struct _EFI_DISK_INFO_PROTOCOL {\r | |
20774adc LG |
146 | ///\r |
147 | /// A GUID that defines the format of buffers for the other member functions of this protocol.\r | |
148 | ///\r | |
149 | EFI_GUID Interface;\r | |
0a6f7170 LG |
150 | EFI_DISK_INFO_INQUIRY Inquiry;\r |
151 | EFI_DISK_INFO_IDENTIFY Identify;\r | |
152 | EFI_DISK_INFO_SENSE_DATA SenseData;\r | |
153 | EFI_DISK_INFO_WHICH_IDE WhichIde;\r | |
154 | };\r | |
155 | \r | |
156 | extern EFI_GUID gEfiDiskInfoProtocolGuid;\r | |
157 | \r | |
158 | #endif\r | |
159 | \r | |
160 | \r |