From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C50DC433ED for ; Tue, 4 May 2021 15:22:08 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D664A61168 for ; Tue, 4 May 2021 15:22:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D664A61168 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HRwvsRSOqutJgSfv+Uhp5Htt/qmjNvFGt60UOjgyWPo=; b=mt96WVXZcjoHP8RPnf9VBNuRn QG3AJwvsjEcVf2BoVOEdhMR+CR9aY/Kmlj/c+R4soiVlDNw1xmD5VadxZjTvNKhvaiL8WdriYmSrm Dt14YvTXTlxtJKWH25Dy/B0A25XRwl2J0WEU7LsLqSVuUgZtLjZApTD6khLjBqgYjtj1YnM8BhtHs 2zFsb37C1F17CafdoDcsdtYsgwDGZy+lAicCIwD1SPMJBPPmYEhfRAeOjics+yK5/JuLW1zmF3PgV y0kStaTQVHlG+11XPQxlBPrB9m4H/Qd+FQFVxaQqetbftvb7pXwSo0QGXwXuL6qoPI5FZYTjWZmu8 OaSV5g23w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ldwq8-00GQeA-Ft; Tue, 04 May 2021 15:20:00 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ldwq4-00GQdy-JF for linux-arm-kernel@desiato.infradead.org; Tue, 04 May 2021 15:19:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description; bh=+VQRsvvjA6lBIg8O4m/qRSC89osSCE9/DLxyu6kLiSY=; b=WdajEJFl67X3LOsYUEPOwvnM24 /x6Ie75BW1vxupSTmFjhPrYm1nIdS7OI0TlxuhqU3TZXNNsiomK+sOoEM0yYLTnpoKFY7FSumUVu9 nkbpMY42OV73+kujvcxOG303QoPhe3pyeLzPzKFymrXJk/R5BvvD91qwmH9ek4UI1/WR1Oe20fvlQ 7B0XeXCWZqVJGW5agKFf1JE0LcTrl9FImiVb9ZU/cJKYtBwYe1gsB7irOx1RLYyY9aGO12MZpzX3m BrgoXwtlcFMLpi6Cg6ihwf9DKop48Eduy+/S81wPxnqv04WU4Fj/qtUyt09JINWxcCSc0RpE/RkJY hnHyHt2w==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ldwq1-004478-KG for linux-arm-kernel@lists.infradead.org; Tue, 04 May 2021 15:19:54 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BD5FBD6E; Tue, 4 May 2021 08:19:49 -0700 (PDT) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D9F713F718; Tue, 4 May 2021 08:19:48 -0700 (PDT) Date: Tue, 4 May 2021 16:19:12 +0100 From: Andre Przywara To: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, Mark Rutland , broonie@kernel.org, kernel-team@android.com Subject: Re: [AArch64 boot-wrapper][PATCH] aarch64: Enable FGT for EL2 Message-ID: <20210504161912.4b570e9d@slackpad.fritz.box> In-Reply-To: <20210503120920.1819233-1-maz@kernel.org> References: <20210503120920.1819233-1-maz@kernel.org> Organization: Arm Ltd. X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210504_081953_752805_45F80831 X-CRM114-Status: GOOD ( 14.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 3 May 2021 13:09:20 +0100 Marc Zyngier wrote: > We have no intention of handling FGT traps to EL3, so let EL2 > play with the feature directly. > > Signed-off-by: Marc Zyngier Verified the bits used against the ARM ARM. Also Trusted Firmware does the same thing, so: Reviewed-by: Andre Przywara Cheers, Andre > --- > > Notes: > Needed to boot Linux 5.13 at EL2. > > arch/aarch64/boot.S | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S > index e47cf59..fd7133d 100644 > --- a/arch/aarch64/boot.S > +++ b/arch/aarch64/boot.S > @@ -54,6 +54,13 @@ _start: > cbz x1, 1f > > orr x0, x0, #(1 << 34) // TME enable > +1: > + /* Enable FGT if present */ > + mrs x1, id_aa64mmfr0_el1 > + ubfx x1, x1, #56, #4 > + cbz x1, 1f > + > + orr x0, x0, #(1 << 27) // FGT enable > 1: > #ifndef KERNEL_32 > orr x0, x0, #(1 << 10) // 64-bit EL2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel