[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-riscv] RISC-V: qemu should provide different "model" strings i
From: |
Alistair Francis |
Subject: |
Re: [Qemu-riscv] RISC-V: qemu should provide different "model" strings in DT for RV64 and RV32 |
Date: |
Mon, 6 May 2019 19:52:32 +0000 |
On Mon, 2019-05-06 at 20:53 +0200, Karsten Merker wrote:
> On Mon, May 06, 2019 at 02:33:29PM +0000, Alistair Francis wrote:
> > On Sun, 2019-05-05 at 23:03 +0200, Karsten Merker wrote:
> > > Hello,
> > >
> > > while working on RISC-V support for the Debian flash-kernel packa
> > >
> > > I have stumbled over a potential problem with the "model" string
> > > that qemu sets in the DT that it generates for the "virt"
> > > machine,
> > > namely "riscv-virtio,qemu".
> > >
> > > Some tools, among them flash-kernel, use the "model" string to
> > > determine on which specific type of hardware they are running and
> > > perform corresponding hardware-specific actions. It looks like
> > > qemu uses the same model string for both RV64 and RV32, which
> > > makes it impossible to differentiate between the two. I would
> > > therefore like to propose to make the model-string
> > > XLEN-dependent, i.e. "riscv64-virtio,qemu" respectively
> > > "riscv32-virtio,qemu".
> >
> > This sounds fine to me.
> >
> > Is there anything that already relies on the
> > "riscv-virtio,qemu" compat string?
>
> At least nothing that I am aware of.
>
> > Maybe we can keep that and add a 32/64 bit one so we don't
> > break anything that is already working.
>
> AFAICS this isn't possible as according to the device-tree
> specification the "model" property in DT can only have a single
> value:
>
> Property name: model
> Value type: <string>
>
> To allow for multiple values that would have to be
>
> Value type: <stringlist>
Ah, no worries. I think it's worth sending the patch. The 4.1
development cycle has just opened so now seems like a good time to send
it. We can then test to make sure nothing is broken before the next
release.
Alistair
>
> Regards,
> Karsten