Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/20348 )
Change subject: arm: Make the CNTFRQ register read only.
......................................................................
arm: Make the CNTFRQ register read only.
This register is just for reading the generic timer frequency, and
setting it, if it's even possible, shouldn't have any control function.
Change-Id: I45fd9f3f7250b6a6fef920bb0afe609e619b7852
---
M src/arch/arm/isa.cc
M src/dev/arm/generic_timer.cc
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/arch/arm/isa.cc b/src/arch/arm/isa.cc
index 299698d..9c2683b 100644
--- a/src/arch/arm/isa.cc
+++ b/src/arch/arm/isa.cc
@@ -2058,12 +2058,16 @@
warn("miscreg L2CTLR (%s) written with %#x. ignored...\n",
miscRegName[misc_reg], uint32_t(val));
break;
+ case MISCREG_CNTFRQ:
+ warn("miscreg CNTFRQ (%s) written with %#x. ignored...\n",
+ miscRegName[misc_reg], uint32_t(val));
+ break;
// Generic Timer registers
case MISCREG_CNTHV_CTL_EL2:
case MISCREG_CNTHV_CVAL_EL2:
case MISCREG_CNTHV_TVAL_EL2:
- case MISCREG_CNTFRQ ... MISCREG_CNTHP_CTL:
+ case MISCREG_CNTKCTL ... MISCREG_CNTHP_CTL:
case MISCREG_CNTPCT ... MISCREG_CNTHP_CVAL:
case MISCREG_CNTKCTL_EL1 ... MISCREG_CNTV_CVAL_EL0:
case MISCREG_CNTVOFF_EL2 ... MISCREG_CNTPS_CVAL_EL1:
diff --git a/src/dev/arm/generic_timer.cc b/src/dev/arm/generic_timer.cc
index 396926f..9cdf5bf 100644
--- a/src/dev/arm/generic_timer.cc
+++ b/src/dev/arm/generic_timer.cc
@@ -319,7 +319,8 @@
switch (reg) {
case MISCREG_CNTFRQ:
case MISCREG_CNTFRQ_EL0:
- systemCounter.setFreq(val);
+ warn("Ignoring write to read only frequency register: %s\n",
+ miscRegName[reg]);
return;
case MISCREG_CNTKCTL:
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/20348
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: I45fd9f3f7250b6a6fef920bb0afe609e619b7852
Gerrit-Change-Number: 20348
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev