In the PMC pm49fl004, You got eight 64K size blocks.
You can erase the individual block and write that block only.
Regards
YH
-----邮件原件----- 发件人: Li-Ta Lo [mailto:ollie@lanl.gov] 发送时间: 2004年4月21日 9:49 收件人: YhLu 抄送: LinuxBIOS 主题: Re: 答复: flash_rom start and size
On Wed, 2004-04-21 at 10:40, YhLu wrote:
For example,
- I only want to let end user to flash normal part [0-384k), and don't
let
him touch fallback part [384k, 512k).
there is no way you can really lock the flash.
- or I only want to update the payload image in the beginning, [0,64k).
you need some kind of flash translation layer to accomplish this. You need to back up some part of the erase block you want reserve , erase the block and write with updated and reserved data.
You probably need MTD.
Ollie
Regards
Yinghai Lu -----邮件原件----- 发件人: Li-Ta Lo [mailto:ollie@lanl.gov] 发送时间: 2004年4月21日 9:09 收件人: YhLu 抄送: LinuxBIOS 主题: Re: flash_rom start and size
On Tue, 2004-04-20 at 20:06, YhLu wrote:
Ollie or David,
Can you modify the flash_rom to take start and size command line?
I mean
Flash_rom -start=0k -size=384k xxxx.rom
And xxxx.rom only to be 384k.
Why do you want to do this ? You should prepare the image the same size as your flash chip.
There are techinical difficulty doing this. Most flash parts are block/sector erase and byte program. There is no general way to start from an abitrary address to any size.
Ollie
Regards
YH
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
On Wed, 2004-04-21 at 11:03, YhLu wrote:
In the PMC pm49fl004, You got eight 64K size blocks.
You can erase the individual block and write that block only.
Regards
YH
The problem is the block size is different for different flash parts. It requires a lot of code to handle this difference. It is the reason why MTD got so big.
Ollie
-----邮件原件----- 发件人: Li-Ta Lo [mailto:ollie@lanl.gov] 发送时间: 2004年4月21日 9:49 收件人: YhLu 抄送: LinuxBIOS 主题: Re: 答复: flash_rom start and size
On Wed, 2004-04-21 at 10:40, YhLu wrote:
For example,
- I only want to let end user to flash normal part [0-384k), and don't
let
him touch fallback part [384k, 512k).
there is no way you can really lock the flash.
- or I only want to update the payload image in the beginning, [0,64k).
you need some kind of flash translation layer to accomplish this. You need to back up some part of the erase block you want reserve , erase the block and write with updated and reserved data.
You probably need MTD.
Ollie
Regards
Yinghai Lu -----邮件原件----- 发件人: Li-Ta Lo [mailto:ollie@lanl.gov] 发送时间: 2004年4月21日 9:09 收件人: YhLu 抄送: LinuxBIOS 主题: Re: flash_rom start and size
On Tue, 2004-04-20 at 20:06, YhLu wrote:
Ollie or David,
Can you modify the flash_rom to take start and size command line?
I mean
Flash_rom -start=0k -size=384k xxxx.rom
And xxxx.rom only to be 384k.
Why do you want to do this ? You should prepare the image the same size as your flash chip.
There are techinical difficulty doing this. Most flash parts are block/sector erase and byte program. There is no general way to start from an abitrary address to any size.
Ollie
Regards
YH
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
for the Alphas long ago I modified flash_rom as follows:
flash_rom e <start block #> <length in blocks>
Erase the blocks
flash_rom r <start block #> <length in blocks>
read the blocks
flash_rom p <file name> <start block #>
program with file name starting at start block #. Program up to the limit of the file size or the flash size, whichever is small. This was for partial programming.
flash_rom s <start block #> <lenght in blocks>
program using stdin as the data, starting at start block # and for length blocks OR eof on stdin, whichever was smaller.
This was pretty handy for the DS10, which had 2 MB of flash in 64KB blocks, and had areas of flash we could not rewrite.
maybe we need this for the general case?
ron