From: Laszlo Ersek <lersek@redhat.com>
To: Andre <andreesteve@gmail.com>
Cc: edk2-devel@lists.01.org,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
"Leif Lindholm (Linaro address)" <leif.lindholm@linaro.org>
Subject: Re: Can OVMF run on an emulated QEMU ARM vexpress-a9?
Date: Mon, 12 Jun 2017 18:28:45 +0200 [thread overview]
Message-ID: <c40331d9-6700-b22a-00aa-ceeccd5fcfbd@redhat.com> (raw)
In-Reply-To: <CADwQNj_s+SN68W1_9QUz7AoWqcedUsTv=y1rWhdd2yvT46oNRw@mail.gmail.com>
CC Ard & Leif
On 06/12/17 08:44, Andre wrote:
> Hi,
>
> this might be a silly question, as I am learning as I go about the topic,
> but is it possible to emulate UEFI on QEMU when setting the emulated
> machine to an ARM vexpress-a9?
>
> I was able to emulate it on QEMU's virt machine, but I don't care as much
> about the vexpress-a9, but as to know whether OVMF can only run against
> QEMU's virt machine or if it can run against some other emulated board.
>
> Are there too many differences between the virt machine to other boards
> that make providing images for different emulated boards impractical?
>
> I really don't know enough even to know if my question is sensible, so any
> pointers on the topic are really appreciated!
Your question is fully justified and to the point.
The answer is that, yes, there's a *whole lot* of integration between
QEMU machine type and firmware. This is reflected by several things:
- The kinds of firmware drivers we include the firmware build follows
the QEMU machine type. Under "driver", understand both software drivers
(i.e. something that produces ACPI tables and SMBIOS tables -- because
QEMU exports those in a particular format), and hardware drivers (for
the kinds of emulated hardware that we know the targeted QEMU machine
type will, or can, provide).
- The way we customize or control generic (= platform-independent)
firmware drivers.
- The things we assume about hardware in the lowest-level / earliest
firmware modules (for example, what parts of the address space are known
to map to system RAM / MMIO / platform devices; what IO ports belong to
what platform devices, etc)
There *is* a bunch of stuff we try to abstract even between QEMU and
firmware, for enabling incremental development & compat, but then again
those abstractions rest upon virtual hardware specifics (DTB pre-filled
into RAM, fw_cfg, virtio, ...).
So, a quick summary about virtual platform support (that I know of) in edk2:
- ArmVirtPkg/ArmVirtQemu.dsc:
- qemu-system-arm and qemu-system-aarch64, with the "virt" machine
type (the higher-versioned "virt" machine types you use, the better
integration you get)
- ArmVirtPkg/ArmVirtQemuKernel.dsc:
- Not really sure about the QEMU configuration for this, but see
commit 8de84d424221 ("ArmVirtPkg: implement ArmVirtQemuKernel",
2016-02-05) for the intended use. I think Ard can explain it better.
- ArmVirtPkg/ArmVirtXen.dsc:
- Xen, with HVM (fullvirt) guests, potentially using the XenPV block
device. Both arm/aarch64. (I'm not a Xen user myself, hence the
scant details -- I'm sorry.)
- OvmfPkg/*dsc:
- qemu-system-i386 and qemu-system-x86_64, with the "pc" and "q35"
machine types (the higher-versioned machine types you use, the
better integration you get)
- Xen, with HVM (fullvirt) guests, potentially using the XenPV block
device
There used to be ArmPlatformPkg/ArmVExpressPkg (now defunct I think?),
and there's
<https://git.linaro.org/uefi/OpenPlatformPkg.git/tree/Platforms/ARM/VExpress>
as well.
I think the latter might just give you what you want.
You might get away running builds of existent firmware platforms (DSC
files) in non-matching environments, but the platform integration will
suffer. This ranges from "crashes without a single log message" to "some
optional UEFI protocols are missing".
Thanks
Laszlo
next prev parent reply other threads:[~2017-06-12 16:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 6:44 Can OVMF run on an emulated QEMU ARM vexpress-a9? Andre
2017-06-12 16:28 ` Laszlo Ersek [this message]
2017-06-12 16:40 ` Ard Biesheuvel
2017-06-12 19:38 ` Laszlo Ersek
2017-06-12 19:50 ` Ard Biesheuvel
2017-06-12 16:43 ` Leif Lindholm
Reply instructions:
You may reply publicly 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-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c40331d9-6700-b22a-00aa-ceeccd5fcfbd@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox