Re: Kernel versions 6.x don't boot on Amiga 4000

Michael Schmitz
2023-02-21T21:09:50Z

Hi Adrian,

On 22/02/23 04:53, John Paul Adrian Glaubitz wrote:
> Hi Geert!
>
> On Tue, 2023-02-21 at 15:55 +0100, Geert Uytterhoeven wrote:
>> Looks surprisingly similar to the issue reported by Stan.
>> Do the mitigations given in
>> https://lore.kernel.org/all/CAMuHMdUtkr2zvZiJfLXvs9d_inJbktSNqQQfO1oxnJHZeoYcHg@mail.gmail.com
>> help?
> The kernel actually crashes with a backtrace:
>
> ABCDGHIJK
> [ 0.000000] Linux version 6.0.0-6-m68k (debian-kernel@lists.debian.org) (gcc-12 (Debian 12.2.0-9) 12.2.0, GNU ld (GNU Binutils for
> Debian) 2.39) #1 Debian 6.0.12-1 (2022-12-09)
> [ 0.000000] Enabling workaround for errata I14
> [ 0.000000] printk: bootconsole [debug0] enabled
> [ 0.000000] Amiga hardware found: [A4000] VIDEO BLITTER AUDIO FLOPPY A4000_IDE KEYBOARD MOUSE SERIAL PARALLEL A3000_CLK CHIP_RAM PAULA
> LISA ALICE_PAL ZORRO3
> [ 0.000000] initrd: 0ef0602c - 0f800000
> [ 0.000000] Zone ranges:
> [ 0.000000] DMA [mem 0x0000000008000000-0x000000f7ffffffff]
> [ 0.000000] Normal empty
> [ 0.000000] Movable zone start for each node
> [ 0.000000] Early memory node ranges
> [ 0.000000] node 0: [mem 0x0000000008000000-0x000000000f7fffff]

In both your case and Kars', the memory does not start at 0x0. Kars
finds all memory reserved on his HP.

6.2rc8 boots fine on my 030 (memory starting at 0x0).

> [ 0.000000] Initmem setup node 0 [mem 0x0000000008000000-0x000000000f7fffff]
> [ 0.000000] Unable to handle kernel access at virtual address (ptrval)
> [ 0.000000] Oops: 00000000
> [ 0.000000] Modules linked in:
> [ 0.000000] PC: [<00201d3c>] memcmp+0x28/0x56
> [ 0.000000] SR: 2709 SP: (ptrval) a2: 004a5580
> [ 0.000000] d0: 00000003 d1: 00000001 d2: 00201d14 d3: 00000272
> [ 0.000000] d4: 00012750 d5: 08023ec0 a0: 0000000c a1: 0f7ffff4

a1 is just  before the end of your RAM chunk. If that's a longword
access, you'd fall over the edge :) Can you disassemble the code snippet
(or memcmp()) so we can see what's happening?

I do recall recent changes to the mm code, but that was for NOMMU. I
wonder whether there was anything else that would introduce an implicit
assumption about memory starting at 0x0 ...

> [ 0.000000] Process swapper (pid: 0, task=(ptrval))
> [ 0.000000] Frame format=4 fault addr=0f7ffff4 fslw=01051000
> [ 0.000000] Stack from 004a3fac:
> [ 0.000000] 00201d14 00000272 00374e40 0f7ffff4 0f800000 00534b22 0f7ffff4 0042e325
> [ 0.000000] 0000000c 0055c000 00000272 00012750 08023ec0 00012750 080dbf48 08001000
> [ 0.000000] 08001000 0f7ffff0 00553d9a 00000000 00533872
> [ 0.000000] Call Trace: [<00201d14>] memcmp+0x0/0x56
> [ 0.000000] [<00374e40>] _printk+0x0/0x18
> [ 0.000000] [<00534b22>] start_kernel+0x8a/0x5d6
> [ 0.000000] [<00012750>] LOGTBL+0x228/0x800
> [ 0.000000] [<00012750>] LOGTBL+0x228/0x800
> [ 0.000000] [<00533872>] _sinittext+0x872/0x11f8
> [ 0.000000]
> [ 0.000000] Code: b288 661e 4280 6030 2a49 284b 264c 224d <bb8c> 66ea 5988 7003 b088 65f0 224d 264c 60dc 4283 1631 1800 4282 1433 1800
> 2003
> [ 0.000000] Disabling lock debugging due to kernel taint
> [ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
> [ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---
>
>>> FWIW, I noticed that the kernel image itself is already over 7 MB, not sure
>>> whether this is a problem.
>> Depends on how much RAM you have ;-)
> 128 MB.
>
>>> Anyone else tried a recent kernel on their Amigas?
>> I really should start booting on real Amiga hardware again...
> You should ;-).

Thirded :-)

Cheers,

Michael

>
> Adrian
>