修复aarch64-qemu启动失败问题 (#7661)
This commit is contained in:
parent
edaa0d9c8a
commit
76d8416e72
|
@ -771,19 +771,19 @@ void rt_hw_mem_setup_early(unsigned long *tbl0, unsigned long *tbl1,
|
|||
unsigned long size, unsigned long pv_off)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* setup pv off */
|
||||
rt_kmem_pvoff_set(pv_off);
|
||||
unsigned long count = (size + ARCH_SECTION_MASK) >> ARCH_SECTION_SHIFT;
|
||||
unsigned long normal_attr = MMU_MAP_CUSTOM(MMU_AP_KAUN, NORMAL_MEM);
|
||||
|
||||
#ifdef RT_USING_SMART
|
||||
unsigned long va = KERNEL_VADDR_START;
|
||||
#else
|
||||
extern unsigned char __start;
|
||||
unsigned long va = (unsigned long) &__start;
|
||||
va = RT_ALIGN_DOWN(va, 0x200000);
|
||||
#endif
|
||||
|
||||
unsigned long count = (size + ARCH_SECTION_MASK) >> ARCH_SECTION_SHIFT;
|
||||
unsigned long normal_attr = MMU_MAP_CUSTOM(MMU_AP_KAUN, NORMAL_MEM);
|
||||
/* setup pv off */
|
||||
rt_kmem_pvoff_set(pv_off);
|
||||
|
||||
/* clean the first two pages */
|
||||
rt_memset((char *)tbl0, 0, ARCH_PAGE_SIZE);
|
||||
|
|
|
@ -134,7 +134,7 @@ __start:
|
|||
mov x3,0
|
||||
#endif
|
||||
|
||||
ldr x2, =0x01000000 /* map 16M memory for kernel space */
|
||||
ldr x2, =0x10000000 /* map 256M memory for kernel space */
|
||||
bl rt_hw_mem_setup_early
|
||||
|
||||
ldr x30, =after_mmu_enable /* set LR to after_mmu_enable function, it's a v_addr */
|
||||
|
|
Loading…
Reference in New Issue