UFS 13 - Logical Unit Management

news2024/11/25 12:37:21

UFS 13 - Logical Unit Management

  • 1 Introduction
  • 2 Logical Unit features
  • 3 Logical Unit Configuration

基于UFS 3.1 标准文档阐述
UFS 1-UFS架构简介1
UFS 2 -UFS架构简介2
UFS 3 - UFS RPMB
UFS 4 - UFS Boot
UFS 5 - UFS UIC Layer: MIPI M-PHY
UFS 6 - UAP – SCSI Commands(1)
UFS 7 - UAP – SCSI Commands(2)
UFS 8 - UAP – SCSI Commands(3)
UFS 9 - UAP – SCSI Commands(4)
UFS 10 - UAP – SCSI Commands(5)
UFS 11 - UFS RPMB分区功能验证

1 Introduction

The functionality aims to provide a mechanism to let an external application define and use a virtual memory organization which could easily fit different usage models in a versatile way.
该功能旨在提供一种机制,让外部应用程序定义和使用虚拟内存组织,该组织可以轻松地以多种方式适应不同的使用模型。
Besides segmenting the available addressable space, the mechanism introduces the possibility of differentiating each logical unit through dedicated functionalities and features.
除了对可用的可寻址空间进行分段之外,该机制还引入了通过专用功能和特性来区分每个逻辑单元的可能性。
This section describes the procedure to configure the UFS device in terms of: number of logical units, logical unit size, logical unit memory type, etc. Security features can be configured as described in clause 12, UFS Security.
本节从以下方面描述配置 UFS 设备的过程:逻辑单元数量、逻辑单元大小、逻辑单元内存类型等。安全功能可以按照第 12 条“UFS 安全”中的描述进行配置。
A UFS device can be organized in different logical units. Each one represents an autonomous computing entity with independent logical address ranges and singularly accessible.
UFS 设备可以组织为不同的逻辑单元。每一个都代表一个具有独立逻辑地址范围且可单独访问的自治计算实体。
Moreover, each logical unit can be defined for a specified use and with peculiar attributes (i.e., memory type) in order to be adapted to different UFS host usage models and operating systems requirements.
此外,每个逻辑单元可以针对指定用途进行定义,并具有特定的属性(即内存类型),以便适应不同的 UFS 主机使用模型和操作系统要求。

2 Logical Unit features

UFS device address space is organized in several memory areas configurable by the user. In particular, such memory areas are denoted as logical units and characterized by the fact that they have independent logical addressable spaces starting from the logical address zero.
UFS 设备地址空间组织在多个可由用户配置的存储区域中。特别地,这样的存储器区域被表示为逻辑单元并且其特征在于它们具有从逻辑地址零开始的独立的逻辑可寻址空间。
In addition to the logical units, the UFS device supports the following well known logical units for specific purposes: UFS Device, REPORT LUNS, Boot and RPMB. Logical units are addressed by the LUN (logical unit number), while well known logical unit are addressed by the W-LUN (well known logical unit number).
除了逻辑单元之外,UFS 设备还支持以下用于特定用途的众所周知的逻辑单元:UFS 设备、REPORT LUN、Boot 和 RPMB。逻辑单元由LUN(逻辑单元号)寻址,而众所周知的逻辑单元由W-LUN(众所周知的逻辑单元号)寻址。
在这里插入图片描述
NOTE 1 The figure shows an example of device configuration in which LU 0 and LU 1 are used as boot logical units, and the logical units 3, 4 and 7 for code and data storage. LU 1 is the boot active logical unit and it may be accessed in read using the W-LUN = 30h (LUN field in UPIU = B0h).
注: 该图显示了设备配置示例,其中 LU 0 和 LU 1 用作引导逻辑单元,逻辑单元 3、4 和 7 用于代码和数据存储。 LU 1 是引导活动逻辑单元,可以使用 W-LUN = 30h(UPIU 中的 LUN 字段 = B0h)以读取方式对其进行访问。
Each logical unit will have a physical implementation on the non-volatile storage media.
每个逻辑单元将在非易失性存储介质上具有物理实现。
In particular, the UFS device shall support:
特别是,UFS 设备应支持:

  • The number of logical units specified by bMaxNumberLU. Each of them configurable as boot logical units with a maximum of two.
  • bMaxNumberLU 指定的逻辑单元数。它们中的每一个都可配置为引导逻辑单元,最多有两个。
  • One RPMB well known logical unit (W-LUN = 44h, LUN field in UPIU = C4h). RPMB well known logical unit may be further configured into up to four separate RPMB regions (RPMB region 0 - RPMB region 3).
  • 1 个 RPMB 众所周知的逻辑单元(W-LUN = 44h,UPIU 中的 LUN 字段 = C4h)。 RPMB众所周知的逻辑单元可以进一步被配置成多达四个单独的RPMB区域(RPMB区域0-RPMB区域3)。

