]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/misc/allwinner-h3-dramc: enforce 64-bit multiply when calculating row mirror address
authorNiek Linnenbank <nieklinnenbank@gmail.com>
Mon, 30 Mar 2020 12:18:58 +0000 (13:18 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 30 Mar 2020 12:18:58 +0000 (13:18 +0100)
commit34d8df2a1d8cd9f24e29cc9b27c233da471b2ad1
treef0170a1dde9d2d55c9fba071328f52c693c225bb
parentc251191eae40e0e26680d0d8a8a065735acadef8
hw/misc/allwinner-h3-dramc: enforce 64-bit multiply when calculating row mirror address

The allwinner_h3_dramc_map_rows function simulates row addressing behavior
when bootloader software attempts to detect the amount of available SDRAM.

Currently the line that calculates the 64-bit address of the mirrored row
uses a signed 32-bit multiply operation that in theory could result in the
upper 32-bit be all 1s. This commit ensures that the row mirror address
is calculated using only 64-bit operations.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Niek Linnenbank <nieklinnenbank@gmail.com>
Message-id: 20200323192944.5967-1-nieklinnenbank@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/misc/allwinner-h3-dramc.c