Re: [Yaffs] Source code mismatching development notes of Yaf…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: shizheng
Date:  
To: yaffs
Subject: Re: [Yaffs] Source code mismatching development notes of Yaffs2?
Charles Manning wrote:

> On Wednesday 05 March 2008 05:20:26 shizheng wrote:
>
>> I'm viewing the latest source from cvs and I've got
>> a few questions about Yaffs2, especially when I compared
>> the code to the development notes(http://www.yaffs.net/node/38):
>>
>>
>
>
>> 1. tag information stored in NAND oob
>> In the development notes, it says Yaffs2 has these tag information
>> including blockState, chunkId, objectId, nBytes, blockSequence, tagsEcc
>> and ecc.
>> But in yaffs_packedtags2.h, it defines
>> typedef struct {
>> unsigned sequenceNumber;
>> unsigned objectId;
>> unsigned chunkId;
>> unsigned byteCount;
>> } yaffs_PackedTags2TagsPart;
>>
>> typedef struct {
>> yaffs_PackedTags2TagsPart t;
>> yaffs_ECCOther ecc;
>> } yaffs_PackedTags2;
>>
>> and blockState and ecc on data are missing. I have no idea
>> about the MTD layer of linux, so I don't know whether the
>> two tags are handled by MTD.
>>
>
> The difference is because the one structure is the yaffs_ExtendedTags
> structure which is an abstracted form of the tags. This is the structure that
> is passed around within yaffs.
>
> The packed tags are the tags as packed down for writing into NAND. If you look
> at the yaffs_packedtags2.c file you will see the conversion beween these two
> forms.
>
> The block state is managed by a slightly different mechanism, by directly
> querying the nand driver.
>
> This stuff can be a bit confusing at times and I hope to refactor this to be
> far clearer.
>
>

In fact, I wanna use yaffs in RTEMS. As the YDI document says, three
kinds of interfaces must be implemented
for integrating. There's no similar MTD stuff in RTEMS. So I wanna know
how tags are organized in flash
oob area. Since blockstate and ecc on data are missing in
yaffs_PackedTags2TagsPart, I guess they're handled
by linux MTD. I wanna make sure about these:
1. My nand chip has no hardware ecc, does my NAND access functions have
to calc data ecc itself?
2. The offsets of data ecc and block state mark in OOB area can be
defined by myself which maybe different with
linux MTD, can't they? As data ecc and block state query are all handled
by nand access functions, the offsets
won't affect yaffs_guts code, am I right?
Or is there any requirement for tags arrangement in oob area when
integrating yaffs with other RTOS's?
>> 2. The file $(SRC_ROOT)/patches/yaffs_mtdif2.c isn't useful, is it?
>> I have checkouted the source code, and done make/insmod directly on linux
>> without merging Yaffs into kernel tree.
>>
>
> I think I must be missing your point here. THis file converts the more
> abstract NAND interface into calls to mtd to provide the services.
>
>

There's also a file $(SRC_ROOT)/yaffs_mtdif2.c, so I don't know which
one to pick when I test
yaffs on linux mtd. But the one in patch directory seems to be older
than the one under $SRC_ROOT directory.
>> The module works well without any patch when simple file operation is
>> tested on NANDSim(2kB page, 64B oob, 512MB chipsize).
>>
>
> Glad to hear it.
>
>
>> best wishes, shizheng
>>
>>
>>
>> _______________________________________________
>> yaffs mailing list
>>
>> http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>>
>
>
>
>
>