]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDiskInfo.h
MdeModulePkg/EmmcDxe: Implementation of Disk Information Protocol
[mirror_edk2.git] / MdeModulePkg / Bus / Sd / EmmcDxe / EmmcDiskInfo.h
1 /** @file
2 Header file for EFI_DISK_INFO_PROTOCOL interface on EMMC devices.
3
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _EMMC_DISKINFO_H_
16 #define _EMMC_DISKINFO_H_
17
18 /**
19 Provides inquiry information for the controller type.
20
21 This function is used by the driver entity to get inquiry data. Data format of
22 Identify data is defined by the Interface GUID.
23
24 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
25 @param[in,out] InquiryData Pointer to a buffer for the inquiry data.
26 @param[in,out] InquiryDataSize Pointer to the value for the inquiry data size.
27
28 @retval EFI_SUCCESS The command was accepted without any errors.
29 @retval EFI_NOT_FOUND Device does not support this data class.
30 @retval EFI_DEVICE_ERROR Error reading InquiryData from device.
31 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough.
32
33 **/
34 EFI_STATUS
35 EFIAPI
36 EmmcDiskInfoInquiry (
37 IN EFI_DISK_INFO_PROTOCOL *This,
38 IN OUT VOID *InquiryData,
39 IN OUT UINT32 *InquiryDataSize
40 );
41
42 /**
43 Provides identify information for the controller type.
44
45 This function is used by the driver entity to get identify data. Data format
46 of Identify data is defined by the Interface GUID.
47
48 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL
49 instance.
50 @param[in,out] IdentifyData Pointer to a buffer for the identify data.
51 @param[in,out] IdentifyDataSize Pointer to the value for the identify data
52 size.
53
54 @retval EFI_SUCCESS The command was accepted without any errors.
55 @retval EFI_NOT_FOUND Device does not support this data class.
56 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device.
57 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough.
58
59 **/
60 EFI_STATUS
61 EFIAPI
62 EmmcDiskInfoIdentify (
63 IN EFI_DISK_INFO_PROTOCOL *This,
64 IN OUT VOID *IdentifyData,
65 IN OUT UINT32 *IdentifyDataSize
66 );
67
68 /**
69 Provides sense data information for the controller type.
70
71 This function is used by the driver entity to get sense data. Data format of
72 Sense data is defined by the Interface GUID.
73
74 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
75 @param[in,out] SenseData Pointer to the SenseData.
76 @param[in,out] SenseDataSize Size of SenseData in bytes.
77 @param[out] SenseDataNumber Pointer to the value for the sense data size.
78
79 @retval EFI_SUCCESS The command was accepted without any errors.
80 @retval EFI_NOT_FOUND Device does not support this data class.
81 @retval EFI_DEVICE_ERROR Error reading SenseData from device.
82 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.
83
84 **/
85 EFI_STATUS
86 EFIAPI
87 EmmcDiskInfoSenseData (
88 IN EFI_DISK_INFO_PROTOCOL *This,
89 IN OUT VOID *SenseData,
90 IN OUT UINT32 *SenseDataSize,
91 OUT UINT8 *SenseDataNumber
92 );
93
94 /**
95 Provides IDE channel and device information for the interface.
96
97 This function is used by the driver entity to get controller information.
98
99 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
100 @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.
101 @param[out] IdeDevice Pointer to the Ide Device number. Master or slave.
102
103 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid.
104 @retval EFI_UNSUPPORTED This is not an IDE device.
105
106 **/
107 EFI_STATUS
108 EFIAPI
109 EmmcDiskInfoWhichIde (
110 IN EFI_DISK_INFO_PROTOCOL *This,
111 OUT UINT32 *IdeChannel,
112 OUT UINT32 *IdeDevice
113 );
114
115 #endif