[flashrom] operation details and future changes (was: flashrom ignoring ROM layout region)

Mark Marshall markmarshall14 at gmail.com
Fri Feb 8 17:40:31 CET 2013


On 8 February 2013 16:44, Stefan Tauner
<stefan.tauner at student.tuwien.ac.at>wrote:

> On Fri, 8 Feb 2013 11:08:21 +0100
> Mark Marshall <markmarshall14 at gmail.com> wrote:
> Hi Mark,
> > The other problems are:
> > - That most of flashrom seems to be limited to 2^24 address bits.
> >   (this is relatively easy to fix)
> We will see about that :) We are of course aware that this is needed
> quite soon. Do you want to help us with this (mostly testing, but if
> you like you can also try to create the needed patch)?

I've got some patches that work here, but one of them involves just
commenting out the code in spi.c::spi_chip_read!  I don't really understand
what it thinks it's checking for (which isn't strictly true, it seems to be
to do
with accessing the flash through a memory window, which happens for a
motherboard BIOS.)

I'll neaten them up and post them next week.

> > - That flashrom thinks a page is always 256 byes (I think I've found
> >   most cases of this, but I'm not sure.  What's the granularity flag
> >   for?
> The flag is there to fix exactly this :)
> See also http://patchwork.coreboot.org/patch/3757/
> Not many chips need this and so we never moved into this direction...
> do you really need it?

I don't know if I need it.  I guess not actually, as my page size is 512,
and it should all work with the code for 256?  It might be faster as 512,
but I
don't care about that small difference.

> > I've also found that flashrom doesn't always do what I expect, and I'm
> not
> > sure if this is
> > by design or not.  for instance, if I want to erase my entire flash chip,
> > it ends up calling
> > the sector erase on each sector, not by doing a chip-erase?  Are these
> > types of things
> > written down anywhere?
> We try to erase the smallest possible blocks first (in order of the
> eraser array of the chip definition(s) in flashchips.c. This potentially
> allows to skip writing of block as explained above. It is of course
> rather useless for the -E/--erase operation, but the code is shared and
> no one complained yet IIRC (or sent a patch). Most of these details are
> not documented I think, but some are (in the manpage). Patches for the
> manpage are welcomed. Everyone is invited to edit the wiki too :)

I was wondering about creating a more detailed structure of both the
contents of
the ROM and the (set of) files that the user was trying to program.  Then
could read back from the flash only for the bits that we needed. Any

Thanks for your help, and I'll try to post more next week.


Mark M?

> --
> Kind regards/Mit freundlichen Grüßen, Stefan Tauner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20130208/d92e1f69/attachment.html>

More information about the flashrom mailing list