diff options
author | Gabe Black <gabeblack@google.com> | 2019-04-24 17:19:23 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-04-28 03:09:09 +0000 |
commit | fce9c7a26f8c8a29d51c319c876a7bf0a32404a7 (patch) | |
tree | 61cf66e892473fafab9e0e7726750542a0be92b0 /src/kern | |
parent | cdcc55a6a8fe9b4625b316a8d8845366ccfa71c9 (diff) | |
download | gem5-fce9c7a26f8c8a29d51c319c876a7bf0a32404a7.tar.xz |
mem: Remove the ISA specialized versions of port proxy's read/write.
These selected their behavior based on ifdefs and had to be disabled
when on the NULL ISA. The versions which take an explicit endianness
have been renamed to just read/write instead of readGtoH and writeHtoG
since the direction of the translation is obvious from context.
Change-Id: I6cfbfda6c4481962d442d3370534e50532d41814
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18372
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/kern')
-rw-r--r-- | src/kern/linux/helpers.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/kern/linux/helpers.cc b/src/kern/linux/helpers.cc index 54fc42138..ed58427ec 100644 --- a/src/kern/linux/helpers.cc +++ b/src/kern/linux/helpers.cc @@ -43,6 +43,7 @@ #include "config/the_isa.hh" #include "cpu/thread_context.hh" #include "mem/fs_translating_port_proxy.hh" +#include "sim/byteswap.hh" #include "sim/system.hh" struct DmesgEntry { @@ -107,9 +108,12 @@ Linux::dumpDmesg(ThreadContext *tc, std::ostream &os) return; } - uint32_t log_buf_len = proxy.readGtoH<uint32_t>(addr_lb_len); - uint32_t log_first_idx = proxy.readGtoH<uint32_t>(addr_first); - uint32_t log_next_idx = proxy.readGtoH<uint32_t>(addr_next); + uint32_t log_buf_len = + proxy.read<uint32_t>(addr_lb_len, TheISA::GuestByteOrder); + uint32_t log_first_idx = + proxy.read<uint32_t>(addr_first, TheISA::GuestByteOrder); + uint32_t log_next_idx = + proxy.read<uint32_t>(addr_next, TheISA::GuestByteOrder); if (log_first_idx >= log_buf_len || log_next_idx >= log_buf_len) { warn("dmesg pointers/length corrupted\n"); |