qemu/target
Peter Maydell bd8e9ddf6f target/arm: Refactor default generic timer frequency handling
The generic timer frequency is settable by board code via a QOM
property "cntfrq", but otherwise defaults to 62.5MHz.  The way this
is done includes some complication resulting from how this was
originally a fixed value with no QOM property.  Clean it up:

 * always set cpu->gt_cntfrq_hz to some sensible value, whether
   the CPU has the generic timer or not, and whether it's system
   or user-only emulation
 * this means we can always use gt_cntfrq_hz, and never need
   the old GTIMER_SCALE define
 * set the default value in exactly one place, in the realize fn

The aim here is to pave the way for handling the ARMv8.6 requirement
that the generic timer frequency is always 1GHz.  We're going to do
that by having old CPU types keep their legacy-in-QEMU behaviour and
having the default for any new CPU types be a 1GHz rather han 62.5MHz
cntfrq, so we want the point where the default is decided to be in
one place, and in code, not in a DEFINE_PROP_UINT64() initializer.

This commit should have no behavioural changes.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240426122913.3427983-2-peter.maydell@linaro.org
2024-04-30 15:14:15 +01:00
..
alpha target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
arm target/arm: Refactor default generic timer frequency handling 2024-04-30 15:14:15 +01:00
avr target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
cris hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
hexagon accel: Include missing 'exec/cpu_ldst.h' header 2024-04-26 15:31:37 +02:00
hppa target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
i386 accel/hvf: Use accel-specific per-vcpu @dirty field 2024-04-26 17:03:00 +02:00
loongarch target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
m68k hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
microblaze target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
mips target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
openrisc target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
ppc exec: Declare CPUBreakpoint/CPUWatchpoint type in 'breakpoint.h' header 2024-04-26 17:03:05 +02:00
riscv exec: Declare CPUBreakpoint/CPUWatchpoint type in 'breakpoint.h' header 2024-04-26 17:03:05 +02:00
rx hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
s390x target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
sh4 hw, target: Add ResetType argument to hold and exit phase methods 2024-04-25 10:21:06 +01:00
sparc target/sparc: Replace abi_ulong by uint32_t for TARGET_ABI32 2024-04-26 15:31:37 +02:00
tricore gdbstub: Avoid including 'cpu.h' in 'gdbstub/helpers.h' 2024-04-26 15:31:37 +02:00
xtensa target: Define TCG_GUEST_DEFAULT_MO in 'cpu-param.h' 2024-04-26 15:31:37 +02:00
Kconfig target/nios2: Remove the deprecated Nios II target 2024-04-24 16:03:38 +02:00
meson.build exec: Expose 'target_page.h' API to user emulation 2024-04-26 15:28:11 +02:00