From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [PATCH] mac_newworld: change timebase frequency from 100MHz to 25MHz for mac99 machine
Date: Sat, 9 Mar 2024 18:51:12 +0100 [thread overview]
Message-ID: <f24730db-c9b4-4d08-b55c-bfdc594994bf@linaro.org> (raw)
In-Reply-To: <20240304073548.2098806-1-mark.cave-ayland@ilande.co.uk>
On 4/3/24 08:35, Mark Cave-Ayland wrote:
> MacOS X uses multiple techniques for calibrating timers depending upon the detected
> hardware. One of these calibration routines compares the change in the timebase
> against the KeyLargo timer and uses this to recalculate the clock frequency,
> timebase frequency and bus frequency if the calibration exceeds certain limits.
> This recalibration occurs despite the correct values being passed via the device
> tree, and is likely due to buggy firmware on some hardware.
>
> The timebase frequency of 100MHz was set way back in 2005 by commit fa296b0fb4
> ("PIC fix - changed back TB frequency to 100 MHz") and with this value on a
> mac99,via=pmu machine the OSX 10.2 timer calibration incorrectly calculates the
> bus frequency as 400MHz instead of 100MHz. The most noticeable side-effect is
> the UI appears sluggish and not very responsive for normal use.
>
> Change the timebase frequency from 100MHz to 25MHz which matches that of a real
> G4 AGP machine (the closest match to QEMU's mac99 machine) and allows OSX 10.2
> to correctly detect all of the clock frequency, timebase frequency and bus
> frequency.
>
> Tested on various MacOS images from OS 9.2 through to OSX 10.4, along with Linux
> and NetBSD and I was unable to find any regressions from this change.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
> hw/ppc/mac_newworld.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2024-03-09 17:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 7:35 [PATCH] mac_newworld: change timebase frequency from 100MHz to 25MHz for mac99 machine Mark Cave-Ayland
2024-03-09 17:51 ` Philippe Mathieu-Daudé [this message]
2024-03-11 8:38 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f24730db-c9b4-4d08-b55c-bfdc594994bf@linaro.org \
--to=philmd@linaro.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).