make PCI work with Windows NT 4 guest
PATCH 1/1 make PCI work with Windows NT 4 guest
This is the minimal patch that, combined with my previous patch, allows a Windows NT 4 guest to boot with qemu's PCI support enabled. It seems that WNT4 is pretty grumpy about the DSC ("device seek complete") bit in the status register. If we don't set it on WIN_SPECIFY, WNT4 times out and gives up on the device.
ide.c +1 -1
@@ -1477,7 +1477,7 @@ static void ide_ioport_write(void *opaqucase WIN_SPECIFY :case WIN_RECAL : s->error =0 ; - s->status =READY_STAT ; + s->status =READY_STAT |SEEK_STAT ;ide_set_irq (s);break ;case WIN_SETMULT :
Signature · 3 lines
Ben Pfaff email: [email protected] web: http://benpfaff.org
Hi Ben,
great work! Out of curiosity: how did you manage to find out what is going wrong? (may help others to debug similarly complicated situations...)
Ciao,
Dscho
Quoted 2 lines · Johannes Schindelin
great work! Out of curiosity: how did you manage to find out what is going wrong? (may help others to debug similarly complicated situations...)
To tell that the lack of CMOS was a problem, I tried the WNT4 install under both Bochs (in which WNT4 worked) and qemu and set up both to dump out IDE port reads and writes in the same trace format. Then I `diff'ed the outputs. There were lots of differences so I adjusted the qemu state machine until the traces were bug-for-bug identical. It still didn't work so I knew something else had to be the problem, and eventually I thought of the CMOS.
I did about the same thing for figuring out how to make PCI work. I turned on lots of debug print statements, then ran installs with PCI enabled and disabled, and looked at the `diff' between the debug print outputs. There was a particular point in the PCI trace where the guest was sitting in a loop polling the IDE status register until it timed out, so I figured that it was looking for a bit that wasn't on. Adding the "seek complete" bit fixed it.
Signature · 3 lines
"...I've forgotten where I was going with this, but you can bet it was scathing." --DesiredUsername
[Qemu-devel] Win98 network & cirrus logic success
Hi,
short warning at first: don't ping. It does not do what you think it does. Try looking at a web page instead.
After long hours and nights, I finally got Win98 working as it should. However, it was not easy: first of all, I forgot to update the rom images in /usr/local/share/qemu. This resulted in several crashes. Even after that, I had plenty of crashes, the network card would not be recognized, and it was generally very frustrating. I then played with the device manager and kept removing devices (especially that APM device...). A few times Win98 then would "recognize" devices with very strange names (all characters > 0x80 ASCII), which I removed at once. A few times the host bridge was installed. At one time, the IDE controller was defunct, so Win98 could not detect the cdrom. After that, however, things became much more stable. Win98 recognized everything just fine. It forgot the HiColor setting a couple of times, but then it worked. Without crashing.
Next came the network. I tried to ping, and it wouldn't. ipconfig showed no 169.* rubbish, but the expected 10.* address. I now think the ping fails, because the answer is not correctly routed back, being ICMP instead of TCP. When I finally had that idea and just tried to surf to www.google.de, it just worked...
In hindsight, I think it would have been easier to just reinstall
Windows98: The original installation was before cirrus logic and pci were present in qemu.
Ciao,
Dscho
Quoted 5 lines · Ben Pfaff
This is the minimal patch that, combined with my previous patch, allows a Windows NT 4 guest to boot with qemu's PCI support enabled. It seems that WNT4 is pretty grumpy about the DSC ("device seek complete") bit in the status register. If we don't set it on
WIN_SPECIFY, WNT4 times out and gives up on the device.
Fabrice, do you plan to commit Ben's patches soon, or should I put it on my web site for now?
Thanks,
Hetz
Fabrice Bellard
AppliedApplied.
Fabrice.
Quoted 19 lines · Ben Pfaff
This is the minimal patch that, combined with my previous patch, allows a Windows NT 4 guest to boot with qemu's PCI support enabled. It seems that WNT4 is pretty grumpy about the DSC ("device seek complete") bit in the status register. If we don't set it on
WIN_SPECIFY, WNT4 times out and gives up on the device.diff -u -p -u -r1.26
ide.cide.c +1
-1@@ -1477,7 +1477,7 @@ static void ide_ioport_write(void *opaqucase WIN_SPECIFY :case WIN_RECAL : s->error =0 ; - s->status =READY_STAT ; + s->status =READY_STAT |SEEK_STAT ;ide_set_irq (s);break ;case WIN_SETMULT :
While at it, what about:
http://lists.gnu.org/archive/html/qemu-devel/2004-07/msg00574.html
/ magnus
Quoted 32 lines · Fabrice Bellard
Applied.
Fabrice.
Quoted 11 lines · Ben Pfaff
This is the minimal patch that, combined with my previous patch, allows a Windows NT 4 guest to boot with qemu's PCI support enabled. It seems that WNT4 is pretty grumpy about the DSC ("device seek complete") bit in the status register. If we don't set it on
WIN_SPECIFY, WNT4 times out and gives up on the device.diff -u -p -u -r1.26
ide.cide.c static void ide_ioport_write(void *opaqu · line 1483
Quoted 8 lines
ide.c +1
-1@@ -1477,7 +1477,7 @@ static void ide_ioport_write(void *opaqucase WIN_SPECIFY :case WIN_RECAL : s->error =0 ; - s->status =READY_STAT ; + s->status =READY_STAT |SEEK_STAT ;ide_set_irq (s);break ;case WIN_SETMULT :_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel