diff options
-rw-r--r-- | sys/arm64/arm64/locore.S | 12 | ||||
-rw-r--r-- | sys/conf/ldscript.arm64 | 7 |
2 files changed, 13 insertions, 6 deletions
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 6f8d007b2efa..6735ffe8900b 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -189,7 +189,7 @@ virtdone: .Lbss: .quad __bss_start .Lend: - .quad _end + .quad __bss_end #ifdef SMP /* @@ -780,8 +780,12 @@ sctlr_clear: abort: b abort - //.section .init_pagetable - .align 12 /* 4KiB aligned */ + .align 3 +init_pt_va: + .quad pagetable /* XXX: Keep page tables VA */ + + .section .init_pagetable, "aw", %nobits + .align PAGE_SHIFT /* * 6 initial tables (in the following order): * L2 for kernel (High addresses) @@ -813,8 +817,6 @@ el2_pagetable: .space PAGE_SIZE .globl init_pt_va -init_pt_va: - .quad pagetable /* XXX: Keep page tables VA */ .align 4 initstack: diff --git a/sys/conf/ldscript.arm64 b/sys/conf/ldscript.arm64 index 36af34589db9..3c4b77034725 100644 --- a/sys/conf/ldscript.arm64 +++ b/sys/conf/ldscript.arm64 @@ -112,8 +112,13 @@ SECTIONS *(.dynbss) *(.bss) *(COMMON) + . = ALIGN(8); + __bss_end = .; + /* A section for the initial page table, it doesn't need to be in the + kernel file, however unlike normal .bss entries should not be zeroed + out as we use it before the .bss section is cleared. */ + *(.init_pagetable) } - . = ALIGN(8); _end = . ; PROVIDE (end = .); /* Stabs debugging sections. */ |