From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 930E921BB252A for ; Mon, 12 Jun 2017 09:27:34 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9E15D80471; Mon, 12 Jun 2017 16:28:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9E15D80471 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9E15D80471 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-168.phx2.redhat.com [10.3.116.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7775B80F5D; Mon, 12 Jun 2017 16:28:46 +0000 (UTC) To: Andre References: From: Laszlo Ersek Cc: edk2-devel@lists.01.org, Ard Biesheuvel , "Leif Lindholm (Linaro address)" Message-ID: Date: Mon, 12 Jun 2017 18:28:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 12 Jun 2017 16:28:47 +0000 (UTC) Subject: Re: Can OVMF run on an emulated QEMU ARM vexpress-a9? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2017 16:27:34 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 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