changeset 61c625151d9a in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=61c625151d9a
description:
        arm: AArch64 report cache size correctly when reading CTR_EL0

        Trying to read MISCREG_CTR_EL0 on AArch64 returned 0 as is was not
        implmemented.  With that an operating system relying on the cache line
        sizes reported in order to manage the caches would (a) panic given the
        returned value 0 is not valid (high bit is RES1) or (b) worst case would
        assume a cache line size of 4 doing a tremendous amount of extra
        instruction work (including fetching).  Return the same values as for 
ARMv7
        as the fields seem to be the same, or RES0/1 seem to be reported
        accordingly for AArch64

        In collaboration with:  Andrew Turner

        Testing Done: Checked on FreeBSD boots with extra printfs;  also 
observed a
        reduction of a factor of about 10 in instruction fetches for a simple
        micro-test.

        Reviewed at http://reviews.gem5.org/r/3667/

        Signed-off-by: Jason Lowe-Power <[email protected]>

diffstat:

 src/arch/arm/isa.cc |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r f254d8a17da9 -r 61c625151d9a src/arch/arm/isa.cc
--- a/src/arch/arm/isa.cc       Tue Feb 07 15:28:33 2017 +0000
+++ b/src/arch/arm/isa.cc       Thu Feb 09 18:54:28 2017 -0500
@@ -594,7 +594,8 @@
         warn_once("The ccsidr register isn't implemented and "
                 "always reads as 0.\n");
         break;
-      case MISCREG_CTR:
+      case MISCREG_CTR:                 // AArch32, ARMv7, top bit set
+      case MISCREG_CTR_EL0:             // AArch64
         {
             //all caches have the same line size in gem5
             //4 byte words in ARM
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to