qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] hw/display: Add basic ATI VGA emulation


From: BALATON Zoltan
Subject: Re: [Qemu-devel] [PATCH] hw/display: Add basic ATI VGA emulation
Date: Thu, 21 Feb 2019 12:44:22 +0100 (CET)
User-agent: Alpine 2.21.9999 (BSF 287 2018-06-16)

On Wed, 20 Feb 2019, Gerd Hoffmann wrote:
So it could be tested with linux guests on x86 too I guess?
Can the radeon drm driver handle the devices too?

Yes you can try with x86 guests, I haven't tested that yet. The radeon
driver only supports RV100 and up I think so may only work with the 0x5159
variant not with Rage 128 Pro which had another driver r128 but not sure
that still exists. Although these two chips are similar, Rage 128 Pro is a
bit simpler that's why I'm targeting it first and also that's what the
PowerMac3,1 (the ppc mac99 machine is converging to) has. The R128Pro is the
last of the previous generation before Radeon, while RV100 is the stripped
down simplest version of the R100 family which has some more 3D capability).
But even if the DRM driver loads, probably only the mode setting part is
useful at the moment as 3D is not implemented yet by this device model.

Chances are not too bad that it'll be good enough to bring up a linux
console.

I've tried a random Fedora live CD on qemu-system-x86_64 with ati-vga and with the default 0x5046 (Rage128Pro) that got me to X desktop. With 0x5159 (RV100) I don't get any picture. It looks like first problem is that the vgabios in QEMU doesn't like this card. I haven't checked further from there. Maybe eventually we'll need a vgabios-ati.bin for this but so far the existing one worked enough for at least the R128P.

There's another problem I know about with the vgabios, that it's compiled with gcc that cannot compile real x86 16-bit code, only code that can be run in i386 real mode as discussed here
https://stackoverflow.com/questions/19055647/how-to-tell-gcc-to-generate-16-bit-code-for-real-mode

This is usually not a problem but some PPC machines e.g. the sam460ex has a BIOS emulator (usually a variant of x86emu) in their firmware (and maybe also X server does the same on these platforms) which runs the card's VESA bios to initialise the card and set mode but this fails with QEMU's vgabios due to unsupported 32bit prefixes in 16bit code. There's a VGA_FIXUP_ASM config option in vgabios which is supposed to help with this but it doesn't. Vgabios compiled with that option still has other opcodes not supported by x86emu. As a workaround I've found there are real 16-bit version of the Bochs vgabios compiled with bcc available here: http://www.nongnu.org/vgabios/ which work with x86emu and can be used via -device ati-vga,romfile=VGABIOS-lgpl-latest.bin but this has the same problem with 0x5159 as well.

Regards,
BALATON Zoltan



reply via email to

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