[Top][All Lists]

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/3] hw/ppc/ppc_boards: Don't use old

From: Peter Maydell
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/3] hw/ppc/ppc_boards: Don't use old_mmio for ref405ep_fpga
Date: Thu, 2 Aug 2018 17:40:34 +0100

On 2 August 2018 at 16:58, Philippe Mathieu-Daudé <address@hidden> wrote:
> Hopefully this is a good case to show the bug I'm having with
> access_with_adjusted_size().
> I agree with your change, so:
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> However IMO little endian guest access is likely to fail.
> The bug I'm having looks like, we have BE data is 'aabbccdd', I expect
> 16-bit access @2 return 'ccdd' but returns 'bbaa' (IIRC).

Behaviour here is going to depend on (a) what the TARGET_ENDIANNESS
setting is for the system (b) whether the device is DEVICE_NATIVE_ENDIAN,
CPU is in "little endian" or "big endian" mode (if the guest CPU
architecture is bi-endian). I would not be surprised if device
models which were only ever expected to work with (say) big endian
MIPS didn't behave correctly when run with a little endian
MIPS OS, but that's usually an error in the device model and/or
its choice of .endianness in the memory region ops struct.

If there's something wrong with access_with_adjusted_size(),
I would suggest starting a different thread for that. I don't
think these changes should alter the behaviour of this device.

-- PMM

reply via email to

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