qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 05/15] hw/riscv: boot: Remove compile time XLEN checks


From: Alistair Francis
Subject: Re: [PATCH v2 05/15] hw/riscv: boot: Remove compile time XLEN checks
Date: Wed, 9 Dec 2020 14:19:14 -0800

On Wed, Dec 9, 2020 at 7:51 AM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 12/8/20 4:56 PM, Alistair Francis wrote:
> > +    if (riscv_is_32_bit(machine)) {
> > +        dinfo.magic = cpu_to_le32(FW_DYNAMIC_INFO_MAGIC_VALUE);
> > +        dinfo.version = cpu_to_le32(FW_DYNAMIC_INFO_VERSION);
> > +        dinfo.next_mode = cpu_to_le32(FW_DYNAMIC_INFO_NEXT_MODE_S);
> > +        dinfo.next_addr = cpu_to_le32(kernel_entry);
> > +    } else {
> > +        dinfo.magic = cpu_to_le64(FW_DYNAMIC_INFO_MAGIC_VALUE);
> > +        dinfo.version = cpu_to_le64(FW_DYNAMIC_INFO_VERSION);
> > +        dinfo.next_mode = cpu_to_le64(FW_DYNAMIC_INFO_NEXT_MODE_S);
> > +        dinfo.next_addr = cpu_to_le64(kernel_entry);
> > +    }
>
> This looks like it's still based on the TARGET, but via the types in
> fw_dynamic_info.  So far it would be clearer with sizeof(dinfo.magic) or 
> something.

Fixed.

Alistair

>
>
> r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]