git: 263fa9ba098e - stable/13 - arm64: Move the initial kernel stack out of the init_pagetables section

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 11 Apr 2023 14:10:36 UTC
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=263fa9ba098e8fbd6be233d2a4fdff7d5eeec876

commit 263fa9ba098e8fbd6be233d2a4fdff7d5eeec876
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-03-31 15:04:37 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-04-11 14:09:45 +0000

    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)
---
 sys/arm64/arm64/locore.S | 13 ++++++-------
 1 file 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