* Eric W. Biederman ebiederman@lnxi.com [041103 00:26]:
This hunk below initializes it. It seems to work out better to initialize the idt with code instead of data.
/* Initialize the Interrupt Descriptor table */ leal _idt, %edi leal vec0, %ebx movl $(0x10 << 16), %eax /* cs selector */
1: movw %bx, %ax movl %ebx, %edx movw $0x8E00, %dx /* Interrupt gate - dpl=0, present */ movl %eax, 0(%edi) movl %edx, 4(%edi) addl $6, %ebx addl $8, %edi cmpl $_idt_end, %edi jne 1b
/* Load the Interrupt descriptor table */ lidt idtarg
What would btw be the correct way of resuming operation after, say, a division by zero exception? I tried to set a new info->eip in x86_exception() to a helper function, but I get the honour of a GPF right after returning from that function... finding it jumps into the stack at some point.
Stefan