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