简体   繁体   中英

x86 hardware Interrupt is not working on qemu

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.

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

如果您期望来自RTC的中断,则必须首先通过读取REG_C(CMOS寄存器0x0C)来确认先前的中断。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM