Here's the diff of winflashrom versus what seems to be the closest revision, namely r126.
diffstat: 82802ab.h | 2 Makefile | 59 +-- README | 64 +++ am29f040b.c | 4 board_enable.c | 4 chipset_enable.c | 7 direct_io.c | 654 +++++++++++++++++++++++++++++++++++++ direct_io.h | 28 + driver/sources | 17 driver/winflashrom.c | 899 +++++++++++++++++++++++++++++++++++++++++++++++++++ driver/winflashrom.h | 83 ++++ error_msg.c | 30 + error_msg.h | 11 flashchips.c | 3 flashrom.c | 77 +++- interfaces.h | 81 ++++ jedec.h | 7 layout.c | 7 lbtable.c | 13 libpci/Makefile | 27 + libpci/access.c | 282 +++++++++++++++ libpci/filter.c | 39 ++ libpci/generic.c | 214 ++++++++++++ libpci/header.h | 421 +++++++++++++++++++++++ libpci/i386-ports.c | 222 ++++++++++++ libpci/internal.h | 39 ++ libpci/pci.h | 135 +++++++ m29f400bt.h | 2 msys_doc.c | 2 sharplhf00l04.h | 3 sst49lfxxxc.c | 2 todo.txt | 11 udelay.h | 6 w39v040fa.c | 112 ++++++ w39v040fa.h | 6 winflashrom.rc | 6 36 files changed, 3528 insertions(+), 51 deletions(-)
He pulled in a copy of libpci, not sure why.
Diff created from two cleaned up copies (.svn and created files removed) with -urN.
Have fun with it :)
Luc Verhaegen.
On 09.08.2009 01:47, Luc Verhaegen wrote:
Here's the diff of winflashrom versus what seems to be the closest revision, namely r126.
Summary: 1. w39v040fa.c was added 2. lots of udelay() was replaced with myusec_delay() 3. clean shutdown before every exit() 4. different memory mapping infrastructure 5. Readme for winflashrom was added 6. Todo list was added 7. Windows kernel driver was added 8. pcilib was added
Suggested resolution: 1. Check differenced between w39v040fa.c and most similar file in current svn. 2. Already solved in current svn with programmer_delay. 3. The shutdown thing is still a problem in current flashrom. Uwe had a patch, but Stefan had the idea to use atexit instead. New patch needed. 4. Current abstraction solves this nicely, only one place in internal.c needs to be changed. 5. Merge the Readme. 6. Look at Todo and decide what's worth to be done. 7. Test if the Windows kernel driver still works on Windows 7 (or anything post XP). 8. Make pcilib usable without including it.
Regards, Carl-Daniel
Carl-Daniel Hailfinger wrote:
- Test if the Windows kernel driver still works on Windows 7 (or
anything post XP). 8. Make pcilib usable without including it.
Darmawan's code works as is, I tried it today on an i945 box running Windows XP. But the code is based on a very old version of flashrom.
The two main issues are - memory access - IO access (including PCI access)
PCI access is nicely implemented by libpci/pci utils, which is available for Windows since 2.1.99. libpci needs WinIo, which is an abstraction layer for memory and IO accesses, similar to DirectIO on OSX: http://www.internals.com/utilities_main.htm
It would likely make sense to base a new port on WinIo and libpci.
Stefan
On 09.08.2009 02:11, Stefan Reinauer wrote:
Carl-Daniel Hailfinger wrote:
- Test if the Windows kernel driver still works on Windows 7 (or
anything post XP). 8. Make pcilib usable without including it.
Darmawan's code works as is, I tried it today on an i945 box running Windows XP. But the code is based on a very old version of flashrom.
The two main issues are
- memory access
- IO access (including PCI access)
PCI access is nicely implemented by libpci/pci utils, which is available for Windows since 2.1.99. libpci needs WinIo, which is an abstraction layer for memory and IO accesses, similar to DirectIO on OSX: http://www.internals.com/utilities_main.htm
It would likely make sense to base a new port on WinIo and libpci.
Since the forward port of most of the patch is pretty easy, it might make sense to do that first, test the result, then tackle a rewrite where needed. The benefit of this approach is an up-to-date baseline for comparison.
Regards, Carl-Daniel
Luc Verhaegen wrote:
He pulled in a copy of libpci, not sure why.
Because upstream libpci would not support Darmawan's winflashrom.sys driver.
We should replace this with a patch against libpci, if we continue to use winflashrom.sys. I googled and read that WinIo does not work with Vista nor 64bit Windows, so maybe it's not such a fine idea.
Diff created from two cleaned up copies (.svn and created files removed) with -urN.
Have fun with it :)
Thanks a lot for doing this.
Here is a version that is working on XP against the latest flashrom (r670).
* I found that quite some files have unneeded include files in them (mainly sys/mman.h is breaking MinGW compiles) * The serprog driver is hopelessly unix code and is disabled on Windows currently * Mapping "high tables" did not work for me, that's why the code in cbtable.c is disabled for now (to keep flashrom from exiting there instead of just not finding the table)
Please don't merge yet, it's not too shiny.
Stefan