SectorInfo

This structure emulates the typical physical layout of the actual extra area of flash. The FAL portion of the NAND flash block driver supplied by Microsoft makes use of 8 bytes of the Sector Extra Info area. The file public/COMMON/oak/drivers/block/msflashfmd/inc/fmd.h has the SectorInfo definition:

typedef struct _SectorInfo{
   DWORD dwReserved1;
   BYTE bOEMReserved;
   BYTE bBadBlock;
   WORD wReserved2;
}SectorInfo, *PSectorInfo;
Members
dwReserved1
Reserved. Used by the FAL to hold the logical to physical sector mapping information.
bOEMReserved
For use by OEM. One of the following (2 bits are recognized by the FAL):
#define OEM_BLOCK_RESERVED 0x01
#define OEM_BLOCK_READONLY 0x02
Any sectors that the OEM does not want the FAL to touch should have both of these bits set. This includes the sectors including the boot loader and any other flash data that sits before the MBR. Note also that because only full blocks can be erased, all sectors within a block should have the same values for these fields.

bBadBlock
Indicates if block is BAD.
wReserved2
Reserved. Used by the FAL to maintain state information about the sector.
Remarks
The SectorInfo data structure was designed to emulate the typical physical layout of the actual extra area of flash. Specifically, most NAND flash manufacturers (Samsung and Toshiba most notably) set byte 5 (the 6th byte) to 0 to indicate if a block has shipped BAD from the factory.

The following is a typical representation of how the extra area is utilized:

- - - - - - - - - - - - - - - -

|R|R|R|R|O|V|R|R|E|E|E|E|E|E|E|E|

- - - - - - - - - - - - - - - -

The following table describes each element.

Element Description
R reserved bytes used by the FAL
O byte for use by the OEM
V byte indicating if the block is valid (a.k.a. bad)
E bytes typically used for by the FMD for ECC

See Also
TFAT on NAND for Smartphone

 

 

 

 

;plateform.reg----------
see HKEY_LOCAL_MACHINE/init
see if have  #include
see xipregion DEFAULT_REGISTRY
;-----------------------

in Bootloader:
see sectorinfo if write right

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值