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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 34B5BC433ED for ; Thu, 1 Apr 2021 18:13:39 +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 C751C60241 for ; Thu, 1 Apr 2021 18:13:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C751C60241 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8a4PrNbmiPvEDkfXGRDnYROYlBFPLzSo3AMS++L/rac=; b=mK82eH/JEvpQELmoyDOyznEts hhIDSoSlOPqgiQ7NmwKpeKyY7tn10+FmKDL0s6u4CKjDiDGdT3TiXxqeLRyfeex5cv9P+OkE0RVpp p+zIATdo+7AjvgwPL1hYJwnR2Hlyvj5ZHQrxgWjiX44r2xE+PEvLIFlj3ATYfDBAIjazZryLijDnq XdUuOYrd78TCS+Z8/fNwKKttww11joCeNgeoL323lp8qzqid8IhQm45YdybeC/yaeH3o5dCBt1HvH Hb3sQAWa9rE0T+wgBWJ+lKNEiN299V2cbSgtj4vrO2JmRCGpU4R5McrXj0yuKMp5Q3pQ3jp7kp5NM cQr8bhFxw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lS1ns-00AczE-Hn; Thu, 01 Apr 2021 18:12:24 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lS1nZ-00AcwC-50 for linux-arm-kernel@lists.infradead.org; Thu, 01 Apr 2021 18:12:07 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7337C611EF; Thu, 1 Apr 2021 18:12:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617300724; bh=bbxxgXe8WRsW0wlTNlVgxE5kGGtSxPsSiGgXVPa6tro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q0HKmDKLxXo2IirlegtFQZghi0dPf0fBna4w/xtVbV07b3juNspyQD6kuhykzNpmK MlyoqTCiqbE3VF2G7piKNIrhMbi+OGmA2s4c7AL3nMmDg5g7LTtKzxU+mTx3fmA5Sj NTsXMhTBDS1sPohCynVeiOhJzcE58XBF8Z5RgwZWwBsACxh9b3w/pdcckxLDcXIyAY PUNcD9cMInQH6jY+pbRSh85cylIorCmljqlftgP38Ywi8YMLo8TUwSOdFZJafcLj8I w7tIMf+Ri+MNt4tniS0MbkEsOVZjrc00595GEUr/4mYRfqy73oOkHaWLzxRcyiZpzP fXkWFxL+VTdlw== From: Mark Brown To: Catalin Marinas , Will Deacon Cc: Marc Zyngier , Mark Rutland , linux-arm-kernel@lists.infradead.org, Mark Brown Subject: [PATCH v2 3/4] arm64: Require that system registers at all visible ELs be initialized Date: Thu, 1 Apr 2021 19:09:41 +0100 Message-Id: <20210401180942.35815-4-broonie@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210401180942.35815-1-broonie@kernel.org> References: <20210401180942.35815-1-broonie@kernel.org> MIME-Version: 1.0 X-Patch-Hashes: v=1; h=sha256; i=T0coOGdX5tOTdaYLOaBnfwFwcCIEVp03jXA5K8IHrhg=; m=e35lFP6FNzFfhChOXFeXvwr3Qqs9BRt95xlbN4S41Y8=; p=yo46sSyX+CIH/99TehnpT2QdAgk1PBARxh4F8LagZ1c=; g=769ee96557897dc7973f32d925ca74551d2ad82d X-Patch-Sig: m=pgp; i=broonie@kernel.org; s=0xC3F436CA30F5D8EB; b=iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmBmDGQACgkQJNaLcl1Uh9Aonwf/Xt7 Pa33LHp9e4yloy5SSsMr/hNDg/u48/9r+svpgsmEgqS5WyH1omEdtaEXJWVVrDeYY7wdRJThNH5ml YNZyiHjukh0luW+YlQb98roVMj6+nxRT+8+MZA4U8M3HCN+gA3UYFxl8+CrDuOgVACIUMHW9xs9/F II6ak8JgoAc5Ytg2341T6Bz1y+uVSjz5e/J1P24AVxy6ssjJQxfIJPjo77zkxYo53GCcuxHPTP6C0 QeWXd72chOcIUvtfLBr2pK87SQ1HY/yzVNo/94izSXn6PjzappxEzJK+N1Ym7hHS2WSuFLwf4fIme AbddRkDnVjF4qgqDKjYmdaf7iUR0sTw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210401_191205_906964_4D729D7D X-CRM114-Status: GOOD ( 12.26 ) 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 Currently we require that software at a higher exception level initialise all registers at the exception level the kernel will be entered prior to starting the kernel in order to ensure that there is nothing uninitialised which could result in an UNKNOWN state while running the kernel. The expectation is that the software running at the highest exception levels will be tightly coupled to the system and can ensure that all available features are appropriately initialised and that the kernel can initialise anything else. There is a gap here in the case where new registers are added to lower exception levels that require initialisation but the kernel does not yet understand them. Extend the requirement to also include exception levels below the one where the kernel is entered to cover this. Suggested-by: Catalin Marinas Signed-off-by: Mark Brown --- Documentation/arm64/booting.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/arm64/booting.rst b/Documentation/arm64/booting.rst index 92ec0bea1af5..4fcc00add117 100644 --- a/Documentation/arm64/booting.rst +++ b/Documentation/arm64/booting.rst @@ -202,9 +202,10 @@ Before jumping into the kernel, the following conditions must be met: - System registers - All writable architected system registers at the exception level where - the kernel image will be entered must be initialised by software at a - higher exception level to prevent execution in an UNKNOWN state. + All writable architected system registers at or below the exception + level where the kernel image will be entered must be initialised by + software at a higher exception level to prevent execution in an UNKNOWN + state. - SCR_EL3.FIQ must have the same value across all CPUs the kernel is executing on. -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel