Browse Source

[libcpu][arm][cortex-a] Fixup mmu setup early
Correct the starting virtual address of _reset alignment to 16MB

laidene 2 tuần trước cách đây
mục cha
commit
68a5c6a83b
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      libcpu/arm/cortex-a/mmu.c

+ 1 - 1
libcpu/arm/cortex-a/mmu.c

@@ -112,7 +112,7 @@ void rt_hw_mem_setup_early(rt_uint32_t *early_mmu_talbe,
     extern unsigned char _reset;
     rt_uint32_t va = (rt_uint32_t) &_reset;
     /* The starting virtual address is aligned along 0x1000000. */
-    va &= (0x1000000 - 1);
+    va &= ~(0x1000000 - 1);
     size -= va;
     _init_map_section(early_mmu_talbe, va, size, va + pv_off, normal_attr);
 #endif