Two logical units can be configured as boot logical unit, with only one of them active and readable through the Boot well known logical unit (W-LUN = 30h) for the execution of the system boot (see 13.1, UFS Boot). The RPMB well known logical unit is accessed by authenticated operations by a well defined security algorithm (see 12.4, RPMB). The other logical units will be used to fulfill other use cases.
可以将两个逻辑单元配置为引导逻辑单元,其中只有一个逻辑单元处于活动状态并可通过引导众所周知的逻辑单元 (W-LUN = 30h) 进行读取,以执行系统引导(请参阅 13.1,UFS 引导)。 RPMB 众所周知的逻辑单元由经过明确定义的安全算法(参见 12.4,RPMB)的认证操作进行访问。其他逻辑单元将用于完成其他用例。
Common features of each logical unit are:

  • independent logical addressable spaces (starting from logical address zero up to the logical unit size),
  • Configurable logical unit size.
    The size of each logical unit is determined by the number of allocation units assigned to it:
    dNumAllocUnits parameter value of the Configuration Descriptor. The dNumAllocUnits is expressed in terms of allocation unit size (bAllocationUnitSize).
    Moreover each logical unit is characterized by the memory type parameter which can be configured.
    Examples of memory types to differentiate logical unit properties are the following ones:
  • Default type – regular memory characteristic
  • System Code type – a logical unit that is rarely updated (e.g., system files or binary code executable files or the host operating system image and other system data structures)
  • Non-Persistent type – a logical unit that is used for temporary information (e.g., swap file extend the host virtual memory space)
  • Enhanced Memory type – vendor specific attribute
    The definition of the Enhanced Memory type is left open in order to accomplish different needs and vendor specific implementations.
    Mechanisms of write protection can be configured for each logical unit. Write protection feature types are:
  • Permanent write protection (permanent read only)
  • Power on write protection (write protection can be cleared with a power cycle or a hardware reset event)
    Write protection is not available in the RPMB well known logical unit.

3 Logical Unit Configuration

The user shall configure the logical units of the UFS device according to the following rules:

  • Maximum number of logical units is specified by bMaxNumberLU
  • One or two logical units can be configured as boot logical units.
    When a UFS device is shipped only the following well known logical units will be available: UFS Device, REPORT LUNS and the RPMB. All other logical units shall be configured before they can be accessed.
    The RPMB well known logical unit shall be configured by the device manufacturer before shipping the device. Only RPMB region 0 shall be enabled and bRPMBRegion0Size shall be set to the same size as the total RPMB well known logical unit size before shipping the device.
    Logical units and RPMB regions may be configured writing the Configuration Descriptors, see 14.1.3, Accessing Descriptors and Device Configuration, for details. RPMB regions may be configured multiple times until the Configuration Descriptor is locked by setting bConfigDescrLock attribute value to 01h. RPMB key may be programmed any time when the target RPMB region is enabled, and may be programmed independent to whether the value of bConfigDescrLock attribute is set or not. When RPMB regions are re-configured with different configuration setting, the data which was previously written to any RPMB region shall be erased while RPMB key and RPMB write counter are maintained. To keep the compatibility to the previous version of the standard, RPMB region 0 is always enabled independent of 5493
    configuration value of bRPMBRegionEnable.
    The configuration of each logical unit and the configuration of RPMB regions may be retrieved by reading the corresponding Unit Descriptor.
    It is recommended to execute logical unit configuration and RPMB region configuration during the system manufacturing phase.

