[Top][All Lists]

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

Re: [RFC PATCH 0/2] Pegasos2 emulation

From: BALATON Zoltan
Subject: Re: [RFC PATCH 0/2] Pegasos2 emulation
Date: Sat, 9 Jan 2021 23:54:31 +0100 (CET)

On Thu, 7 Jan 2021, Philippe Mathieu-Daudé wrote:
On 1/7/21 2:15 AM, BALATON Zoltan wrote:
On Wed, 6 Jan 2021, BALATON Zoltan wrote:

This is adding a new PPC board called pegasos2 currently posted as RFC
because it depends on not yet merged VT8231 emulation currently on the


This note ^^^ ...

and may need some changes like a test case but I'm posting it now for
getting feedback on what's needed to merge this. More info on it can
be found at:


Currently it needs a firmware ROM image that I cannot include due to
original copyright holder (bPlan) did not release it under a free
licence but I have plans to write a replacement in the future. With
that firmware it can boot MorphOS now as:

qemu-system-ppc -M pegasos2 -cdrom morphos.iso -device
ati-vga,romfile="" -serial stdio

then enter "boot cd boot.img" at the firmware "ok" prompt as described
in the MorphOS.readme. To boot Linux use same command line with e.g.
-cdrom debian-8.11.0-powerpc-netinst.iso then enter
"boot cd install/pegasos"

Patch 2 adds the actual board code after patch 1 adding MV64361 system
controller chip. The mv643xx.h header file is taken from Linux and
produces a bunch of checkpatch warnings due to different formatting
rules it follows, I'm not sure we want to adopt it or keep it as it is
given that it does not appear any more in recent Linux versions so we
could reformat it as it's unlikely to get updated in the future.

Interestingly it applies for patchew while this was accidentally based
on my previous series that has hw/ppc/Kconfig reverts so it does not
apply on current master.

... can be passed as hint to patchew as a tag:

Based-on: <cover.1609967638.git.balaton@eik.bme.hu>

Also missing a file so does not compile but
other than that the content could be reviewed. I've now updated this repo:


which contains all the needed patches over QEMU master at one place in
case somebody wants to try this. I'll send an updated version later
after I get some feedback.

The command lines above also need -bios /path/to/firmware.rom

An integration test similar to the Fuloong PMON would be highly
appreciated :)


This does not seem to be in master so I could copy and modify. I also have no way to test this test so maybe you could help writing and testing the necessary module. Basically we need to download a boot iso from here:


For the pegasos2.rom the easiest may be to extract it from an update still available here:


which links to


that has the actual file as the original site does not have it any more (used to be here: http://www.bplan-gmbh.de/flash_update_for_pegasos_ii_en.html ). Then the rom can be extracted with:


To get a binary with MD5 sum 3248e02596480f2dba5944bd219ecfad

Then running it like this should produce the following output:

$ qemu-system-ppc -M pegasos2 -bios pegasos2.rom -device ati-vga,romfile="" 
-cdrom morphos-3.15.iso -serial stdio

PegasosII Boot Strap (c) 2002-2003 bplan GmbH
Running on CPU PVR:000C0209
Enable L1 ICache...                                                   Done.
Reading W83194 :                                                      FAILED.
Setting Front Side Bus to 133MHz...                                   FAILED.
Configuring DDR...                                                    Done.
Configuring PCI0...                                                   Done.
Configuring PCI1...                                                   Done.
Configuring ETH...                                                    Done.
Releasing IDE reset ...                                               Done.
Configuring Legacy Devices
Initializing KBD...                                                   Done.
Testing 10000000 Bytes, Pass: 00000000 Failed: 00000000
RAM TEST (fill linear)...                                             Done.

cpu0: PowerPC,G4 CPUClock 599 Mhz BUSClock 133 Mhz (Version 0x000C,0x0209)
no/bad nvramrc - performing default startup script
channel 1 unit 0 : atapi | QEMU DVD-ROM | 2.5+ ATA device not present or not responding

Welcome to SmartFirmware(tm) for bplan Pegasos2 version 1.1 (20040405172512)
SmartFirmware(tm) Copyright 1996-2001 by CodeGen, Inc.
All Rights Reserved.
Pegasos BIOS Extensions Copyright 2001-2003 by bplan GmbH.
All Rights Reserved.
entering main read/eval loop...
ok boot cd boot.img
ISO-9660 filesystem:  System-ID: "MORPHOS"  Volume-ID: "MorphOSBoot"
Root dir: "" flags=0x2 extent=0x20 size=0x1800
Memory used before SYS_Init: 9MB

ABox 1.30 (2.7.2018) © 1999-2018 by Ralph Schmidt, Emmanuel Lesueur, Teemu 
Suikki, Harry Sintonen
PCI ATA/ATAPI Driver@2: PIO Mode 4
PCI ATA/ATAPI Driver@2: UDMA Mode 5
ide.device@2: QEMU     QEMU DVD-ROM     <CDROM>
ide.device@2:  CDRom <CD001>,<MORPHOS > found, bootable
ide.device@2:  Mount <CD0>
ide.device@2:  Partition <CD0> DosType 0x43444653 BootPri 127

Maybe you should wait for the "Welcome to SmartFirmware" banner or "entering main read/eval loop" followed by the "ok" prompt where you should send "boot cd boot.img" string then wait for the "ide.device@2: Mount <CD0>" string to confirm it found the boot CD at which point it should be working which also tests that via-ide DMA works (it it doesn't it won't find the CD). This tests mv64361, vt8231 (including via-ide half-native mode). Also uses ati-vga but that's already tested by other tests and these texts on serial do not confirm it works with ati-vga, that's just so you can also see it boot if you let it running further. The romfile="" is needed to disable vgabios-ati.bin which the firmware cannot handle.

Can you turn this into a python script implementing a test case based on your other similar tests? I think you have more experience with this and have a way to actually test it that I lack.


reply via email to

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