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