On Mon, Oct 10, 2016 at 10:18:40AM +0100, Peter Maydell wrote:
> On 10 October 2016 at 05:55, David Gibson <da...@gibson.dropbear.id.au> wrote:
> > However right now - until we get fixed-endianness qtest accessors of
> > some sort - this test is more or less necessary to make most tests
> > cross platform correct (except PCI, see below).  That's because the
> > testcase will generally know the endianness of the hardware it's
> > testing, but has to compensate for the endianness that the
> > readw/writew primitives will use along the way.
> 
> The test case isn't testing the hardware (device), though, it's
> testing the hardware in a system. The same device in QEMU board A
> could be behind a bridge or otherwise differently wired by
> the SoC from the device in QEMU board B. The qtest setup
> doesn't instantiate a device and talk directly to it, it
> instantiates a board and talks over the same interface the
> emulated CPU would.

If your bridges change the effective endianness of your device, then
your bridge hardware design is broken.  Such boards exist but they
are, thankfully, rare.

In the overwhelming majority of cases the endianness of the device is
known independent of the guest CPU and board.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature

Reply via email to