qemu-ppc
[Top][All Lists]
Advanced

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

Re: OpenMPIC controller emulation in qemu ?


From: Andrew Randrianasulu
Subject: Re: OpenMPIC controller emulation in qemu ?
Date: Fri, 17 May 2024 18:07:23 +0300



On Fri, May 17, 2024 at 5:33 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:
On Fri, 17 May 2024, Andrew Randrianasulu wrote:
> yeah .... I tried to boot kernel directly (mounted iso at some test dir)
>
> /dev/shm/qemu-9.0.0/build/qemu-system-ppc -M mac99 -smp 2 -nographic -cdrom
> ~/finnix-ppc-110.iso -boot d -bios /dev/shm/openbios-qemu.elf -d unimp
> -kernel /mnt/test/boot/ppc/linux
>
> and it hanged at
>
[...]
> [    0.000000] Console: colour dummy device 80x25
> [    0.000000] console [tty0] enabled
> [    0.000000] bootconsole [udbg0] disabled

Maybe it did not hang but tried to output to screen which you have
disabled with -nographic. Try adding -append "console=ttyPZ0" to see
further logs on serial. (Then also add -initrd with the root filesystem,
you can check in yaboot.conf.)

 /dev/shm/qemu-9.0.0/build/qemu-system-ppc -m 512 -M mac99 -smp 2 -nographic -cdrom ~/finnix-ppc-110.iso -boot d -bios /dev/shm/openbios-qemu.elf -d unimp -kernel /mnt/test/boot/ppc/linux -append "console=ttyPZ0" -initrd /mnt/test/boot/ppc/initrd.xz

yeah, it prints a bit more but panics with -smp 2 like this:

returning from prom_init
Hello World !
[    0.000000] Using PowerMac machine description
[    0.000000] Total memory = 512MB; using 1024kB for hash table (at cff00000)
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.13.0-1-ppc-finnix (finnix-buildd@inez) (gcc version 4.8.2 (Debian 4.8.2-16) ) #1 Sat Mar 29 16:04:27 UTC 2014
[    0.000000] Found initrd at 0xc18dd000:0xc1afb840
[    0.000000] Found UniNorth memory controller & host bridge @ 0xf8000000 revision: 0x07
[    0.000000] Mapped at 0xff7c0000
[    0.000000] Found a Keylargo mac-io controller, rev: 0, mapped at 0xff740000
[    0.000000] PowerMac motherboard: PowerMac G4 AGP Graphics
[    0.000000] boot stdout isn't a display !
[    0.000000] bootconsole [udbg0] enabled
setup_arch: bootmem
[    0.000000] Found UniNorth PCI host bridge at 0x00000000f2000000. Firmware bus number: 0->0
[    0.000000] PCI host bridge /pci@f2000000 (primary) ranges:
[    0.000000]   IO 0x00000000f2000000..0x00000000f27fffff -> 0x0000000000000000
[    0.000000]  MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000
[    0.000000] nvram: Checking bank 0...
[    0.000000] Invalid signature
[    0.000000] Invalid checksum
[    0.000000] nvram: gen0=0, gen1=0
[    0.000000] nvram: Active bank is: 0
[    0.000000] nvram: OF partition at 0xffffffff
[    0.000000] nvram: XP partition at 0xffffffff
[    0.000000] nvram: NR partition at 0xffffffff
arch: exit
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x00000000-0x1fffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x1fffffff]
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyPZ0
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 508404K/524288K available (4632K kernel code, 324K rwdata, 1256K rodata, 296K init, 1525K bss, 15884K reserved, 0K highmem)
[    0.000000] Kernel virtual memory layout:
[    0.000000]   * 0xfffcf000..0xfffff000  : fixmap
[    0.000000]   * 0xff800000..0xffc00000  : highmem PTEs
[    0.000000]   * 0xfef36000..0xff800000  : early ioremap
[    0.000000]   * 0xe1000000..0xfef36000  : vmalloc & ioremap
[    0.000000] NR_IRQS:512 nr_irqs:512 16
[    0.000000] mpic: Setting up MPIC " MPIC 1   " version 1.2 at 80040000, max 1 CPUs
[    0.000000] mpic: ISU size: 64, shift: 6, mask: 3f
[    0.000000] mpic: Initializing for 64 sources
[    0.000000] GMT Delta read from XPRAM: 0 minutes, DST: on
[    0.000000] clocksource: timebase mult[28000000] shift[24] registered
[    0.000000] Console: colour dummy device 80x25
[    0.000000] console [ttyPZ0] enabled
[    0.000000] console [ttyPZ0] enabled
[    0.000000] bootconsole [udbg0] disabled
[    0.000000] bootconsole [udbg0] disabled
[    0.911782] pid_max: default: 32768 minimum: 301
[    0.913447] Security Framework initialized
[    1.009641] AppArmor: AppArmor disabled by boot time parameter
[    1.010273] Yama: disabled by default; enable with sysctl kernel.yama.*
[    1.108972] Mount-cache hash table entries: 512
[    1.610826] Initializing cgroup subsys memory
[    1.707846] Initializing cgroup subsys devices
[    1.708430] Initializing cgroup subsys freezer
[    1.708975] Initializing cgroup subsys blkio
[    1.709383] Initializing cgroup subsys perf_event
[    2.408454] devtmpfs: initialized
[    2.614990] NET: Registered protocol family 16

