diff options
author | Mark Cave-Ayland | 2021-03-11 11:05:05 +0100 |
---|---|---|
committer | Laurent Vivier | 2021-03-16 21:41:37 +0100 |
commit | 30ca7eddc486646fa19c9619fcf233ceaa65e28c (patch) | |
tree | d0869e6d574b00d86499cdec9a9dd6d17b73fb39 /include | |
parent | mac_via: fix 60Hz VIA1 timer interval (diff) | |
download | qemu-30ca7eddc486646fa19c9619fcf233ceaa65e28c.tar.gz qemu-30ca7eddc486646fa19c9619fcf233ceaa65e28c.tar.xz qemu-30ca7eddc486646fa19c9619fcf233ceaa65e28c.zip |
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>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions