Re: [PATCH-for-10.0 2/3] hw/char/riscv_htif: Explicit little-endian implementation

2024-12-02 Thread Alistair Francis
On Sat, Nov 30, 2024 at 12:43 AM Philippe Mathieu-Daudé wrote: > > Since our RISC-V system emulation is only built for little > endian, the HTIF device aims to interface with little endian > memory accesses, thus we can explicit htif_mm_ops:endianness > being DEVICE_LITTLE_ENDIAN. > > In that case

Re: [PATCH-for-10.0 2/3] hw/char/riscv_htif: Explicit little-endian implementation

2024-11-29 Thread Daniel Henrique Barboza
On 11/29/24 12:43 PM, Philippe Mathieu-Daudé wrote: Since our RISC-V system emulation is only built for little endian, the HTIF device aims to interface with little endian memory accesses, thus we can explicit htif_mm_ops:endianness being DEVICE_LITTLE_ENDIAN. In that case tswap64() is equiva

[PATCH-for-10.0 2/3] hw/char/riscv_htif: Explicit little-endian implementation

2024-11-29 Thread Philippe Mathieu-Daudé
Since our RISC-V system emulation is only built for little endian, the HTIF device aims to interface with little endian memory accesses, thus we can explicit htif_mm_ops:endianness being DEVICE_LITTLE_ENDIAN. In that case tswap64() is equivalent to le64_to_cpu(), as in "convert this 64-bit little-