MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
UfsDeviceConfig.h File Reference

Data Structures

struct  _EFI_UFS_DEVICE_CONFIG_PROTOCOL
 

Macros

#define EFI_UFS_DEVICE_CONFIG_GUID   { 0xb81bfab0, 0xeb3, 0x4cf9, { 0x84, 0x65, 0x7f, 0xa9, 0x86, 0x36, 0x16, 0x64 }};
 

Typedefs

typedef struct
_EFI_UFS_DEVICE_CONFIG_PROTOCOL 
EFI_UFS_DEVICE_CONFIG_PROTOCOL
 
typedef IN BOOLEAN Read
 
typedef IN BOOLEAN IN UINT8 DescId
 
typedef IN BOOLEAN IN UINT8 IN
UINT8 
Index
 
typedef IN BOOLEAN IN UINT8 IN
UINT8 IN UINT8 
Selector
 
typedef IN BOOLEAN IN UINT8 IN
UINT8 IN UINT8 IN OUT UINT8
Descriptor
 
typedef IN BOOLEAN IN UINT8 IN
UINT8 IN UINT8 IN OUT UINT8 IN
OUT UINT32
DescSize
 
typedef IN BOOLEAN IN UINT8 FlagId
 
typedef IN BOOLEAN IN UINT8 IN
OUT UINT8
Flag
 
typedef IN BOOLEAN IN UINT8 AttrId
 
typedef IN BOOLEAN IN UINT8 IN
UINT8 IN UINT8 IN OUT UINT8
Attribute
 
typedef IN BOOLEAN IN UINT8 IN
UINT8 IN UINT8 IN OUT UINT8 IN
OUT UINT32
AttrSize
 

Functions

typedef EFI_STATUS (EFIAPI *EFI_UFS_DEVICE_CONFIG_RW_DESCRIPTOR)(IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This
 

Variables

EFI_GUID gEfiUfsDeviceConfigProtocolGuid
 

Detailed Description

This file defines the EFI UFS Device Config Protocol.

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

Revision Reference:
This Protocol is introduced in UEFI Specification 2.7

Macro Definition Documentation

#define EFI_UFS_DEVICE_CONFIG_GUID   { 0xb81bfab0, 0xeb3, 0x4cf9, { 0x84, 0x65, 0x7f, 0xa9, 0x86, 0x36, 0x16, 0x64 }};

Typedef Documentation

typedef IN BOOLEAN Read

Function Documentation

typedef EFI_STATUS ( EFIAPI EFI_UFS_DEVICE_CONFIG_RW_ATTRIBUTE)

Read or write specified device descriptor of a UFS device.

The service is used to read/write UFS device descriptors. The consumer of this API is responsible for allocating the data buffer pointed by Descriptor.

Parameters
[in]ThisThe pointer to the EFI_UFS_DEVICE_CONFIG_PROTOCOL instance.
[in]ReadThe boolean variable to show r/w direction.
[in]DescIdThe ID of device descriptor.
[in]IndexThe Index of device descriptor.
[in]SelectorThe Selector of device descriptor.
[in,out]DescriptorThe buffer of device descriptor to be read or written.
[in,out]DescSizeThe size of device descriptor buffer. On input, the size, in bytes, of the data buffer specified by Descriptor. On output, the number of bytes that were actually transferred.
Return values
EFI_SUCCESSThe device descriptor is read/written successfully.
EFI_INVALID_PARAMETERThis is NULL or Descriptor is NULL or DescSize is NULL. DescId, Index and Selector are invalid combination to point to a type of UFS device descriptor.
EFI_DEVICE_ERRORThe device descriptor is not read/written successfully.

Read or write specified flag of a UFS device.

The service is used to read/write UFS flag descriptors. The consumer of this API is responsible for allocating the buffer pointed by Flag. The buffer size is 1 byte as UFS flag descriptor is just a single Boolean value that represents a TRUE or FALSE, '0' or '1', ON or OFF type of value.

Parameters
[in]ThisThe pointer to the EFI_UFS_DEVICE_CONFIG_PROTOCOL instance.
[in]ReadThe boolean variable to show r/w direction.
[in]FlagIdThe ID of flag to be read or written.
[in,out]FlagThe buffer to set or clear flag.
Return values
EFI_SUCCESSThe flag descriptor is set/clear successfully.
EFI_INVALID_PARAMETERThis is NULL or Flag is NULL. FlagId is an invalid UFS flag ID.
EFI_DEVICE_ERRORThe flag is not set/clear successfully.

Read or write specified attribute of a UFS device.

The service is used to read/write UFS attributes. The consumer of this API is responsible for allocating the data buffer pointed by Attribute.

Parameters
[in]ThisThe pointer to the EFI_UFS_DEVICE_CONFIG_PROTOCOL instance.
[in]ReadThe boolean variable to show r/w direction.
[in]AttrIdThe ID of Attribute.
[in]IndexThe Index of Attribute.
[in]SelectorThe Selector of Attribute.
[in,out]AttributeThe buffer of Attribute to be read or written.
[in,out]AttrSizeThe size of Attribute buffer. On input, the size, in bytes, of the data buffer specified by Attribute. On output, the number of bytes that were actually transferred.
Return values
EFI_SUCCESSThe attribute is read/written successfully.
EFI_INVALID_PARAMETERThis is NULL or Attribute is NULL or AttrSize is NULL. AttrId, Index and Selector are invalid combination to point to a type of UFS attribute.
EFI_DEVICE_ERRORThe attribute is not read/written successfully.

Variable Documentation

EFI_GUID gEfiUfsDeviceConfigProtocolGuid

UFS Device Config Protocol GUID variable.