diff options
| author | wangqinglin <[email protected]> | 2023-06-05 14:18:00 +0800 |
|---|---|---|
| committer | guo <[email protected]> | 2023-06-11 07:09:24 +0800 |
| commit | 216d72ef1c98f36ac1a0c830add13fd59befe3ef (patch) | |
| tree | c0f29fccd1497852a44bd1cda6dc3bdd99cdee99 /libcpu/aarch64/common | |
| parent | 0c29bed30f81f79f3265813b186d1091e4411dc4 (diff) | |
修改:启动过程和__start解耦,对于RT_AMP_SLAVE 跳过cpu 非0核等待
Diffstat (limited to 'libcpu/aarch64/common')
| -rw-r--r-- | libcpu/aarch64/common/mmu.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libcpu/aarch64/common/mmu.c b/libcpu/aarch64/common/mmu.c index a08f3fca53..45b5fc0f71 100644 --- a/libcpu/aarch64/common/mmu.c +++ b/libcpu/aarch64/common/mmu.c @@ -535,10 +535,8 @@ unsigned long get_free_page(void) { if (!__init_page_array) { - unsigned long temp_page_start; - asm volatile("mov %0, sp" : "=r"(temp_page_start)); - __init_page_array = - (struct page_table *)(temp_page_start & ~(ARCH_SECTION_MASK)); + extern unsigned char __bss_end; + __init_page_array = (struct page_table *) RT_ALIGN((unsigned long) &__bss_end, 0x1000); __page_off = 2; /* 0, 1 for ttbr0, ttrb1 */ } __page_off++; @@ -778,7 +776,13 @@ void rt_hw_mem_setup_early(unsigned long *tbl0, unsigned long *tbl1, /* setup pv off */ rt_kmem_pvoff_set(pv_off); +#ifdef RT_USING_SMART unsigned long va = KERNEL_VADDR_START; +#else + extern unsigned char __start; + unsigned long va = (unsigned long) &__start; +#endif + unsigned long count = (size + ARCH_SECTION_MASK) >> ARCH_SECTION_SHIFT; unsigned long normal_attr = MMU_MAP_CUSTOM(MMU_AP_KAUN, NORMAL_MEM); |
