TianoCore EDK2 master
Loading...
Searching...
No Matches
UsbMassDiskInfo.c File Reference
#include "UsbMass.h"

Go to the source code of this file.

Functions

VOID InitializeDiskInfo (IN USB_MASS_DEVICE *UsbMass)
 
EFI_STATUS EFIAPI UsbDiskInfoInquiry (IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *InquiryData, IN OUT UINT32 *InquiryDataSize)
 
EFI_STATUS EFIAPI UsbDiskInfoIdentify (IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *IdentifyData, IN OUT UINT32 *IdentifyDataSize)
 
EFI_STATUS EFIAPI UsbDiskInfoSenseData (IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *SenseData, IN OUT UINT32 *SenseDataSize, OUT UINT8 *SenseDataNumber)
 
EFI_STATUS EFIAPI UsbDiskInfoWhichIde (IN EFI_DISK_INFO_PROTOCOL *This, OUT UINT32 *IdeChannel, OUT UINT32 *IdeDevice)
 

Variables

EFI_DISK_INFO_PROTOCOL gUsbDiskInfoProtocolTemplate
 

Detailed Description

This file is used to implement the EFI_DISK_INFO_PROTOCOL interface.

Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UsbMassDiskInfo.c.

Function Documentation

◆ InitializeDiskInfo()

VOID InitializeDiskInfo ( IN USB_MASS_DEVICE UsbMass)

Initialize the installation of DiskInfo protocol.

This function prepares for the installation of DiskInfo protocol on the child handle. By default, it installs DiskInfo protocol with USB interface GUID.

Parameters
[in]UsbMassThe pointer of USB_MASS_DEVICE.

Definition at line 29 of file UsbMassDiskInfo.c.

◆ UsbDiskInfoIdentify()

EFI_STATUS EFIAPI UsbDiskInfoIdentify ( IN EFI_DISK_INFO_PROTOCOL This,
IN OUT VOID *  IdentifyData,
IN OUT UINT32 *  IdentifyDataSize 
)

Provides identify information for the controller type.

This function is used to get identify data. Data format of Identify data is defined by the Interface GUID.

Parameters
[in]ThisPointer to the EFI_DISK_INFO_PROTOCOL instance.
[in,out]IdentifyDataPointer to a buffer for the identify data.
[in,out]IdentifyDataSizePointer to the value for the identify data size.
Return values
EFI_SUCCESSThe command was accepted without any errors.
EFI_NOT_FOUNDDevice does not support this data class
EFI_DEVICE_ERRORError reading IdentifyData from device
EFI_BUFFER_TOO_SMALLIdentifyDataSize not big enough

Definition at line 95 of file UsbMassDiskInfo.c.

◆ UsbDiskInfoInquiry()

EFI_STATUS EFIAPI UsbDiskInfoInquiry ( IN EFI_DISK_INFO_PROTOCOL This,
IN OUT VOID *  InquiryData,
IN OUT UINT32 *  InquiryDataSize 
)

Provides inquiry information for the controller type.

This function is used to get inquiry data. Data format of Identify data is defined by the Interface GUID.

Parameters
[in]ThisPointer to the EFI_DISK_INFO_PROTOCOL instance.
[in,out]InquiryDataPointer to a buffer for the inquiry data.
[in,out]InquiryDataSizePointer to the value for the inquiry data size.
Return values
EFI_SUCCESSThe command was accepted without any errors.
EFI_NOT_FOUNDDevice does not support this data class
EFI_DEVICE_ERRORError reading InquiryData from device
EFI_BUFFER_TOO_SMALLInquiryDataSize not big enough

Definition at line 54 of file UsbMassDiskInfo.c.

◆ UsbDiskInfoSenseData()

EFI_STATUS EFIAPI UsbDiskInfoSenseData ( IN EFI_DISK_INFO_PROTOCOL This,
IN OUT VOID *  SenseData,
IN OUT UINT32 *  SenseDataSize,
OUT UINT8 *  SenseDataNumber 
)

Provides sense data information for the controller type.

This function is used to get sense data. Data format of Sense data is defined by the Interface GUID.

Parameters
[in]ThisPointer to the EFI_DISK_INFO_PROTOCOL instance.
[in,out]SenseDataPointer to the SenseData.
[in,out]SenseDataSizeSize of SenseData in bytes.
[out]SenseDataNumberPointer to the value for the sense data size.
Return values
EFI_SUCCESSThe command was accepted without any errors.
EFI_NOT_FOUNDDevice does not support this data class.
EFI_DEVICE_ERRORError reading SenseData from device.
EFI_BUFFER_TOO_SMALLSenseDataSize not big enough.

Definition at line 123 of file UsbMassDiskInfo.c.

◆ UsbDiskInfoWhichIde()

EFI_STATUS EFIAPI UsbDiskInfoWhichIde ( IN EFI_DISK_INFO_PROTOCOL This,
OUT UINT32 *  IdeChannel,
OUT UINT32 *  IdeDevice 
)

This function is used to get controller information.

Parameters
[in]ThisPointer to the EFI_DISK_INFO_PROTOCOL instance.
[out]IdeChannelPointer to the Ide Channel number. Primary or secondary.
[out]IdeDevicePointer to the Ide Device number. Master or slave.
Return values
EFI_SUCCESSIdeChannel and IdeDevice are valid.
EFI_UNSUPPORTEDThis is not an IDE device.

Definition at line 146 of file UsbMassDiskInfo.c.

Variable Documentation

◆ gUsbDiskInfoProtocolTemplate

EFI_DISK_INFO_PROTOCOL gUsbDiskInfoProtocolTemplate
Initial value:
= {
}
#define EFI_DISK_INFO_USB_INTERFACE_GUID
Definition: DiskInfo.h:49
EFI_STATUS EFIAPI UsbDiskInfoWhichIde(IN EFI_DISK_INFO_PROTOCOL *This, OUT UINT32 *IdeChannel, OUT UINT32 *IdeDevice)
EFI_STATUS EFIAPI UsbDiskInfoInquiry(IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *InquiryData, IN OUT UINT32 *InquiryDataSize)
EFI_STATUS EFIAPI UsbDiskInfoIdentify(IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *IdentifyData, IN OUT UINT32 *IdentifyDataSize)
EFI_STATUS EFIAPI UsbDiskInfoSenseData(IN EFI_DISK_INFO_PROTOCOL *This, IN OUT VOID *SenseData, IN OUT UINT32 *SenseDataSize, OUT UINT8 *SenseDataNumber)

Definition at line 11 of file UsbMassDiskInfo.c.