2 Implement the EFI_DISK_INFO_PROTOCOL interface on EMMC devices.
4 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
12 Provides inquiry information for the controller type.
14 This function is used by the driver entity to get inquiry data. Data format of
15 Identify data is defined by the Interface GUID.
17 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
18 @param[in,out] InquiryData Pointer to a buffer for the inquiry data.
19 @param[in,out] InquiryDataSize Pointer to the value for the inquiry data size.
21 @retval EFI_SUCCESS The command was accepted without any errors.
22 @retval EFI_NOT_FOUND Device does not support this data class.
23 @retval EFI_DEVICE_ERROR Error reading InquiryData from device.
24 @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough.
30 IN EFI_DISK_INFO_PROTOCOL
*This
,
31 IN OUT VOID
*InquiryData
,
32 IN OUT UINT32
*InquiryDataSize
36 EMMC_PARTITION
*Partition
;
39 Partition
= EMMC_PARTITION_DATA_FROM_DISKINFO (This
);
40 Device
= Partition
->Device
;
42 if (*InquiryDataSize
>= sizeof (Device
->Cid
)) {
44 CopyMem (InquiryData
, &Device
->Cid
, sizeof (Device
->Cid
));
46 Status
= EFI_BUFFER_TOO_SMALL
;
49 *InquiryDataSize
= sizeof (Device
->Cid
);
55 Provides identify information for the controller type.
57 This function is used by the driver entity to get identify data. Data format
58 of Identify data is defined by the Interface GUID.
60 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL
62 @param[in,out] IdentifyData Pointer to a buffer for the identify data.
63 @param[in,out] IdentifyDataSize Pointer to the value for the identify data
66 @retval EFI_SUCCESS The command was accepted without any errors.
67 @retval EFI_NOT_FOUND Device does not support this data class.
68 @retval EFI_DEVICE_ERROR Error reading IdentifyData from device.
69 @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough.
74 EmmcDiskInfoIdentify (
75 IN EFI_DISK_INFO_PROTOCOL
*This
,
76 IN OUT VOID
*IdentifyData
,
77 IN OUT UINT32
*IdentifyDataSize
84 Provides sense data information for the controller type.
86 This function is used by the driver entity to get sense data. Data format of
87 Sense data is defined by the Interface GUID.
89 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
90 @param[in,out] SenseData Pointer to the SenseData.
91 @param[in,out] SenseDataSize Size of SenseData in bytes.
92 @param[out] SenseDataNumber Pointer to the value for the sense data size.
94 @retval EFI_SUCCESS The command was accepted without any errors.
95 @retval EFI_NOT_FOUND Device does not support this data class.
96 @retval EFI_DEVICE_ERROR Error reading SenseData from device.
97 @retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.
102 EmmcDiskInfoSenseData (
103 IN EFI_DISK_INFO_PROTOCOL
*This
,
104 IN OUT VOID
*SenseData
,
105 IN OUT UINT32
*SenseDataSize
,
106 OUT UINT8
*SenseDataNumber
109 return EFI_NOT_FOUND
;
113 Provides IDE channel and device information for the interface.
115 This function is used by the driver entity to get controller information.
117 @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.
118 @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.
119 @param[out] IdeDevice Pointer to the Ide Device number. Master or slave.
121 @retval EFI_SUCCESS IdeChannel and IdeDevice are valid.
122 @retval EFI_UNSUPPORTED This is not an IDE device.
127 EmmcDiskInfoWhichIde (
128 IN EFI_DISK_INFO_PROTOCOL
*This
,
129 OUT UINT32
*IdeChannel
,
130 OUT UINT32
*IdeDevice
133 return EFI_UNSUPPORTED
;