Menu

#24 flashmem doesn\'t always erase all blocks

0.10
closed-fixed
UrJTAG (101)
5
2008-01-13
2008-01-13
No

This is a theoretical bug, I haven't verified whether it exists in practice...

If flashmem is started at an address not aligned with an erase block boundary, it may fail to erase the next block _before_ programming.

The current algorithm is as follows: flashmem determines the current block to be programmed from the address and unlocks/erases it. Then, it reads up to BSIZE (4096) bytes from the input file and writes/programs them to the flash device. If the current block ended somewhere between start and start+BSIZE, the next block would be programmed before it's erased (and then maybe erased in the next step, forgetting the just programmed data)

Idea: in flashmem.c:find_block(), also determine the end address of the current block and limit the BSIZE for fread accordingly.

Discussion

  • Kolja Waschk

    Kolja Waschk - 2008-01-13
    • assigned_to: nobody --> kawk
    • summary: flashmem doesn't always erase all blocks --> flashmem doesn\'t always erase all blocks
     
  • Kolja Waschk

    Kolja Waschk - 2008-01-13

    Logged In: YES
    user_id=478715
    Originator: YES

    Idea implemented in #917

     
  • Kolja Waschk

    Kolja Waschk - 2008-01-13
    • status: open --> closed-fixed
     
  • Kolja Waschk

    Kolja Waschk - 2017-02-12
    • Group: --> 0.10
     

Log in to post a comment.

MongoDB Logo MongoDB