From nobody Thu Feb 17 13:46:24 2022 X-Original-To: dev-commits-src-branches@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 961CE19D5814; Thu, 17 Feb 2022 13:46:25 +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 4Jzx1s1wLsz3PnB; Thu, 17 Feb 2022 13:46:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645105585; 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=BCn7zm8K8l+DyBrvgpNgjkfaLfsmM5OFHQQZHFNxT+A=; b=e/3X9orah6cJKpndfXNv+9F+F7mFVU4F+Yk1zneLeYe7uOEaS5l7jOfFbchG+P03jshkhA 2YCocXNrtU6vBQNSMra7oELvLNH8WagHGcr7wQrPxi2bz7POhqHMC3HN/n31Iupm5hEzWV BpDOInkau08h9H6ImFwDuIGY0njKJhQ78SreSluXqN2hgF4IHAutlczFBmO2AXc0pOwWMd yFWa/qGMlhnS004eF8rZXvMKT6Q1FyaTqFHOWHJp0J1nodXqKJtntglh3DmeRFZk4ii2wC M2tKu4Vc9hiUv/uPkowFtiqHTx/S1x5ZQqLnuGWfuMNy4W7nckRVy8CYUCuInw== 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 E37C92E21; Thu, 17 Feb 2022 13:46:24 +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 21HDkO6S048299; Thu, 17 Feb 2022 13:46:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21HDkOrL048298; Thu, 17 Feb 2022 13:46:24 GMT (envelope-from git) Date: Thu, 17 Feb 2022 13:46:24 GMT Message-Id: <202202171346.21HDkOrL048298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 5d5616acec5b - stable/13 - linux: export AT_HWCAP and AT_HWCAP2 on aarch64 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 5d5616acec5be93e64d353ce7212ee93c7fbeb20 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645105585; 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=BCn7zm8K8l+DyBrvgpNgjkfaLfsmM5OFHQQZHFNxT+A=; b=gaGcsKJ29NShShrh9JEcsTK+nLH0BqvB1tyBEj2H8wK1Za4RHF5EDzU05AXKhiP6jHQMIF IbVMg/jFe8j/dCKuzlwr0p7Qs1NGQXOGh+K2zO5+NlS/BbqQj4y7p5H2HWFv8hUwQAI7+k cf/gXnf4NQsiy5hAHPQWAOQTcHt0wlNMWiIq6Uls6am1z9E9c9c08pfwZEbH7MBJ6LFu+o YQf2A02TE2kJydNzf8RKpppmOY/e2IGLGTxwPr9wxkparIjhL2/4vwL2OEeOX89Pg5bQLu d7OOIgYV1x0XNu1FQQRavhxsgmQFoNurAIiCmwlE9hzXvdZvrAuMr2BHKTihBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645105585; a=rsa-sha256; cv=none; b=ucmlgYJofzCnDTU4u+xTrfYX4ZMDbgJRkJlnznRDSYPJ11S5ExbB1cjOD54aCTb0UnSalC wqwGft9N6nQysaI7qEGtAjZmx0/wb5wDmtUSJ9u34EGwe1jnMQYYH3H5xw+hstXX3E5df0 cv6USaw7bf+hKmvPb3TwznodPtRkf4mwPu9pY0mEiUGz5eQlvIYJxazJ7DWFA17E1WAEjs 5w7F1cn21RhxHFp514fsKLSgrOL32BxJeo5gCiqc1/i88iA/00StPlk0Iy5EG3I9V5J7iL AriVrr9NSU14n+D7FJxLbty7cZHE3fAez7qO3N9+wJE578BS9xPu8gC5y0+9IQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=5d5616acec5be93e64d353ce7212ee93c7fbeb20 commit 5d5616acec5be93e64d353ce7212ee93c7fbeb20 Author: Edward Tomasz Napierala AuthorDate: 2021-06-01 12:12:25 +0000 Commit: Edward Tomasz Napierala CommitDate: 2022-02-13 23:21:35 +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 (cherry picked from commit b501b2ae52f3ccb384584dcbb5dc4a4568cc0096) --- 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 0ffdf9cb424e..de8dd023f82d 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -60,6 +60,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #ifdef VFP #include #endif @@ -172,9 +174,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); @@ -189,6 +189,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,