To Provision a UFS Device through the Flashing Tools#
Enter the following command:
./bootburn.py -b p3710/p3960-10-a01|p3663-a01 -U ${NV_WORKSPACE}/drive-foundation/tools/flashtools/storage_configs/t23x/ufs-provision-256gb.cfg
This boots the device in RCM mode, then programs the frequency and lun_nodes based on the values provided in the file ufs-provision-3710.cfg
.
Make sure to use the right provision file for your UFS:
ufs-provision-128gb-samsung.cfg – Samsung 128 GB
ufs-provision-128gb.cfg – 128 GB
ufs-provision-256gb.cfg – 256 GB
ufs-provision-512gb.cfg – 512 GB
ufs-provision-p3710/p3960.cfg – is now obsolete and the same as ufs-provision-256.cfg
Note
UFS provisioning must be performed before use. A UFS provision erases all
existing data on the UFS. UFS provisioning cannot be done through DRIVE
Update. UFS provisioning sets persistent properties like logical block size
and writebooster shared buffer size. A complete list of properties can be
found in the .cfg
file used. The 128 GB Samsung requires provisioning
before flashing to configure the required properties of writebooster. For
Samsung provisioning, use the Samsung .cfg
file.
If writebooster is enabled, performance is dropped when the SLC memory is full. Delay must be given to flush SLC memory data to be written to TLC nand.
For more details on provisioning, refer to the NVIDIA DriveOS 7.0 SDK Developer Guide.
UFS Config File Format#
The UFS provisioning configuration file uses a format similar to the following:
UFS_debugfs_node=a80b8d0000.ufshci
program_refclkfreq=1
refclkfreq_value=0x01
program_bootlun_en_id=0
bootlun_en_id_value=0x01
program_lun=1
number_of_luns=8
boot_enable=0x01
enable_shared_wb=1
shared_wb_alloc_units=0x000a0000
descr_access_en=0x01
lun0.bLUEnable=0x01
lun0.bBootLunID=0x00
lun0.bLUWriteProtect=0x00
lun0.bMemoryType=0x00
lun0.dNumAllocUnits=0x6aed0000
lun0.bDataReliability=0x01
lun0.bLogicalBlockSize=0x0C
lun0.bProvisioningType=0x03
lun1.bLUEnable=0x01
lun1.bBootLunID=0x01
lun1.bLUWriteProtect=0x00
lun1.bMemoryType=0x03
lun1.dNumAllocUnits=0x96000000
lun1.bDataReliability=0x01
lun1.bLogicalBlockSize=0x0C
lun1.bProvisioningType=0x03
In this case, two LUNs have been created by filling out the following parameters:
Parameter |
Description |
---|---|
refclkfreq_value |
00h: 19.2MHz
01h: 26MHz
02h: 38.4MHz
03h: 52MHz
|
bLUEnable |
Logical Unit Enable
00h: Logical Unit disabled
01h: Logical Unit enabled
|
bBootLunID |
Boot LUN ID
00h: Not bootable
01h: Boot LU A
02h: Boot LU B
|
bLUWriteProtect |
Logical Unit Write Protect
00h: LU not write protected
01h: LU write protected when fPowerOnWPEn =1
02h: LU permanently write protected when PermanentWPEn=1
03h: Reserved (for UFS Security Extension specification)
|
bMemoryType |
Memory Type
bMemoryType defines logical unit memory type.
00h: Normal Memory
01h: System code memory type
02h: Non-Persistent memory type
03h: Enhanced memory type 1
04h: Enhanced memory type 2
05h: Enhanced memory type 3
06h: Enhanced memory type 4
|
dNumAllocUnits |
Number of Allocation Units
Number of allocation units assigned to the logical unit.
The value shall be calculated considering the capacity
adjustment factor of the selected memory type
32 bit big endian format
|
bDataReliability |
Data Reliability
bDataReliability defines the device behavior when a power
failure occurs during a write operation the logical unit
00h: the logical unit is not protected. Logical unit’s
entire data might be lost as a result of a power
failure during a write operation
01h: logical unit is protected. Logical unit’s data is
protected against power failure.
|
bLogicalBlockSize |
Logical Block Size
The size of addressable logical blocks equal the result
of exponentiation with as base the number two and as
exponent the bLogicalBlockSize value: 2bLogicalBlockSize
(i.e., bLogicalBlockSize = 0Ch corresponds to 4 KByte
Logical Block Size). Its minimum value is 0Ch, which
corresponds to 4 KByte
|
bProvisioningType |
Provisioning Type
00h:Thin Provisioning is disabled (default)
02h:Thin Provisioning is enabled and TPRZ = 0
03h:Thin Provisioning is enabled and TPRZ = 1
|
CapacityAdjFactor |
Capacity Adjustment Factory
This value is determined by the memory type
01h: Normal Memory
03h: Enhanced memory type
|
dSegmentSize |
Segment Size
0x2000 = 8192 units of 512 byte blocks
|
bAllocationUnitSz |
Allocation unit size:
Value exprtessed in number of segment. Each logical unit
can be allocated as a multiple of allocation units
|
The calculation for the number of allocated units is given by the following formula:
For example, for a 200 MB LUN device enhanced memory device (CapacityAdjFactor = 3
):
Change 0x96
to a 32-bit, big-endian value: