Yu-hsin Wang has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/49907 )
Change subject: mem: Fix offset when loading a memory image
......................................................................
mem: Fix offset when loading a memory image
Change-Id: I5e98979fe3105771c0ba27ba32d9edcbcb72aadd
---
M src/mem/abstract_mem.cc
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mem/abstract_mem.cc b/src/mem/abstract_mem.cc
index 03f2557..8e24ab2 100644
--- a/src/mem/abstract_mem.cc
+++ b/src/mem/abstract_mem.cc
@@ -89,7 +89,7 @@
if (!range.contains(image_range.start())) {
warn("%s: Moving image from %s to memory address range %s.",
name(), image_range.to_string(), range.to_string());
- image = image.offset(range.start());
+ image = image.offset(range.start() - image_range.start());
image_range = AddrRange(image.minAddr(), image.maxAddr());
}
panic_if(!image_range.isSubset(range), "%s: memory image %s doesn't
fit.",
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/49907
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I5e98979fe3105771c0ba27ba32d9edcbcb72aadd
Gerrit-Change-Number: 49907
Gerrit-PatchSet: 1
Gerrit-Owner: Yu-hsin Wang <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s