[LinuxBIOS] winflashrom architecture (Windows port of flashrom) -- looking for suggestions

Peter Stuge stuge-linuxbios at cdy.org
Tue May 1 22:40:08 CEST 2007


On Wed, May 02, 2007 at 12:09:39AM +0700, Darmawan Salihun wrote:
> Do you think that this approach is foolproof

Certainly not, this is a very dangerous path, the entire operating
system is circumvented. Tread carefully.


> and extensible enough for the time being?

It allows flashrom to run with little modification, but it is not
a solution I like.


On Wed, May 02, 2007 at 12:15:39AM +0700, Darmawan Salihun wrote:
> >The app could enumerate the PCI devices in the system and compare
> 
> The current PCI device enumeration uses a cut-down version of the
> pciutils source code which I port to Windows (Quite trivial given
> the availability of inb,outb, ..., in the current kernel driver).

That's not a good idea

This is because Windows assumes it has full control over hardware.
Windows could start making a PCI config access at any time, including
in the middle of the PCI config access you're doing directly with
in/out functions.

Again, direct hardware access is very dangerous since you're
operating under the feet of the operating system. Always use the
Windows API for everything you can. Direct access only for memory
reads and writes at the top of 4GB.


//Peter




More information about the coreboot mailing list