[    3.010243] PCI: Probing PCI hardware
[    3.012616] PCI host bridge to bus 0000:00
[    3.013885] pci_bus 0000:00: root bus resource [io  0x0000-0x7fffff]
[    3.014646] pci_bus 0000:00: root bus resource [mem 0x80000000-0x8fffffff]
[    3.015754] pci_bus 0000:00: root bus resource [bus 00-ff]
[    9.112864] bio: create slab <bio-0> at 0
[    9.313860] vgaarb: device added: PCI:0000:00:0e.0,decodes=io+mem,owns=io+mem,locks=none
[    9.314707] vgaarb: loaded
[    9.315047] vgaarb: bridge control possible 0000:00:0e.0
[    9.414038] SCSI subsystem initialized
[    9.616808] Switched to clocksource timebase
[    9.912636] NET: Registered protocol family 2
[   10.115692] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[   10.116610] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[   10.117813] TCP: Hash tables configured (established 4096 bind 4096)
[   10.120022] TCP: reno registered
[   10.120647] UDP hash table entries: 256 (order: 0, 4096 bytes)
[   10.121425] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[   10.215219] NET: Registered protocol family 1
[   10.614997] Unpacking initramfs...
[   42.834543] Unable to handle kernel paging request for data at address 0x40000024
[   42.835231] Faulting instruction address: 0xc006d5a8
[   42.835743] Thread overran stack, or stack corrupted
[   42.836695] Oops: Kernel access of bad area, sig: 11 [#1]
[   42.837201] PowerMac
[   42.837596] Modules linked in:
[   42.838366] CPU: 0 PID: 1 Comm: АID@ Not tainted 3.13.0-1-ppc-finnix #1
[   42.839264] task: df829720 ti: df836000 task.ti: df836000
[   42.839764] NIP: c006d5a8 LR: c006782c CTR: 00000000
[   42.840250] REGS: df837a30 TRAP: 0300   Not tainted  (3.13.0-1-ppc-finnix)
[   42.840857] MSR: 00001032 <ME,IR,DR,RI>  CR: 24828048  XER: 00000000
[   42.841745] DAR: 40000024 DSISR: 40000000
GPR00: c004745c df837ae0 df829720 df829720 00000010 c0618508 00000001 00000002
GPR08: 00000000 00000001 40000000 00000001 c0618488 00000000 c0617318 c0617350
GPR16: 3b9ac9ff 00000003 ffffffff 00000001 7fffffff c0617280 00000000 c06172e0
GPR24: 00000021 26f4abdf 7fffffff c008ce58 df837c00 c0619480 00000000 df829720
[   42.846053] NIP [c006d5a8] cpuacct_account_field+0x18/0x54
[   42.846559] LR [c006782c] account_system_time+0xcc/0x1e0
[   42.847078] Call Trace:
[   42.847678] [df837ae0] [2123e300] 0x2123e300 (unreliable)
[   42.848400] [df837af0] [c004745c] update_process_times+0x24/0x6c
[   42.848973] [df837b00] [c008cdf8] tick_sched_handle.isra.20+0x20/0x80
[   42.849573] [df837b10] [c008cea4] tick_sched_timer+0x4c/0x94
[   42.850113] [df837b40] [c005d328] __run_hrtimer+0x64/0x1b0
[   42.850640] [df837b60] [c005e074] hrtimer_interrupt+0x150/0x3e0
[   42.851180] [df837bd0] [c000b788] timer_interrupt+0x140/0x21c
[   42.851737] [df837bf0] [c0014bd4] ret_from_except+0x0/0x1c
[   42.852285] --- Exception: 901 at lzma_main+0x158/0xb30
[   42.852285]     LR = lzma_main+0x6cc/0xb30
[   42.853185] [df837cb0] [40001032] 0x40001032 (unreliable)
[   42.853806] Instruction dump:
[   42.854275] 91460000 91660004 80e70020 2f870000 409effdc 4e800020 7cc93378 7ca82b78
[   42.855104] 8143066c 3ca0c062 54841838 38a58508 <80ea0024> 7f872800 419e0030 80c70048
[   42.856552] ---[ end trace 095e9ab01936ee81 ]---
[   42.857072]
[   44.854623] Kernel panic - not syncing: Fatal exception in interrupt
[   44.855427] Rebooting in 180 seconds..

without -smp it boots

if I omit -initrd it  finds ATA devices etc then VFS root not found :)

