[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~
- [PATCH v2 00/15] RISC-V: Start to remove xlen preprocess, Alistair Francis, 2020/12/08
- [PATCH v2 01/15] hw/riscv: Expand the is 32-bit check to support more CPUs, Alistair Francis, 2020/12/08
- [PATCH v2 02/15] target/riscv: Add a TYPE_RISCV_CPU_BASE CPU, Alistair Francis, 2020/12/08
- [PATCH v2 03/15] riscv: spike: Remove target macro conditionals, Alistair Francis, 2020/12/08
- [PATCH v2 04/15] riscv: virt: Remove target macro conditionals, Alistair Francis, 2020/12/08
- [PATCH v2 05/15] hw/riscv: boot: Remove compile time XLEN checks, Alistair Francis, 2020/12/08
- [PATCH v2 06/15] hw/riscv: virt: Remove compile time XLEN checks, Alistair Francis, 2020/12/08
- [PATCH v2 07/15] hw/riscv: spike: Remove compile time XLEN checks, Alistair Francis, 2020/12/08
- [PATCH v2 09/15] target/riscv: fpu_helper: Match function defs in HELPER macros, Alistair Francis, 2020/12/08
- [PATCH v2 08/15] hw/riscv: sifive_u: Remove compile time XLEN checks, Alistair Francis, 2020/12/08
- [PATCH v2 10/15] target/riscv: Add a riscv_cpu_is_32bit() helper function, Alistair Francis, 2020/12/08
- [PATCH v2 11/15] target/riscv: Specify the XLEN for CPUs, Alistair Francis, 2020/12/08