]> git.proxmox.com Git - mirror_qemu.git/commit
arm: add fw_cfg to "virt" board
authorLaszlo Ersek <lersek@redhat.com>
Mon, 22 Dec 2014 12:11:42 +0000 (13:11 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 22 Dec 2014 23:39:19 +0000 (23:39 +0000)
commit578f3c7b083514b4fec0bf8fa0617934cdbdf826
tree359334e4ca82df3bc6a41961c7e1ef840a80c69e
parent6c87e3d5967a1d731b5f591a8f0ee6c319c14ca8
arm: add fw_cfg to "virt" board

fw_cfg already supports exposure over MMIO (used in ppc/mac_newworld.c,
ppc/mac_oldworld.c, sparc/sun4m.c); we can easily add it to the "virt"
board.

Because MMIO access is slow on ARM KVM, we enable the guest, with
fw_cfg_init_mem_wide(), to transfer up to 8 bytes with a single access.
This has been measured to speed up transfers up to 7.5-fold, relative to
single byte data access, on both ARM KVM and x86_64 TCG.

The MMIO register block of fw_cfg is advertized in the device tree. As
base address we pick 0x09020000, which conforms to the comment preceding
"a15memmap": it falls in the miscellaneous device I/O range 128MB..256MB,
and it is aligned at 64KB. The DTB properties follow the documentation in
the Linux source file "Documentation/devicetree/bindings/arm/fw-cfg.txt".

fw_cfg automatically exports a number of files to the guest; for example,
"bootorder" (see fw_cfg_machine_reset()).

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1419250305-31062-9-git-send-email-pbonzini@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/virt.c