From fce9c7a26f8c8a29d51c319c876a7bf0a32404a7 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 24 Apr 2019 17:19:23 -0700 Subject: 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 Maintainer: Gabe Black Tested-by: kokoro --- src/kern/linux/helpers.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/kern/linux/helpers.cc') 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(addr_lb_len); - uint32_t log_first_idx = proxy.readGtoH(addr_first); - uint32_t log_next_idx = proxy.readGtoH(addr_next); + uint32_t log_buf_len = + proxy.read(addr_lb_len, TheISA::GuestByteOrder); + uint32_t log_first_idx = + proxy.read(addr_first, TheISA::GuestByteOrder); + uint32_t log_next_idx = + proxy.read(addr_next, TheISA::GuestByteOrder); if (log_first_idx >= log_buf_len || log_next_idx >= log_buf_len) { warn("dmesg pointers/length corrupted\n"); -- cgit v1.2.3