From nobody Wed Aug 21 10:19:35 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wpj4R6ZtPz5Tcr5; Wed, 21 Aug 2024 10:19:35 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wpj4R5RP9z4k66; Wed, 21 Aug 2024 10:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724235575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X5XexcMELglAyeQwYNC/BCoiJHk1d3IRWNid0ZPrdlU=; b=eqDBoOg5wKGKmc+rNJNiRm6aU81dBUFDTIZi3HLtCpKFswZ0KtAl8lV2KCRjHq5U0XtZ0o 9g9N76sEwq10w8DwGqzntxIuBX/vgtnUk7RIs6jW8aZDHULtkzHN185dz60zyxcsMXH03L JGcWYcEX+wDwG3jwc/fZgo8z5Rc5sADsAkMm/fd7JVNMKW8X8C04UQqc4/oPPiqM3fI/vh h8zcUYiOkv5oAth+d4MddIjw6UiboXMUyfX4K1mX1KCG47SVH+MzYuYY7VXp09PQ1cSlMO u/pt16u7LcaMjaXBfxS9ukv4IDGzgi+gG5M0gj4yTRjbyawdE5oLZwb65ZCH3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1724235575; a=rsa-sha256; cv=none; b=k84izt4ahx8KTSDVCXODR4dugKOoDbg72KwmM89k5L+Dy9bte9m4LPRSzaLUArcRruMO5+ TP64EzSb2MMmKKZYiQ4Qtli48Krd/1TXHkOga634HO05fBhn3XvoVQfjf5AD6vEzvMKqRp 9t5EreYnrJYJstVfoNUhAfO0B6TqFdnxX2HfS7ZKhCJ6eWTkhORxX+koJJzyPlAdKGKL8G a0ZQUsbsFyxOqiXgZ6FIWteCsg1gAtMICFdXMcs/HQyKlPmkGi3ePt32BKtQiAsCMVce95 cSVgCWZoSeSI/GcQ3tmGCMeodLSM3Xnjb2WczU57mQ2HumkV8rXWKIefC9pwNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1724235575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X5XexcMELglAyeQwYNC/BCoiJHk1d3IRWNid0ZPrdlU=; b=o/nu3GhMot/SNd7RnKq72OdDhxqA0vERUXObREZQdk4OnHZAHHvb6iI2DRz0zAfkwOJPjD TrrEUUyiAX8xU8N9x2K02Fc241Wh+W+axkfKHgGmxOWnZQNIrdfM9P1HMF/AtGGQYHCkQp fufPL/RTOjnHjDkVBM3fjFbBLmgpwHHRdgp2JDAVKOp8aPyPentleo459b6gMGMGyRQ5gv a7nkVf4ro4l8rfzlJ3olfMvQ4NVbpc5J/oyt0ZrspjCdE7oWH3a4VeUy5dk6NkZU+E9Wrs XAfpIbFFFI8ljBpeNBzPAuSpgmnFw46vJ7tJjPlXZeDHPrFJpQPnv3Z7u9z5NA== 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 4Wpj4R52xDzg2h; Wed, 21 Aug 2024 10:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47LAJZ7n044256; Wed, 21 Aug 2024 10:19:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47LAJZDK044253; Wed, 21 Aug 2024 10:19:35 GMT (envelope-from git) Date: Wed, 21 Aug 2024 10:19:35 GMT Message-Id: <202408211019.47LAJZDK044253@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: f1bc3750cf9a - main - arm64: Use store-pair to zero the kernel bss List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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: f1bc3750cf9a6623b0c0861984ef2a8ac966a4e3 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=f1bc3750cf9a6623b0c0861984ef2a8ac966a4e3 commit f1bc3750cf9a6623b0c0861984ef2a8ac966a4e3 Author: Andrew Turner AuthorDate: 2024-08-20 17:14:28 +0000 Commit: Andrew Turner CommitDate: 2024-08-21 10:16:10 +0000 arm64: Use store-pair to zero the kernel bss While this won't be noticed by most users the time to zero the bss while using instruction tracing in the Arm FVP models (simulators) is noticeable. Reduce this time by using a store-pair instruction to double the size of memory we zero on each iteration of the loop. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42733 --- sys/arm64/arm64/locore.S | 2 +- sys/conf/ldscript.arm64 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index b71e02538716..ae1a005fd68f 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -111,7 +111,7 @@ virtdone: ldr x15, .Lbss ldr x14, .Lend 1: - str xzr, [x15], #8 + stp xzr, xzr, [x15], #16 cmp x15, x14 b.lo 1b diff --git a/sys/conf/ldscript.arm64 b/sys/conf/ldscript.arm64 index ea52a3128527..32af035105d0 100644 --- a/sys/conf/ldscript.arm64 +++ b/sys/conf/ldscript.arm64 @@ -121,6 +121,7 @@ SECTIONS .sdata : { *(.sdata) } _edata = .; PROVIDE (edata = .); + . = ALIGN(16); __bss_start = .; .sbss : { *(.sbss) *(.scommon) } .bss : @@ -128,7 +129,7 @@ SECTIONS *(.dynbss) *(.bss) *(COMMON) - . = ALIGN(8); + . = ALIGN(16); __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