qemu/target
Peter Maydell f037f5b4b9 target/arm: Default to 1GHz cntfrq for 'max' and new CPUs
In previous versions of the Arm architecture, the frequency of the
generic timers as reported in CNTFRQ_EL0 could be any IMPDEF value,
and for QEMU we picked 62.5MHz, giving a timer tick period of 16ns.
In Armv8.6, the architecture standardized this frequency to 1GHz.

Because there is no ID register feature field that indicates whether
a CPU is v8.6 or that it ought to have this counter frequency, we
implement this by changing our default CNTFRQ value for all CPUs,
with exceptions for backwards compatibility:

 * CPU types which we already implement will retain the old
   default value. None of these are v8.6 CPUs, so this is
   architecturally OK.
 * CPUs used in versioned machine types with a version of 9.0
   or earlier will retain the old default value.

The upshot is that the only CPU type that changes is 'max'; but any
new type we add in future (whether v8.6 or not) will also get the new
1GHz default.

It remains the case that the machine model can override the default
value via the 'cntfrq' QOM property (regardless of the CPU type).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240426122913.3427983-5-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: Default to 1GHz cntfrq for 'max' and new CPUs 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