<br><br><div><span class="gmail_quote">On 7/25/07, <b class="gmail_sendername">Stefan Reinauer</b> <<a href="mailto:email@example.com">firstname.lastname@example.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;">
* Darmawan Salihun <<a href="mailto:email@example.com">firstname.lastname@example.org</a>> [070724 06:11]:<br>> I'm currently completing the MMIO mapping routine<br>> in the device driver, but I have a problem as follows:
<br>> - The current driver doesn't limit the application<br>> to map certain MMIO phy address range even if it's<br>> already mapped by another routine in the same<br>> application. I actually plan to "lock" the mapped
<br>> MMIO phy address range so that once it's mapped, it<br>> must be unmapped first before another routine can map<br>> that range. Actually, this is to avoid two routine<br>> from manipulating the same area at the same time.
<br>><br>> My question is, do you think we really need the "lock-ing"<br>> mechanism in the driver? I just think it is a potential<br>> problem if the MMIO access is not "lock-ed".<br>
<br>Since the places where mmap happens are only a few I'd say it is not<br>really "needed". It's a good idea though as it is a safety measure<br>against application bugs.</blockquote><div> </div>The MMIO mapping routine completed. I need more testing though.
</div><br>Anyway, after evaluating all of the possible development path last week, <br>I came to conclusion that the robustness of winflashrom code and its evolution <br>in to the future will be guaranteed if the architecture is as follows:
<br>1. PCI detection routine in Windows is in "user mode" and parsing the data from Windows device "database".<br>2. The driver will contain the chipset_enable and board_enable routine as they are doing direct IO transactions which should be hidden from the user mode application as much as possible to mitigate possible exploit in the future. It will ease migration into WDK (ofr Windows Vista support in the future) as well.
<br>3. As before, user mode application part of winflashrom will be compiled with MinGW and its driver will be compiled with Microsoft's native device driver compiler that comes with their driver development kit. I decided that this is the best approach because it will be problematic when we migrate to Windows Vista and take a different route.
<br><br>Anyway, the architecture above will make the winflashrom significantly differ from flashrom.<br>However, "unification" with the flashrom base code is not impossible but I think it's better to do it gradually. Peter's idea of using a "simple protocol" to exchange data between the application and the driver for the chipset_enable and board_enable routine sounds solid at the moment. I will implement it for the rest of Google Summer of Code coding phase and I think we will have a working code in about two weeks from now. However, I'm still looking for other ideas in this matter.
<br><br>Regards,<br> <br>-- Darmawan Salihun a.k.a Pinczakko<br>--------------------------------------------------------------------<br>-= Human knowledge belongs to the world =-