修复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)
|
unsigned long size, unsigned long pv_off)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
unsigned long count = (size + ARCH_SECTION_MASK) >> ARCH_SECTION_SHIFT;
|
||||||
/* setup pv off */
|
unsigned long normal_attr = MMU_MAP_CUSTOM(MMU_AP_KAUN, NORMAL_MEM);
|
||||||
rt_kmem_pvoff_set(pv_off);
|
|
||||||
|
|
||||||
#ifdef RT_USING_SMART
|
#ifdef RT_USING_SMART
|
||||||
unsigned long va = KERNEL_VADDR_START;
|
unsigned long va = KERNEL_VADDR_START;
|
||||||
#else
|
#else
|
||||||
extern unsigned char __start;
|
extern unsigned char __start;
|
||||||
unsigned long va = (unsigned long) &__start;
|
unsigned long va = (unsigned long) &__start;
|
||||||
|
va = RT_ALIGN_DOWN(va, 0x200000);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned long count = (size + ARCH_SECTION_MASK) >> ARCH_SECTION_SHIFT;
|
/* setup pv off */
|
||||||
unsigned long normal_attr = MMU_MAP_CUSTOM(MMU_AP_KAUN, NORMAL_MEM);
|
rt_kmem_pvoff_set(pv_off);
|
||||||
|
|
||||||
/* clean the first two pages */
|
/* clean the first two pages */
|
||||||
rt_memset((char *)tbl0, 0, ARCH_PAGE_SIZE);
|
rt_memset((char *)tbl0, 0, ARCH_PAGE_SIZE);
|
||||||
|
|
|
@ -134,7 +134,7 @@ __start:
|
||||||
mov x3,0
|
mov x3,0
|
||||||
#endif
|
#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
|
bl rt_hw_mem_setup_early
|
||||||
|
|
||||||
ldr x30, =after_mmu_enable /* set LR to after_mmu_enable function, it's a v_addr */
|
ldr x30, =after_mmu_enable /* set LR to after_mmu_enable function, it's a v_addr */
|
||||||
|
|
Loading…
Reference in New Issue