Re: [hatari-devel] Linux bootup issues in Hatari

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 3/17/19 12:19 AM, Eero Tamminen wrote:
I've tried booting up m68k Linux with the --lilo option I've added.

However, I'm having some issues:

* Debugger disassembly and memdump show PC and active memory
   areas to contain only zero bytes, although profiler shows
   those addresses having different execution counts.  Any
   ideas why?

* If I emulate 040 Falcon (AfterBurner) like Aranym, boot fails
   right at start, between ST_MFP & YM2149 outputs,

Maybe SCSI poking provoked something:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/m68k/atari/config.c#n261


although same kernel works fine with Aranym

AB40 has also different reset address handling:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/m68k/atari/config.c#n494

And I guess that explains also why Aranym code starts things from
address 0x030:
https://github.com/aranym/aranym/blob/master/src/bootos_linux.cpp#L209

(I.e. that code is unlikely to fully work with normal 030?)


Valid debug=<output> options are listed here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/m68k/atari/debug.c#n288

Looking at Linux code, I think "console=nfcon" should works
as long as kernel has NatFeats support enabled as Hatari
implements all the used NF features:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/m68k/emu/nfcon.c


* So far, Falcon 030/MMU emulation has gotten further in booting
   than either TT or 030 MegaSTE emulation, so I'm concentrating to
   that first

When booting with TT emulation, I get lots of:
[    2.610000] unexpected interrupt from 112
[    2.610000] unexpected interrupt from 104

112 would seem to be self-assigned interrupt for VME board:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/m68k/atari/ataints.c#n57

I don't know what 104, is it's not listed here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/m68k/include/asm/atariints.h


* If I enable --log-level debug, messages about (all bits in)
   Falcon PSG PORT-A loop in console:
----------------------------------
DEBUG: Calling DSP_Reset?
DEBUG: Falcon: Reset IDE subsystem
----------------------------------

When one looks into Hatari psg.c, none of these bits do
anything, except for the one doing constantly DSP resets.

=> I wonder whether these (and centronics strobe) are really
    interpreted correctly for Falcon and would they need some
    kind of acknowledgement?

(This is same register where things got stuck when I used
bootstra.tos to start Linux, I'm now just getting Linux
bootup messages about what's it doing while these IO regs
are written.)


At the bottom is full boot log, as far as it can go so far.

(NVRAM reg not supported by Hatari seems to be for weekday
based on Aranym sources.)

In Linux kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/m68k/atari/time.c#n229


	- Eero


