UFS_GEOMETRY_DESCRIPTOR structure (ufs.h)

UFS_GEOMETRY_DESCRIPTOR describes a device's geometric parameters.

Syntax

typedef struct {
  UCHAR  bLength;
  UCHAR  bDescriptorIDN;
  UCHAR  bMediaTechnology;
  UCHAR  Reserved1;
  UCHAR  qTotalRawDeviceCapacity[8];
  UCHAR  bMaxNumberLU;
  UCHAR  dSegmentSize[4];
  UCHAR  bAllocationUnitSize;
  UCHAR  bMinAddrBlockSize;
  UCHAR  bOptimalReadBlockSize;
  UCHAR  bOptimalWriteBlockSize;
  UCHAR  bMaxInBufferSize;
  UCHAR  bMaxOutBufferSize;
  UCHAR  bRPMB_ReadWriteSize;
  UCHAR  bDynamicCapacityResourcePolicy;
  UCHAR  bDataOrdering;
  UCHAR  bMaxContexIDNumber;
  UCHAR  bSysDataTagUnitSize;
  UCHAR  bSysDataTagResSize;
  UCHAR  bSupportedSecRTypes;
  UCHAR  wSupportedMemoryTypes[2];
  UCHAR  dSystemCodeMaxNAllocU[4];
  UCHAR  wSystemCodeCapAdjFac[2];
  UCHAR  dNonPersistMaxNAllocU[4];
  UCHAR  wNonPersistCapAdjFac[2];
  UCHAR  dEnhanced1MaxNAllocU[4];
  UCHAR  wEnhanced1CapAdjFac[2];
  UCHAR  dEnhanced2MaxNAllocU[4];
  UCHAR  wEnhanced2CapAdjFac[2];
  UCHAR  dEnhanced3MaxNAllocU[4];
  UCHAR  wEnhanced3CapAdjFac[2];
  UCHAR  dEnhanced4MaxNAllocU[4];
  UCHAR  wEnhanced4CapAdjFac[2];
  UCHAR  dOptimalLogicalBlockSize[4];
  UCHAR  bHPBNumberLU;
  UCHAR  bHPBSubRegionSize;
  UCHAR  bHPBRegionSize;
  USHORT wDeviceMaxActiveHPBRegions;
  UCHAR  Reserved2[2];
  ULONG  dWriteBoosterBufferMaxNAllocUnits;
  UCHAR  bDeviceMaxWriteBoosterLUs;
  UCHAR  bWriteBoosterBufferCapAdjFac;
  UCHAR  bSupportedWriteBoosterBufferUserSpaceReductionTypes;
  UCHAR  bSupportedWriteBoosterBufferTypes;
} UFS_GEOMETRY_DESCRIPTOR, *PUFS_GEOMETRY_DESCRIPTOR;

Members

bLength

Specifies the length of the descriptor.

bDescriptorIDN

Specifies the type of the descriptor. This descriptor will have a value of UFS_DESC_GEOMETRY_IDN.

bMediaTechnology

Reserved for future use.

Reserved1

Reserved for future use.

qTotalRawDeviceCapacity[8]

Specifies the total raw device capacity. Expressed in units of 512 bytes.

bMaxNumberLU

Specifies the maximum number of logical unit(s) supported by the UFS (Universal Flash Storage). Contains one of the following values:

Value Description
0x00 8 logical units.
0x01 32 logical units.
Other Values Reserved for future use.

dSegmentSize[4]

Specifies the segment size of the device in units of 512 bytes.

bAllocationUnitSize

Specifies the allocation unit size in number of segments.

bMinAddrBlockSize

Specifies the minimum addressable block size in units of 512 bytes. The minium size is 4 KB or a value of 0x08.

bOptimalReadBlockSize

Specifies the optimal read block size in units of 512 bytes.

bOptimalWriteBlockSize

Specifies the optimal write block size in units of 512 bytes. bOptimalWriteBlockSize is equal to or greater than bMinAddrBlockSize.

bMaxInBufferSize

Specifies the max size of the data-in buffer in units of 512 bytes. The minium size is 4 KB or a value of 0x08.

bMaxOutBufferSize

