dev: Make the virtio devices track endianness explicitly.
authorGabe Black <gabeblack@google.com>
Tue, 29 Oct 2019 04:07:16 +0000 (21:07 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 30 Oct 2019 22:29:23 +0000 (22:29 +0000)
commit7adc90a2970dfdc54560305ddca46c90ce519016
treefb03f7da1cc3cd5e44c9a631f3fd2da89842ae37
parentcbf20899528f523db38b78c32d27dcb8fc8485fd
dev: Make the virtio devices track endianness explicitly.

These classes now track what endianness they're supposed to use
explicitly, initially set by the getGuestByteOrder accessor on the
system object. In the future, if the endianness depends on the
version of the VirtIO spec as the comment suggest, it will be easier
to dynamically set the endianness in the various structures based on
the version being used,

Since there isn't anything special about the virt IO versions of these
converters other than their types, and since the endianness conversion
infrastructure can be taught how to convert new types, the code was
switched over to using the standard htog and gtoh but with the
explicit byte order provided.

This also gets rid of the final use of TheISA in the dev directory.

Change-Id: I9345e3295eb27fc5eb87e8ce0d8d424ad1e75d2d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22273
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/virtio/base.cc
src/dev/virtio/base.hh
src/dev/virtio/block.cc
src/dev/virtio/block.hh
src/dev/virtio/console.cc
src/dev/virtio/console.hh
src/dev/virtio/fs9p.cc
src/dev/virtio/fs9p.hh