Re: Amiga, serial and SYSRQ

Geert Uytterhoeven
2024-05-21T07:07:48Z

Hi Michael,

On Mon, May 20, 2024 at 11:01 PM Michael Schmitz <schmitzmic@gmail.com> wrote:
> On 21/05/24 05:17, Paolo Pisati wrote:
> > On Sun, May 19, 2024 at 04:58:17PM +0200, Geert Uytterhoeven wrote:
> >> Probably some of the Warp 1260 on-board hardware has its interrupt line
> >> asserted, causing an interrupt storm when Linux enables interrupts.
> >> Amiboot knows how to reset several boards to prevent this, but it
> >> doesn't support Warp 1260 yet.
> >>
> >> https://github.com/geertu/m68kboot/blob/master/common/amiga/linuxboot.c#L195
> > Doesn't the kernel print out something like "too many spurious interrupts etcetc" in
> > this case?
> Used to do that, yes. But I haven't found that message in current mainline.
> >
> > Anyhow, any debug option i could turn on? I've tried everything IRQ related, but
>
> CONFIG_CONSOLE_LOGLEVEL_DEFAULT should be high enough to print messages
> of level WARN:
>
> asmlinkage void handle_badint(struct pt_regs *regs)
> {
> atomic_inc(&irq_err_count);
> pr_warn("unexpected interrupt from %u\n", regs->vector);
> }
>
> That would help to verify Geert's reading of the problem (which I have
> no doubt is the correct one).
>
> The interrupt vector number will tell us what interrupt level is causing
> the storm (if it's an autovector int).

If it's _not_ an autovector int?

Anyway, unlike Atari, Amiga only uses autovector interrupts, and most
expansion boards use IRQ_AMIGA_PORTS (IRQ_AUTO_2) (some can be jumpered
for IRQ_AMIGA_EXTER (IRQ_AUTO_6). As lots of other components use
IRQ_AUTO_2, these are all shared interrupts. Hence handle_badint()
is never called, the "bad" interrupt is never disabled by the irq core
code, and you end up with an eternal interrupt storm.

> > that didn't change a bit. I understand it requires a new fw from the board
> > manufacturer or a quirk in the bootloader, but i would like to get something more
> > verbose before i ping them.
>
> Interrupt level and vector number would help the manufacturer to give us
> the information required to disable the problematic interrupt source.

IRQ_AMIGA_PORTS :-)

I guess the system would boot if you hack arch/m68k/amiga/amiints.c
to never enable IRQ_AMIGA_PORTS in amiga_custom.intena, but then you
would also lose the ability to use e.g. the builtin A1200 IDE.

BTW, code to reset/silence the hardware components on Warp 1260
could not only be added to Amiboot, but also to e.g.
arch/m68k/amiga/config.c:amiga_parse_bootinfo().
Reverse-engineering the AmigaOS interrupt handlers for the board may
also help.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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