Re: Autovector exceptions on Atari ST

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

 



On Thu, Aug 25, 2011 at 03:51, Joshua Juran <jjuran@xxxxxxxxx> wrote:
On Aug 24, 2011, at 12:47 PM, Matthias Reis wrote:

On Sun, Aug 7, 2011 at 23:09, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
wrote:

MFP interrupts are not autovector interrupts, but user vector interrupts.

Sorry, I forgot about this: it may be a stack frame format issue,
which causes the kernel to
incorrectly identify the interrupt number.

user_inthandler() in arch/m68k/kernel/entry_mm.S looks at the
PT_OFF_FORMATVEC
field in the stack frame to identify the interrupt source. I don't
know from memory
if the plain 68000 stores it there. For autovector interrupts, it
doesn't, that's why
I created inidividual auto*_inthandler() functions that put an hardcoded
number
on the stack instead of looking at the stack frame.

thanks for your kind reply. As far as I understand the 68000 manual
(http://www.freescale.com/files/archives/doc/ref_manual/M68000PRM.pdf,
section b.2), the CPU does not store the vector number on the exception
stack. This is also what I've seen in the debugger: some seemingly bogus
irq number is passed to m68k_handle_int. Any suggestions how to solve
this? I guess it is not a good idea to write an individual
user*_inthandler for each of the 255-64=191 possible user interrupts.

It's not out of the question.  Although you wouldn't write 192 little
functions by hand -- just have stubs that push the vector number or offset
onto the stack and branch to another function, and generate the stub code at
runtime.

And you only have to do it for the user interrupts you actually need/use.
I.e. m68k_setup_user_interrupt() could allocate the needed memory and fill
it with the generated interrupt handlers.
For Atari that's doable, for VME it would still generate all 192 of them.
Alternatively, let m68k_irq_startup() handle it when it's called the
first time for
that specific interrupt.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux