On 4/24/07, <b class="gmail_sendername">Stefan Reinauer</b> <<a href="mailto:stepan@coresystems.de">stepan@coresystems.de</a>> wrote:<div><span class="gmail_quote"></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:darmawan.salihun@gmail.com">darmawan.salihun@gmail.com</a>> [070424 17:37]:<br>> Hi all,<br>>    Sorry if this is quite very basic question. I haven't got the time to read
<br>> the latest version of linuxbios's flashrom. Is the basic mechanism to access<br>> the BIOS chip address space is through mmap function? haven't grep the code<br>> though :-(.<br><br>Yes. The bios chip is mmapped into the processes address space. There
<br>are some occurences of mmap over the place. I recently cleaned the code<br>up a little bit, dropping multiple open() calls on /dev/mem.<br><br>Do we need a wrapper for those "map-physical-memory" functions?<br>
<br></blockquote></div>I think we don't need it because it has an "equivalent" in Windows' kernel mode driver, i.e. <br><br>PVOID MmGetSystemAddressForMdlSafe(IN PMDL  Mdl, IN MM_PAGE_PRIORITY  Priority);
<br><br>Unless, we are planning for a "single-build" for all platforms (Linux, BSD, etc.), we don't need a wrapper. <br>The main problem is the mechanism will be a bit different because flashrom will be divided into kernel mode driver 
<br>and user mode application in Windows.<br clear="all"><br>-- Darmawan<br>--------------------------------------------------------------------<br>-= Human knowledge belongs to the world =-