]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdeModulePkg/Include/Protocol/DiskInfo.h
Code scrube for MdeModule Definitions.
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / DiskInfo.h
... / ...
CommitLineData
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
5\r
6Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
7All rights reserved. This program and the accompanying materials\r
8are licensed and made available under the terms and conditions of the BSD License\r
9which accompanies this distribution. The full text of the license may be found at\r
10http://opensource.org/licenses/bsd-license.php\r
11\r
12THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
15**/\r
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
28typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL;\r
29\r
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
44typedef\r
45EFI_STATUS\r
46(EFIAPI *EFI_DISK_INFO_INQUIRY) (\r
47 IN EFI_DISK_INFO_PROTOCOL * This,\r
48 IN OUT VOID *InquiryData,\r
49 IN OUT UINT32 *IntquiryDataSize\r
50 )\r
51;\r
52\r
53\r
54/**\r
55 Return the results of the Identify command to a drive in IdentifyData.\r
56 Data format of Identify data is defined by the Interface GUID.\r
57\r
58 @param This Protocol instance pointer. \r
59 @param IdentifyData Results of Identify command to device \r
60 @param IdentifyDataSize Size of IdentifyData in bytes. \r
61\r
62 @retval EFI_SUCCESS IdentifyData valid \r
63 @retval EFI_NOT_FOUND Device does not support this data class \r
64 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device \r
65 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough \r
66\r
67**/\r
68typedef\r
69EFI_STATUS\r
70(EFIAPI *EFI_DISK_INFO_IDENTIFY) (\r
71 IN EFI_DISK_INFO_PROTOCOL * This,\r
72 IN OUT VOID *IdentifyData,\r
73 IN OUT UINT32 *IdentifyDataSize\r
74 )\r
75;\r
76\r
77\r
78/**\r
79 Return the results of the Request Sense command to a drive in SenseData.\r
80 Data format of Sense data is defined by the Interface GUID.\r
81\r
82 @param This Protocol instance pointer. \r
83 @param SenseData Results of Request Sense command to device \r
84 @param SenseDataSize Size of SenseData in bytes. \r
85 @param SenseDataNumber Type of SenseData \r
86\r
87 @retval EFI_SUCCESS InquiryData valid \r
88 @retval EFI_NOT_FOUND Device does not support this data class \r
89 @retval EFI_DEVICE_ERROR Error reading InquiryData from device \r
90 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough \r
91\r
92**/\r
93typedef\r
94EFI_STATUS\r
95(EFIAPI *EFI_DISK_INFO_SENSE_DATA) (\r
96 IN EFI_DISK_INFO_PROTOCOL * This,\r
97 IN OUT VOID *SenseData,\r
98 IN OUT UINT32 *SenseDataSize,\r
99 OUT UINT8 *SenseDataNumber\r
100 )\r
101;\r
102\r
103/**\r
104 Return the results of the Request Sense command to a drive in SenseData.\r
105 Data format of Sense data is defined by the Interface GUID.\r
106\r
107 @param This Protocol instance pointer. \r
108 @param IdeChannel Primary or Secondary \r
109 @param IdeDevice Master or Slave \r
110\r
111 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid \r
112 @retval EFI_UNSUPPORTED This is not an IDE device \r
113\r
114**/\r
115typedef\r
116EFI_STATUS\r
117(EFIAPI *EFI_DISK_INFO_WHICH_IDE) (\r
118 IN EFI_DISK_INFO_PROTOCOL * This,\r
119 OUT UINT32 *IdeChannel,\r
120 OUT UINT32 *IdeDevice\r
121 )\r
122;\r
123\r
124//\r
125// GUIDs for EFI_DISK_INFO_PROTOCOL.Interface. Defines the format of the\r
126// buffers returned by member functions\r
127//\r
128#define EFI_DISK_INFO_IDE_INTERFACE_GUID \\r
129 { \\r
130 0x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec } \\r
131 }\r
132extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid;\r
133\r
134#define EFI_DISK_INFO_SCSI_INTERFACE_GUID \\r
135 { \\r
136 0x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc } \\r
137 }\r
138extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid;\r
139\r
140#define EFI_DISK_INFO_USB_INTERFACE_GUID \\r
141 { \\r
142 0xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27 } \\r
143 }\r
144extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid;\r
145\r
146struct _EFI_DISK_INFO_PROTOCOL {\r
147 EFI_GUID Interface;\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
154extern EFI_GUID gEfiDiskInfoProtocolGuid;\r
155\r
156#endif\r
157\r
158\r