From nobody Tue Nov 21 12:29:07 2023 X-Original-To: dev-commits-src-main@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 4SZNwN1Kn2z51W8C; Tue, 21 Nov 2023 12:29:08 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SZNwN0bzXz3TKB; Tue, 21 Nov 2023 12:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700569748; 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=PktfeDv4e2nYpZJ+OrEqmQlTZRJixgmn5f9sw2SOGJc=; b=lDPJxP5I5E+WZlbomSyAJsCO6tXu7Sq0ZMeB3tpnmlGvDmtvVT8+27G5yTVU6VfbbvLKfQ lmUit95KUk9ZMcYli0ehyBhA17NCsd82g1JwGN4oq9BvAdaFumk+702XN6VFqXCAs7sHCN CekuM/6eFdee4wLU167eXLJVjOzrVdhBdQg31Xv2/9NFNeJcan7nxH/Cts+dMcI55rWqly mnnWY8cgmSf6cCmVxvGl+r1fz8z5OzH3k7ZrV09likb9pS6BNt/jJZiWVUPp1IBSW7Jw2f aEbE0V/X0QunO5+PzPaFBJOHCUUv2sCHy5IX8RRD2na+5dwc69xb4Dowq386MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700569748; 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=PktfeDv4e2nYpZJ+OrEqmQlTZRJixgmn5f9sw2SOGJc=; b=m2YHzn4JZqGWS4l+WWUSJhewDo1dk621Zt67GV1w21StUpjPiFhl+ow2SLGimvigyKn3fr gtQ1NOVBpWkoesWFi26GDabtGRC6KcwdWBDCtSW+zF7DjbFdwU4YYQG9ZNHHThbN+zoaSy Ll3ugOf9bjHpmEnPNEay/nHFPmEwSMLFwasU4CTkkaOC2uIIAzpWlmbvpfXgbgp0qvLYo0 oHOTkgTG+zCJcFehMms6ZR+s/w6yEHgAnPSc5QtZlACmNyG0jBsio/pjAnMSuNOp9YgGXt 5aFAZkKoSzA/4qB7lk43XgvzBT5e+Bk4IQOZDkKhSce5UOAHPVERyPBgwUaWVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700569748; a=rsa-sha256; cv=none; b=R8L2n1kGIrkrnoV5IXznolmBb45tON2pqbiYOl+UNfNIi4cDuIQ7VE5lLMAq8ip8HKgZAB 0c1FuX1JUM1S1FeJBplKu/LkYMe00iDrm7tdBK568xwPHP1YOM+dNjS32cJKmG93okoTZR eojQvdRHmep61zunI1rK5pshQ1cEu9QdIagWZjpXh+eDNpkf6DVmzmu33Kx8ZaxFMS3Ysr 18tQ/PdKEmA7hrEIF0yDQou8nsOP11wIKQfkRpB/nFfRV3x+4WY1uW5t6ft6RWr1fZTGAl 4NlXpFkN2knQUFhKb8EY4obRR1O0nfEfOXHszIeaUYtjoujE2t1Ua7luROGd/A== 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 4SZNwM6n0jzbLf; Tue, 21 Nov 2023 12:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ALCT7YA026638; Tue, 21 Nov 2023 12:29:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ALCT7xZ026635; Tue, 21 Nov 2023 12:29:07 GMT (envelope-from git) Date: Tue, 21 Nov 2023 12:29:07 GMT Message-Id: <202311211229.3ALCT7xZ026635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5a2bbacea56f - main - FEATURE compat_freebsd_32bit: only report on arm64 when support is present List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a2bbacea56f40e91c5371d5d6a210afd797fd3b Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5a2bbacea56f40e91c5371d5d6a210afd797fd3b commit 5a2bbacea56f40e91c5371d5d6a210afd797fd3b Author: Konstantin Belousov AuthorDate: 2023-11-16 21:06:36 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-21 11:55:59 +0000 FEATURE compat_freebsd_32bit: only report on arm64 when support is present depending on hardware support for aarch32. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42641 --- sys/arm64/arm64/elf32_machdep.c | 2 ++ sys/compat/freebsd32/freebsd32_misc.c | 13 ++++++++++++- sys/compat/freebsd32/freebsd32_util.h | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index 4acb68b09108..de0ee9607ad1 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -160,6 +160,8 @@ register_elf32_brand(void *arg) if (ID_AA64PFR0_EL0_VAL(READ_SPECIALREG(id_aa64pfr0_el1)) == ID_AA64PFR0_EL0_64_32) { elf32_insert_brand_entry(&freebsd32_brand_info); + } else { + compat_freebsd_32bit = 0; } } SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, register_elf32_brand, NULL); diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index c26e7b97e717..d9266f57ac94 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -123,7 +123,18 @@ #include #include -FEATURE(compat_freebsd_32bit, "Compatible with 32-bit FreeBSD"); +int compat_freebsd_32bit = 1; + +static void +register_compat32_feature(void *arg) +{ + if (!compat_freebsd_32bit) + return; + + FEATURE_ADD("compat_freebsd_32bit", "Compatible with 32-bit FreeBSD"); +} +SYSINIT(freebsd32, SI_SUB_EXEC, SI_ORDER_ANY, register_compat32_feature, + NULL); struct ptrace_io_desc32 { int piod_op; diff --git a/sys/compat/freebsd32/freebsd32_util.h b/sys/compat/freebsd32/freebsd32_util.h index 67f0c099792a..c32c7a2ef4c1 100644 --- a/sys/compat/freebsd32/freebsd32_util.h +++ b/sys/compat/freebsd32/freebsd32_util.h @@ -122,4 +122,6 @@ struct image_args; int freebsd32_exec_copyin_args(struct image_args *args, const char *fname, enum uio_seg segflg, uint32_t *argv, uint32_t *envv); +extern int compat_freebsd_32bit; + #endif /* !_COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ */