Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

x86 hardware Interrupt is not working on qemu

Tags:

c

qemu

x86

kernel

I'm writing a kernel (using qemu to simulate) for x86 as a school project and I ran into weird problem. Even though I have set the interrupt flag in the eflags register, I'm sill not getting any clock interrupts (I checked with qemu info register command and I see eflag=0x292 which means it is set).

To be precise when I run a spin test (while(1); program) in user mode, I get one clock interrupt, but after that one, it stops, qemu does not seems to simulate more! did it happen to anyone else? Is there another mechanism that can affect interrupts? Anyone have a clue?
Shai.

like image 626
buc030 Avatar asked May 08 '13 02:05

buc030


1 Answers

Apparently in x86, you have to acknowledge clock interrupts after each one. I.e one must sent an acknowledgment to the lapic after every clock interrupt.

like image 110
buc030 Avatar answered Sep 20 '22 09:09

buc030