Table 13.3 summarizes the configurable parameters per logical unit. See 14.1.4, Descriptor Definitions, for details about these parameters.
在这里插入图片描述
The following Geometry Descriptor parameters provide relevant information for configuring the logical units:

  • qTotalRawDeviceCapacity (total raw device density in unit of 512 bytes)
  • dSegmentSize
  • bAllocationUnitSize (Allocation Unit Size, value expressed in number of segments)
  • wSupportedMemoryTypes
  • Maximum number of allocation unit for each memory type (dSystemCodeMaxNAllocU, dNonPersistMaxNAllocU, etc.)
  • Capacity Adjustment Factor for each memory type (wSystemCodeCapAdjFac, wNonPersistCapAdjFac, etc.)
  • bMinAddrBlockSize (this parameter indicates a value equal or greater than 4Kbyte)
  • bOptimalReadBlockSize and bOptimalWriteBlockSize
  • bMaxInBufferSize
  • bMaxOutBufferSize
    To enable the access to a logical unit, the user shall configure Unit Descriptor parameters as described in the following:
  • bLUEnable
    bLUEnable shall be set to 01h to enable the logical unit. If bLUEnable is equal to 00h the logical unit is disabled and all Unit Descriptor parameters are don’t care.
  • bMemoryType
    bMemoryType shall be set to value corresponding to the desired memory type. The wSupportedMemoryTypes parameter in the Geometry Descriptor indicates which memory types are supported by the device.
  • bLogicalBlockSize
    bLogicalBlockSize value shall adhere to the following rules:
    在这里插入图片描述
    To optimize the device performance, it is recommended to configure the logical block size (bLogicalBlockSize) to represent the value indicated by dOptimalLogicalBlockSize for the specific logical unit memory type.
    Supported bLogicalBlockSize values are device specific, refer to the vendor datasheet for further information.
  • dNumAllocUnits
    在这里插入图片描述
    Assuming that the medium of the UFS device is composed by NAND flash memories which support 2 bit-per-cell and 1 bit-per-cell operation modes. The 2 bit-per-cell operation mode may be associated with the Normal memory type, while the 1 bit-per-cell operation mode may be associated with the Enhanced memory type 1.
    The Capacity Adjustment Factor for the Enhanced memory type 1 will be equal to 2.
    If:
    o dSegmentSize = 1024
    o bAllocationUnitSize = 8
    Then dNumAllocUnits for LU 1 and LU 4 are:
    在这里插入图片描述
    The logical unit capacity can be retrieved by either reading the qLogicalBlockCount parameter in the Unit Descriptor or issuing the READ CAPACITY command.
    In particular, the relations between the parameters returned by READ CAPACITY (RETURNED LOGICAL BLOCK ADDRESS and LOGICAL BLOCK LENGTH IN BYTES), and bLogicalBlockSize and qLogicalBlockCount parameters in Unit Descriptors are:
    在这里插入图片描述
    在这里插入图片描述
    RPMB well known logical unit may be divided in multiple RPMB regions configuring the parameters described in the following.
    The total size of the RPMB well known logical unit is indicated by qLogicalBlockCount of RPMB Unit Descriptor. An attempt to configure the device setting the RPMB regions with total size that exceeds the value indicated by qLogicalBlockCount shall fail. An attempt to configure the device setting a RPMB Region with enable bit to one and size to zero shall fail. An attempt to configure the device setting a RPMB Region with enable bit to zero and size greater than zero shall fail.
    在这里插入图片描述
    在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/684739.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

