Skip to content

Commit

Permalink
[libcpu] fix No memory higher than 1 GB is mapped
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuzhuzhus authored and mysterywolf committed Nov 18, 2024
1 parent 96da7ab commit 4451562
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libcpu/aarch64/common/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4451562

Please sign in to comment.