Page 1 of 1

notice anything wrong here?

Posted: Fri Aug 08, 2003 12:03 am
by libber
alright, i have been trying to setup the idt for about 2 weeks now and i am completley stumpted. i have decompiled the way c kernels do it and tried to emulate that. i have followed every idt-related guide at osdev.neopages.net (mainly involved stuffing the idt in .data and making sure the address to the handler was correct), i at one point had tons of interrupts filling every part of the idt and nothing changed, i have tried to sortof brute-force this problem by trying every combination of things i can. also i reread the part in intel book 3 about interrupts but it still doesnt work. this fails in both bochs and on a real pc, so it is definetly my problem. i mean, i really cant see how i am doing something wrong with the idt, i mean it is just an array pointing to handlers, which you then load a pointer to, but i dont know

any commentary is appreciated, even if it doesnt help me fix the idt (although that would be much *more* appreciated :) ).

thanks for your time,
Collin



[attachment deleted by admin]

Re:notice anything wrong here?

Posted: Fri Aug 08, 2003 12:30 am
by Pype.Clicker
sounds good but i'd need to know the base of your DS segment to be 100% affirmative...

Re:notice anything wrong here?

Posted: Fri Aug 08, 2003 12:53 am
by libber
oh, sorry data segment is offset 0x10 in the gdt. so you really dont see anything suspicious? oh how will i ever catch this error... :/

thanks for your time,
Collin

Re:notice anything wrong here?

Posted: Fri Aug 08, 2003 1:27 am
by Pype.Clicker
nah! that was not what i asked for ... i meant *base* of the segment, not its selector ... if your base is not 0, it means that the IDTR.base value may not be used as a pointer to the IDT from %DS ...

Re:notice anything wrong here?

Posted: Fri Aug 08, 2003 2:19 am
by libber
ah sorry, yes its base is 0. to firther clarify here is my bootloader also

[attachment deleted by admin]

Re:notice anything wrong here?

Posted: Tue Aug 12, 2003 10:51 am
by Candy
you're not scaling the IDT offset address

suppose you add ISR 0, then 1

you then use offsets ISR_BASE and ISR_BASE + 1, obviously ISR1 is overwriting the entry for ISR0.

add an shl eax, 3 before the add to edx, then you're set.