QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Machine specific option ROMs
Date: Tue, 20 Aug 2019 12:46:56 +0200 (CEST)
Message-ID: <alpine.BSF.2.21.9999.1908201235270.15352@zero.eik.bme.hu> (raw)
In-Reply-To: <20190820062552.ivu7o4rcroppkjje@sirius.home.kraxel.org>

On Tue, 20 Aug 2019, Gerd Hoffmann wrote:
>>> For example in qemu 1.5 the nic roms got EFI support and there is a
>>> compat property which switches the pc-i440fx-1.4 (and older) machine
>>> types to the non-efi versions.  Grep for pxe-e1000.rom to find the code.
> Note that roms with a pci firmware standard header[1] can be chained
> together, then placed in the pci rom bar.  This is how the efi-*.rom
> files are created, they are three-in-one images (bios, efi ia32, efi
> x64).
>   # file pc-bios/qemu_vga.ndrv
>   pc-bios/qemu_vga.ndrv: header for PowerPC PEF executable
> Hmm, so that is probably not going to work.
>> +static GlobalProperty compat[] = {
>> +    { "VGA", "romfile", NDRV_VGA_FILENAME },
>> +};
>> +    compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
> I wouldn't name the variable compat (in this specific case it's not for
> backward compatibility), but yes, this is the idea.
>> manually. (In the future this same way can also be used to pass proper
>> FCode ROMs to OpenBIOS.)
> The image type (pci rom header) can be:
>   Type      Description
>   0         Intel x86, PC-AT compatible
>   1         Open Firmware standard for PCI
>   2         Hewlett-Packard PA RISC
>   3         Extensible Firmware Interface (EFI)
>   4-FF      Reserved
> So having a single pci rom image with both classic vgabios (type 0) and
> open firmware fcode (type 1) should be possible.
> cheers,
>  Gerd
> [1] http://read.pudn.com/downloads211/doc/comm/994029/pcifw_r3_0_updated.pdf, section 5.1

Thanks for investigating it. However there are at least two problems with 
that idea:

1. OpenBIOS does not yet understand standard PCI ROM headers, it can only 
handle NDRV and PEF ROMs yet so first support for that (and FCode ROMs) 
should be added to OpenBIOS.

2. Building rom images from different sources (in this case your vgabios 
and QemuMacDrivers for the NDRV) might not be straightforward (maybe some 
clever make rules would take care of these without too much hassle but I'm 
not sure, this would mean rebuilding binary if any of the two sources 

Plus I don't know if other firmwares such as sam460ex U-Boot can handle 
such multiplatform ROMs, especially because it can use x86 ROM just not 
the QEMU vgabios due to not emulating i386 specific opcodes that gcc puts 
in real mode code so it needs something compiled with bcc such as 
Plex86/Bochs VGABios so then we can't put those in one binary because we 
had two x86 images in it. Therefore I think setting this based on machine 
like above is probably the easiest way for now.

I'll wait for Mark's comments before going further with this.


  reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19  0:38 BALATON Zoltan
2019-08-19  6:15 ` Gerd Hoffmann
2019-08-19 23:42   ` BALATON Zoltan
2019-08-20  6:25     ` Gerd Hoffmann
2019-08-20 10:46       ` BALATON Zoltan [this message]
2019-08-20 12:28         ` Gerd Hoffmann
2019-08-20 14:01           ` BALATON Zoltan

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.BSF.2.21.9999.1908201235270.15352@zero.eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=kraxel@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org qemu-devel@archiver.kernel.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/ public-inbox