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 17:20:15 +0300



On Fri, May 17, 2024 at 4:58 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:
On Fri, 17 May 2024, Andrew Randrianasulu wrote:
> On Fri, May 17, 2024 at 11:41 AM BALATON Zoltan <balaton@eik.bme.hu> wrote:
>
>> On Fri, 17 May 2024, Andrew Randrianasulu wrote:
>>> On Fri, May 17, 2024 at 12:02 AM Mark Cave-Ayland <
>>> mark.cave-ayland@ilande.co.uk> wrote:
>>>
>>>> On 16/05/2024 14:51, Andrew Randrianasulu wrote:
>>>>
>>>>>    > and openfirmware starts ....
>>>>>    >
>>>>>    > bash-5.1$ build/qemu-system-ppc -M mac99 -smp 2 -nographic
>>>>>    >
>>>>>    >>> =============================================================
>>>>>    >>> OpenBIOS 1.1 [Mar 7 2023 22:21]
>>>>>    >>> Configuration device id QEMU version 1 machine id 1
>>>>>    >>> CPUs: 2
>>>>>    >>> Memory: 128M
>>>>>    >>> UUID: 00000000-0000-0000-0000-000000000000
>>>>>    >>> CPU type PowerPC,G4
>>>>>    > milliseconds isn't unique.
>>>>>    > Welcome to OpenBIOS v1.1 built on Mar 7 2023 22:21
>>>>>    > Trying hd:,\\:tbxi...
>>>>>    > Trying hd:,\ppc\bootinfo.txt...
>>>>>    > Trying hd:,%BOOT...
>>>>>    > No valid state has been set by load or init-program
>>>>>    >
>>>>>    > 0 >
>>>>
>>>> You can check the device tree in OpenBIOS by using show-devs to see how
>>>> many CPUs are
>>>> present, and confirm that the properties are set correctly.
>>>>
>>>> The reason that SMP hasn't been enabled for the Mac machines is mainly
>>>> because no-one
>>>> has been inclined to work on it yet ;)
>>>>
>>>>>    >
>>>>>    >
>>>>>    >
>>>>>    > but boooting finnix fails:
>>>>>    >
>>>>>    > bash-5.1$ build/qemu-system-ppc -M mac99 -smp 2 -nographic -cdrom
>>>>>    > ~/finnix-ppc-110.iso -boot d
>>>>>    >
>>>>>    >>> =============================================================
>>>>>    >>> OpenBIOS 1.1 [Mar 7 2023 22:21]
>>>>>    >>> Configuration device id QEMU version 1 machine id 1
>>>>>    >>> CPUs: 2
>>>>>    >>> Memory: 128M
>>>>>    >>> UUID: 00000000-0000-0000-0000-000000000000
>>>>>    >>> CPU type PowerPC,G4
>>>>>    > milliseconds isn't unique.
>>>>>    > Welcome to OpenBIOS v1.1 built on Mar 7 2023 22:21
>>>>>    > Trying cd:,\\:tbxi...
>>>>>    >>> switching to new context:
>>>>>    >
>>>>>    > я:interpret: exception -13 caught
>>>>>
>>>>>     There's a comment in openbios/forth/system/ciface.fs that says it
>>>> might
>>>>>     not be an error and also a line:
>>>>>
>>>>>     \ ." INTERPRETE: --- " 2dup type
>>>>>
>>>>>     where you could remove the \ to get it print the Forth code that
>>>> causes
>>>>>     the error. (By the way is INTERPRETE a typo with extra E at the
>> end?)
>>>>>
>>>>>
>>>>>
>>>>> I tried this and get:
>>>>>
>>>>> bash-5.1$ build/qemu-system-ppc -M mac99 -smp 4 -nographic -cdrom
>>>>> ~/finnix-ppc-110.iso -boot d -bios /dev/shm/openbios-qemu.elf
>>>>>
>>>>>>> =============================================================
>>>>>>> OpenBIOS 1.1 [May 16 2024 12:44]
>>>>>>> Configuration device id QEMU version 1 machine id 1
>>>>>>> CPUs: 4
>>>>>>> Memory: 128M
>>>>>>> UUID: 00000000-0000-0000-0000-000000000000
>>>>>>> CPU type PowerPC,G4
>>>>> milliseconds isn't unique.
>>>>> Welcome to OpenBIOS v1.1 built on May 16 2024 12:44
>>>>> Trying cd:,\\:tbxi...
>>>>>>> switching to new context:
>>>>>
>>>>> я:interpret: exception -13 caughte-int nip nip ;
>>>>>
>>>>> =====
>>>>
>>>> Try rebuilding OpenBIOS with DEBUG_CIF enabled in libopenbios/client.c
>>>> which will
>>>> show the calls being used by the bootloader.
>>>>
>>>
>>>
>>> ===============
>>>
>>> bash-5.1$ build/qemu-system-ppc -M mac99 -smp 2 -nographic -cdrom
>>> ~/finnix-ppc-110.iso -boot d -bios /dev/shm/openbios-qemu.elf
>>
>> Add -d unimp,guest_errors here. If it crashes you won't see an error
>> without that so having these debug options enabled helps finding where it
>> stopped.
>>
>
> it prints a lot of those:
>
> Invalid write at addr 0xB259C, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB25A0, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB25A4, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB25A8, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB25AC, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB25B0, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB25B4, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB25B8, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB25BC, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB25C0, size 4, region 'ppc_core99.bios', reason:
> rejectedInvalid write at addr 0xB26F4, size 4, region 'ppc_core99.bios',
> reason: rejected
> Invalid write at addr 0xB26F8, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB26FC, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB2700, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB2704, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB2708, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB270C, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB2710, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB2714, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB2718, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB271C, size 4, region 'ppc_core99.bios', reason:
> rejected
> Invalid write at addr 0xB2720, size 4, region 'ppc_core99.bios', reason:
> rejected
>>> =============================================================
>>> OpenBIOS 1.1 [May 17 2024 00:06]
>>> Configuration device id QEMU version 1 machine id 1
>>> CPUs: 2
>>> Memory: 128M
>>> UUID: 00000000-0000-0000-0000-000000000000
>>> CPU type PowerPC,G4
> milliseconds isn't unique.
> Welcome to OpenBIOS v1.1 built on May 17 2024 00:06
> Trying cd:,\\:tbxi...
>>> switching to new context:
>>> finddevice("/chosen") = 0xfff57108
> invalid/unsupported opcode: 00 - 00 - 00 - 10 (00300000) 00000004
>>> exit()
> EXIT
> 0 > QEMU: Terminated
>
> if I do not stop qemu here it will flood stdout harder
>
> Do you want full log somewhere?

No, it already crashed at "invalid/unsupported opcode: 00 - 00 - 00 - 10
(00300000) 00000004" so output after that is not useful. Question to
answer is why it reached that invalid opcode. (And from your other message
looks like it sometimes continues? That's strange.)

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

returning from prom_init
Hello World !
[    0.000000] Using PowerMac machine description
[    0.000000] Total memory = 128MB; using 256kB for hash table (at c7fc0000)
[    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-0x07ffffff]
[    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-0x07ffffff]
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,9600 console=tty0
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 121500K/131072K available (4632K kernel code, 324K rwdata, 1256K rodata, 296K init, 1525K bss, 9572K 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]   * 0xc9000000..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 [tty0] enabled
[    0.000000] bootconsole [udbg0] disabled


==================

may be it not really hanged, but I'll left it overnight at next night :}

sparc in the meantime boots ok:

bash-5.1$ qemu-system-sparc -smp 4 -M SS-10 -accel tcg,thread=multi -kernel /home/guest/Downloads/QEMU/sparc/vmlinuz-2.4.27-3-sparc32 -nographic
Configuration device id QEMU version 1 machine id 64
Probing SBus slot 0 offset 0
Probing SBus slot 1 offset 0
Probing SBus slot 2 offset 0
Probing SBus slot 3 offset 0
Probing SBus slot 15 offset 0
Invalid FCode start byte
CPUs: 4 x TI,TMS390Z55
kernel phys 0x4000 virt 0x4000 size 0x20a250
UUID: 00000000-0000-0000-0000-000000000000
Welcome to OpenBIOS v1.1 built on Mar 7 2023 22:22
  Type 'help' for detailed information
[sparc] Kernel already loaded
switching to new context:
PROMLIB: obio_ranges 1
bootmem_init: Scan sp_banks,  init_bootmem(spfn[20b],bpfn[20b],mlpfn[6fe0])
free_bootmem: base[0] size[6fe0000]
reserve_bootmem: base[0] size[20b000]
reserve_bootmem: base[20b000] size[dfc]
Booting Linux...
mem_init: Calling free_all_bootmem().
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 2.4.27-3-sparc32 (steve@brick) (gcc version 3.3.5 (Debian 1:3.3.5-13)) #1 Fri Jun 2 10:31:52 UTC 2006
ARCH: SUN4M
TYPE: Sun4m SparcStation10/20
Ethernet address: 52:54:0:12:34:56
Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek (jj@ultra.linux.cz). Patching kernel for srmmu[TI Viking/MXCC]/iommu
On node 0 totalpages: 28116
zone(0): 28640 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Found CPU 0 <node=ffd39bdc,mid=8>
Found CPU 1 <node=ffd39ff0,mid=9>
Found CPU 2 <node=ffd3a404,mid=10>
Found CPU 3 <node=ffd3a818,mid=11>
Found 4 CPU prom device tree node(s).
Power off control detected.
Kernel command line:
Calibrating delay loop... 534.11 BogoMIPS
Memory: 108020k available (1436k kernel code, 220k data, 128k init, 0k highmem) [f0000000,06fe0000]
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
POSIX conformance testing by UNIFIX
IOMMU: impl 0 vers 3 page table at f6f80000 of size 262144 bytes
sbus0: Clock 21.1250 MHz
dma0: Revision 2
dma1: Revision 2
Sparc Zilog8530 serial driver version 1.68.2.2
Sun Mouse-Systems mouse driver version 1.00
tty00 at 0xffdd3004 (irq = 44) is a Zilog8530
tty01 at 0xffdd3000 (irq = 44) is a Zilog8530
tty02 at 0xffdd4004 (irq = 44) is a Zilog8530
tty03 at 0xffdd4000 (irq = 44) is a Zilog8530
keyboard: not present
Console: ttyS0 (Zilog8530)
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
ioremap: done with statics, switching to malloc
apc: power management initialized
Starting kswapd
VFS: Disk quotas vdquot_6.5.1
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x0
pty: 256 Unix98 ptys configured
Floppy drive(s): fd0 is 1.44M
FDC 0 is a S82078B
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 8192 bind 16384)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Cannot open root device "" or 00:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 00:00
 Press L1-A to return to the boot prom
QEMU: Terminated
 

Regards,
BALATON Zoltan

reply via email to

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