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