aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2023-03-31 15:04:37 +0000
committerMark Johnston <markj@FreeBSD.org>2023-04-11 14:09:45 +0000
commit263fa9ba098e8fbd6be233d2a4fdff7d5eeec876 (patch)
treedb782f1a1d9118c9686e81284350ca545c7e3116
parente180d4c124b51b7f5958ff64b180a1e2cabf7fb7 (diff)
downloadsrc-263fa9ba098e8fbd6be233d2a4fdff7d5eeec876.tar.gz
src-263fa9ba098e8fbd6be233d2a4fdff7d5eeec876.zip
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 (cherry picked from commit 1a3cb489e5aac260eb9f48567dd6c086d62a8ea7)
-rw-r--r--sys/arm64/arm64/locore.S13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
index bcf60ea0540e..87d86d8ac994 100644
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -750,6 +750,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
/*
@@ -774,18 +780,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