mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-02-01 05:40:38 -07:00
The armv7m systick timer is a 24-bit decrementing, wrap-on-zero, clear-on-write counter. Our current implementation has various bugs and dubious workarounds in it (for instance see https://bugs.launchpad.net/qemu/+bug/1872237). We have an implementation of a simple decrementing counter and we put a lot of effort into making sure it handles the interesting corner cases (like "spend a cycle at 0 before reloading") -- ptimer. Rewrite the systick timer to use a ptimer rather than a raw QEMU timer. Unfortunately this is a migration compatibility break, which will affect all M-profile boards. Among other bugs, this fixes https://bugs.launchpad.net/qemu/+bug/1872237 : now writes to SYST_CVR when the timer is enabled correctly do nothing; when the timer is enabled via SYST_CSR.ENABLE, the ptimer code will (because of POLICY_NO_IMMEDIATE_RELOAD) arrange that after one timer tick the counter is reloaded from SYST_RVR and then counts down from there, as the architecture requires. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20201015151829.14656-3-peter.maydell@linaro.org |
||
|---|---|---|
| .. | ||
| a9gtimer.c | ||
| allwinner-a10-pit.c | ||
| altera_timer.c | ||
| arm_mptimer.c | ||
| arm_timer.c | ||
| armv7m_systick.c | ||
| aspeed_timer.c | ||
| avr_timer16.c | ||
| bcm2835_systmr.c | ||
| cadence_ttc.c | ||
| cmsdk-apb-dualtimer.c | ||
| cmsdk-apb-timer.c | ||
| digic-timer.c | ||
| etraxfs_timer.c | ||
| exynos4210_mct.c | ||
| exynos4210_pwm.c | ||
| grlib_gptimer.c | ||
| hpet.c | ||
| i8254.c | ||
| i8254_common.c | ||
| imx_epit.c | ||
| imx_gpt.c | ||
| Kconfig | ||
| lm32_timer.c | ||
| meson.build | ||
| milkymist-sysctl.c | ||
| mips_gictimer.c | ||
| mss-timer.c | ||
| npcm7xx_timer.c | ||
| nrf51_timer.c | ||
| omap_gptimer.c | ||
| omap_synctimer.c | ||
| puv3_ost.c | ||
| pxa2xx_timer.c | ||
| renesas_cmt.c | ||
| renesas_tmr.c | ||
| sh_timer.c | ||
| slavio_timer.c | ||
| stm32f2xx_timer.c | ||
| trace-events | ||
| trace.h | ||
| xilinx_timer.c | ||