Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Mar 2023 15:57:54 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1a3cb489e5aa - main - arm64: Move the initial kernel stack out of the init_pagetables section
Message-ID:  <202303311557.32VFvsJk081271@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=1a3cb489e5aac260eb9f48567dd6c086d62a8ea7

commit 1a3cb489e5aac260eb9f48567dd6c086d62a8ea7
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-03-31 15:04:37 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-03-31 15:57:26 +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
---
 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 a73941a01492..e17f897baeab 100644
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303311557.32VFvsJk081271>