[PATCH v3 1/4] arm: x86: qemu: move qfw to DM, include Arm support

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Feb 23 17:15:49 CET 2021


On 2/23/21 5:03 PM, Tom Rini wrote:
> On Tue, Feb 23, 2021 at 04:54:45PM +0100, Heinrich Schuchardt wrote:
>> Am 23. Februar 2021 15:53:38 MEZ schrieb Tom Rini <trini at konsulko.com>:
>>> On Tue, Feb 23, 2021 at 01:59:52PM +0100, Heinrich Schuchardt wrote:
>>>> On 23.02.21 12:43, Asherah Connor wrote:
>>>>> Updates the QFW driver to use the driver model, and adds support
>>> for QFW
>>>>> on Arm platforms by configuring from the device tree and using MMIO
>>>>> accordingly.  A sandbox driver for QFW is also included, and a
>>> simple DM
>>>>> unit test for it.
>>>>
>>>> For which architectures does the fw_cfg device exist?
>>>>
>>>> It it is only ARM and X86, than I am missing such a dependency on
>>>> CONFIG_CMD_QFW.
>>>
>>> The qemu 'qfw' interface is I believe a generic QEMU thing and a
>>> generic
>>> U-Boot cleanup would be to have a common QEMU symbol for everyone to
>>> select.
>>
>> qemu-system-riscv64 does not allow me to specify a file for the qfw interface.
>
> Really?  It's listed under the help (taken from out docker images):
> $ /opt/qemu/bin/qemu-system-riscv64 --help
> ...
> Debug/Expert options:
> -fw_cfg [name=]<name>,file=<file>
>                  add named fw_cfg entry with contents from file
> -fw_cfg [name=]<name>,string=<str>
>                  add named fw_cfg entry with contents from string
>

The man-page is shared by all qemu-system-*. It is not architecture
specific. That is why it shows items like: "PS/2 mouse and keyboard".

qemu-system-riscv64 (v5.0.0) has no fw_cfg device:

$ qemu-system-riscv64 -machine virt -m 1G -nographic -bios u-boot
-fw_cfg opt/foo,file=foo
qemu-system-riscv64: -fw_cfg opt/foo,file=foo: fw_cfg device not available

qemu-system-aarch64 does not complain:

$ qemu-system-aarch64 -machine virt -m 1G -nographic -bios u-boot
-fw_cfg opt/foo,file=foo

Best regards

Heinrich


More information about the U-Boot mailing list