[U-Boot-Users] CFI driver does not verify writes in buffered mode - feature?

Detlev Zundel dzu at denx.de
Thu May 10 08:53:31 CEST 2007


Hello Tolunay,

> Wolfgang Denk wrote:
>> In message <46422E3E.40703 at orkun.us> you wrote:
>>>> when using the CFI flash driver with CFG_FLASH_USE_BUFFER_WRITE the
>>>> "usual" verification whether the write did indeed happen correctly is
>>>> not done:
>> ...
>>> In the above example you are overwriting the same data. Which is OK
>>> to write without erasing first. You can turn 1 bits to 0 or
>>> re-write the same data without erasing which is OK. The redundant
>>> environment implementation takes advantage of this in U-Boot. This
>>> is not an error.
>>>
>>> Am I missing something?
>>
>> Yes, you do. Detlev wrote different data, and it was not discovered by
>> the CFI driver. Using one of the propriatary flash drivers like on the
>> TQM8xxL will complain...
>
> Yes, in that case we need to fix this! Detlev, do you have a patch
> suggestion?

No sorry, not right now.  This actually turned out to be a problem
during a training that I do right now.  The participants complained
that they copied u-boot images being correct in RAM to flash but they
were corrupt in flash.  It took me a while to figure out what was
going on here.

If I understand the code correctly then we would have to do a buffer
read after a buffer write and compare the data, right?  I am not too
fluent in working with CFI flashes so I would have to look up all
details like can I simply read from flash after the program cycle or
do I have to do things like take it out of command mode etc so I
couldn't come up with a fix "after work".

On the other hand I consider this to be a serious problem so I
brazenly posted it in the hope that someone else might be able to
solve it more quickly.  If this does not happen, I will have to spend
some time on it, but this will not happen this week nor early next
week...

Thanks
  Detlev

-- 
I will use free software even if it is less powerful, or less reliable,
because freedom is the most important thing, and that is what the Free
Software movement is about.  How we get freedom.
                       -- Richard M. Stallman
--
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany +49 8142 66989 40




More information about the U-Boot mailing list