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: Richard Henderson
Subject: Re: [PATCH v2 05/15] hw/riscv: boot: Remove compile time XLEN checks
Date: Wed, 9 Dec 2020 09:50:59 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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.


r~



reply via email to

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