Bochs/Interrupts

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Whatever5k

Bochs/Interrupts

Post by Whatever5k »

Have you noticed any problems with Bochs concerning interrupts. Because I can handle keyboard IRQs on a real machine but it doesn't work on Bochs 2.0. I think it worked on in Bochs 1.4.1, but I'm not really sure...
Any ideas?
Whatever5k

Re:Bochs/Interrupts

Post by Whatever5k »

Hm, I noticed that my keyboard IRQ works in Bochs when I change my stack size...I had the stack size to be 256 KB, I had s.th. like this:

Code: Select all

section .bss
   resb 262144 ; = 256 KB
   stack_top:
Now, when I change it to 4KB (4096), it works...
Anybody knows why? Besides, I'm having trouble with my page fault handler...although I have set up my own ISR for interrupt 14, Bochs quits with the error message "3rd (14) exception with no resolution" when enabling paging...
Whatever5k

Re:Bochs/Interrupts

Post by Whatever5k »

Ok, when I generate an "__asm__("int $0xe")", that is a page fault, my Page fault handler successfully handles it...but when I try to enable paging, bochs quits with the known error
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Bochs/Interrupts

Post by Pype.Clicker »

page fault exception come with a error code which cannot be pushed on the stack by your INT 0x0e instruction.
Whatever5k

Re:Bochs/Interrupts

Post by Whatever5k »

Well, I didn't push anything on the stack, and my page fault handler said that there would be a page fault at address 0 (because there was nothin in cr0 and because I just did int $0xe)
Whatever5k

Re:Bochs/Interrupts

Post by Whatever5k »

Hm, I think I wrote my page directory wrong to CR3, now I fixed that, but when enabling paging, I get the error:
"prefetch: running in bogus memory"

What does that mean? Can somebody please help me?
beyondsociety

Re:Bochs/Interrupts

Post by beyondsociety »

Whatever5k

Re:Bochs/Interrupts

Post by Whatever5k »

So it has to do something with the stack? In how far?
beyondsociety

Re:Bochs/Interrupts

Post by beyondsociety »

I not sure, I would have to see the part of code for the stack. Is it the same as above?
Whatever5k

Re:Bochs/Interrupts

Post by Whatever5k »

Well, I think so...Bochs quits with saying:
prefetch: running in bogus memory
My stack is simply that here:

Code: Select all

...
...
mov esp, stack_top
...
...
section .bss
   resb 4096 ; 4KB for stack
   stack_top:
Post Reply