<br><br><div><span class="gmail_quote">On 5/2/07, <b class="gmail_sendername">Peter Stuge</b> <<a href="mailto:stuge-linuxbios@cdy.org">stuge-linuxbios@cdy.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, May 02, 2007 at 12:09:39AM +0700, Darmawan Salihun wrote:<br>> Do you think that this approach is foolproof<br><br>Certainly not, this is a very dangerous path, the entire operating<br>system is circumvented. Tread carefully.
<br></blockquote>hmmm..., ok, this won't be the development path. Anyway, the current version is just a very early experimental version to test <br>the MMIO related routine in the kernel mode driver. <br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>> and extensible enough for the time being?<br><br>It allows flashrom to run with little modification, but it is not<br>a solution I like.<br><br><br>On Wed, May 02, 2007 at 12:15:39AM +0700, Darmawan Salihun wrote:
<br>> >The app could enumerate the PCI devices in the system and compare<br>><br>> The current PCI device enumeration uses a cut-down version of the<br>> pciutils source code which I port to Windows (Quite trivial given
<br>> the availability of inb,outb, ..., in the current kernel driver).<br><br>That's not a good idea<br><br>This is because Windows assumes it has full control over hardware.<br>Windows could start making a PCI config access at any time, including
<br>in the middle of the PCI config access you're doing directly with<br>in/out functions.<br><br>Again, direct hardware access is very dangerous since you're<br>operating under the feet of the operating system. Always use the
<br>Windows API for everything you can. Direct access only for memory<br>reads and writes at the top of 4GB.</blockquote><div><br>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. 
<br></div></div><br clear="all"><br>--Darmawan<br>--------------------------------------------------------------------<br>-= Human knowledge belongs to the world =-