机器人工程创新类课程补充说明-2023-2

仅供参考 之前一篇:机器人工程创新类课程补充说明-2023- 自主学习→自主研究→自主创新,这是一个循序渐进的过程,着急没用的,大部分学生,都卡在第一个阶段,自主学习的效率比较低,并且成果不突出…

【C++ 程序设计】第 6 章:多态与虚函数

目录 一、多态的基本概念 (1)多态 (2)虚函数 (3)通过基类指针实现多态 (4)通过基类引用实现多态 (5)* 多态的实现原理 二、多态实例 三、多态的使用 …

docker启动的jenkins拉取gitee项目构建并部署

docker启动的jenkins拉取gitee项目构建并部署 docker 拉取jenkins https://hub.docker.com/r可以search不同的jenkins版本docker pull jenkins/jenkins创建挂载目录 /home/jenkins_home加权限chmod 777 /home/jenkins_homedocker run -di --namejenkins -p 9999:8080 -v /hom…

【json-server】centos线上环境搭建全攻略

▒ 目录 ▒ 🛫 问题描述环境 1️⃣ 安装json-server安装nvm安装node安装json-server 2️⃣ json-server 使用创建json数据踩坑:指定host关闭防火墙云后台修改安全组规则最终命令行 🛬 结论📖 参考资料 🛫 问题 描述 开…

【虚拟机搭建-VMware设置固定IP】VMWare中CentOS如何设置固定IP【不成功手把手教学】

背景 在日常工作学习中(比如博主在之前学习k8s过程中,windows本地搭建虚拟机,重启windows后)虚拟机的IP会发生变化,所以该篇文章详细记录VMWare中CentOS如何设置固定IP 虚拟机安装 参考: https://rundr…

尚硅谷Docker2022版学习笔记(基础篇 上)

目录 一、Docker简介 1.1、是什么? 问题:为什么会有Docker出现? Docker理念 一句话 1.2、容器与虚拟机比较 传统虚拟机技术 容器虚拟机技术 容器虚拟机技术 1.3、去哪下? 二、Docker安装 2.1、前提说明 2.2、Docker的…

Rust语言从入门到入坑——(8)Rust泛型与特性

文章目录 0、引入1、泛型1.1、在函数中使用1.2、在结构体中使用 2、特性2.1 默认特性2.2 特性做参数2.3 特性做返回值2.4 有条件实现方法 3、总结 0、引入 泛型是一个编程语言不可或缺的机制。 C 语言中用"模板"来实现泛型,而 C 语言中没有泛型的机制&am…

MySQL数据库——备份与恢复

MySQL数据库——备份与恢复 一、数据备份的重要性二 、数据库备份的分类和备份策略1 数据库备份的分类2 数据库的备份策略3常见的备份方法 三、MySQL完全备份1 什么是完全备份2 完全备份的优缺点3 完全备份的方法 四、完全备份的操作1.物理冷备份与恢复2.mysqldump 备份与恢复3…

Arduino IDE 2.1.0 下安装ESP32

很久没玩Arduino了。新装了一台电脑,想重新捡起ESP32-WROOM-32开发板玩玩。官网上下了Arduino IDE 2.1.0,然后配置ESP32开发环境。 下载及安装Arduino IDE略过不谈。装完后还是老规矩,文件 -> 首选项,先把自定义板管理地址填入…

如何与西门子200 PLC建立连接

更多关于西门子S7-200PLC内容请查看:西门子200系列PLC学习课程大纲 与西门子200 PLC建立连接很简单,分为以下几步: 1.给S7-200PLC通电 按下图1-1所示连接PLC端口,然后给PLC供电,有直流24V和交流220V两种供电方式&am…

