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

Darmawan Salihun darmawan.salihun at gmail.com
Wed May 2 01:13:27 CEST 2007


On 5/2/07, Peter Stuge <stuge-linuxbios at cdy.org> wrote:
>
> 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.
>
hmmm..., ok, this won't be the development path. Anyway, the current version
is just a very early experimental version to test
the MMIO related routine in the kernel mode driver.


> > 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.


OK. I see the problem now. Anyway, IIRC the PCI enumeration is not provided
by "user mode" Windows API but it's available as kernel mode driver API in
the OS.


--Darmawan
--------------------------------------------------------------------
-= Human knowledge belongs to the world =-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20070502/0efba000/attachment.html>


More information about the coreboot mailing list