]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm: Implement SEL2 physical and virtual timers
authorAlex Bennée <alex.bennee@linaro.org>
Fri, 7 Mar 2025 10:08:21 +0000 (10:08 +0000)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 18 Mar 2025 06:02:48 +0000 (09:02 +0300)
commitab37d6bd8917da6130a22a11c5d6e32b31f7d5d4
tree0fb638e78716fd43db23de4ac81ed88a0f82d6fd
parent739dabb1ad26c750fdf6df469e442ab8591c3090
target/arm: Implement SEL2 physical and virtual timers

When FEAT_SEL2 was implemented the SEL2 timers were missed. This
shows up when building the latest Hafnium with SPMC_AT_EL=2. The
actual implementation utilises the same logic as the rest of the
timers so all we need to do is:

  - define the timers and their access functions
  - conditionally add the correct system registers
  - create a new accessfn as the rules are subtly different to the
    existing secure timer

Fixes: e9152ee91c (target/arm: add ARMv8.4-SEL2 system registers)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20250204125009.2281315-7-peter.maydell@linaro.org
Cc: qemu-stable@nongnu.org
Cc: Andrei Homescu <ahomescu@google.com>
Cc: Arve Hjønnevåg <arve@google.com>
Cc: Rémi Denis-Courmont <remi.denis.courmont@huawei.com>
[PMM: CP_ACCESS_TRAP_UNCATEGORIZED -> CP_ACCESS_UNDEFINED;
 offset logic now in gt_{indirect,direct}_access_timer_offset() ]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit f9f99d7ca522339c1de2292f132bb8ddc3471c39)
(Mjt: CP_ACCESS_UNDEFINED -> CP_ACCESS_TRAP_UNCATEGORIZED)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
include/hw/arm/bsa.h
target/arm/cpu.c
target/arm/cpu.h
target/arm/gtimer.h
target/arm/helper.c