Path: blob/main/sys/contrib/edk2/Include/Protocol/DiskInfo.h
96339 views
/** @file1Provides the basic interfaces to abstract platform information regarding an2IDE controller.34Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>5SPDX-License-Identifier: BSD-2-Clause-Patent67@par Revision Reference:8This Protocol is defined in UEFI Platform Initialization Specification 1.69Volume 5: Standards1011**/1213#ifndef __DISK_INFO_H__14#define __DISK_INFO_H__1516///17/// Global ID for EFI_DISK_INFO_PROTOCOL18///19#define EFI_DISK_INFO_PROTOCOL_GUID \20{ \210xd432a67f, 0x14dc, 0x484b, {0xb3, 0xbb, 0x3f, 0x2, 0x91, 0x84, 0x93, 0x27 } \22}2324///25/// Forward declaration for EFI_DISK_INFO_PROTOCOL26///27typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL;2829///30/// Global ID for an IDE interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface31///32#define EFI_DISK_INFO_IDE_INTERFACE_GUID \33{ \340x5e948fe3, 0x26d3, 0x42b5, {0xaf, 0x17, 0x61, 0x2, 0x87, 0x18, 0x8d, 0xec } \35}3637///38/// Global ID for a SCSI interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface39///40#define EFI_DISK_INFO_SCSI_INTERFACE_GUID \41{ \420x8f74baa, 0xea36, 0x41d9, {0x95, 0x21, 0x21, 0xa7, 0xf, 0x87, 0x80, 0xbc } \43}4445///46/// Global ID for a USB interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface47///48#define EFI_DISK_INFO_USB_INTERFACE_GUID \49{ \500xcb871572, 0xc11a, 0x47b5, {0xb4, 0x92, 0x67, 0x5e, 0xaf, 0xa7, 0x77, 0x27 } \51}5253///54/// Global ID for an AHCI interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface55///56#define EFI_DISK_INFO_AHCI_INTERFACE_GUID \57{ \580x9e498932, 0x4abc, 0x45af, {0xa3, 0x4d, 0x2, 0x47, 0x78, 0x7b, 0xe7, 0xc6 } \59}6061///62/// Global ID for a NVME interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface63///64#define EFI_DISK_INFO_NVME_INTERFACE_GUID \65{ \660x3ab14680, 0x5d3f, 0x4a4d, {0xbc, 0xdc, 0xcc, 0x38, 0x0, 0x18, 0xc7, 0xf7 } \67}6869///70/// Global ID for a UFS interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface71///72#define EFI_DISK_INFO_UFS_INTERFACE_GUID \73{ \740x4b3029cc, 0x6b98, 0x47fb, { 0xbc, 0x96, 0x76, 0xdc, 0xb8, 0x4, 0x41, 0xf0 } \75}7677///78/// Global ID for an SD/MMC interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface79///80#define EFI_DISK_INFO_SD_MMC_INTERFACE_GUID \81{ \820x8deec992, 0xd39c, 0x4a5c, { 0xab, 0x6b, 0x98, 0x6e, 0x14, 0x24, 0x2b, 0x9d } \83}8485/**86Provides inquiry information for the controller type.8788This function is used by the IDE bus driver to get inquiry data. Data format89of Identify data is defined by the Interface GUID.9091@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.92@param[in,out] InquiryData Pointer to a buffer for the inquiry data.93@param[in,out] InquiryDataSize Pointer to the value for the inquiry data size.9495@retval EFI_SUCCESS The command was accepted without any errors.96@retval EFI_NOT_FOUND Device does not support this data class97@retval EFI_DEVICE_ERROR Error reading InquiryData from device98@retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough99100**/101typedef102EFI_STATUS103(EFIAPI *EFI_DISK_INFO_INQUIRY)(104IN EFI_DISK_INFO_PROTOCOL *This,105IN OUT VOID *InquiryData,106IN OUT UINT32 *InquiryDataSize107);108109/**110Provides identify information for the controller type.111112This function is used by the IDE bus driver to get identify data. Data format113of Identify data is defined by the Interface GUID.114115@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL116instance.117@param[in,out] IdentifyData Pointer to a buffer for the identify data.118@param[in,out] IdentifyDataSize Pointer to the value for the identify data119size.120121@retval EFI_SUCCESS The command was accepted without any errors.122@retval EFI_NOT_FOUND Device does not support this data class123@retval EFI_DEVICE_ERROR Error reading IdentifyData from device124@retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough125126**/127typedef128EFI_STATUS129(EFIAPI *EFI_DISK_INFO_IDENTIFY)(130IN EFI_DISK_INFO_PROTOCOL *This,131IN OUT VOID *IdentifyData,132IN OUT UINT32 *IdentifyDataSize133);134135/**136Provides sense data information for the controller type.137138This function is used by the IDE bus driver to get sense data.139Data format of Sense data is defined by the Interface GUID.140141@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.142@param[in,out] SenseData Pointer to the SenseData.143@param[in,out] SenseDataSize Size of SenseData in bytes.144@param[out] SenseDataNumber Pointer to the value for the sense data size.145146@retval EFI_SUCCESS The command was accepted without any errors.147@retval EFI_NOT_FOUND Device does not support this data class.148@retval EFI_DEVICE_ERROR Error reading SenseData from device.149@retval EFI_BUFFER_TOO_SMALL SenseDataSize not big enough.150151**/152typedef153EFI_STATUS154(EFIAPI *EFI_DISK_INFO_SENSE_DATA)(155IN EFI_DISK_INFO_PROTOCOL *This,156IN OUT VOID *SenseData,157IN OUT UINT32 *SenseDataSize,158OUT UINT8 *SenseDataNumber159);160161/**162This function is used by the IDE bus driver to get controller information.163164@param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance.165@param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary.166@param[out] IdeDevice Pointer to the Ide Device number. Master or slave.167168@retval EFI_SUCCESS IdeChannel and IdeDevice are valid.169@retval EFI_UNSUPPORTED This is not an IDE device.170171**/172typedef173EFI_STATUS174(EFIAPI *EFI_DISK_INFO_WHICH_IDE)(175IN EFI_DISK_INFO_PROTOCOL *This,176OUT UINT32 *IdeChannel,177OUT UINT32 *IdeDevice178);179180///181/// The EFI_DISK_INFO_PROTOCOL provides controller specific information.182///183struct _EFI_DISK_INFO_PROTOCOL {184///185/// A GUID that defines the format of buffers for the other member functions186/// of this protocol.187///188EFI_GUID Interface;189///190/// Return the results of the Inquiry command to a drive in InquiryData. Data191/// format of Inquiry data is defined by the Interface GUID.192///193EFI_DISK_INFO_INQUIRY Inquiry;194///195/// Return the results of the Identify command to a drive in IdentifyData. Data196/// format of Identify data is defined by the Interface GUID.197///198EFI_DISK_INFO_IDENTIFY Identify;199///200/// Return the results of the Request Sense command to a drive in SenseData. Data201/// format of Sense data is defined by the Interface GUID.202///203EFI_DISK_INFO_SENSE_DATA SenseData;204///205/// Specific controller.206///207EFI_DISK_INFO_WHICH_IDE WhichIde;208};209210extern EFI_GUID gEfiDiskInfoProtocolGuid;211212extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid;213extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid;214extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid;215extern EFI_GUID gEfiDiskInfoAhciInterfaceGuid;216extern EFI_GUID gEfiDiskInfoNvmeInterfaceGuid;217extern EFI_GUID gEfiDiskInfoUfsInterfaceGuid;218extern EFI_GUID gEfiDiskInfoSdMmcInterfaceGuid;219220#endif221222223