returning from prom_init
Hello World !
[    0.000000] Using PowerMac machine description
[    0.000000] Total memory = 512MB; using 1024kB for hash table (at cff00000)
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.13.0-1-ppc-finnix (finnix-buildd@inez) (gcc version 4.8.2 (Debian 4.8.2-16) ) #1 Sat Mar 29 16:04:27 UTC 2014
[    0.000000] Found UniNorth memory controller & host bridge @ 0xf8000000 revision: 0x07
[    0.000000] Mapped at 0xff7c0000
[    0.000000] Found a Keylargo mac-io controller, rev: 0, mapped at 0xff740000
[    0.000000] PowerMac motherboard: PowerMac G4 AGP Graphics
[    0.000000] boot stdout isn't a display !
[    0.000000] bootconsole [udbg0] enabled
setup_arch: bootmem
[    0.000000] Found UniNorth PCI host bridge at 0x00000000f2000000. Firmware bus number: 0->0
[    0.000000] PCI host bridge /pci@f2000000 (primary) ranges:
[    0.000000]   IO 0x00000000f2000000..0x00000000f27fffff -> 0x0000000000000000
[    0.000000]  MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000
[    0.000000] nvram: Checking bank 0...
[    0.000000] Invalid signature
[    0.000000] Invalid checksum
[    0.000000] nvram: gen0=0, gen1=0
[    0.000000] nvram: Active bank is: 0
[    0.000000] nvram: OF partition at 0xffffffff
[    0.000000] nvram: XP partition at 0xffffffff
[    0.000000] nvram: NR partition at 0xffffffff
arch: exit
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x00000000-0x1fffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x1fffffff]
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyPZ0
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 510576K/524288K available (4632K kernel code, 324K rwdata, 1256K rodata, 296K init, 1525K bss, 13712K reserved, 0K highmem)
[    0.000000] Kernel virtual memory layout:
[    0.000000]   * 0xfffcf000..0xfffff000  : fixmap
[    0.000000]   * 0xff800000..0xffc00000  : highmem PTEs
[    0.000000]   * 0xfef36000..0xff800000  : early ioremap
[    0.000000]   * 0xe1000000..0xfef36000  : vmalloc & ioremap
[    0.000000] NR_IRQS:512 nr_irqs:512 16
[    0.000000] mpic: Setting up MPIC " MPIC 1   " version 1.2 at 80040000, max 1 CPUs
[    0.000000] mpic: ISU size: 64, shift: 6, mask: 3f
[    0.000000] mpic: Initializing for 64 sources
[    0.000000] GMT Delta read from XPRAM: 0 minutes, DST: on
[    0.000000] clocksource: timebase mult[28000000] shift[24] registered
[    0.000000] Console: colour dummy device 80x25
[    0.000000] console [ttyPZ0] enabled
[    0.000000] console [ttyPZ0] enabled
[    0.000000] bootconsole [udbg0] disabled
[    0.000000] bootconsole [udbg0] disabled
[    0.725813] pid_max: default: 32768 minimum: 301
[    0.727401] Security Framework initialized
[    0.823380] AppArmor: AppArmor disabled by boot time parameter
[    0.824069] Yama: disabled by default; enable with sysctl kernel.yama.*
[    0.826670] Mount-cache hash table entries: 512
[    1.125822] Initializing cgroup subsys memory
[    1.126729] Initializing cgroup subsys devices
[    1.127277] Initializing cgroup subsys freezer
[    1.127809] Initializing cgroup subsys blkio
[    1.128329] Initializing cgroup subsys perf_event
[    1.521708] devtmpfs: initialized
[    1.823949] NET: Registered protocol family 16

