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
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.
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
24 #ifndef __DISK_INFO_H__
25 #define __DISK_INFO_H__
27 #define EFI_DISK_INFO_PROTOCOL_GUID \
29 0xd432a67f, 0x14dc, 0x484b, {0xb3, 0xbb, 0x3f, 0x2, 0x91, 0x84, 0x93, 0x27 } \
33 // Forward reference for pure ANSI compatability
35 typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL
;
39 (EFIAPI
*EFI_DISK_INFO_INQUIRY
) (
40 IN EFI_DISK_INFO_PROTOCOL
* This
,
41 IN OUT VOID
*InquiryData
,
42 IN OUT UINT32
*IntquiryDataSize
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.
51 This - Protocol instance pointer.
52 InquiryData - Results of Inquiry command to device
53 InquiryDataSize - Size of InquiryData in bytes.
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
66 (EFIAPI
*EFI_DISK_INFO_IDENTIFY
) (
67 IN EFI_DISK_INFO_PROTOCOL
* This
,
68 IN OUT VOID
*IdentifyData
,
69 IN OUT UINT32
*IdentifyDataSize
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.
78 This - Protocol instance pointer.
79 IdentifyData - Results of Identify command to device
80 IdentifyDataSize - Size of IdentifyData in bytes.
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
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
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.
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
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
122 (EFIAPI
*EFI_DISK_INFO_WHICH_IDE
) (
123 IN EFI_DISK_INFO_PROTOCOL
* This
,
124 OUT UINT32
*IdeChannel
,
125 OUT UINT32
*IdeDevice
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.
134 This - Protocol instance pointer.
135 IdeChannel - Primary or Secondary
136 IdeDevice - Master or Slave
139 EFI_SUCCESS - IdeChannel and IdeDevice are valid
140 EFI_UNSUPPORTED - This is not an IDE device
146 // GUIDs for EFI_DISK_INFO_PROTOCOL.Interface. Defines the format of the
147 // buffers returned by member functions
149 #define EFI_DISK_INFO_IDE_INTERFACE_GUID \
151 0x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec } \
153 extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid
;
155 #define EFI_DISK_INFO_SCSI_INTERFACE_GUID \
157 0x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc } \
159 extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid
;
161 #define EFI_DISK_INFO_USB_INTERFACE_GUID \
163 0xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27 } \
165 extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid
;
167 struct _EFI_DISK_INFO_PROTOCOL
{
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
;
175 extern EFI_GUID gEfiDiskInfoProtocolGuid
;