diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2020-12-23 08:05:21 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2020-12-23 13:10:23 +0000 |
commit | 166ceb6fd18ba315b66c8b712e04f9ded3b31277 (patch) | |
tree | 94fec9bbb21aa945e3a38d70ec3fd9650df8e499 | |
parent | f952bdf1425d6a877f99b5c5ca59f25fc8bedabe (diff) | |
download | src-166ceb6fd18ba315b66c8b712e04f9ded3b31277.tar.gz src-166ceb6fd18ba315b66c8b712e04f9ded3b31277.zip |
More the arm64 early page tables and stack to .bss
This removes 806k from the kernel ELF file that is only needed while
the kernel is running, not in the static file.
Sponsored by: Innovate UK
-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. */ |