kern: Stop using TheISA::GuestByteOrder in Linux::dumpDmesg.
This value is already read from the system object in that same function. We should use that instead of getting the value ourselves. Change-Id: I0a442cd4892f50ad0179884bebf3eb52881c022f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32924 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -109,12 +109,9 @@ Linux::dumpDmesg(ThreadContext *tc, std::ostream &os)
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t log_buf_len =
|
||||
proxy.read<uint32_t>(lb_len->address, TheISA::GuestByteOrder);
|
||||
uint32_t log_first_idx =
|
||||
proxy.read<uint32_t>(first->address, TheISA::GuestByteOrder);
|
||||
uint32_t log_next_idx =
|
||||
proxy.read<uint32_t>(next->address, TheISA::GuestByteOrder);
|
||||
uint32_t log_buf_len = proxy.read<uint32_t>(lb_len->address, bo);
|
||||
uint32_t log_first_idx = proxy.read<uint32_t>(first->address, bo);
|
||||
uint32_t log_next_idx = proxy.read<uint32_t>(next->address, bo);
|
||||
|
||||
if (log_first_idx >= log_buf_len || log_next_idx >= log_buf_len) {
|
||||
warn("dmesg pointers/length corrupted\n");
|
||||
|
||||
Reference in New Issue
Block a user