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