summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhujiale <[email protected]>2024-11-15 18:56:52 +0800
committerMeco Man <[email protected]>2024-11-17 21:13:07 -0500
commit44515624e25230f5ec2157c5293fba9e431569db (patch)
treec56a93eb4eaff2606182f9f83cb99b16f4c867af
parent96da7abd3e1dc30d901220b2c14e89ea9ecd096c (diff)
[libcpu] fix No memory higher than 1 GB is mapped
-rw-r--r--libcpu/aarch64/common/setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcpu/aarch64/common/setup.c b/libcpu/aarch64/common/setup.c
index c8de62137c..d64dfc9811 100644
--- a/libcpu/aarch64/common/setup.c
+++ b/libcpu/aarch64/common/setup.c
@@ -237,14 +237,14 @@ void rt_hw_common_setup(void)
/* To virtual address */
fdt_ptr = (void *)(fdt_ptr - pv_off);
-
+#ifdef KERNEL_VADDR_START
if ((rt_ubase_t)fdt_ptr + fdt_size - KERNEL_VADDR_START > SIZE_GB)
{
fdt_ptr = rt_ioremap_early(fdt_ptr + pv_off, fdt_size);
RT_ASSERT(fdt_ptr != RT_NULL);
}
-
+#endif
rt_memmove((void *)(fdt_start - pv_off), fdt_ptr, fdt_size);
fdt_ptr = (void *)fdt_start - pv_off;