Skip to content

Commit 4451562

Browse files
zhuzhuzhusmysterywolf
authored andcommitted
[libcpu] fix No memory higher than 1 GB is mapped
1 parent 96da7ab commit 4451562

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcpu/aarch64/common/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,14 @@ void rt_hw_common_setup(void)
237237

238238
/* To virtual address */
239239
fdt_ptr = (void *)(fdt_ptr - pv_off);
240-
240+
#ifdef KERNEL_VADDR_START
241241
if ((rt_ubase_t)fdt_ptr + fdt_size - KERNEL_VADDR_START > SIZE_GB)
242242
{
243243
fdt_ptr = rt_ioremap_early(fdt_ptr + pv_off, fdt_size);
244244

245245
RT_ASSERT(fdt_ptr != RT_NULL);
246246
}
247-
247+
#endif
248248
rt_memmove((void *)(fdt_start - pv_off), fdt_ptr, fdt_size);
249249
fdt_ptr = (void *)fdt_start - pv_off;
250250

0 commit comments

Comments
 (0)