aboutsummaryrefslogtreecommitdiff
path: root/target-arm
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@xilinx.com>2014-08-29 15:00:30 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-08-29 15:00:30 +0100
commit0614601cecc8e5d9c6c5fa606b39fe388a18583a (patch)
tree64e9b9e283a5b77234adf5008e05aab9ae3b62af /target-arm
parent942a155b2098d7cd9b6f93e251cd06fe11d96bcf (diff)
downloadqemu-0614601cecc8e5d9c6c5fa606b39fe388a18583a.zip
qemu-0614601cecc8e5d9c6c5fa606b39fe388a18583a.tar.gz
qemu-0614601cecc8e5d9c6c5fa606b39fe388a18583a.tar.bz2
target-arm: Implement pmccfiltr_write function
This is the function that is called when writing to the PMCCFILTR_EL0 register Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 73da3da6404855b17d5ae82975a32ff3a4dcae3d.1409025949.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm')
-rw-r--r--target-arm/helper.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index d213ed1..2b95f33 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -650,6 +650,14 @@ void pmccntr_sync(CPUARMState *env)
#endif
+static void pmccfiltr_write(CPUARMState *env, const ARMCPRegInfo *ri,
+ uint64_t value)
+{
+ pmccntr_sync(env);
+ env->cp15.pmccfiltr_el0 = value & 0x7E000000;
+ pmccntr_sync(env);
+}
+
static void pmcntenset_write(CPUARMState *env, const ARMCPRegInfo *ri,
uint64_t value)
{
@@ -801,6 +809,7 @@ static const ARMCPRegInfo v7_cp_reginfo[] = {
#endif
{ .name = "PMCCFILTR_EL0", .state = ARM_CP_STATE_AA64,
.opc0 = 3, .opc1 = 3, .crn = 14, .crm = 15, .opc2 = 7,
+ .writefn = pmccfiltr_write,
.access = PL0_RW, .accessfn = pmreg_access,
.type = ARM_CP_IO,
.fieldoffset = offsetof(CPUARMState, cp15.pmccfiltr_el0),