Interrupt Handling
Stefan Reinauer
stepan at openbios.org
Tue Nov 2 17:19:01 CET 2004
* Eric W. Biederman <ebiederman at 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
More information about the coreboot
mailing list