dev: Get PageBytes from the system in the ARM generic timer.
authorGabe Black <gabeblack@google.com>
Tue, 29 Oct 2019 02:55:15 +0000 (19:55 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 30 Oct 2019 08:51:02 +0000 (08:51 +0000)
These will ultimately by ArmISA::PageBytes, but this is more consistent
with other devices which don't know what ISA they're part of.

Change-Id: Iac13d5010564512207ed009377a771ee5949eff3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22269
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

src/dev/arm/generic_timer.cc

index 396926f409e434b5c90acbf448b42649b1746e1b..430b4ebfaf15826ce75000e6a93622a62b946cda 100644 (file)
@@ -524,8 +524,9 @@ GenericTimerISA::readMiscReg(int reg)
 
 GenericTimerMem::GenericTimerMem(GenericTimerMemParams *p)
     : PioDevice(p),
-      ctrlRange(RangeSize(p->base, TheISA::PageBytes)),
-      timerRange(RangeSize(p->base + TheISA::PageBytes, TheISA::PageBytes)),
+      ctrlRange(RangeSize(p->base, sys->getPageBytes())),
+      timerRange(RangeSize(p->base + sys->getPageBytes(),
+                  sys->getPageBytes())),
       addrRanges{ctrlRange, timerRange},
       systemCounter(),
       physTimer(csprintf("%s.phys_timer0", name()),