[PATCH v3 1/4] arm: x86: qemu: move qfw to DM, include Arm support
Tom Rini
trini at konsulko.com
Wed Feb 24 00:58:00 CET 2021
On Tue, Feb 23, 2021 at 11:54:01PM +0000, Asherah Connor wrote:
> On 21/02/23 11:02:p, Tom Rini wrote:
> > On Tue, Feb 23, 2021 at 05:15:49PM +0100, Heinrich Schuchardt wrote:
> > > On 2/23/21 5:03 PM, Tom Rini wrote:
> > > > On Tue, Feb 23, 2021 at 04:54:45PM +0100, Heinrich Schuchardt wrote:
> > > > > 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
> >
> > So all that's missing is someone hooking that up inside qemu itself.
> > I'm pretty sure it works on PowerPC, from when I was trying to figure
> > out how to pass something in to qemu-ppce500 a while ago.
> > qemu-system-mips/sh4 don't complain.
>
> A review of the various FW_CFG_ Kconfig options in QEMU itself suggests
> there is support on at least i386, arm, ppc, and mips (their arch
> terms). Looking further, it appears sparc(64) and hppa (HP PA-RISC) are
> also supported in the source base.
>
> But actually trying it, it looks like a freshly built QEMU 5.2.0 does
> not support qfw on ppce500:
>
> $ qemu-system-ppc -M ppce500 -nographic -bios \
> build-qemu-ppce500/u-boot -fw_cfg xyz,string=hello
> qemu-system-ppc: -fw_cfg xyz,string=hello: fw_cfg device not available
>
> Same for mips(64)(el). Maybe I missed a configuration option somewhere.
> The sparc systems work fine.
Ah well, so my experiment would likely have not worked back then anyhow
(but I don't recall seeing an error at the time). Anyhow, for now in
U-Boot as there's not a generic QEMU symbol, this side of things should
depend on ARM||X86 for now and let future enhancements add it elsewhere.
Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210223/4938f7b0/attachment.sig>
More information about the U-Boot
mailing list