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: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] hw/display: Add basic ATI VGA emulation
Date: Thu, 21 Feb 2019 13:36:18 +0100
User-agent: NeoMutt/20180716

On Thu, Feb 21, 2019 at 12:44:22PM +0100, BALATON Zoltan wrote:
> 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.

Wow.  Guess X11 just runs unaccelerated on some framebuffer though.

> With 0x5159 (RV100) I don't get any picture.

So maybe the drm driver tries some more advanced stuff here.

> It looks like first problem is that the
> vgabios in QEMU doesn't like this card.

The seabios banner should show up in any case.  That is just using
standard vga text mode without any vendor-specific extensions.

The PCI IDs of device and bios must match, so you need one bios per card
version.  You can use roms/config.vga-qxl as template and replace the
IDs there.

Maybe it makes sense to have an abstract ati-vga-base type, then create
two (or more) types using that base type which only differ in pci id and
vgabios (and maybe more later on when the more advanced stuff is
implemented).

> 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.

The X server does it on pretty much anything but i386.
Specifically x86emu is also used on x86_64 (when using the vesa driver).

> There's a VGA_FIXUP_ASM config option in vgabios which is supposed to
> help with this but it doesn't.

It surely helps at least with the x86emu variant used by the X server,
even for RHEL-5 (which is more than 10 years old meanwhile).

So the sam460ex firmware must have a ancient version/fork of x86emu.
Is it open source, so there is a chance to update it?

cheers,
  Gerd




reply via email to

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