$ cat hatari.cfg
[LILO]
Kernel = vmlinuz
Ramdisk = initrd.img
# debug=par
# - debug output to parallel port, use e.g. "--printer /dev/stdout"
Args = root=/dev/ram console=tty debug=par devtmpfs.mount=1 video=atafb:vga16 $ hatari --trace nvram --log-level warn --machine falcon --dsp dummy --mmu on --fpu 68882  --lilo yes  -c hatari.cfg -s 14 --ttram 64 --addr24 off --printer /dev/stdout
LILO: uncompressing 'debian-iso/vmlinuz'
LILO:  uncompressed length: 3746128 bytes
LILO: uncompressing 'debian-iso/initrd.img'
LILO:  uncompressed length: 18198528 bytes
LILO: kexec_elf->e_phnum = 0x00000002
LILO: kernel_phdrs[0].p_vaddr  = 0x00000000
LILO: kernel_phdrs[0].p_offset = 0x00000000
LILO: kernel_phdrs[0].p_filesz = 0x0036d760
LILO: kernel_phdrs[0].p_memsz  = 0x003a0d0c
LILO: kernel_phdrs[1].p_vaddr  = 0x003a1000
LILO: kernel_phdrs[1].p_offset = 0x0036f000
LILO: kernel_phdrs[1].p_filesz = 0x00023558
LILO: kernel_phdrs[1].p_memsz  = 0x00024000
LILO: min_addr = 0x00000000
LILO: max_addr = 0x003c5000
LILO: new linker:
LILO:  kernel_phdrs[0].p_vaddr  = 0x00000000
LILO:  kernel_phdrs[0].p_offset = 0x00000000
LILO:  kernel_phdrs[0].p_filesz = 0x0036d760
LILO:  kernel_phdrs[0].p_memsz  = 0x003a0d0c
LILO: modified to:
LILO:  kernel_phdrs[0].p_vaddr  = 0x00001000
LILO:  kernel_phdrs[0].p_offset = 0x00001000
LILO:  kernel_phdrs[0].p_filesz = 0x0036c760
LILO:  kernel_phdrs[0].p_memsz  = 0x0039fd0c
LILO: 14336 kB ST-RAM, 65536 kB TT-RAM
LILO: kernel_size = 3948544
LILO: copying 2 segments to FastRAM...
LILO: Copied segment 0: 0x00001000 + 0x0036c760 to 0x01001000
LILO: Copied segment 1: 0x0036f000 + 0x00023558 to 0x013a1000
LILO: Ramdisk at 0x03ea5000 in RAM, length = 0x0115b000
LILO: config_file command line: root=/dev/ram console=tty debug=par devtmpfs.mount=1 video=atafb:vga16 LILO: kernel command line: root=/dev/ram console=tty debug=par devtmpfs.mount=1 video=atafb:vga16 BOOT_IMAGE=vmlinux
LILO: bootinfo at 0x013c5000
LILO: bi_union.record[ 0] = 0x00010008
LILO: bi_union.record[ 1] = 0x00000002
LILO: bi_union.record[ 2] = 0x00020008
LILO: bi_union.record[ 3] = 0x00000002
LILO: bi_union.record[ 4] = 0x00030008
LILO: bi_union.record[ 5] = 0x00000002
LILO: bi_union.record[ 6] = 0x00040008
LILO: bi_union.record[ 7] = 0x00000002
LILO: bi_union.record[ 8] = 0x0005000c
LILO: bi_union.record[ 9] = 0x01000000
LILO: bi_union.record[10] = 0x04000000
LILO: bi_union.record[11] = 0x0005000c
LILO: bi_union.record[12] = 0x00000000
LILO: bi_union.record[13] = 0x00e00000
LILO: bi_union.record[14] = 0x0006000c
LILO: bi_union.record[15] = 0x03ea5000
LILO: ok
NVRAM: loaded from '~/.config/hatari/hatari.nvram'
[    0.000000] Linux version 4.9.0-3-m68k (debian-kernel@xxxxxxxxxxxxxxxx) (gcc version 6.3.0 20170321 (Debian 6.3.0-11) ) #1 Debian 4.9.25-1 (2017-05-02)
[    0.000000] console [debug0] enabled
[    0.000000] Atari hardware found: [    0.000000] VIDEL
STDMA-SCSI [    0.000000] ST_MFP
YM2149 [    0.000000] PCM
CODEC [    0.000000] DSP56K
SCC [    0.000000] ANALOG_JOY
BLITTER [    0.000000] IDE
TT_CLK [    0.000000] FDC_SPEED
[    0.000000]
[    0.000000] Ignoring memory chunk at 0x0:0xe00000 before the first chunk
[    0.000000] Fix your bootloader or use a memfile to make use of this area!
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 0036dd60, node_mem_map 003c8000
[    0.000000]   DMA zone: 160 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 16384 pages, LIFO batch:3
[    0.000000] initrd: 02ea5000 - 04000000
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16224 [    0.000000] Kernel command line: root=/dev/ram console=tty debug=par devtmpfs.mount=1 video=atafb:vga16 BOOT_IMAGE=vmlinux
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 43164K/65536K available (2445K kernel code, 426K rwdata, 828K rodata, 144K init, 205K bss, 22372K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0x0036d858 - 0x0036dc58   (   1 KiB)
[    0.000000]     kmap    : 0xd0000000 - 0xf0000000   ( 512 MiB)
[    0.000000]     vmalloc : 0x04800000 - 0xd0000000   (3256 MiB)
[    0.000000]     lowmem  : 0x00000000 - 0x04000000   (  64 MiB)
[    0.000000]       .init : 0x003a1000 - 0x003c5000   ( 144 KiB)
[    0.000000]       .text : 0x00001000 - 0x0026455c   (2446 KiB)
[    0.000000]       .data : 0x00267120 - 0x003a0d0c   (1255 KiB)
[    0.000000]       .bss  : 0x0036d760 - 0x003a0d0c   ( 206 KiB)
[    0.000000] NR_IRQS:200
NVRAM: read data at 11 = 14 ($0e)
NVRAM: read data at 10 = 128 ($80)
NVRAM: read data at 10 = 0 ($00)
NVRAM: write data at 11 = 142 ($8e)
NVRAM: read data at 0 = 54 ($36)
NVRAM: read data at 2 = 52 ($34)
NVRAM: read data at 4 = 22 ($16)
NVRAM: read data at 7 = 16 ($10)
NVRAM: read data at 8 = 3 ($03)
NVRAM: read data at 9 = 51 ($33)
NVRAM: read data at 6 = 1 ($01)
NVRAM: write data at 11 = 14 ($0e)
[    0.060000] Console: colour dummy device 80x25
[    0.160000] console [tty0] enabled
[    0.170000] Calibrating delay loop... 4.91 BogoMIPS (lpj=24576)
[    0.330000] pid_max: default: 32768 minimum: 301
[    0.370000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.380000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.640000] devtmpfs: initialized
[    0.860000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.870000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.920000] NET: Registered protocol family 16
[    1.300000] random: fast init done
[   28.640000] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper:1]
[   28.640000] Modules linked in:
[   28.640000]
[   28.640000] Format 00  Vector: 0114  PC: 00006ace  Status: 2208 Not tainted
[   28.640000] ORIG_D0: ffffffff  D0: d0040000  A2: 0282b2d0  A1: 00040000
[   28.640000] A0: 00001804  D5: 00000000  D4: 0003e5e2
[   28.640000] D3: 00000002  D2: 00000001  D1: d0040000
[   67.290000] random: crng init done






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/