力扣----环形链表

🎈个人主页:🎈 :✨✨✨初阶牛✨✨✨ 🐻推荐专栏1: 🍔🍟🌯C语言初阶 🐻推荐专栏2: 🍔🍟🌯C语言进阶 🔑个人信条: 🌵知行合一 金句分享:…

9i物联网浏览器(cef_114.2.110114.2.100支持H264视频)WinForm-CefSharp114(5735)视频版本体验

更新:2023.6.25 版本:Cef_114.2.110和114.2.100+chromium-114.0.5735.134的32位和64位 说明:支持图片,mp3,mp4(H264)多媒体 测试环境:windows server 2019 测试网址:www.html5test.com 1.包下载地址 1.1 https://www.nuget.org/packages/CefSharp.Common/ 1.2 https…

SpringCloud Alibaba学习笔记

SpringCloud Alibaba学习笔记 1、项目搭建 版本依赖关系&#xff1a;https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E 1.1、搭建父工程 spring-initializr构建项目 清理父工程中不必要的文件/文件夹 修改pom.xml文件 <…

Linux进程信号【信号产生】

✨个人主页&#xff1a; 北 海 &#x1f389;所属专栏&#xff1a; Linux学习之旅 &#x1f383;操作环境&#xff1a; CentOS 7.6 阿里云远程服务器 文章目录 &#x1f307;前言&#x1f3d9;️正文1、进程信号基本概念1.1、什么是信号&#xff1f;1.2、信号的作用1.3、信号的…

十四、go语言的指针

一、指针 1.1 指针的概念 指针是存储另一个变量的内存地址的变量。 我们都知道&#xff0c;变量是一种使用方便的占位符&#xff0c;用于引用计算机内存地址。 一个指针变量可以指向任何一个值的内存地址它指向那个值的内存地址。 在上面的图中&#xff0c;变量b的值为156&…

怎么输入文字生成绘画图?分享一份文字生成绘画教程

你是否曾经幻想过&#xff0c;将文字化为绘画&#xff0c;将思维转化为图像&#xff0c;让你的想象力得到更好的释放与表达&#xff1f;现在&#xff0c;这一切都变得可能了&#xff01;通过一些绘画软件&#xff0c;你可以轻松生成各种风格的绘画图。只需要一个创意的想法和一…

Selenium教程__POM架构(17)

POM是Page Object Model的简称&#xff0c;它是一种设计思想&#xff0c;意思是&#xff0c;把每一个页面&#xff0c;当做一个对象&#xff0c;页面的元素和元素之间操作方法就是页面对象的属性和行为。 POM一般使用三层架构&#xff0c;分别为&#xff1a;基础封装层、页面对…

SkyWalking--traceId的作用

原文网址&#xff1a;SkyWalking--traceId的作用_IT利刃出鞘的博客-CSDN博客 简介 本文介绍SkyWalking中traceId的作用。 traceId是什么 SkyWalking的一个核心功能就是&#xff1a;链路追踪。链路追踪就是跟踪一个请求的所有链路&#xff0c;而这个链路都是通过一个id来串起…

数据结构--算法空间复杂度

数据结构–算法空间复杂度 只需关注存储空间大小与问题规模相关的变量 计算规则与算法的时间复杂度类似 eg&#xff1a; S ( n ) O ( n 2 ) O ( n ) O ( 1 ) O ( n 2 ) S(n) O(n^2)O(n)O(1) O(n^2) S(n)O(n2)O(n)O(1)O(n2) 知识点回顾 & 重要考点

java list集合数据去重方式

1.概述 最近又是一轮代码review , 发现了一些实现去重的代码&#xff0c;在使用 list.contain … 我沉思&#xff0c;是不是其实很多初学者也存在这种去重使用问题&#xff1f; 所以我选择把这个事情整出来&#xff0c;分享一下。 2.contain 去重 首先是造出一个 List 模拟…