]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Sd/SdDxe/SdDiskInfo.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Bus / Sd / SdDxe / SdDiskInfo.h
1 /** @file
2 Header file for EFI_DISK_INFO_PROTOCOL interface on SD memory card devices.
3
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef _SD_DISKINFO_H_
10 #define _SD_DISKINFO_H_
11
12 /**
13 Provides inquiry information for the controller type.
14
15 This function is used by the driver entity to get inquiry data. Data format of
16 Identify data is defined by the Interface GUID.
17
18 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
19 @param[in,out] InquiryData Pointer to a buffer for the inquiry data.
20 @param[in,out] InquiryDataSize Pointer to the value for the inquiry data size.
21
22 @retval EFI_SUCCESS The command was accepted without any errors.
23 @retval EFI_NOT_FOUND Device does not support this data class.
24 @retval EFI_DEVICE_ERROR Error reading InquiryData from device.
25 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough.
26
27 **/
28 EFI_STATUS
29 EFIAPI
30 SdDiskInfoInquiry (
31 IN EFI_DISK_INFO_PROTOCOL *This,
32 IN OUT VOID *InquiryData,
33 IN OUT UINT32 *InquiryDataSize
34 );
35
36 /**
37 Provides identify information for the controller type.
38
39 This function is used by the driver entity to get identify data. Data format
40 of Identify data is defined by the Interface GUID.
41
42 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL
43 instance.
44 @param[in,out] IdentifyData Pointer to a buffer for the identify data.
45 @param[in,out] IdentifyDataSize Pointer to the value for the identify data
46 size.
47
48 @retval EFI_SUCCESS The command was accepted without any errors.
49 @retval EFI_NOT_FOUND Device does not support this data class.
50 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device.
51 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough.
52
53 **/
54 EFI_STATUS
55 EFIAPI
56 SdDiskInfoIdentify (
57 IN EFI_DISK_INFO_PROTOCOL *This,
58 IN OUT VOID *IdentifyData,
59 IN OUT UINT32 *IdentifyDataSize
60 );
61
62 /**
63 Provides sense data information for the controller type.
64
65 This function is used by the driver entity to get sense data. Data format of
66 Sense data is defined by the Interface GUID.
67
68 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
69 @param[in,out] SenseData Pointer to the SenseData.
70 @param[in,out] SenseDataSize Size of SenseData in bytes.
71 @param[out] SenseDataNumber Pointer to the value for the sense data size.
72
73 @retval EFI_SUCCESS The command was accepted without any errors.
74 @retval EFI_NOT_FOUND Device does not support this data class.
75 @retval EFI_DEVICE_ERROR Error reading SenseData from device.
76 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.
77
78 **/
79 EFI_STATUS
80 EFIAPI
81 SdDiskInfoSenseData (
82 IN EFI_DISK_INFO_PROTOCOL *This,
83 IN OUT VOID *SenseData,
84 IN OUT UINT32 *SenseDataSize,
85 OUT UINT8 *SenseDataNumber
86 );
87
88 /**
89 Provides IDE channel and device information for the interface.
90
91 This function is used by the driver entity to get controller information.
92
93 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
94 @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.
95 @param[out] IdeDevice Pointer to the Ide Device number. Master or slave.
96
97 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid.
98 @retval EFI_UNSUPPORTED This is not an IDE device.
99
100 **/
101 EFI_STATUS
102 EFIAPI
103 SdDiskInfoWhichIde (
104 IN EFI_DISK_INFO_PROTOCOL *This,
105 OUT UINT32 *IdeChannel,
106 OUT UINT32 *IdeDevice
107 );
108
109 #endif