mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
test/py: Update u_boot_utils.find_ram_base to bypass the low 2MiB memory
On some RISC-V targets the low memory is protected that prevents S-mode U-Boot from access. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
a379d330a9
commit
b2c2608161
1 changed files with 4 additions and 3 deletions
|
@ -237,9 +237,10 @@ def find_ram_base(u_boot_console):
|
|||
raise Exception('Failed to find RAM bank start in `bdinfo`')
|
||||
|
||||
# We don't want ram_base to be zero as some functions test if the given
|
||||
# address is NULL (0). Let's add 2MiB then (size of an ARM LPAE/v8 section).
|
||||
# address is NULL (0). Besides, on some RISC-V targets the low memory
|
||||
# is protected that prevents S-mode U-Boot from access.
|
||||
# Let's add 2MiB then (size of an ARM LPAE/v8 section).
|
||||
|
||||
if ram_base == 0:
|
||||
ram_base += 1024 * 1024 * 2
|
||||
|
||||
return ram_base
|
||||
|
|
Loading…
Reference in a new issue