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 5C23DC433F5 for ; Wed, 12 Jan 2022 14:36:14 +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=sY7BlEEkoPypnZH0xIp2yHqJgENhDG00H9MwKOhG7xk=; b=Pzh4SJpnxRoEXb Yx7+pjAneJeId1Ddzp+xHpQA0KaDek89AOsMq/OpUO2GVZd56Ht4sSykziVCN8WoTysYMfXaJYJhr xhc3jipFcBiXAw8ejgRlaQhIVbpZOiDZLkvVcbeRc0lggnhO6zETZ5HhttRditayL5iK2CkKE3xzK yNbO6hqbdEfJilVdOuYw3w0nCq2NC7mUSr0bNdkCOC+IJSTnEuH5B9CVNYxhZtIjr/heQx/7Lj1Vg 9GgaiX2stjWeSl1TTSsEvxufj0jw4EywwTe6fCAjA0gX3t71UGL6R8ZVZ+fGZHumijzF050EQBfo4 A2B6GAtbFOMknLL63W6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7eiI-002igh-Ap; Wed, 12 Jan 2022 14:34:58 +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 1n7eiF-002ifO-2g for linux-arm-kernel@lists.infradead.org; Wed, 12 Jan 2022 14:34:56 +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 C1E7CD6E; Wed, 12 Jan 2022 06:34:53 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.1.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C0A913F766; Wed, 12 Jan 2022 06:34:52 -0800 (PST) Date: Wed, 12 Jan 2022 14:34:45 +0000 From: Mark Rutland To: Robin Murphy Cc: linux-arm-kernel@lists.infradead.org, andre.przywara@arm.com, Jaxson.Han@arm.com, Wei.Chen@arm.com Subject: Re: [bootwrapper PATCH 06/13] aarch64: initialize SCTLR_ELx for the boot-wrapper Message-ID: References: <20220111130653.2331827-1-mark.rutland@arm.com> <20220111130653.2331827-7-mark.rutland@arm.com> 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-20220112_063455_199407_8F949AEF X-CRM114-Status: GOOD ( 13.37 ) 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 11, 2022 at 02:38:28PM +0000, Robin Murphy wrote: > On 2022-01-11 13:06, Mark Rutland wrote: > > The SCTLR_ELx registers contain fields which are UNKNOWN or > > IMPLEMENTATION DEFINED out of reset. This includes SCTLR_ELx.EE, which > > defines the endianness of memory accesses (e.g. reads from literal > > pools). Due to this, portions of boot-wrapper code are not guaranteed > > top work correctly. > > Nit: "to" Cheers; fixed. > > +/* > > + * RES1 bit definitions definitions as of ARM DDI 0487G.b > > + * > > + * These includes bits which are RES1 in some configurations. > > + */ > > +#define SCTLR_EL3_RES1 (1 << 29 | 1 << 28 | 1 << 23 | 1 << 22 | \ > > + 1 << 18 | 1 << 16 | 1 << 11 | 1 << 5 | 1 << 4) > > + > > +#define SCTLR_EL2_RES1 (1 << 29 | 1 << 28 | 1 << 23 | 1 << 22 | \ > > + 1 << 18 | 1 << 16 | 1 << 11 | 1 << 5 | 1 << 4) > > + > > +#define SCTLR_EL1_RES1 (1 << 29 | 1 << 28 | 1 << 23 | 1 << 22 | \ > > + 1 << 11 | 1 << 8 | 1 << 7 | 1 << 4) > > + > > +#define HCR_EL2_RES1 (1 << 1) > > Maybe use the new BIT() macro in these? I reckon that would be more readable > overall. Hmm; I'm not sure why I didn't do that to start with. Done. Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel