Saturday, April 6, 2019

The next How-To

Nearly 10 years after writing Solaris/SPARC under QEMU How-To, now it’s time for the AIX/PReP under QEMU How-To.

Back then my strategy was using the Power-On Self Tests and other tests from the original firmware to verify and improve qemu-system-sparc.

This time I took a different approach as some tests are synthetic and check some typical hardware-specific problems like broken and shorted wires or faulty memory chips. The result of IBM firmware diagnostics is something like “replace your motherboard” – which is not exactly helpful to find out for instance whether there is a problem with the interrupt or DMA emulation. And yeah, there are some problems with the DMA emulation, that’s why qemu-system-ppc -M 40p can not use IDE CD-ROMs under AIX, and probably some other DMA devices like sound card (haven't tried it yet).

The approach this time was making the emulation good enough and describe it the way that it

  • matches to the hardware implemented in QEMU good enough
  • has a driver in AIX

The later was tricky, as AIX does support only a very limited amount of hardware. It checks exactly that your IDE controller is from Winbond (does anyone still remember them?) and checks the exact chip model. It doesn’t care if your chip is compatible, it wants the exact match.

As result we have a -M 40p model in QEMU which is not perfectly matching the physical IBM PPS 6015, and a firmware which describes it the way AIX 5.1 can see the onboard devices.

But anyways, it was fun 10 years ago and it's still fun.


harsky said...

I tried running Solaris 2.5.1 on 40p. Unfortunately the VM doesn't want to boot from floppy

harsky said...

I looked at the contents of the sol_251_ibm.img file and realized that I wanted to commit suicide ...
At address 0x0200 - bullshit - f0 ff ff f7. This place should be the bootloader address, usually 00 40 00 00 for vmlinuz
I tried to find the start of VOF on disk but couldn't, I am a loser

atar said...

Actually booting from floppy should work, I used to test it with NetBSD images. You have to expicitly specify that the floppy is 1.44, as OFW doesn't support 2.88 floppies (IBM firmware seems to be compatible with 2.88).

But it would fail because the 40p target doesn't support switching to the little endian mode.

Anonymous said...

Anyone managed to get AIX 5.2 running? I am trying 5.1, 5.2, 5.3, but only 5.1 seems to work. Is the install cdrom boot process this different across multiple minor versions? It is interesting that .partitions cdrom shows only one partition for both 5.2 and 5.3, but 5.2 is showing two partitions. However, Linux fdisk -l on the iso images does not show any partitions on 5.1 but one for 5.2 and 5.3. One of the earlier posts says that p40 support might've been removed in 5.2 onwards, but this is not even AIX, this is firmware and ISO partitions, right? Is it just the installer CD? If I had a pre-installed 5.2 system, would its disk copy boot in QEMU?
And the last one: will these patches get merged to the upstream QEMU?