[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sw interrups on i386 platform



On 12/27/2011 02:56 AM, Lotte Halkj?r wrote:
>
> Hi!
>
> I am testing rtems semaphores on platform nios2 and i386 (with qemu), 
> - but I have problems when I tries to simulate interrupts on the i386 
> platform. I would have expected support for all i386 hw and sw 
> interrups, - but the bsp only supports the 16 hw interrupts. Then I 
> thought that I might use IRQ10 which is free in our platform, and 
> invoke the interrupt from sw by issuing the command
>
> __asm__ __volatile__ ( "int $0x72" )
>
> I use RTEMS Interrupt Manager Extension for common interface on nios2 
> and i386, and installs my interrupt function by calling the 
> rtems_interrupt_handler_install  function. Then for test purpose I 
> want to activate my installed interrupt function by simulate the IRQ10 
> by executing the assembler instruction ?int 0x72?. But all I get is an 
> exception ?default_raw_idt_handler?.
>
> Do anyone have an idea to what I can do?
>
Without looking at the code is the "interrupts" on the i386 BSPs are
actually not the raw hardware interrupt numbers you are thinking
they are.  The "real interrupts" are those that matter to the system
and are assigned logical vector numbers.  Most of those interrupts
actually come in on a single hardware vector and are decoded in
software based on the two i8259's.

On the PowerPC and MIPS, there is an architectural distinction
between this first hardware level of dispatching (e.g. exceptions)
and the secondary level (e.g. interrupts) which happens in software.
The x86 suffers from the PC/AT architecture. :(

You will have to figure out (or someone point out) what installs
the default_raw_idt_handler and you will have to install it that way.
And likely do more work than you want to turn that into an RTEMS
interrupt which can schedule and dispatch.

--joel
>
> Best regards
>
> Lotte Halkj?r
>