can't set IDT entry twice!!!

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
J. Weeks

can't set IDT entry twice!!!

Post by J. Weeks »

Okay guys, I really need some help here... this makes
_NO_ sence to me!

I've defined and set a timer interrupt, and then
enabled IRQ 0. This works fine.

Then I disable IRQ 0, which also works fine.

I then re-define the timer interrupt with
another function, and re-enable IRQ 0.

My problem? When the interrupt starts up again,
the function hasn't changed!!! It's still using
the old function!!!

How is that possible!?
My createGate function seems to be able to set an
interrupt _once_, and only once!!! Huh? The same
thing happens with the keyboard interrupt... I tested it
with that one too.

My createGate code is as follows, if it helps:

void createGate(long table, short desc_num, long offset,
short selector, long control) {
Gate *gate ;
gate = (Gate *)(table + desc_num * 8);

gate->offset_low = offset & 0xffff;
gate->selector = selector;
gate->access = control + D_PRESENT;
gate->offset_high = offset >> 16;

return;
}

Any ideas?
Post Reply