]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Disk Info protocol is used to export Inquiry Data for a drive.\r | |
3 | It supports low level formating of drives in a DOS compatible manner.\r | |
4 | \r | |
5 | Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r | |
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 | |
30 | Return the results of the Inquiry command to a drive in InquiryData.\r | |
31 | Data format of Inquiry data is defined by the Interface GUID.\r | |
32 | \r | |
33 | @param This Protocol instance pointer. \r | |
34 | @param InquiryData Results of Inquiry command to device \r | |
35 | @param InquiryDataSize Size of InquiryData in bytes. \r | |
36 | \r | |
37 | @retval EFI_SUCCESS InquiryData valid \r | |
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 | |
53 | Return the results of the Identify command to a drive in IdentifyData.\r | |
54 | Data format of Identify data is defined by the Interface GUID.\r | |
55 | \r | |
56 | @param This Protocol instance pointer. \r | |
57 | @param IdentifyData Results of Identify command to device \r | |
58 | @param IdentifyDataSize Size of IdentifyData in bytes. \r | |
59 | \r | |
60 | @retval EFI_SUCCESS IdentifyData valid \r | |
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 | |
76 | Return the results of the Request Sense command to a drive in SenseData.\r | |
77 | Data format of Sense data is defined by the Interface GUID.\r | |
78 | \r | |
79 | @param This Protocol instance pointer. \r | |
80 | @param SenseData Results of Request Sense command to device \r | |
81 | @param SenseDataSize Size of SenseData in bytes. \r | |
82 | @param SenseDataNumber Type of SenseData \r | |
83 | \r | |
84 | @retval EFI_SUCCESS InquiryData valid \r | |
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 | |
100 | Return the IDE device information.\r | |
101 | \r | |
102 | @param This Protocol instance pointer. \r | |
103 | @param IdeChannel Primary or Secondary \r | |
104 | @param IdeDevice Master or Slave \r | |
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 | |
119 | // GUIDs for EFI_DISK_INFO_PROTOCOL.Interface. Defines the format of the\r | |
120 | // buffers returned by member functions.\r | |
121 | //\r | |
122 | #define EFI_DISK_INFO_IDE_INTERFACE_GUID \\r | |
123 | { \\r | |
124 | 0x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec } \\r | |
125 | }\r | |
126 | extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid;\r | |
127 | \r | |
128 | #define EFI_DISK_INFO_SCSI_INTERFACE_GUID \\r | |
129 | { \\r | |
130 | 0x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc } \\r | |
131 | }\r | |
132 | extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid;\r | |
133 | \r | |
134 | #define EFI_DISK_INFO_USB_INTERFACE_GUID \\r | |
135 | { \\r | |
136 | 0xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27 } \\r | |
137 | }\r | |
138 | extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid;\r | |
139 | \r | |
140 | #define EFI_DISK_INFO_AHCI_INTERFACE_GUID \\r | |
141 | { \\r | |
142 | 0x9e498932, 0x4abc, 0x45af, {0xa3, 0x4d, 0x2, 0x47, 0x78, 0x7b, 0xe7, 0xc6} \\r | |
143 | }\r | |
144 | extern EFI_GUID gEfiDiskInfoAhciInterfaceGuid;\r | |
145 | \r | |
146 | struct _EFI_DISK_INFO_PROTOCOL {\r | |
147 | EFI_GUID Interface; /// The format of the buffers returned by member functions.\r | |
148 | EFI_DISK_INFO_INQUIRY Inquiry;\r | |
149 | EFI_DISK_INFO_IDENTIFY Identify;\r | |
150 | EFI_DISK_INFO_SENSE_DATA SenseData;\r | |
151 | EFI_DISK_INFO_WHICH_IDE WhichIde;\r | |
152 | };\r | |
153 | \r | |
154 | extern EFI_GUID gEfiDiskInfoProtocolGuid;\r | |
155 | \r | |
156 | #endif\r | |
157 | \r | |
158 | \r |