UFS 1-UFS架构简介1
UFS 2 -UFS架构简介2
UFS 3 - UFS RPMB
UFS 4 - UFS Boot
UFS 5 - UFS UIC Layer: MIPI M-PHY
UAP : UFS Application Layer
This chapter defines the mandatory commands set supported by the UFS device.
本章定义了 UFS 设备支持的强制命令集。
Commands may belong to the UFS Native command set or to the UFS SCSI command set.
This version of the standard does not define UFS native commands.These command set may be defined in the future to support specific flash storage or UFS native basic needs.
命令可能属于 UFS Native 命令集或 UFS SCSI 命令集。 该版本的标准没有定义UFS原生命令。未来可能会定义这些命令集以支持特定的闪存或UFS原生的基本需求。
The UFS SCSI command set (USC) consists of a selection of commands from SCSI Primary Commands [SPC], and SCSI Block Commands [SBC]. Both command types share similar command descriptor block (CDB) format.
UFS SCSI 命令集 (USC) 由从 SCSI 主命令 [SPC] 和 SCSI 块命令 [SBC] 中选择的命令组成。两种命令类型共享相似的命令描述符块 (CDB) 格式。
SCSI commands are communicated by sending the SCSI Command Descriptor Block (CDB) to the device. There are only fixed length CDB format for UFS, unlike SCSI which has additional Variable Length CDB format.
SCSI 命令通过向设备发送 SCSI 命令描述符块 (CDB) 来传达。 UFS 只有固定长度的 CDB 格式,不像 SCSI 有额外的可变长度 CDB 格式。
All UFS CDBs shall have an OPERATION CODE field as their first byte and these values shall be defined by each SCSI and UFS. Detail SCSI CDB usages and structure are defined in [SPC], section 4.3, The Command Descriptor Block (CDB).
The General Common CDB fields are defined in [SPC], section 4.3.5, Common CDB fields.
所有 UFS CDB 都应将操作代码字段作为其第一个字节,并且这些值应由每个 SCSI 和 UFS 定义。详细的 SCSI CDB 用法和结构在 [SPC],第 4.3 节,命令描述符块 (CDB) 中定义。 通用 CDB 字段在 [SPC] 第 4.3.5 节,通用 CDB 字段中定义。
Operation code
The first byte of a SCSI and USC CDB shall contain an operation code identifying the operation being requested by the CDB.
The OPERATION CODE of the CDB contains a GROUP CODE field and COMMAND CODE field. The GROUP CODE field provides eight groups of command codes and the COMMAND CODE provides thirty-two command codes in each group, see [SPC] for further details.
SCSI 和 USC CDB 的第一个字节应包含一个操作代码,用于标识 CDB 请求的操作。 CDB 的 OPERATION CODE 包含 GROUP CODE 字段和 COMMAND CODE 字段。 GROUP CODE 字段提供八组命令代码,COMMAND CODE 提供每组三十二个命令代码,详见[SPC]。
The UFS Native commands are not defined in this version of the standard, they may be defined in future versions if needed.
UFS Native 命令未在此版本的标准中定义,如果需要,它们可能会在未来的版本中定义。
The Basic Universal Flash Storage (UFS) SCSI commands are compatible with SCSI Primary Commands - 4 [SPC] and SCSI Block Commands - 3 [SBC].
基本通用闪存 (UFS) SCSI 命令与 SCSI 主要命令 - 4 [SPC] 和 SCSI 块命令 - 3 [SBC] 兼容。
If enabled (bLUEnable = 01h), each logical unit shall support the commands defined as mandatory in Table 11.1.
如果启用(bLUEnable = 01h),每个逻辑单元应支持表 11.1 中定义为强制性的命令。
The remaining part of this section describes the SCSI commands used in UFS devices. A dedicated paragraph for each command provides: CDB table, brief command description, relevant command fields, details about mandatory and optional features, and some other fundamental information.
本节的其余部分描述了 UFS 设备中使用的 SCSI 命令。每个命令的专用段落提供:CDB 表、简要命令描述、相关命令字段、有关强制和可选功能的详细信息以及一些其他基本信息。
Fields that are not supported by UFS should be set to zero, and are documented using the notation “= 00h” (e.g., RDPROTECT = 000b). The device may ignore values in fields that are not supported by UFS.
UFS 不支持的字段应设置为零,并使用符号“= 00h”进行记录(例如,RDPROTECT = 000b)。设备可能会忽略 UFS 不支持的字段中的值。
NOTE The values enclosed in parenthesis are defined in SCSI standards and are not UFS specific (e.g., OPERATION CODE (12h)).
注意括号中的值是在 SCSI 标准中定义的,而不是特定于 UFS 的(例如,OPERATION CODE (12h))。
In the following some information that apply to all SCSI commands used in UFS.
以下是适用于 UFS 中使用的所有 SCSI 命令的一些信息。
CONTROL
The CONTROL byte is present in several CDB and it is defined in [SAM]. The CONTROL byte is not used in this standard: the CONTROL byte should be set to zero and it shall be ignored by UFS device. No vendor specific interpretation and Normal ACA are assumed.
CONTROL 字节存在于多个 CDB 中,并在 [SAM] 中定义。本标准未使用 CONTROL 字节:CONTROL 字节应设置为零,UFS 设备应忽略它。不假定供应商特定解释和正常 ACA。
Auto contingent allegiance (ACA)
Establishing an ACA condition the application client may request that the device server alter command processing when a command terminates with a CHECK CONDITION status.
建立 ACA 条件后,应用程序客户端可以请求设备服务器在命令以CHECK CONDITION状态终止时更改命令处理。
UFS device does not support ACA.
UFS 设备不支持 ACA。
The INQUIRY command (see Table 11.2) is a request for information regarding the logical units and UFS target device be sent to the application client. Refer to [SPC] for more details regarding the INQUIRY command.
INQUIRY 命令(参见表 11.2)是一个关于逻辑单元和 UFS 目标设备的信息请求,被发送到应用程序客户端。有关 INQUIRY 命令的更多详细信息,请参阅 [SPC]。
When EVPD = 1, the device server shall return the vital product data specified by the PAGE CODE field as defined in [SPC]. Support for all vital product data except Mode Page Policy VPD is optional for UFS. Mode Page Policy VPD shall be supported by UFS device to provide information about Mode pages which are applicable to Device level or logical unit level. See [SPC] for data format definition of Mode Page Policy VPD page.
当 EVPD = 1 时,设备服务器应返回由 [SPC] 中定义的 PAGE CODE 字段指定的重要产品数据。 UFS 可选择支持除模式页面策略 VPD 之外的所有重要产品数据。模式页面策略 VPD 应由 UFS 设备支持,以提供有关适用于设备级别或逻辑单元级别的模式页面的信息。 Mode Page Policy VPD page的数据格式定义见[SPC]。
When EVPD = 0 and Page Code = 0, the Standard INQUIRY DATA is responded to INQUIRY command. The standard INQUIRY data format is shown on Table 11.3, INQUIRY data shall contain at least 36 bytes. Table 11.4 defines the INQUIRY response data for UFS.
当 EVPD = 0 且Page Code = 0 时,标准 INQUIRY DATA 响应 INQUIRY 命令。标准查询数据格式如表 11.3 所示,查询数据至少包含 36 个字节。表 11.4 定义了 UFS 的 INQUIRY 响应数据。
The INQUIRY command requests that information regarding the logical unit and SCSI target device be sent to the Application Client.
INQUIRY 命令请求将有关逻辑单元和 SCSI 目标设备的信息发送到 Application Client。
The INQUIRY command may be used by an Application Client after a hard reset or power on condition to determine information about the device for system configuration. If a INQUIRY command is received with a pending UNIT ATTENTION condition (i.e., before the device server reports CHECK CONDITION status), the device server shall perform the INQUIRY command.
INQUIRY information is returned in standard INQUIRY response data structure (see Table 11.3).
INQUIRY 命令可由应用程序客户端在硬重置或开机条件后使用以确定有关系统配置的设备的信息。如果收到带有未决 UNIT ATTENTION 条件的 INQUIRY 命令(即,在设备服务器报告 CHECK CONDITION 状态之前),设备服务器应执行 INQUIRY 命令。 INQUIRY 信息以标准 INQUIRY 响应数据结构返回(见表 11.3)。
The 4-byte PRODUCT REVISION LEVEL in the Inquiry Response Data shall identify the firmware version of the UFS device and shall be uniquely encoded for any firmware modification implemented by the UFS device vendor.
查询响应数据中的 4 字节PRODUCT REVISION LEVEL应标识 UFS 设备的固件版本,并应针对 UFS 设备供应商实施的任何固件修改进行唯一编码。