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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D6B78C433EF for ; Tue, 18 Jan 2022 10:36:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: 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=EukcwpdlambXb+M+r9U4hLdHpjB4XQICSA6iQkusnwI=; b=GDGe4cpX8C0qxT 5XHMEZziZNHqSMz20IE8pg+d+fx2YADLmAgb1l4Wvv+4g2ad10QS3YfnS6Cxmiav9bmwm7MyuaId2 Hhz79RAH5ExHKd7Ssg0whCq0sMqg1haosjcj8LaIGQvQJHeGlm5WbmAr//Y61nIWrPPv+p/42dKKR eVPDVaKRqhdFUm35fAoPHKLF2rFDKN5SS/FWgwSrWTFOYJuirQgehIFv+JmctmNSl8SiLMbyNarq8 p1Zgh3aKSVWC6mL3QKrpWVvks4H/A6ub8sxhbkBlaUSp5rGYepyfpy42+AsAfPuEVqLvc0lg9VQmw 0X40l3fjR4iW/aW1zZkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9lpR-001DYa-FZ; Tue, 18 Jan 2022 10:35:05 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9lpN-001DXm-Uf for linux-arm-kernel@lists.infradead.org; Tue, 18 Jan 2022 10:35:03 +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 322D11FB; Tue, 18 Jan 2022 02:35:01 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.37.52]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 531373F774; Tue, 18 Jan 2022 02:35:00 -0800 (PST) Date: Tue, 18 Jan 2022 10:34:29 +0000 From: Mark Rutland To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, andre.przywara@arm.com, robin.murphy@arm.com Subject: Re: [bootwrapper PATCH] aarch64: Enable BRBE for the non-secure world Message-ID: <20220118103429.GA16043@C02TD0UTHF1T.local> References: <1642066868-23151-1-git-send-email-anshuman.khandual@arm.com> <20220117132541.GD87485@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220118_023502_068141_E7CDC15D X-CRM114-Status: GOOD ( 19.17 ) 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 Tue, Jan 18, 2022 at 08:12:39AM +0530, Anshuman Khandual wrote: > On 1/17/22 6:55 PM, Mark Rutland wrote: > > On Mon, Jan 17, 2022 at 04:06:44PM +0530, Anshuman Khandual wrote: > >> On 1/13/22 3:54 PM, Mark Rutland wrote: > >>> On Thu, Jan 13, 2022 at 03:11:08PM +0530, Anshuman Khandual wrote: > >>>> +1: mrs x1, id_aa64dfr0_el1 > >>>> + ubfx x1, x1, #52, #4 > >>>> + cbz x1, 1f > >>>> + > >>>> + // Enable BRBE for the non-secure world. > >>>> + ldr x1, =(0x3 << 32) > >>>> + orr x0, x0, x1 > >>>> + > >>> > >>> I assume this is the `SBRBE` field, which naming-wise sounds like it controls > >>> Secure rather than Non-Secure (e,g. by way of comparison to `NSPB`). Is that > >> > >> Right, that is some what counter-intuitive. > >> > >>> correct? What effect does the value 0x3 have? > >> > >> As per the definition above. > >> > >> 0b11 This control does not cause any direct accesses to BRBE registers or > >> instruction to be trapped, and does not cause any Exception levels to > >> be a prohibited region. > >> > >> This basically allows BRBE usage in EL2/EL1. > > > > Thanks for this! > > > > Just to check, my understanding, there's nothing else that we need to > > initialize to ensure that BRBE won't start recording unexpectedly > > out-of-reset, becuase in BRBCR_EL* the E*BRE bits all warm-reset to 0 > > and hence prevent recording in any of EL0/EL1/EL2 (and BRBE never > > records at EL3). Is that right? > > Right, that is my understanding as well. Those required bits that start > BRBE recording, always warm-reset to 0. Thanks for confirming! I've applied this and pushed it out. Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel