arm64: Move the initial kernel stack out of the init_pagetables section

init_pagetables is mapped into the segment containing the BSS, but does
not get zeroed by locore.  It is used for bootstrap page table pages.

It happens that the bootstrap kernel stack is also placed in that
section, but there's no reason it shouldn't live in the BSS, so move it
there.  No functional change intended.

Reviewed by:	andrew
MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	Juniper Networks
Differential Revision:	https://reviews.freebsd.org/D39367
This commit is contained in:
Mark Johnston 2023-03-31 11:04:37 -04:00
parent 47ff149afa
commit 1a3cb489e5

View File

@ -877,6 +877,12 @@ ENTRY(abort)
b abort
END(abort)
.bss
.align PAGE_SHIFT
initstack:
.space (PAGE_SIZE * KSTACK_PAGES)
initstack_end:
.section .init_pagetable, "aw", %nobits
.align PAGE_SHIFT
/*
@ -907,18 +913,11 @@ pagetable_l0_ttbr0_boostrap:
.space PAGE_SIZE
pagetable_l0_ttbr0:
.space PAGE_SIZE
pagetable_end:
el2_pagetable:
.space PAGE_SIZE
.align 4
initstack:
.space (PAGE_SIZE * KSTACK_PAGES)
initstack_end:
.text
EENTRY(aarch32_sigcode)
.word 0xe1a0000d // mov r0, sp