Re:Bochs or me?
Posted: Tue May 30, 2006 10:07 am
Brendan:
The image: http://69.194.132.218/2khz.rar
Because it does not output anything other then when it generates an exception, you would just see a blue line when its running good.
Dumping register and stack information..
CS=0008h DS=0010h ES=0010h SS=0018h GS=0010h FS=0010h
EAX=80000002h ESI=00094000h EIP=0009016Fh CR0=00000011h
EDX=00000254h EDI=00084000h ESP=00000F4Ch CR2=00000000h
ECX=00000000h EBX=00000000h EBP=00009000h CR3=00000000h
EFLAG=00210286h Reserved checksum (00000002)
IOPL=0 CF=0 PF=1 AF=0 ZF=0 SF=1 OF=0
ID=1 TF=0 IF=0 DF=0 NT=0 RF=1 VM=0 AC=0 VIF=0 VIP=0
ErrorCode=0000013Bh EXT=1 IDT=1 TI=0 Selector: 39 (27h)
ESP [00h]=00000000h
ESP [04h]=00000000h
ESP [08h]=00000000h
ESP [0Ch]=00000000h
Now I know you notice that this is a external error code that is specifying selector 39 (mapped to IRQ 7). At first I did not mask any IRQs, however I always had a #NP handler and confirm it works properly. The only ISR that was installed is IRQ 0, and only IDT was made was 20h for IRQ 0. This would at least what I think would case a #NP if some other IRQ was servicing (Yes the entire area was zero'd before installing ISRs). But no #NP was generated, so I assume its has nothing to do with that nature. However after you metioned it, I did mask all IRQs but the timer. Why the error code is pointed to IRQ 7 (parallel printer interrupt)? I am clueless.
edit: I forgot to mention that it still does generate the same GPF as shown here after masking IRQs.
The image: http://69.194.132.218/2khz.rar
Because it does not output anything other then when it generates an exception, you would just see a blue line when its running good.
Hmm.. well on my bochs it crashs for the 200hz image. After then I started chipping away the source and ended up with the code in the previous post, then it needed to be at a higher timer frequency to cause a GPF.Brendan wrote: I've been trying your last boot images (PIT100hz.img and PIT200hz.img) but I haven't been able to get them to crash - I just get a sea of scrolling "tock!!tick"...
I don't use the CVS ones but the released one which is the bochs-2.2.6-win32msvc-src.zip still up in thier website. The only modifcation done was to support your 64KB ISA BIOS. (I've haven't managed to figure out why I can't get the 128KB BIOS working yet, nor can I understand why when I tried to compile Bochs with SMP enabled it hangs after any BIOS post.)Brendan wrote: Also, which version of Bochs are you using? I'm using the CVS version from about a month ago...
.....
It might also help to know how you've compiled Bochs - which optimizations were enabled (and possibly if SMP was enabled, as SMP disables some of the optimizations).
Wether its me or bochs, I hope its me actually so then I can say I learn something out of this whole deal, but if it is bochs then I'm afraid I've just went through that for nothing.Brendan wrote: Bochs does have bugs but they are extremely rare for common things (like the CPU itself, PIC, PIT, etc).
Just wondering.. do you have that show IPS for bochout.txt enabled and using the option clock: sync=realtime, time0=local? It was an important factor for the two images because I've that the 100hz won't GPF but 200hz GPF on realtime setting, I'm not sure why your not getting GPFs...Brendan wrote: I haven't been able to reproduce the problem and it's still not precise enough to tell exactly where a bug might be in Bochs....
I've now made a more friendly unhandled exception handler which hopefully will answer all those questions. This is what it outputs on GPF:Brendan wrote: I'm also not sure which instruction/s trigger the GPF or what is on the stack after the GPF (the error code pushed on the stack by the CPU, etc). Also, are all other IRQs masked?
Dumping register and stack information..
CS=0008h DS=0010h ES=0010h SS=0018h GS=0010h FS=0010h
EAX=80000002h ESI=00094000h EIP=0009016Fh CR0=00000011h
EDX=00000254h EDI=00084000h ESP=00000F4Ch CR2=00000000h
ECX=00000000h EBX=00000000h EBP=00009000h CR3=00000000h
EFLAG=00210286h Reserved checksum (00000002)
IOPL=0 CF=0 PF=1 AF=0 ZF=0 SF=1 OF=0
ID=1 TF=0 IF=0 DF=0 NT=0 RF=1 VM=0 AC=0 VIF=0 VIP=0
ErrorCode=0000013Bh EXT=1 IDT=1 TI=0 Selector: 39 (27h)
ESP [00h]=00000000h
ESP [04h]=00000000h
ESP [08h]=00000000h
ESP [0Ch]=00000000h
Now I know you notice that this is a external error code that is specifying selector 39 (mapped to IRQ 7). At first I did not mask any IRQs, however I always had a #NP handler and confirm it works properly. The only ISR that was installed is IRQ 0, and only IDT was made was 20h for IRQ 0. This would at least what I think would case a #NP if some other IRQ was servicing (Yes the entire area was zero'd before installing ISRs). But no #NP was generated, so I assume its has nothing to do with that nature. However after you metioned it, I did mask all IRQs but the timer. Why the error code is pointed to IRQ 7 (parallel printer interrupt)? I am clueless.
edit: I forgot to mention that it still does generate the same GPF as shown here after masking IRQs.