]> git.dujemihanovic.xyz Git - u-boot.git/commit
riscv: Adjust board_get_usable_ram_top() for 32-bit
authorBin Meng <bin.meng@windriver.com>
Sun, 31 Jan 2021 12:35:57 +0000 (20:35 +0800)
committerSimon Glass <sjg@chromium.org>
Wed, 3 Feb 2021 10:38:41 +0000 (03:38 -0700)
commit85c714d8dcd56f63c2c0ae1b0f6a7e4a96c918a4
tree2d185c829f6461849cfbf6d5988233d013506afe
parent7a3c628c43f7200684edf81783e11b69fd0fd7df
riscv: Adjust board_get_usable_ram_top() for 32-bit

When testing QEMU RISC-V 'virt' machine with a 2 GiB memory
configuration, it was discovered gd->ram_top is assigned to
value zero in setup_dest_addr().

While gd->ram_top should not be declared as type `unsigned long`,
which will be updated in a future patch, the current logic in
board_get_usable_ram_top() can be updated to cover both 64-bit
and 32-bit RISC-V.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
arch/riscv/cpu/fu540/dram.c
arch/riscv/cpu/generic/dram.c