On Tue, Apr 24, 2007 at 11:15:24PM +0700, Darmawan Salihun wrote:
Do we need a wrapper for those "map-physical-memory" functions?
I think we don't need it because it has an "equivalent" in Windows' kernel mode driver, i.e.
PVOID MmGetSystemAddressForMdlSafe(IN PMDL Mdl, IN MM_PAGE_PRIORITY Priority);
Is MmMapIoSpace() strictly for io? Otherwise it may also be a candidate.
It seems an MDL is always specified with a virtual address but I can't find a phystovirt() in the Mm functions. Admittedly I didn't look very hard so you may already have found it. :)
The main problem is the mechanism will be a bit different because flashrom will be divided into kernel mode driver and user mode application in Windows.
I think I like having more of the logic in the kernel driver for once, this is because the algorithms can benefit in speed, and because the system will be more stable as long as the kernel driver is bug free. ;)
Letting the app drive everything is less intrusive of course, but could also put the system into an unknown state if the app is aborted halfway through something.
//Peter