From patchwork Sat Oct 5 05:01:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 13823102 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 D9E82CF8861 for ; Sat, 5 Oct 2024 05:08:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xhYJFY/3ez6e12f4SS2gZFove6N9JarO3wcT3pL3TYY=; b=EMXzk1I5LghLRNoC+kJmGQ4Rxx ugt/4sCHv4kahTXnbk15ealLdPwF/9s7HO4CU+JvSZ60npAxHFSve20oBLzJBmIUF8uyNdihjKxgp QNfsIcpJz68rHf8+8beqH5XcJyzdVT3GBQVZT8+IHaIlXCHSH5TC93CaatFk2dQ5B90WJDYHvVsIP pWjMgI//b5+BlSWtwFuG7gjvUE4qaPs6L1y/GC1vKcucvPJQtS27GSaT+AYHNmvB+g19CXY5MkDen 1edYHagD90tWoajDZlr8r0ECTc8rcSGWGSG5AhjRWevUdVd+xFZtgZTX3Uu0hX69rjX4uypPtxFEP 8FuUKP0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swx23-0000000Emcj-0h3m; Sat, 05 Oct 2024 05:08:43 +0000 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1swwy9-0000000EmCl-200t for linux-arm-kernel@lists.infradead.org; Sat, 05 Oct 2024 05:04:42 +0000 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-2e137183587so2386193a91.3 for ; Fri, 04 Oct 2024 22:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728104680; x=1728709480; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xhYJFY/3ez6e12f4SS2gZFove6N9JarO3wcT3pL3TYY=; b=CuadyAtn1DCUJgtxEWQ5DMoitpGbo7pih5LbBQSNtf9HEYr2cUn8vdcfJ+6Vi+2Mc/ Ooq9/YU95TZipvR49PqRPnBccY8foXfzAch//foTb7qXKGizuEz3zrjCvMLKOUgHM438 fn7UhRNGedMg+l6exhSQctGANOyTPE4thOT1uKTS/DnwqbggjhIrW0U/GHM4GF37o4fB EvMJ+D4OJ+5n6r5BMt326JA2TDE0F5dkWnW+jw/Pb1D1K6+pukZsrIwilYEwMbk5wr+t fTUDYtYkpnD+coW4odc7yDnmVb5RLAmlLx6WmhP6eZJO8dTKAEDza4s2ZEtZ3Cmb9beC bqdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728104680; x=1728709480; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xhYJFY/3ez6e12f4SS2gZFove6N9JarO3wcT3pL3TYY=; b=fHdOiAAXKCdO+ztlI1kmOx5nybSQ7KcyV5y9cMegtY8S8DSPLetTULWsgXJnsZhEdq /IHj9Ik7cIBpzA6y7k+4d1Y6z67B6ShPg50TWpX891CNi5/njIWTE6al8lbJMezEkuOd eBirHRSUzQeFkAGITyoZkn7TswxaL7RrxQrcRxOZjaj/Slbm+rHOGNru/4wuo5zYdxfP uTTORLsgRyxP3pRepcZQnZVAYBMEMVSU0MuqU2T8JQUfpyZMgpbp7g8c0LyrpfVP9PRY KNxbFMWxeFwxAB9Smrbm9nnDrBjSJIX2OApepFDh8ZSKjbApwYKaLLbHRj199KNBIVbX 8kBA== X-Forwarded-Encrypted: i=1; AJvYcCVbqFd/6f+bDPAc1VFlLFKfglF+vhst1Lsq4Vpmo+03pXdnOdUB0GxtXfmLhKnRiAIED47nHfuyfjiVIIsbQUqC@lists.infradead.org X-Gm-Message-State: AOJu0YxJLZ4Udn91FbGy3pk1mNAyhXypiOVaDgDEYYWLEfxT5/Bo4zl+ F4wJtjw6enC1plRQ85+X+cgtKJJMCBTbqFqqD3lGRL1/ViAsvXeb X-Google-Smtp-Source: AGHT+IFqU/bD9owh44BLnO7Dt8lW7NUUiiNoXHDfrVl05qMKf92usq8r5t6nJNkTf762XBPm1PCy4A== X-Received: by 2002:a17:90a:7085:b0:2e0:a931:cb11 with SMTP id 98e67ed59e1d1-2e1e6213282mr6114447a91.4.1728104680268; Fri, 04 Oct 2024 22:04:40 -0700 (PDT) Received: from celestia.turtle.lan ([2601:1c2:c184:dc00:ed3:4cda:b368:ce98]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e1e85db34fsm2625744a91.33.2024.10.04.22.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2024 22:04:39 -0700 (PDT) From: Sam Edwards X-Google-Original-From: Sam Edwards To: Florian Fainelli , =?utf-8?b?UmFmYcWCIE1p?= =?utf-8?b?xYJlY2tp?= , William Zhang , Anand Gore , Kursad Oney Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Broadcom internal kernel review list , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sam Edwards Subject: [PATCH v2 2/2] arm64: dts: broadcom: bcmbca: bcm4908: Protect cpu-release-addr Date: Fri, 4 Oct 2024 22:01:55 -0700 Message-ID: <20241005050155.61103-3-CFSworks@gmail.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20241005050155.61103-1-CFSworks@gmail.com> References: <20241005050155.61103-1-CFSworks@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241004_220441_547447_15688CCC X-CRM114-Status: GOOD ( 14.20 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The `cpu-release-addr` property is relevant only when the "spin-table" enable method is used. It is the physical address where the bootloader expects Linux to write the secondary CPU entry point's physical address. On this platform, only the CFE bootloader uses this method: U-Boot uses PSCI instead. CFE actually walks the FDT to learn this address, so we're free to put it wherever we want. We only need to make sure that it goes in a reserved-memory block so that writing to it during early boot does not risk conflicting with an unrelated memory allocation: this was not done. Since the previous patch reserved the first page of memory for CFE's secondary-CPU init stub, which is actually much smaller than a page, just put this address at the end of that page and it shall be so protected. Signed-off-by: Sam Edwards --- arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi index c51b92387fad..613ba7ee43d6 100644 --- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi @@ -30,7 +30,7 @@ cpu0: cpu@0 { compatible = "brcm,brahma-b53"; reg = <0x0>; enable-method = "spin-table"; - cpu-release-addr = <0x0 0xfff8>; + cpu-release-addr = <0x0 0xff8>; next-level-cache = <&l2>; }; @@ -39,7 +39,7 @@ cpu1: cpu@1 { compatible = "brcm,brahma-b53"; reg = <0x1>; enable-method = "spin-table"; - cpu-release-addr = <0x0 0xfff8>; + cpu-release-addr = <0x0 0xff8>; next-level-cache = <&l2>; }; @@ -48,7 +48,7 @@ cpu2: cpu@2 { compatible = "brcm,brahma-b53"; reg = <0x2>; enable-method = "spin-table"; - cpu-release-addr = <0x0 0xfff8>; + cpu-release-addr = <0x0 0xff8>; next-level-cache = <&l2>; }; @@ -57,7 +57,7 @@ cpu3: cpu@3 { compatible = "brcm,brahma-b53"; reg = <0x3>; enable-method = "spin-table"; - cpu-release-addr = <0x0 0xfff8>; + cpu-release-addr = <0x0 0xff8>; next-level-cache = <&l2>; };