Specifies the max size of the data-out buffer in units of 512 bytes. The minium size is 4 KB or a value of 0x08.

bRPMB_ReadWriteSize

Specifies the maximum number of Replay Protected Memory Block (RPMB) frames allowed in Security Protocol In and Security Protocol Out. Each frame is 256-bytes.

bDynamicCapacityResourcePolicy

Specifies a device's spare blocks resource management policy. Contains one of the following values:

Value Description
0x00 Spare blocks resource management policy is per logical unit.
0x01 Spare blocks resource management policy is per memory type.

bDataOrdering

Specifies if a device supports out-of-order data transfer. Contains one of the following values:

Value Description
0x00 Out-of-order data transfer is not supported.
0x01 Out-of-order data transfer is supported.
All other values Reserved for future use.

bMaxContexIDNumber

Specifies the max number of contexts supported by a device. This number must be greater than 5.

bSysDataTagUnitSize

Specifies the system data tag unit size.

bSysDataTagResSize

Specifies the maximum size in bytes allocated by the device to handle system data.

bSupportedSecRTypes

Specifies the supported Secure Removal types. The first 3 bits of the variable are flags that represent different supported Secure Removal types.

Bit Description
0 Information removed with an erase of the physical memory.
1 Information removed by overwriting the addressed locations with a single character followed by an erase.
2 Information removed by overwriting the addressed locations with a character, its complement, then a random character.
3 Information removed using a vendor-defined mechanism.
4-7 Reserved for future use.

wSupportedMemoryTypes[2]

Specifies the supported memory types in a bitmap.

Bit Description
0 A normal memory type is supported.
1 A system code memory type is supported.
2 A non-persistent memory type is supported.
3 Enhanced memory type 1 is supported.
4 Enhanced memory type 2 is supported.
5 Enhanced memory type 3 is supported.
6 Enhanced memory type 4 is supported.
7-14 Reserved for future use.
15 A RPMB memory type is supported.

dSystemCodeMaxNAllocU[4]

Specifies the maximum number of allocation units for the System Code for a device.

wSystemCodeCapAdjFac[2]

Species the Capacity Adjustment Factor for the System Code memory type.

dNonPersistMaxNAllocU[4]

Species the maximum number of Allocation Units for a non-persistent memory type.

wNonPersistCapAdjFac[2]

Specifies the capacity adjustment factor for the non-persistent memory type.

dEnhanced1MaxNAllocU[4]

specifies the max number of Allocation Units for the enhanced memory type 1.

wEnhanced1CapAdjFac[2]

specifies the Capacity Adjustment Factor for the enhanced memory type 1.

dEnhanced2MaxNAllocU[4]

specifies the max number of Allocation Units for the enhanced memory type 2.

wEnhanced2CapAdjFac[2]

specifies the Capacity Adjustment Factor for the enhanced memory type 2.

dEnhanced3MaxNAllocU[4]

specifies the max number of Allocation Units for the enhanced memory type 3.

wEnhanced3CapAdjFac[2]

specifies the Capacity Adjustment Factor for the enhanced memory type 3.

dEnhanced4MaxNAllocU[4]

specifies the max number of Allocation Units for the enhanced memory type 4.

wEnhanced4CapAdjFac[2]

specifies the Capacity Adjustment Factor for the enhanced memory type 4.

dOptimalLogicalBlockSize[4]

Specifies the optimal logical block size.

bHPBNumberLU

bHPBSubRegionSize

bHPBRegionSize

wDeviceMaxActiveHPBRegions

Reserved2[2]

dWriteBoosterBufferMaxNAllocUnits

bDeviceMaxWriteBoosterLUs

bWriteBoosterBufferCapAdjFac

bSupportedWriteBoosterBufferUserSpaceReductionTypes

bSupportedWriteBoosterBufferTypes

Remarks

If the size of the data transferred exceeds the number of frames bRPMB_ReadWriteSize, it will be done in multiple Security commands.

The Capacity Adjustment Factor value for a normal memory type is equal to 1.

Requirements

Requirement Value
Minimum supported client Windows 10, version 1709
Minimum supported server Windows Server 2016
Header ufs.h