From patchwork Mon Apr 1 10:45:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Murray X-Patchwork-Id: 10879713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2547814DE for ; Mon, 1 Apr 2019 10:46:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0794828414 for ; Mon, 1 Apr 2019 10:46:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBF932880B; Mon, 1 Apr 2019 10:46:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 71EEC28414 for ; Mon, 1 Apr 2019 10:46:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ybgQME+W7uaDcM30VITFNyaWtWYc0lBaVywfgVMPZjc=; b=Rn0vTWnbS3U1// QxGFQTQ4HwyhkTGFf0Ce90CWkKxy1epBml+aaWdz1Uph7PlpdzF4QMlQV3igIYObcPuRqfaAWN8uO VSSfhuJ3Saet26+6vNfnhpjOEp67WcmMhWfQWOlFeFfAbmyIfkdGqCCcDiuXsEhvtZreRaTjwRZQD sA6yDGXvwt8+9RA9X5mOf1LPCEZq1mRmzNi+ar/ha78JayiwK3Ynzd32KuSt7uaJfa5XJJMPdMDm7 r6qsYVtOJ49yGFlIS16MNYfUNie+Bwkh9cvGXewlkDhLrr6W9qPWzTTkQ/U6625Sg9QaS5mgbBSxH +OLsSC0CSikczs7FIhrw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAuSe-0003Rt-Bn; Mon, 01 Apr 2019 10:46:40 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hAuRk-0002EZ-5Q for linux-arm-kernel@lists.infradead.org; Mon, 01 Apr 2019 10:46:04 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 83F8615AD; Mon, 1 Apr 2019 03:45:41 -0700 (PDT) Received: from e119886-lin.cambridge.arm.com (unknown [10.37.6.20]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 964993F557; Mon, 1 Apr 2019 03:45:39 -0700 (PDT) From: Andrew Murray To: Catalin Marinas , Will Deacon Subject: [PATCH v3 7/7] arm64: docs: document AT_HWCAP2 and unused AT_HWCAP bits Date: Mon, 1 Apr 2019 11:45:15 +0100 Message-Id: <20190401104515.39775-8-andrew.murray@arm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190401104515.39775-1-andrew.murray@arm.com> References: <20190401104515.39775-1-andrew.murray@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190401_034544_848099_F9A6F640 X-CRM114-Status: GOOD ( 12.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , libc-alpha@sourceware.org, Szabolcs Nagy , linux-api@vger.kernel.org, Phil Blundell , dave.martin@arm.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we have expanded into AT_HWCAP2 let's add some documentation to describe its presence. We also document the unused top half of AT_HWCAP which we always return as 0 for userspace interoperation. Signed-off-by: Andrew Murray --- Documentation/arm64/elf_hwcaps.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Documentation/arm64/elf_hwcaps.txt b/Documentation/arm64/elf_hwcaps.txt index c605757dd4db..6b3d4d334db7 100644 --- a/Documentation/arm64/elf_hwcaps.txt +++ b/Documentation/arm64/elf_hwcaps.txt @@ -13,9 +13,9 @@ architected discovery mechanism available to userspace code at EL0. The kernel exposes the presence of these features to userspace through a set of flags called hwcaps, exposed in the auxilliary vector. -Userspace software can test for features by acquiring the AT_HWCAP entry -of the auxilliary vector, and testing whether the relevant flags are -set, e.g. +Userspace software can test for features by acquiring the AT_HWCAP or +AT_HWCAP2 entry of the auxiliary vector, and testing whether the relevant +flags are set, e.g. bool floating_point_is_present(void) { @@ -198,3 +198,11 @@ HWCAP_PACG Functionality implied by ID_AA64ISAR1_EL1.GPA == 0b0001 or ID_AA64ISAR1_EL1.GPI == 0b0001, as described by Documentation/arm64/pointer-authentication.txt. + + +4. Unused AT_HWCAP bits +----------------------- + +Each AT_HWCAP and AT_HWCAP2 entry provides for up to 32 hwcaps contained +in bits [31:0]. For interoperation with userspace we guarantee that bit +62 of AT_HWCAP will always be returned as 0.