[LinuxBIOS] Getting Friendly with Flashrom

Stefan Reinauer stepan at openbios.org
Thu Mar 22 15:08:46 CET 2007

* Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> [070322 14:22]:
> On 22.03.2007 10:56, Stefan Reinauer wrote:
> > The sequence to call these in-flash enablers is well-known. Uniflash is
> > using them and so knows how to flash every board without the need for
> > new code, as long as it knows the flash chips.
> Does Uniflash work on this board? If so, you can modify it to print out
> the addresses it would be calling (along with the parameters) and then
> call these addresses in vm86 under Linux. That should work.
> You can even dump the PCI config space before and after enabling and
> diff them.

Comparing registers is a good approach. You might have to dump the
registers of your superio as well, though, not only the pci config
space, as bios write protect is usually done with superio GPIOs.

I just looked at uniflash. One possibility would be to implement
AMIBIOS.PAS by using vm86 or, better because it works in the BSDs as
well, lrmi-0.10, the linux realmode interface wrapper.

I found out uniflash supports AMI, but not award. From the time when I
developed /dev/bios, I found this note in a stack of old paper that I
thought I'd never need anymore:

This is a structure found in every award bios image (the friend who
found this out told me it is legally absolutely unproblematic since it
just means using a callback structure made for interoperability. Before
you do anything with this (including calling into those offsets), be
sure that your local law permits this. As far as I understand, the DMCA
is about circumventing copy protection, not overwrite protection. But I
am not a lawyer, so better don't quote me on that.

8 bytes: AWDFLASH
2 bytes: ??
2 bytes: offset of bios write enable function
2 bytes: offset of bios write disable function
2 bytes: ??
2 bytes: ??
2 bytes: offset of bios shadow disable function
2 bytes: offset of bios shadow enable function

Best regards,

More information about the coreboot mailing list