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>