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

Change subject: dev,arm: Use the ArmSystem::PageBytes constant in the generic timer.
......................................................................

dev,arm: Use the ArmSystem::PageBytes constant in the generic timer.

This component very specific to ARM, and so there's no reason to use
generic interfaces to get the page size.

Change-Id: Id757b5742c807c5f616a6dc8df94a7709932d071
---
M src/dev/arm/generic_timer.cc
1 file changed, 6 insertions(+), 6 deletions(-)



diff --git a/src/dev/arm/generic_timer.cc b/src/dev/arm/generic_timer.cc
index da8de08..75ef38f 100644
--- a/src/dev/arm/generic_timer.cc
+++ b/src/dev/arm/generic_timer.cc
@@ -873,7 +873,7 @@

 GenericTimerFrame::GenericTimerFrame(GenericTimerFrameParams *const p)
     : PioDevice(p),
-      timerRange(RangeSize(p->cnt_base, sys->getPageBytes())),
+      timerRange(RangeSize(p->cnt_base, ArmSystem::PageBytes)),
       addrRanges({timerRange}),
       systemCounter(*p->counter),
       physTimer(csprintf("%s.phys_timer", name()),
@@ -887,7 +887,7 @@
     SystemCounter::validateCounterRef(p->counter);
     // Expose optional CNTEL0Base register frame
     if (p->cnt_el0_base != MaxAddr) {
-        timerEl0Range = RangeSize(p->cnt_el0_base, sys->getPageBytes());
+        timerEl0Range = RangeSize(p->cnt_el0_base, ArmSystem::PageBytes);
         accessBitsEl0 = 0x303;
         addrRanges.push_back(timerEl0Range);
     }
@@ -1244,9 +1244,9 @@

 GenericTimerMem::GenericTimerMem(GenericTimerMemParams *const p)
     : PioDevice(p),
- counterCtrlRange(RangeSize(p->cnt_control_base, sys->getPageBytes())),
-      counterStatusRange(RangeSize(p->cnt_read_base, sys->getPageBytes())),
-      timerCtrlRange(RangeSize(p->cnt_ctl_base, sys->getPageBytes())),
+ counterCtrlRange(RangeSize(p->cnt_control_base, ArmSystem::PageBytes)), + counterStatusRange(RangeSize(p->cnt_read_base, ArmSystem::PageBytes)),
+      timerCtrlRange(RangeSize(p->cnt_ctl_base, ArmSystem::PageBytes)),
       cnttidr(0x0),
       addrRanges{counterCtrlRange, counterStatusRange, timerCtrlRange},
       systemCounter(*p->counter),
@@ -1273,7 +1273,7 @@
 void
 GenericTimerMem::validateFrameRange(const AddrRange &range)
 {
-    fatal_if(range.start() % ArmISA::PageBytes,
+    fatal_if(range.start() % ArmSystem::PageBytes,
"GenericTimerMem::validateFrameRange: Architecture states each " "register frame should be in a separate memory page, specified "
              "range base address [0x%x] is not compliant\n");

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/34171
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: Id757b5742c807c5f616a6dc8df94a7709932d071
Gerrit-Change-Number: 34171
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[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

Reply via email to