Interrupt problem

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
raywill

Interrupt problem

Post by raywill »

I did nothing with interrupt (IDT not loaded,8259A not reprogrammed) after my kernel startup,
but bochs restart automatically after 2 or 3 seconds though I use a while(1); loop.
After reboot for 4 or 5 times ,Bochs told me something like "too many timers registed".

Should timer be set or IDT be filled immediately after setup?

If I tured off interrupt using cli , this problem will not ocurr.

What is wrong?
AR

Re:Interrupt problem

Post by AR »

If interrupts are enabled and there isn't an IDT, the moment an interrupt occurs, the CPU will look it up in the [non-existant] IDT, realise the entry is missing and double fault but then realises it can't look that up either so triple faults (crash reboot).

The "timers registered" thing is more likely a bug with Bochs in relation to the host operating system.
raywill

Re:Interrupt problem

Post by raywill »

Bochs give follow outputs:

00001105357i[CPU0 ] LOCK prefix unallowed (op1=0x53, attr=0x0, mod=0x0, nnn=0)

repeated handreds of times .......

00001105359i[CPU0 ] LOCK prefix unallowed (op1=0x53, attr=0x0, mod=0x0, nnn=0)
00001105361i[CPU0 ] LOCK prefix unallowed (op1=0x53, attr=0x0, mod=0x0, nnn=0)
00001105363i[CPU0 ] LOCK prefix unallowed (op1=0x53, attr=0x0, mod=0x0, nnn=0)
00001105365i[CPU0 ] LOCK prefix unallowed (op1=0x53, attr=0x0, mod=0x0, nnn=0)
00001105367i[CPU0 ] LOCK prefix unallowed (op1=0x53, attr=0x0, mod=0x0, nnn=0)
00001105367i[CPU0 ] can_push(): expand-up: esp < N
00001105367i[CPU0 ] push_32(): push outside stack limits
00001105367i[CPU0 ] can_push(): expand-up: esp < N
00001105367i[CPU0 ] can_push(): expand-up: esp < N
00001105367e[CPU0 ] exception(): 3rd (12) exception with no resolution, shutdown status is 00h, resetting
00001105367i[SYS ] bx_pc_system_c::Reset(SOFTWARE) called
AR

Re:Interrupt problem

Post by AR »

The "LOCK prefix" thing is usually caused by jumping to a NULL pointer, you should verify any code that uses function pointers.
Cjmovie

Re:Interrupt problem

Post by Cjmovie »

00001105367e[CPU0 ] exception(): 3rd (12) exception with no resolution, shutdown status is 00h, resetting
That's your tripple fault :).
Post Reply