nand ubi -2 ubi管理下的SLC nand

来源:互联网 发布:南非犰狳蜥淘宝 编辑:程序博客网 时间:2024/05/04 23:39

一 ubi管理下的SLC nand
refer to
http://www.linux-mtd.infradead.org/doc/ubi.html
http://www.360doc.com/content/12/0305/19/1317564_192019619.shtml
1
对于K9K8G08U0A (1GB SLC),


2.
假如对tiny6410的SLC 1G核心板的nand 的MTD分区如下,


3.
在58 0000 - 4000 0000的mtd分区之上,假如仅人为划分了一个UBI Volume(默认还有一个内部卷),ubi管理下的这个mtd结构如下,
(假设没有子页)

说明:
PEB physical eraseblock 物理擦除块,即nand的最小擦除单位,为64个页,131072B。
LEB logical eraseblock 逻辑擦除块,是ubi 卷里的概念,是对物理擦除块的映射,但不包含物理擦除块最前面的EC头页和VID头页。所以是62个页,126976B。
   
erase counter header (or EC header) which contains the erase counter of the physical eraseblock (PEB) plus some other not so important information
volume identifier header (or VID header) which stores volume ID and logical eraseblock (LEB) number thisPEB belongs to (plus some other not so important information).

layout volume 也就是mtd分区的卷表所在的卷,包括两个LEB,但内容一致。
Volume table is an on-flash data structure which contains information about each volume on this UBI device
Internally, the volume table resides in a special-purpose UBI volume which is called
layout volume

一个mtd分区下可以建好多ubi卷,但不能超过128个。

ubi管理下的nand的额外开销:
2 PEBs are used to store the volume table;
1 PEB is reserved for wear-leveling purposes;
1 PEB is reserved for the atomic LEB change operation;
some amount of PEBs is reserved for bad PEB handling; this is applicable for NAND flash, but not for NOR flash; the amount of reserved PEBs is configurable and is equal to 20 blocks per 1024 blocks by default;
UBI stores the EC and VID headers at the beginning of each PEB; the amount of bytes used for these purposes depends on the flash type and is explained below.

在flash说明书上也有块图,里面的块就是PEB,每个PEB去掉page 0,1就可以被映射为一个LEB


原创粉丝点击