still some problems on 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
spectrum
Member
Member
Posts: 37
Joined: Wed Jun 13, 2007 7:06 am

still some problems on interrupts

Post by spectrum »

hi all,

i've enabled the interrupts in protected mode, idt register is loaded correctly, and i have set up some interrupt gates, from 0 to 15 and the 0x80 that i need for testing. Calling int0x80 for test works, but if i leave the system go on reading from hd, i'm still getting bochs errors, and system reset.

Code: Select all


00001074540d[PIC  ] slave: signalling IRQ(14)
00001074540d[PIC  ] IRQ line 2 now high
00001074540d[PIC  ] signalling IRQ(2)
00001074541d[CPU0 ] interrupt(): vector = 118, INT = 0, EXT = 1
00001074541e[CPU0 ] interrupt(): gate descriptor is not valid sys seg
00001074541d[CPU0 ] exception(0x0D)
00001074541d[CPU0 ] interrupt(): vector = 13, INT = 0, EXT = 1
00001074541d[CPU0 ] int_trap_gate286(): INTERRUPT TO SAME PRIVILEGE
00001074576d[CPU0 ] IRET PROTECTED
00001074576e[CPU0 ] fetch_raw_descriptor: LDT: index (8a27)1144 > limit (0)
00001074576d[CPU0 ] exception(0x0D)
00001074576d[CPU0 ] interrupt(): vector = 13, INT = 0, EXT = 1
00001074576d[CPU0 ] int_trap_gate286(): INTERRUPT TO SAME PRIVILEGE
00001074611d[CPU0 ] IRET PROTECTED


From what i see, there is an issue for the vector 118, that i don't even know, and with the iret instruction that i use to return from my interrupts handlers. To neter and exit irs routines i use these macroes:

Code: Select all

.macro _isr_enter
	pusha
	push	%gs
	push	%fs
	push	%ds
	push	%es
.endm

.macro _isr_exit
	pop	%es
	pop	%ds
	pop	%fs
	pop	%gs
	popa
	iret
.endm

if any help, thanks
angelo
spectrum
Member
Member
Posts: 37
Joined: Wed Jun 13, 2007 7:06 am

Post by spectrum »

seems solved, was missing the interrupt handler for the vector 118, now it works.

thanks angelo
Post Reply