qemu-e2k/hw/misc
Philippe Mathieu-Daudé 98a8cc741d hw/misc/zynq_slcr: Avoid #DIV/0! error
Malicious user can set the feedback divisor for the PLLs
to zero, triggering a floating-point exception (SIGFPE).

As the datasheet [*] is not clear how hardware behaves
when these bits are zeroes, use the maximum divisor
possible (128) to avoid the software FPE.

[*] Zynq-7000 TRM, UG585 (v1.12.2)
    B.28 System Level Control Registers (slcr)
    -> "Register (slcr) ARM_PLL_CTRL"
    25.10.4 PLLs
    -> "Software-Controlled PLL Update"

Fixes: 38867cb7ec ("hw/misc/zynq_slcr: add clock generation for uarts")
Reported-by: Gaoning Pan <pgn@zju.edu.cn>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Damien Hedde <damien.hedde@greensocs.com>
Message-id: 20201210141610.884600-1-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-12-15 13:36:45 +00:00
..
macio macio: set user_creatable to false in macio_class_init() 2020-11-12 09:26:20 +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
applesmc.c nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
arm11scu.c
arm_integrator_debug.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04: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-cpuid.c
armsse-mhu.c
aspeed_scu.c misc: aspeed_scu: Update AST2600 silicon id register 2020-09-18 09:04:36 +02:00
aspeed_sdmc.c aspeed/sdmc: Simplify calculation of RAM bits 2020-09-01 14:21:51 +02:00
aspeed_xdma.c
auxbus.c auxbus: Move QOM macros to header 2020-08-27 14:04:55 -04:00
avr_power.c hw/misc: avr: Add limited support for power reduction device 2020-07-11 11:02:05 +02:00
bcm2835_cprman.c hw/misc/bcm2835_cprman: add sane reset values to the registers 2020-10-27 11:10:44 +00:00
bcm2835_mbox.c qom: Don't handle impossible object_property_get_link() failure 2020-07-10 15:18:08 +02:00
bcm2835_mphi.c
bcm2835_property.c qom: Don't handle impossible object_property_get_link() failure 2020-07-10 15:18:08 +02:00
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 i.MX6: Fix bad printf format specifiers 2020-12-10 11:44:55 +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_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
iotkit-sysctl.c qom: simplify object_find_property / object_class_find_property 2020-09-22 16:45:16 -04:00
iotkit-sysinfo.c
ivshmem.c Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
Kconfig hw/misc: add an EMC141{3,4} device model 2020-12-10 12:11:03 +01:00
led.c hw/misc/led: Emit a trace event when LED intensity has changed 2020-10-26 13:44:58 +01:00
mac_via.c mos6522: Rename QOM macros 2020-09-02 07:29:25 -04: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 an EMC141{3,4} device model 2020-12-10 12:11:03 +01: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 mos6522: Rename QOM macros 2020-09-02 07:29:25 -04:00
mps2-fpgaio.c hw/misc/mps2-fpgaio: Use the LED device 2020-10-26 13:44:58 +01:00
mps2-scc.c hw/misc/mps2-scc: Use the LED device 2020-10-26 13:44:58 +01: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 hw/timer: Adding watchdog for NPCM7XX Timer. 2020-10-27 11:10:01 +00:00
npcm7xx_gcr.c hw/misc: Add NPCM7xx System Global Control Registers device model 2020-09-14 14:24:15 +01:00
npcm7xx_rng.c hw/misc: Add npcm7xx random number generator 2020-10-27 11:10:10 +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 Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
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.c pvpanic: Advertise the PVPANIC_CRASHLOADED event support 2020-11-11 03:59:05 -05:00
sbsa_ec.c hw/misc/sbsa_ec : Add an embedded controller for sbsa-ref 2020-09-01 14:01:12 +01:00
sga.c Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
sifive_e_prci.c hw/riscv: Move sifive_e_prci model to hw/misc 2020-09-09 15:54:19 -07:00
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: Add backend drive support 2020-10-22 12:00:50 -07: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 Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
trace-events target-arm queue: 2020-10-29 11:40:04 +00:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
tz-mpc.c memory: Add IOMMUTLBEvent 2020-12-08 13:48:57 -05:00
tz-msc.c
tz-ppc.c
unimp.c hw/misc/unimp: Display the offset with width of the region size 2020-08-28 10:02:46 +01:00
vmcoreinfo.c
zynq_slcr.c hw/misc/zynq_slcr: Avoid #DIV/0! error 2020-12-15 13:36:45 +00:00
zynq-xadc.c