summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2017-12-19 21:43:51 +0000
committerNikos Nikoleris <nikos.nikoleris@arm.com>2018-02-07 16:14:39 +0000
commit760e2eb6f4e40080a49e6372284c5213bf95475a (patch)
treeea44514200a121ce3e653ca635adbd5e514a7fec /src/arch/arm/isa
parentf4e27c3ff56894e738bd2a975646b5a07d9ea75c (diff)
downloadgem5-760e2eb6f4e40080a49e6372284c5213bf95475a.tar.xz
arch-arm: Fix cache line size for cache maintenace inst
Cache maintenance operations operate on whole cache blocks. This changeset uses the system cache line size as the size of the cache maintenance requests and masks the lower bits of the effective address. Change-Id: I6e7aefff51670c8cac39e4e73db21a0c5a0b7aef Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/7824 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/arch/arm/isa')
-rw-r--r--src/arch/arm/isa/templates/misc.isa14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/arch/arm/isa/templates/misc.isa b/src/arch/arm/isa/templates/misc.isa
index 639ff3aca..6d63b8e14 100644
--- a/src/arch/arm/isa/templates/misc.isa
+++ b/src/arch/arm/isa/templates/misc.isa
@@ -1,6 +1,6 @@
// -*- mode:c++ -*-
-// Copyright (c) 2010-2013,2017 ARM Limited
+// Copyright (c) 2010-2013,2017-2018 ARM Limited
// All rights reserved
//
// The license below extends only to copyright in the software and shall
@@ -646,9 +646,9 @@ def template Mcr15Execute {{
}
if (fault == NoFault) {
- Addr size = 64;
- EA &= ~(size - 1);
- fault = xc->writeMem(NULL, size, EA, memAccessFlags, NULL);
+ Addr op_size = xc->tcBase()->getSystemPtr()->cacheLineSize();
+ EA &= ~(op_size - 1);
+ fault = xc->writeMem(NULL, op_size, EA, memAccessFlags, NULL);
}
} else {
xc->setPredicate(false);
@@ -675,9 +675,9 @@ def template Mcr15InitiateAcc {{
}
if (fault == NoFault) {
- Addr size = 64;
- EA &= ~(size - 1);
- fault = xc->writeMem(NULL, size, EA, memAccessFlags, NULL);
+ Addr op_size = xc->tcBase()->getSystemPtr()->cacheLineSize();
+ EA &= ~(op_size - 1);
+ fault = xc->writeMem(NULL, op_size, EA, memAccessFlags, NULL);
}
} else {
xc->setPredicate(false);