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