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

Darmawan Salihun darmawan.salihun at gmail.com
Mon Apr 30 05:50:07 CEST 2007

Hi all,
    I'm currently working on a windows port of the flashrom utility. I have
been thinking about how it should be done. There are two paradigm that I'm
thinking about as of now. I need your suggestions/critics, etc. ;-). Both of
them based on the fact that this utility should be divided into user mode
code and kernel mode code.

1. The kernel mode code a.k.a kernel mode device driver is as simple as
possible and only provides "raw" functionality, i.e. capability to map the
physical address space in which the BIOS chip is mapped into the requesting
user mode code. This approach provides the user mode code similar to mmap()
function in *NIX. The pros in this approach is there won't be much changes
to the *NIX version of flashrom to adapt it to windows and it will be a
little easier to develop because no need to load/unload the driver. The cons
is if the user mode code went wrong, it can bring the whole system down.
I've been experimenting with a minor tested version for this approach

2. The kernel mode driver implements the majority of the flashrom code and
the usermode code is merely a "front-end" to the kernel mode device driver
which provides all of the chip related logic. The pros in this approach is
the code would probably much stable because the user mode code won't bring
the system down as easily as the previous approach. The cons is it will very
probably requires more work to port the *NIX version of flashrom to Windows
with this approach and more over, I haven't been able to figure out how to
do integrity-testing to the driver to ensure its stability :-(.

Anyway, I'm also thinking about a quite "universal" interface between the
user mode code and the kernel mode code. Perhaps a well defined interface
that will work both in *NIX and Windows in the future will be needed or
maybe I will try to provide an "evolution path" to such an interface. I
really need suggestion in this area.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20070430/35891f42/attachment.html>

More information about the coreboot mailing list