qemu-e2k/hw/ppc
Mark Cave-Ayland 78abf93cc7 mac_newworld: change timebase frequency from 100MHz to 25MHz for mac99 machine
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>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240304073548.2098806-1-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-03-09 19:17:01 +01:00
..
amigaone.c ppc/amigaone: Allow running AmigaOS without firmware image 2023-11-30 22:13:00 +10:00
e500-ccsr.h
e500.c hw/ppc: use pci_init_nic_devices() 2024-02-02 16:23:47 +00:00
e500.h
e500plat.c
fdt.c
fw_cfg.c
Kconfig hw/usb: extract sysbus-ohci to a separate file 2024-02-27 09:37:25 +01:00
mac_newworld.c mac_newworld: change timebase frequency from 100MHz to 25MHz for mac99 machine 2024-03-09 19:17:01 +01:00
mac_oldworld.c hw/ppc: use pci_init_nic_devices() 2024-02-02 16:23:47 +00:00
meson.build ppc/pnv: Add POWER9/10 chiptod model 2024-02-23 23:24:43 +10:00
mpc8544_guts.c
mpc8544ds.c
pef.c
pegasos2.c hw/ppc/pegasos2: Let pegasos2 machine configure SuperI/O functions 2024-02-14 06:09:32 -05:00
pnv_bmc.c hw/ppc/pnv_bmc: Use qdev_new() instead of QOM API 2024-02-22 12:47:40 +01:00
pnv_chiptod.c ppc/pnv: Implement the ChipTOD to Core transfer 2024-02-23 23:24:43 +10:00
pnv_core.c
pnv_homer.c
pnv_i2c.c ppc/pnv: Test pnv i2c master and connected devices 2024-02-23 23:24:42 +10:00
pnv_lpc.c
pnv_n1_chiplet.c hw/ppc: Add N1 chiplet model 2024-02-23 23:24:42 +10:00
pnv_nest_pervasive.c hw/ppc: Add pnv nest pervasive common chiplet model 2024-02-23 23:24:42 +10:00
pnv_occ.c
pnv_pnor.c
pnv_psi.c
pnv_sbe.c
pnv_xscom.c
pnv.c ppc/pnv: Implement the ChipTOD to Core transfer 2024-02-23 23:24:43 +10:00
ppc4xx_devs.c
ppc4xx_sdram.c
ppc405_boards.c
ppc405_uc.c
ppc405.h
ppc440_bamboo.c hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h 2024-02-22 12:47:40 +01:00
ppc440_uc.c hw/ppc/ppc4xx_pci: Extract PCI host definitions to hw/pci-host/ppc4xx.h 2024-02-22 12:47:40 +01:00
ppc440.h
ppc_booke.c
ppc.c qemu/main-loop: rename QEMU_IOTHREAD_LOCK_GUARD to BQL_LOCK_GUARD 2024-01-08 10:45:43 -05:00
ppce500_spin.c
prep_systemio.c hw/ppc: Constify VMState 2023-12-30 07:38:06 +11:00
prep.c hw/ppc/prep: Realize ISA bridge before accessing it 2024-02-15 16:58:46 +01:00
rs6000_mc.c hw: Simplify memory_region_init_ram() calls 2024-01-05 16:20:15 +01:00
sam460ex.c hw/ppc/sam460ex: do not use usb_bus_find() 2024-02-27 09:37:03 +01:00
spapr_caps.c hw/ppc: Constify VMState 2023-12-30 07:38:06 +11:00
spapr_cpu_core.c hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API 2024-02-22 12:47:40 +01:00
spapr_drc.c hw/ppc: Constify VMState 2023-12-30 07:38:06 +11:00
spapr_events.c qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql() 2024-01-08 10:45:43 -05:00
spapr_hcall.c hw/ppc/spapr_hcall: Rename {softmmu -> vhyp_mmu}_resize_hpt_pr 2024-02-23 23:24:42 +10:00
spapr_iommu.c hw/ppc: Constify VMState 2023-12-30 07:38:06 +11:00
spapr_irq.c ppc/spapr: Introduce SPAPR_IRQ_NR_IPIS to refer IRQ range for CPU IPIs. 2024-02-23 23:24:42 +10:00
spapr_nested.c
spapr_numa.c
spapr_nvdimm.c hw/ppc: Constify VMState 2023-12-30 07:38:06 +11:00
spapr_ovec.c hw/ppc: Constify VMState 2023-12-30 07:38:06 +11:00
spapr_pci_vfio.c hw/ppc/Kconfig: Imply VFIO_PCI 2023-12-19 19:03:38 +01:00
spapr_pci.c hw/ppc: Constify VMState 2023-12-30 07:38:06 +11:00
spapr_rng.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
spapr_rtas_ddw.c
spapr_rtas.c
spapr_rtc.c hw/ppc: Constify VMState 2023-12-30 07:38:06 +11:00
spapr_tpm_proxy.c
spapr_vhyp_mmu.c hw/ppc/spapr: Rename 'softmmu' -> 'vhyp_mmu' 2024-02-23 23:24:42 +10:00
spapr_vio.c hw/ppc: Constify VMState 2023-12-30 07:38:06 +11:00
spapr_vof.c
spapr.c hw/ppc/pseries: do not require CONFIG_USB 2024-02-27 09:37:18 +01:00
trace-events ppc/pnv: Add POWER9/10 chiptod model 2024-02-23 23:24:43 +10:00
trace.h
virtex_ml507.c
vof.c