dev: Get PageBytes from the system in the ARM generic timer.

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>
This commit is contained in:
Gabe Black
2019-10-28 19:55:15 -07:00
parent f5f60a5e46
commit 1c8ce99ac3

View 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()),