From owner-dev-commits-src-all@freebsd.org Tue Jun 1 12:50:41 2021 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 82273653B67; Tue, 1 Jun 2021 12:50:41 +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 4FvX813JyRz3C01; Tue, 1 Jun 2021 12:50:41 +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 5A51823D82; Tue, 1 Jun 2021 12:50:41 +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 151CofOf039003; Tue, 1 Jun 2021 12:50:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 151Cof9P039002; Tue, 1 Jun 2021 12:50:41 GMT (envelope-from git) Date: Tue, 1 Jun 2021 12:50:41 GMT Message-Id: <202106011250.151Cof9P039002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: b501b2ae52f3 - main - linux: export AT_HWCAP and AT_HWCAP2 on aarch64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b501b2ae52f3ccb384584dcbb5dc4a4568cc0096 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: Tue, 01 Jun 2021 12:50:41 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=b501b2ae52f3ccb384584dcbb5dc4a4568cc0096 commit b501b2ae52f3ccb384584dcbb5dc4a4568cc0096 Author: Edward Tomasz Napierala AuthorDate: 2021-06-01 12:12:25 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-06-01 12:50:20 +0000 linux: export AT_HWCAP and AT_HWCAP2 on aarch64 The flag values seem to be the same between Linux and FreeBSD. Comparing to a Linux VM on the same hardware, we're missing HWCAP_EVTSTRM, HWCAP_CPUID, HWCAP_DCPOP, HWCAP_USCAT, HWCAP_PACA, and HWCAP_PACG. Reviewed By: mhorne, emaste Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30540 --- sys/arm64/linux/linux_sysvec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 4db319cd96fd..365cb9fc386a 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #ifdef VFP #include #endif @@ -169,9 +171,7 @@ linux_copyout_auxargs(struct image_params *imgp, uintptr_t base) issetugid = p->p_flag & P_SUGID ? 1 : 0; AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, imgp->proc->p_sysent->sv_shared_page_base); -#if 0 /* LINUXTODO: implement arm64 LINUX_AT_HWCAP */ - AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, cpu_feature); -#endif + AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, *imgp->sysent->sv_hwcap); AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz); AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz); AUXARGS_ENTRY(pos, AT_PHDR, args->phdr); @@ -186,6 +186,7 @@ linux_copyout_auxargs(struct image_params *imgp, uintptr_t base) AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); + AUXARGS_ENTRY(pos, LINUX_AT_HWCAP2, *imgp->sysent->sv_hwcap2); if (imgp->execpathp != 0) AUXARGS_ENTRY_PTR(pos, LINUX_AT_EXECFN, imgp->execpathp); if (args->execfd != -1) @@ -437,6 +438,8 @@ struct sysentvec elf_linux_sysvec = { .sv_schedtail = linux_schedtail, .sv_thread_detach = linux_thread_detach, .sv_trap = linux_vsyscall, + .sv_hwcap = &elf_hwcap, + .sv_hwcap2 = &elf_hwcap2, .sv_onexec = linux_on_exec, .sv_onexit = linux_on_exit, .sv_ontdexit = linux_thread_dtor,