From: Gabe Black Date: Tue, 29 Oct 2019 02:55:15 +0000 (-0700) Subject: dev: Get PageBytes from the system in the ARM generic timer. X-Git-Tag: v19.0.0.0~368 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c8ce99ac3a19bb93df13aa6b0b0c976bfe56e89;p=gem5.git 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 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- diff --git a/src/dev/arm/generic_timer.cc b/src/dev/arm/generic_timer.cc index 396926f40..430b4ebfa 100644 --- a/src/dev/arm/generic_timer.cc +++ b/src/dev/arm/generic_timer.cc @@ -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()),