Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/23181 )

Change subject: sim: Use _m5opRange in System::allocPhysPages.
......................................................................

sim: Use _m5opRange in System::allocPhysPages.

This removes the hardcoded assumption that the m5 ops live at the
address they use in x86.

Change-Id: Ia551d7cf5b08f926c7756541c92a2af9bb73b88a
---
M src/arch/arm/system.hh
M src/sim/system.cc
M src/sim/system.hh
3 files changed, 7 insertions(+), 8 deletions(-)



diff --git a/src/arch/arm/system.hh b/src/arch/arm/system.hh
index 90fed14..771d738 100644
--- a/src/arch/arm/system.hh
+++ b/src/arch/arm/system.hh
@@ -269,12 +269,6 @@
         return mask(physAddrRange());
     }

-    /**
-     * Range used by memory-mapped m5 pseudo-ops if enabled. Returns
-     * an invalid/empty range if disabled.
-     */
-    const AddrRange &m5opRange() const { return _m5opRange; }
-
     /** Is Arm Semihosting support enabled? */
     bool haveSemihosting() const { return semihosting != nullptr; }

diff --git a/src/sim/system.cc b/src/sim/system.cc
index ff7bb35..263dcff 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -411,8 +411,7 @@

     Addr next_return_addr = pagePtr << PageShift;

-    AddrRange m5opRange(0xffff0000, 0x100000000);
-    if (m5opRange.contains(next_return_addr)) {
+    if (_m5opRange.contains(next_return_addr)) {
         warn("Reached m5ops MMIO region\n");
         return_addr = 0xffffffff;
         pagePtr = 0xffffffff >> PageShift;
diff --git a/src/sim/system.hh b/src/sim/system.hh
index 6c63b32..283bbd1 100644
--- a/src/sim/system.hh
+++ b/src/sim/system.hh
@@ -581,6 +581,12 @@

     const Params *params() const { return (const Params *)_params; }

+    /**
+     * Range used by memory-mapped m5 pseudo-ops if enabled. Returns
+     * an invalid/empty range if disabled.
+     */
+    const AddrRange &m5opRange() const { return _m5opRange; }
+
   public:

     /**

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/23181
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ia551d7cf5b08f926c7756541c92a2af9bb73b88a
Gerrit-Change-Number: 23181
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to