From owner-dev-commits-src-all@freebsd.org Wed Dec 23 13:14:48 2020 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E54844BEFF4; Wed, 23 Dec 2020 13:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D1DFh6CWlz4rbq; Wed, 23 Dec 2020 13:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE26D1EB9B; Wed, 23 Dec 2020 13:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BNDEmx8047720; Wed, 23 Dec 2020 13:14:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BNDEmiw047719; Wed, 23 Dec 2020 13:14:48 GMT (envelope-from git) Date: Wed, 23 Dec 2020 13:14:48 GMT Message-Id: <202012231314.0BNDEmiw047719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 166ceb6fd18b - More the arm64 early page tables and stack to .bss MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 166ceb6fd18ba315b66c8b712e04f9ded3b31277 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for all branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Dec 2020 13:14:49 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=166ceb6fd18ba315b66c8b712e04f9ded3b31277 commit 166ceb6fd18ba315b66c8b712e04f9ded3b31277 Author: Andrew Turner AuthorDate: 2020-12-23 08:05:21 +0000 Commit: Andrew Turner CommitDate: 2020-12-23 13:10:23 +0000 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 --- sys/arm64/arm64/locore.S | 12 +++++++----- 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. */