]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Include/Protocol/DiskInfo.h
Remove SecurityPolicy.h from EdkModulePkg, because this protocol has been defined...
[mirror_edk2.git] / EdkModulePkg / Include / Protocol / DiskInfo.h
1 /*++
2
3 Copyright (c) 2006, 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 //
33 // Forward reference for pure ANSI compatability
34 //
35 typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL;
36
37 typedef
38 EFI_STATUS
39 (EFIAPI *EFI_DISK_INFO_INQUIRY) (
40 IN EFI_DISK_INFO_PROTOCOL * This,
41 IN OUT VOID *InquiryData,
42 IN OUT UINT32 *IntquiryDataSize
43 )
44 /*++
45
46 Routine Description:
47 Return the results of the Inquiry command to a drive in InquiryData.
48 Data format of Inquiry data is defined by the Interface GUID.
49
50 Arguments:
51 This - Protocol instance pointer.
52 InquiryData - Results of Inquiry command to device
53 InquiryDataSize - Size of InquiryData in bytes.
54
55 Returns:
56 EFI_SUCCESS - InquiryData valid
57 EFI_NOT_FOUND - Device does not support this data class
58 EFI_DEVICE_ERROR - Error reading InquiryData from device
59 EFI_BUFFER_TOO_SMALL - IntquiryDataSize not big enough
60
61 --*/
62 ;
63
64 typedef
65 EFI_STATUS
66 (EFIAPI *EFI_DISK_INFO_IDENTIFY) (
67 IN EFI_DISK_INFO_PROTOCOL * This,
68 IN OUT VOID *IdentifyData,
69 IN OUT UINT32 *IdentifyDataSize
70 )
71 /*++
72
73 Routine Description:
74 Return the results of the Identify command to a drive in IdentifyData.
75 Data format of Identify data is defined by the Interface GUID.
76
77 Arguments:
78 This - Protocol instance pointer.
79 IdentifyData - Results of Identify command to device
80 IdentifyDataSize - Size of IdentifyData in bytes.
81
82 Returns:
83 EFI_SUCCESS - IdentifyData valid
84 EFI_NOT_FOUND - Device does not support this data class
85 EFI_DEVICE_ERROR - Error reading IdentifyData from device
86 EFI_BUFFER_TOO_SMALL - IdentifyDataSize not big enough
87
88 --*/
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 Routine Description:
102 Return the results of the Request Sense command to a drive in SenseData.
103 Data format of Sense data is defined by the Interface GUID.
104
105 Arguments:
106 This - Protocol instance pointer.
107 SenseData - Results of Request Sense command to device
108 SenseDataSize - Size of SenseData in bytes.
109 SenseDataNumber - Type of SenseData
110
111 Returns:
112 EFI_SUCCESS - InquiryData valid
113 EFI_NOT_FOUND - Device does not support this data class
114 EFI_DEVICE_ERROR - Error reading InquiryData from device
115 EFI_BUFFER_TOO_SMALL - SenseDataSize not big enough
116
117 --*/
118 ;
119
120 typedef
121 EFI_STATUS
122 (EFIAPI *EFI_DISK_INFO_WHICH_IDE) (
123 IN EFI_DISK_INFO_PROTOCOL * This,
124 OUT UINT32 *IdeChannel,
125 OUT UINT32 *IdeDevice
126 )
127 /*++
128
129 Routine Description:
130 Return the results of the Request Sense command to a drive in SenseData.
131 Data format of Sense data is defined by the Interface GUID.
132
133 Arguments:
134 This - Protocol instance pointer.
135 IdeChannel - Primary or Secondary
136 IdeDevice - Master or Slave
137
138 Returns:
139 EFI_SUCCESS - IdeChannel and IdeDevice are valid
140 EFI_UNSUPPORTED - This is not an IDE device
141
142 --*/
143 ;
144
145 //
146 // GUIDs for EFI_DISK_INFO_PROTOCOL.Interface. Defines the format of the
147 // buffers returned by member functions
148 //
149 #define EFI_DISK_INFO_IDE_INTERFACE_GUID \
150 { \
151 0x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec } \
152 }
153 extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid;
154
155 #define EFI_DISK_INFO_SCSI_INTERFACE_GUID \
156 { \
157 0x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc } \
158 }
159 extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid;
160
161 #define EFI_DISK_INFO_USB_INTERFACE_GUID \
162 { \
163 0xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27 } \
164 }
165 extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid;
166
167 struct _EFI_DISK_INFO_PROTOCOL {
168 EFI_GUID Interface;
169 EFI_DISK_INFO_INQUIRY Inquiry;
170 EFI_DISK_INFO_IDENTIFY Identify;
171 EFI_DISK_INFO_SENSE_DATA SenseData;
172 EFI_DISK_INFO_WHICH_IDE WhichIde;
173 };
174
175 extern EFI_GUID gEfiDiskInfoProtocolGuid;
176
177 #endif
178
179