From 23fc7bfa4d992a105d72f114f0a712b3f61cbd65 Mon Sep 17 00:00:00 2001 From: zms123456 <85141075+zmshahaha@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:04:55 +0800 Subject: [PATCH] [libcpu][setup]fix fdt_ptr error (#9138) fix fdt_ptr error --- libcpu/aarch64/common/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcpu/aarch64/common/setup.c b/libcpu/aarch64/common/setup.c index b38398ed9d..dd30b1d673 100644 --- a/libcpu/aarch64/common/setup.c +++ b/libcpu/aarch64/common/setup.c @@ -235,7 +235,7 @@ void rt_hw_common_setup(void) rt_memblock_reserve_memory("fdt", fdt_start, fdt_end, MEMBLOCK_NONE); rt_memmove((void *)(fdt_start - PV_OFFSET), (void *)(fdt_ptr - PV_OFFSET), fdt_size); - fdt_ptr = (void *)fdt_start; + fdt_ptr = (void *)fdt_start - PV_OFFSET; rt_system_heap_init((void *)(heap_start - PV_OFFSET), (void *)(heap_end - PV_OFFSET));