|
|
@@ -361,7 +361,7 @@ __create_page_tables:
|
|
|
* Create the identity mapping.
|
|
|
*/
|
|
|
mov x0, x25 // idmap_pg_dir
|
|
|
- adrp x3, KERNEL_START // __pa(KERNEL_START)
|
|
|
+ adrp x3, __idmap_text_start // __pa(__idmap_text_start)
|
|
|
|
|
|
#ifndef CONFIG_ARM64_VA_BITS_48
|
|
|
#define EXTRA_SHIFT (PGDIR_SHIFT + PAGE_SHIFT - 3)
|
|
|
@@ -384,11 +384,11 @@ __create_page_tables:
|
|
|
|
|
|
/*
|
|
|
* Calculate the maximum allowed value for TCR_EL1.T0SZ so that the
|
|
|
- * entire kernel image can be ID mapped. As T0SZ == (64 - #bits used),
|
|
|
+ * entire ID map region can be mapped. As T0SZ == (64 - #bits used),
|
|
|
* this number conveniently equals the number of leading zeroes in
|
|
|
- * the physical address of KERNEL_END.
|
|
|
+ * the physical address of __idmap_text_end.
|
|
|
*/
|
|
|
- adrp x5, KERNEL_END
|
|
|
+ adrp x5, __idmap_text_end
|
|
|
clz x5, x5
|
|
|
cmp x5, TCR_T0SZ(VA_BITS) // default T0SZ small enough?
|
|
|
b.ge 1f // .. then skip additional level
|
|
|
@@ -403,8 +403,8 @@ __create_page_tables:
|
|
|
#endif
|
|
|
|
|
|
create_pgd_entry x0, x3, x5, x6
|
|
|
- mov x5, x3 // __pa(KERNEL_START)
|
|
|
- adr_l x6, KERNEL_END // __pa(KERNEL_END)
|
|
|
+ mov x5, x3 // __pa(__idmap_text_start)
|
|
|
+ adr_l x6, __idmap_text_end // __pa(__idmap_text_end)
|
|
|
create_block_map x0, x7, x3, x5, x6
|
|
|
|
|
|
/*
|
|
|
@@ -632,6 +632,7 @@ ENDPROC(__secondary_switched)
|
|
|
*
|
|
|
* other registers depend on the function called upon completion
|
|
|
*/
|
|
|
+ .section ".idmap.text", "ax"
|
|
|
__enable_mmu:
|
|
|
ldr x5, =vectors
|
|
|
msr vbar_el1, x5
|