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

Re: Kernel does not boot on TT030


On 4/6/19 8:58 PM, Andreas Schwab wrote:
On Apr 06 2019, Eero Tamminen <oak@helsinkinet.fi> wrote:

"initcall_debug" doesn't give any output, but I've enabled the dummy
IRQ handler [1] and get constant warnings from it.  There's quite
a lot of them in few seconds:
$ grep unexpected tt-boot.log | sort | uniq -c
    1200 unexpected interrupt from 104
     212 unexpected interrupt from 112

Any idea what those interrupts are for?

These are the HSYNC and VSYNC interrupts.  The HSYNC irq should be
masked by tt_scu.sys_mask, the VSYNC irq is used for the cursor, but I
can't find where it is set up right now.

Looking at config_atari(), there's this:
        if (hwreg_present(&tt_scu.sys_mask)) {
                /* Assume a VME bus if there's a SCU */
                pr_cont(" VME SCU");

Hatari doesn't emulate VME bus nor SCU, but Hatari SCU regs don't
return bus error either.

After I changed Hatari to give bus error on accesses to 0xff8e01
SCU system interrupt mask, unexpected interrupts stopped and minimal
kernel booted fine to minimal rootfs on emulated TT.

I didn't have time to build kernel where the VME assumption is disabled,
but maybe VME part is the issue on real TT?

Btw. that register area is zero on boot in Hatari.  TOS v3 sets there
0x14 early on boot, but with LILO there's no TOS to do that, and Linux
was setting it to 0x10:
        if (ATARIHW_PRESENT(SCU)) {
                /* init the SCU if present */
tt_scu.sys_mask = 0x10; /* enable VBL (for the cursor) and

 * disable HSYNC interrupts (who

 * needs them?)  MFP and SCC are

 * enabled in VME mask
tt_scu.vme_mask = 0x60; /* enable MFP and SCC ints */
        } else {
                /* If no SCU and no Hades, the HSYNC interrupt needs to be
* disabled this way. (Else _inthandler in kernel/sys_call.S
                 * gets overruns)

                vectors[VEC_INT2] = falcon_hblhandler;
                vectors[VEC_INT4] = falcon_hblhandler;

	- Eero

Reply to: