From: Joshua Juran <jjuran@gmail.com>
To: Matthias Reis <matthias.reis@physik.tu-berlin.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>, linux-m68k@vger.kernel.org
Subject: Re: Autovector exceptions on Atari ST
Date: Wed, 24 Aug 2011 18:51:29 -0700 [thread overview]
Message-ID: <48FE2225-A299-45D5-AC6B-07F0102CAAFD@gmail.com> (raw)
In-Reply-To: <7aefed5bdc7af1311db846ae00fb1359.squirrel@www.physik.tu-berlin.de>
On Aug 24, 2011, at 12:47 PM, Matthias Reis wrote:
>> On Sun, Aug 7, 2011 at 23:09, Geert Uytterhoeven <geert@linux-
>> m68k.org>
>> 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.
>>
>
> Hi Geert,
>
> 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.
Josh
next prev parent reply other threads:[~2011-08-25 1:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 19:25 Support for MMU-less Atari ST Matthias Reis
2011-06-03 7:04 ` Greg Ungerer
2011-06-03 7:43 ` Geert Uytterhoeven
2011-06-04 9:14 ` Geert Uytterhoeven
2011-06-04 12:23 ` Matthias Reis
2011-08-07 20:57 ` Autovector exceptions on " Matthias Reis
2011-08-07 21:09 ` Geert Uytterhoeven
2011-08-23 18:22 ` Geert Uytterhoeven
2011-08-24 19:47 ` Matthias Reis
2011-08-25 1:51 ` Joshua Juran [this message]
2011-08-25 8:13 ` Geert Uytterhoeven
2011-08-25 11:38 ` Greg Ungerer
2011-06-03 10:54 ` Support for MMU-less " Finn Thain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48FE2225-A299-45D5-AC6B-07F0102CAAFD@gmail.com \
--to=jjuran@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
--cc=matthias.reis@physik.tu-berlin.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox