[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 22/36] hw/arm/allwinner-h3: add SDRAM controller device
From: |
Peter Maydell |
Subject: |
Re: [PULL 22/36] hw/arm/allwinner-h3: add SDRAM controller device |
Date: |
Sun, 22 Mar 2020 21:17:50 +0000 |
On Sun, 22 Mar 2020 at 20:23, Niek Linnenbank <address@hidden> wrote:
> On Fri, Mar 20, 2020 at 4:46 PM Peter Maydell <address@hidden> wrote:
>> In this calculation we do the multiply as a signed 32-bit operation,
>> which then gets sign-extended to 64 bits for the addition; that
>> means that if the multiply result is greater than 0x7fffffff then
>> the upper bits of the result will all be 1s. Is this a "can't happen"
>> situation, or should we be using "1ULL" to force a 64-bit multiply?
> However in theory, the Control register can indeed be written with larger
> page_size values.
> So to be safe, I'll just make a small patch to replace the 1 with 1UL, thanks!
"1ULL", not "1UL". The former guarantees you a 64-bit constant,
the latter does not: it depends on the size of 'long' on the host.
(Usually using "UL" suffixes in QEMU is a bug, because either 32
bits was fine, in which case "U" or no suffix would have done,
or you really needed 64 bits, in which case you need "ULL". There
are some exceptions where the code really is working with "long"
values.)
thanks
-- PMM
- [PULL 24/36] tests/boot_linux_console: Add a quick test for the OrangePi PC board, (continued)
- [PULL 24/36] tests/boot_linux_console: Add a quick test for the OrangePi PC board, Peter Maydell, 2020/03/12
- [PULL 25/36] tests/boot_linux_console: Add initrd test for the Orange Pi PC board, Peter Maydell, 2020/03/12
- [PULL 26/36] tests/boot_linux_console: Add a SD card test for the OrangePi PC board, Peter Maydell, 2020/03/12
- [PULL 20/36] hw/arm/allwinner-h3: add EMAC ethernet device, Peter Maydell, 2020/03/12
- [PULL 23/36] hw/arm/allwinner: add RTC device support, Peter Maydell, 2020/03/12
- [PULL 28/36] tests/boot_linux_console: Test booting NetBSD via U-Boot on OrangePi PC, Peter Maydell, 2020/03/12
- [PULL 31/36] hw/arm/virt: Introduce VirtGICType enum type, Peter Maydell, 2020/03/12
- [PULL 22/36] hw/arm/allwinner-h3: add SDRAM controller device, Peter Maydell, 2020/03/12
- [PULL 19/36] hw/arm/allwinner: add SD/MMC host controller, Peter Maydell, 2020/03/12
- [PULL 27/36] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC, Peter Maydell, 2020/03/12
- [PULL 33/36] target/arm/kvm: Let kvm_arm_vgic_probe() return a bitmap, Peter Maydell, 2020/03/12
- [PULL 30/36] hw/arm/virt: Document 'max' value in gic-version property description, Peter Maydell, 2020/03/12
- [PULL 34/36] hw/arm/virt: kvm: Restructure finalize_gic_version(), Peter Maydell, 2020/03/12
- [PULL 35/36] hw/arm/virt: kvm: allow gicv3 by default if v2 cannot work, Peter Maydell, 2020/03/12
- [PULL 29/36] docs: add Orange Pi PC document, Peter Maydell, 2020/03/12
- [PULL 32/36] hw/arm/virt: Introduce finalize_gic_version(), Peter Maydell, 2020/03/12
- [PULL 36/36] target/arm: kvm: Inject events at the last stage of sync, Peter Maydell, 2020/03/12
- Re: [PULL 00/36] target-arm queue, Peter Maydell, 2020/03/12