diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2020-03-28 07:25:28 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-10 15:54:16 -0400 |
commit | b2c2608161c997a1ffeb2091ff77c845f602524d (patch) | |
tree | 1ed59dec556080c1d07fa0ff1b34f7a664f7cc40 /test | |
parent | a379d330a963236d3202e8824a07c06e2e204f26 (diff) | |
download | u-boot-b2c2608161c997a1ffeb2091ff77c845f602524d.tar.gz u-boot-b2c2608161c997a1ffeb2091ff77c845f602524d.tar.xz u-boot-b2c2608161c997a1ffeb2091ff77c845f602524d.zip |
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>
Diffstat (limited to 'test')
-rw-r--r-- | test/py/u_boot_utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/py/u_boot_utils.py b/test/py/u_boot_utils.py index bf2a0fc0e2..939d82eec1 100644 --- a/test/py/u_boot_utils.py +++ b/test/py/u_boot_utils.py @@ -237,10 +237,11 @@ 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 + ram_base += 1024 * 1024 * 2 return ram_base |