qemu-e2k/hw/misc
Mark Cave-Ayland 30ca7eddc4 mac_via: remove VIA1 timer optimisations
The original implementation of the Macintosh VIA devices in commit 6dca62a000
"hw/m68k: add VIA support" used timer optimisations to reduce high CPU usage on
the host when booting Linux. These optimisations worked by waiting until VIA1
port B was accessed before re-arming the timers.

The MacOS toolbox ROM constantly writes to VIA1 port B which calls
via1_one_second_update() and via1_sixty_hz_update() to calculate the new expiry
time, causing the timers to constantly reset and never fire. The effect of this
is that the Ticks (0x16a) global variable holding the number of 60Hz timer ticks
since reset is never incremented by the interrupt causing time to stand still.

Whilst the code was introduced as a performance optimisation, it is likely that
the high CPU usage was actually caused by the incorrect 60Hz timer interval
fixed in the previous patch. Remove the optimisation to keep everything simple
and enable the MacOS toolbox ROM to start keeping time.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210311100505.22596-8-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2021-03-16 21:41:37 +01:00
..
macio macio: don't set user_creatable to false 2021-01-13 12:21:21 +00:00
a9scu.c hw/misc/a9scu: Report unimplemented accesses with qemu_log_mask(UNIMP) 2020-09-14 14:23:19 +01:00
allwinner-cpucfg.c
allwinner-h3-ccu.c
allwinner-h3-dramc.c
allwinner-h3-sysctrl.c
allwinner-sid.c qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
applesmc.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
arm11scu.c
arm_integrator_debug.c arm: Update infocenter.arm.com URLs 2021-02-11 11:50:14 +00:00
arm_l2x0.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
arm_sysctl.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
armsse-cpu-pwrctrl.c hw/misc/sse-cpu-pwrctrl: Implement SSE-300 CPU<N>_PWRCTRL register block 2021-03-08 17:20:02 +00:00
armsse-cpuid.c hw/arm/mps2: Update old infocenter.arm.com URLs 2021-03-08 11:54:16 +00:00
armsse-mhu.c hw/arm/mps2: Update old infocenter.arm.com URLs 2021-03-08 11:54:16 +00:00
aspeed_lpc.c hw/misc: Model KCS devices in the Aspeed LPC controller 2021-03-09 12:01:28 +01:00
aspeed_scu.c misc: aspeed_scu: Update AST2600 silicon id register 2020-09-18 09:04:36 +02:00
aspeed_sdmc.c
aspeed_xdma.c Fix SPDX-License-Identifier typos 2021-02-20 12:36:19 +01:00
auxbus.c
avr_power.c
bcm2835_cprman.c clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
bcm2835_mbox.c
bcm2835_mphi.c
bcm2835_property.c
bcm2835_rng.c
bcm2835_thermal.c
cbus.c
debugexit.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
eccmemctl.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
edu.c qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
emc141x.c hw/misc: add an EMC141{3,4} device model 2020-12-10 12:11:03 +01:00
empty_slot.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
exynos4210_clk.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
exynos4210_pmu.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
exynos4210_rng.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
grlib_ahb_apb_pnp.c
imx6_ccm.c hw/msic: imx6_ccm: Correct register value for silicon type 2021-01-08 15:13:39 +00:00
imx6_src.c i.MX6: Fix bad printf format specifiers 2020-12-10 11:44:55 +00:00
imx6ul_ccm.c i.MX6ul: Fix bad printf format specifiers 2020-12-10 11:44:55 +00:00
imx7_ccm.c imx7-ccm: add digprog mmio write method 2021-02-08 15:15:32 +01:00
imx7_gpr.c
imx7_snvs.c
imx25_ccm.c i.MX25: Fix bad printf format specifiers 2020-12-10 11:44:55 +00:00
imx31_ccm.c i.MX31: Fix bad printf format specifiers 2020-12-10 11:44:55 +00:00
imx_ccm.c i.MX31: Fix bad printf format specifiers 2020-12-10 11:44:55 +00:00
imx_rngc.c
iotkit-secctl.c hw/misc/iotkit-secctl.c: Implement SSE-300 PID register values 2021-03-08 17:20:01 +00:00
iotkit-sysctl.c hw/misc/iotkit-sysctl: Implement SSE-200 and SSE-300 PID register values 2021-03-08 17:20:02 +00:00
iotkit-sysinfo.c hw/misc/iotkit-sysinfo.c: Implement SYS_CONFIG1 and IIDR 2021-03-08 17:20:01 +00:00
ivshmem.c qtest: delete superfluous inclusions of qtest.h 2021-03-09 06:03:53 +01:00
Kconfig hw/misc/sse-cpu-pwrctrl: Implement SSE-300 CPU<N>_PWRCTRL register block 2021-03-08 17:20:02 +00:00
led.c hw/misc/led: Add yellow LED 2021-03-15 00:39:30 +01:00
mac_via.c mac_via: remove VIA1 timer optimisations 2021-03-16 21:41:37 +01:00
max111x.c hw/ssi: Rename SSI 'slave' as 'peripheral' 2020-12-10 12:15:03 -05:00
mchp_pfsoc_dmc.c hw/misc: Add Microchip PolarFire SoC DDR Memory Controller support 2020-11-03 07:17:23 -08:00
mchp_pfsoc_ioscb.c hw/misc: Add Microchip PolarFire SoC IOSCB module support 2020-11-03 07:17:23 -08:00
mchp_pfsoc_sysreg.c hw/misc: Add Microchip PolarFire SoC SYSREG module support 2020-11-03 07:17:23 -08:00
meson.build hw/misc: Add NPCM7XX MFT Module 2021-03-12 12:48:56 +00:00
milkymist-hpdmc.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
milkymist-pfpu.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
mips_cmgcr.c
mips_cpc.c hw/mips: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00
mips_itu.c hw/mips: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00
mos6522.c misc/mos6522: Use timer_free() in the finalize function to avoid memleak 2021-01-18 11:51:26 +01:00
mps2-fpgaio.c hw/misc/mps2-fpgaio: Support AN547 DBGCTRL register 2021-03-08 17:20:03 +00:00
mps2-scc.c hw/misc/mps2-scc: Implement changes for AN547 2021-03-08 17:20:03 +00:00
msf2-sysreg.c
mst_fpga.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
npcm7xx_clk.c clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
npcm7xx_gcr.c hw/*: Use type casting for SysBusDevice in NPCM7XX 2021-01-12 21:19:02 +00:00
npcm7xx_mft.c hw/misc: Add NPCM7XX MFT Module 2021-03-12 12:48:56 +00:00
npcm7xx_pwm.c hw/misc: Add GPIOs for duty in NPCM7xx PWM 2021-03-12 12:48:56 +00:00
npcm7xx_rng.c hw/*: Use type casting for SysBusDevice in NPCM7XX 2021-01-12 21:19:02 +00:00
nrf51_rng.c
omap_clk.c
omap_gpmc.c
omap_l4.c
omap_sdrc.c
omap_tap.c
pc-testdev.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pca9552.c
pci-testdev.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
puv3_pm.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pvpanic-isa.c hw/misc/pvpanic: split-out generic and bus dependent code 2021-01-29 10:47:28 +00:00
pvpanic-pci.c hw/misc/pvpanic: add PCI interface support 2021-01-29 10:47:28 +00:00
pvpanic.c hw/misc/pvpanic: split-out generic and bus dependent code 2021-01-29 10:47:28 +00:00
sbsa_ec.c Fix SPDX-License-Identifier typos 2021-02-20 12:36:19 +01:00
sga.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
sifive_e_prci.c
sifive_test.c hw/riscv: Move sifive_test model to hw/misc 2020-09-09 15:54:19 -07:00
sifive_u_otp.c hw/misc: sifive_u_otp: Use error_report() when block operation fails 2021-03-04 09:43:29 -05:00
sifive_u_prci.c hw/riscv: Move sifive_u_prci model to hw/misc 2020-09-09 15:54:19 -07:00
slavio_misc.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
stm32f2xx_syscfg.c hw/misc/stm32f2xx_syscfg: Remove extraneous IRQ 2020-11-10 11:03:48 +00:00
stm32f4xx_exti.c
stm32f4xx_syscfg.c
tmp105.c tmp105: Correct handling of temperature limit checks 2020-11-17 12:56:33 +00:00
tmp105.h tmp105: Correct handling of temperature limit checks 2020-11-17 12:56:33 +00:00
tmp421.c tmp421: Register properties as class properties 2020-12-14 14:25:44 -05:00
trace-events mac_via: switch rtc pram trace-events to use hex rather than decimal for addresses 2021-03-16 21:41:37 +01:00
trace.h
tz-mpc.c memory: Add IOMMUTLBEvent 2020-12-08 13:48:57 -05:00
tz-msc.c
tz-ppc.c tz-ppc: add dummy read/write methods 2021-02-08 15:15:32 +01:00
unimp.c
vmcoreinfo.c
xlnx-versal-xramc.c hw/misc: versal: Add a model of the XRAM controller 2021-03-12 12:40:09 +00:00
zynq_slcr.c clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
zynq-xadc.c