qemu/include/hw/misc
Mark Cave-Ayland 366d27796c mac_via: work around underflow in TimeDBRA timing loop in SETUPTIMEK
The MacOS toolbox ROM calculates the number of branches that can be executed
per millisecond as part of its timer calibration. Since modern hosts are
considerably quicker than original hardware, the negative counter reaches zero
before the calibration completes leading to division by zero later in
CALCULATESLOD.

Instead of trying to fudge the timing loop (which won't work for TimeDBRA/TimeSCCDB
anyhow), use the pattern of access to the VIA1 registers to detect when SETUPTIMEK
has finished executing and write some well-known good timer values to TimeDBRA
and TimeSCCDB taken from real hardware with a suitable scaling factor.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-ID: <20231004083806.757242-15-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2023-10-06 10:33:43 +02:00
..
macio include/: spelling fixes 2023-09-08 13:08:52 +03:00
a9scu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-a10-ccm.h hw/misc: Allwinner-A10 Clock Controller Module Emulation 2023-01-12 16:50:19 +00:00
allwinner-a10-dramc.h hw/misc: Allwinner A10 DRAM Controller Emulation 2023-01-12 16:50:19 +00:00
allwinner-cpucfg.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-h3-ccu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-h3-dramc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-h3-sysctrl.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-r40-ccu.h hw/arm/allwinner-r40: add Clock Control Unit 2023-06-06 10:19:31 +01:00
allwinner-r40-dramc.h hw/arm/allwinner-r40: add SDRAM controller device 2023-06-06 10:19:32 +01:00
allwinner-sid.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
allwinner-sramc.h hw: arm: allwinner-sramc: Add SRAM Controller support for R40 2023-06-06 10:19:33 +01:00
arm11scu.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
arm_integrator_debug.h arm: Update infocenter.arm.com URLs 2021-02-11 11:50:14 +00:00
armsse-cpu-pwrctrl.h hw/misc/sse-cpu-pwrctrl: Implement SSE-300 CPU<N>_PWRCTRL register block 2021-03-08 17:20:02 +00:00
armsse-cpuid.h hw/arm/mps2: Update old infocenter.arm.com URLs 2021-03-08 11:54:16 +00:00
armsse-mhu.h hw/arm/mps2: Update old infocenter.arm.com URLs 2021-03-08 11:54:16 +00:00
armv7m_ras.h arm: Move M-profile RAS register block into its own device 2021-09-01 11:08:18 +01:00
aspeed_hace.h Clean up decorations and whitespace around header guards 2022-05-11 16:50:32 +02:00
aspeed_i3c.h hw/misc/aspeed_i3c.c: Introduce a dummy AST2600 I3C model. 2022-01-20 11:47:53 +00:00
aspeed_lpc.h Don't include headers already included by qemu/osdep.h 2023-02-08 07:28:05 +01:00
aspeed_peci.h hw/misc/aspeed: Add PECI controller 2022-06-30 09:21:14 +02:00
aspeed_sbc.h aspeed: sbc: Allow per-machine settings 2022-07-14 16:24:38 +02:00
aspeed_scu.h bulk: Do not declare function prototypes using 'extern' keyword 2023-08-31 19:47:43 +02:00
aspeed_sdmc.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
aspeed_xdma.h hw/misc/aspeed_xdma: Add AST2600 support 2021-05-01 10:03:52 +02:00
auxbus.h hw/i2c: spelling fixes 2023-08-31 19:47:43 +02:00
avr_power.h hw: Remove superfluous includes of hw/hw.h 2021-05-02 17:24:50 +02:00
bcm2835_cprman_internals.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
bcm2835_cprman.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
bcm2835_mbox_defs.h hw/arm/bcm283x: Correct the license text 2020-03-23 17:22:30 +00:00
bcm2835_mbox.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_mphi.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_powermgt.h hw/arm: Add basic power management to raspi. 2021-07-02 11:48:36 +01:00
bcm2835_property.h hw/arm/bcm2835_property: Implement "get command line" message 2023-05-02 15:47:40 +01:00
bcm2835_rng.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
bcm2835_thermal.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
cbus.h Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
djmemc.h q800: add djMEMC memory controller 2023-10-06 10:33:43 +02:00
empty_slot.h hw/misc/empty_slot: Name the slots when created 2020-06-09 06:59:44 +02:00
grlib_ahb_apb_pnp.h hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
imx6_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx6_src.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx6ul_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx7_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx7_gpr.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx7_snvs.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx7_src.h Add i.MX7 SRC device implementation 2023-08-31 09:45:17 +01:00
imx25_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx31_ccm.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx_ccm.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
imx_rngc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
iosb.h q800: add IOSB subsystem 2023-10-06 10:33:43 +02:00
iotkit-secctl.h hw/misc/iotkit-secctl.c: Implement SSE-300 PID register values 2021-03-08 17:20:01 +00:00
iotkit-sysctl.h hw/misc/iotkit-sysctl: Handle SSE-300 changes to PDCM_PD_*_SENSE registers 2021-03-08 17:20:02 +00:00
iotkit-sysinfo.h hw/misc/iotkit-sysinfo.c: Implement SYS_CONFIG1 and IIDR 2021-03-08 17:20:01 +00:00
ivshmem.h ivshmem: add check on protocol version in QEMU 2015-10-24 18:03:18 +02:00
lasi.h lasi: fix RTC migration 2023-04-20 11:17:35 +02:00
led.h hw/misc/led: Add yellow LED 2021-03-15 00:39:30 +01:00
mac_via.h mac_via: work around underflow in TimeDBRA timing loop in SETUPTIMEK 2023-10-06 10:33:43 +02:00
mchp_pfsoc_dmc.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
mchp_pfsoc_ioscb.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
mchp_pfsoc_sysreg.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
mips_cmgcr.h hw/mips: Declare all length properties as unsigned 2023-03-08 00:37:48 +01:00
mips_cpc.h hw/mips: Fix Lesser GPL version number 2020-11-03 16:51:13 +01:00
mips_itu.h hw/mips/itu: Pass SAAR using QOM link property 2023-03-08 00:37:48 +01:00
mos6522.h input/adb: Only include header where needed 2023-02-06 11:41:39 +00:00
mps2-fpgaio.h hw/misc/mps2-fpgaio: Support AN547 DBGCTRL register 2021-03-08 17:20:03 +00:00
mps2-scc.h hw/misc/mps2-scc: Support using CFG0 bit 0 for remapping 2021-05-10 17:21:54 +01:00
msf2-sysreg.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
npcm7xx_clk.h hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() 2023-01-12 17:15:09 +00:00
npcm7xx_gcr.h hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() 2023-01-12 17:15:09 +00:00
npcm7xx_mft.h hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() 2023-01-12 17:15:09 +00:00
npcm7xx_pwm.h hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() 2023-01-12 17:15:09 +00:00
npcm7xx_rng.h hw/arm/npcm7xx: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() 2023-01-12 17:15:09 +00:00
nrf51_rng.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pca9552_regs.h misc: add pca9552 LED blinker model 2018-06-08 13:15:32 +01:00
pca9552.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
pvpanic.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
raspberrypi-fw-defs.h hw/arm/raspi: Import Linux raspi definitions as 'raspberrypi-fw-defs.h' 2023-06-19 15:27:21 +01:00
sifive_e_aon.h hw/misc: sifive_e_aon: Support the watchdog timer of HiFive 1 rev b. 2023-07-10 22:29:14 +10:00
sifive_e_prci.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
sifive_test.h sifive: Use DECLARE_*CHECKER* macros 2020-09-18 13:49:48 -04:00
sifive_u_otp.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
sifive_u_prci.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
stm32f2xx_syscfg.h hw/misc/stm32f2xx_syscfg: Remove extraneous IRQ 2020-11-10 11:03:48 +00:00
stm32f4xx_exti.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
stm32f4xx_syscfg.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tz-mpc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
tz-msc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
tz-ppc.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
unimp.h Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
virt_ctrl.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
vmcoreinfo.h qom: fix objects with improper parent type 2020-10-12 11:50:22 -04:00
xlnx-cfi-if.h hw/misc: Introduce the Xilinx CFI interface 2023-09-08 16:41:34 +01:00
xlnx-versal-cframe-reg.h hw/misc: Introduce a model of Xilinx Versal's CFRAME_BCAST_REG 2023-09-08 16:41:35 +01:00
xlnx-versal-cfu.h hw/misc/xlnx-versal-cfu: Introduce a model of Xilinx Versal's CFU_SFR 2023-09-08 16:41:35 +01:00
xlnx-versal-crl.h hw/misc: Add a model of the Xilinx Versal CRL 2022-04-21 11:37:03 +01:00
xlnx-versal-pmc-iou-slcr.h include: Include headers where needed 2023-01-08 01:54:22 -05:00
xlnx-versal-xramc.h hw/misc: versal: Add a model of the XRAM controller 2021-03-12 12:40:09 +00:00
xlnx-zynqmp-apu-ctrl.h hw/misc: Move some arm-related files from specific_ss into softmmu_ss 2022-12-15 17:37:47 +00:00
xlnx-zynqmp-crf.h hw/misc: Add a model of the Xilinx ZynqMP CRF 2022-03-18 11:31:20 +00:00