[    2.227011] PCI: Probing PCI hardware
[    2.321222] PCI host bridge to bus 0000:00
[    2.322450] pci_bus 0000:00: root bus resource [io  0x0000-0x7fffff]
[    2.323193] pci_bus 0000:00: root bus resource [mem 0x80000000-0x8fffffff]
[    2.324321] pci_bus 0000:00: root bus resource [bus 00-ff]
[    8.624466] bio: create slab <bio-0> at 0
[    8.825262] vgaarb: device added: PCI:0000:00:0e.0,decodes=io+mem,owns=io+mem,locks=none
[    8.826082] vgaarb: loaded
[    8.826417] vgaarb: bridge control possible 0000:00:0e.0
[    8.925444] SCSI subsystem initialized
[    9.228174] Switched to clocksource timebase
[   10.026579] NET: Registered protocol family 2
[   10.326105] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[   10.326798] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[   10.425799] TCP: Hash tables configured (established 4096 bind 4096)
[   10.526051] TCP: reno registered
[   10.526585] UDP hash table entries: 256 (order: 0, 4096 bytes)
[   10.527353] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[   10.626021] NET: Registered protocol family 1
[   11.526504] Thermal assist unit using timers, shrink_timer: 500 jiffies
[   11.826704] audit: initializing netlink socket (disabled)
[   11.927333] type=2000 audit(1715958197.115:1): initialized
[   14.828260] [sched_delayed] sched: RT throttling activated
[   15.128412] VFS: Disk quotas dquot_6.5.2
[   15.130187] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[   15.230907] msgmni has been set to 999
[   15.831186] alg: No test for stdrng (krng)
[   15.929723] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[   15.931301] io scheduler noop registered
[   15.931881] io scheduler deadline registered
[   15.932598] io scheduler cfq registered (default)
[   16.130366] Using unsupported 800x600 QEMU,VGA at 81000000, depth=32, pitch=3200
[   17.430988] Console: switching to colour frame buffer device 100x37
[   18.532179] fb0: Open Firmware frame buffer device on /pci@f2000000/QEMU,VGA@e
[   18.534734] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[   18.933503] pmac_zilog: 0.6 (Benjamin Herrenschmidt <benh@kernel.crashing.org>)
[   18.934398] Serial: MPC52xx PSC UART driver
[   18.935073] Generic non-volatile memory driver v1.1
[   19.131580] Linux agpgart interface v0.103
[   19.331810] MacIO PCI driver attached to Keylargo chipset
[   19.434040] 0.00013020:ch-a: ttyPZ0 at MMIO 0x80013020 (irq = 37, base_baud = 230400) is a Z85c30 ESCC - Serial port
[   19.532703] 0.00013000:ch-b: ttyPZ1 at MMIO 0x80013000 (irq = 36, base_baud = 230400) is a Z85c30 ESCC - Serial port
[   19.536632] Macintosh CUDA driver v0.5 for Unified ADB.
[   19.632635] adb: starting probe task...
[   20.752015] pata-macio 0.00020000:ata-3: Activating pata-macio chipset KeyLargo ATA-3, Apple bus ID 0
[   20.934660] scsi0 : pata_macio
[   20.936984] ata1: PATA max MWDMA2 irq 16
[   22.035881] pata-macio 0.00021000:ata-3: Activating pata-macio chipset KeyLargo ATA-3, Apple bus ID 1
[   22.038930] scsi1 : pata_macio
[   22.039989] ata2: PATA max MWDMA2 irq 18
[   22.135119] mousedev: PS/2 mouse device common for all mice
[   22.837497] rtc-generic rtc-generic: rtc core: registered rtc-generic as rtc0
[   22.936098] TCP: cubic registered
[   22.938133] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
[   23.037249] NET: Registered protocol family 10
[   23.137638] ata2.00: configured for MWDMA2
[   23.438484] mip6: Mobile IPv6
[   23.439038] NET: Registered protocol family 17
[   23.537002] mpls_gso: MPLS GSO support
[   23.539346] registered taskstats version 1
[   23.739160] rtc-generic rtc-generic: setting system clock to 2024-05-17 15:03:37 UTC (1715958217)
[   28.136267] ata2.00: qc timeout (cmd 0xa0)
[   28.136927] ata2.00: TEST_UNIT_READY failed (err_mask=0x4)
[   28.293462] ata2.00: configured for MWDMA2
[   33.291917] ata2.00: qc timeout (cmd 0xa0)
[   33.292332] ata2.00: TEST_UNIT_READY failed (err_mask=0x4)
[   33.293192] ata2.00: limiting speed to MWDMA2:PIO3
[   33.448945] ata2.00: configured for MWDMA2
[   38.448006] ata2.00: qc timeout (cmd 0xa0)
[   38.448442] ata2.00: TEST_UNIT_READY failed (err_mask=0x4)
[   38.449034] ata2.00: disabled
[   38.450081] ata2: soft resetting link
[   38.604563] ata2: EH complete
[   38.606401] List of all partitions:
[   38.606921] No filesystem could mount root, tried:
[   38.607641] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
[   38.608715] CPU: 0 PID: 1 Comm: swapper Not tainted 3.13.0-1-ppc-finnix #1
[   38.609531] Call Trace:
[   38.610528] [df837de0] [c0008e78] show_stack+0x48/0x150 (unreliable)
[   38.611249] [df837e20] [c0475250] panic+0xcc/0x1fc
[   38.611775] [df837e70] [c05c78bc] mount_root+0x0/0x68
[   38.612259] [df837ed0] [c05c7a78] prepare_namespace+0x154/0x19c
[   38.612812] [df837ef0] [c05c74cc] kernel_init_freeable+0x1e8/0x1fc
[   38.613397] [df837f30] [c0004930] kernel_init+0x18/0x128
[   38.613865] [df837f40] [c00145dc] ret_from_kernel_thread+0x5c/0x64
[   38.615050] Rebooting in 180 seconds..QEMU: Terminated

I am not sure if unxz code in kernel tries  to use multiple cpus or not, sadly this kern does not rint exact number of cpus it found

may be void ppc  kernel will print more?

I also tried to add  multiple cpu support in openbios qemu ppc arch like it was done for sparc, but sparc just dump cpus in / of device tree?

so same trick ofc failed because I do not really know  forth so  no idea where  to put for() loop start :)
 

>
> ==================
>
> may be it not really hanged, but I'll left it overnight at next night :}
>
> sparc in the meantime boots ok:

Great but that has nothing to do with mac99.

Regards,
BALATON Zoltan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]