From patchwork Thu Oct 3 21:30:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Edwards X-Patchwork-Id: 13821602 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 2BB7FCF34C3 for ; Thu, 3 Oct 2024 21:33:16 +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: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:In-Reply-To:References:List-Owner; bh=tlJnuYudkQcvSiXcbuQHiiS8kjmsY5u12FD20Oi4f1w=; b=FRis3moeOZ+GUwWxuxb9EIAbIZ 3UY6x/phH7UZUM/TFV5n87Mb55bEIKB7cFPWChrKIxk2O6ZN+/J9RU/T+a/tc+GgzecbA0dkMkxkN 11AR4178/0fCV6cKOEPY/XIGoeD98Un+e4pR/z5Tv1jddrzdTFCOnOGNWs0J/wPatfc931Ow6Vz+C aoybG5cIG1jJlWCkbvwczgykueqETrbF/JrBfQDPj//uhLhe2OaAYcm4S6MzEoiU5QywIiJLYjgr3 sYlyeouMUAS9BrGodRoLkSseBLAGokLvjD26VpdIBNp4GEuigw7S3+t+d1T+jbVYvhuTooyeqeuc4 Phb2iNbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swTRY-0000000AP4i-2Ncl; Thu, 03 Oct 2024 21:33:04 +0000 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1swTQJ-0000000AOsP-0Dk5 for linux-arm-kernel@lists.infradead.org; Thu, 03 Oct 2024 21:31:48 +0000 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-20b5fb2e89dso11309635ad.1 for ; Thu, 03 Oct 2024 14:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727991106; x=1728595906; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tlJnuYudkQcvSiXcbuQHiiS8kjmsY5u12FD20Oi4f1w=; b=ijJeYRbh0U1Xa2hG2HQE384gvZUV4/B2HzWryDa5SdOLMgSC0KHBYQnN2qkEEMvodK t6WlN2Ilko5VFtApWswbqX4zffYi3bYrrsPrjs7QgXQBDbzphUnDR2PXirLCSPqzQfn/ Pf52U4Ai09QFp19WpzbplaY1t7fdUPJ+BsQSDiwHyXjbfRARupCOtC7ZqMtMl1y8K1o0 SX5k5zdtfEpYrPOws9igfbpfqe135bcRT8ZRA8A0cUGwkJ6TuSuZYlEEmwxPtmQrriPo ZUuS1yXYBLeQ1iWi44eQL/aA8Fr0wENdIxlv4w6ZfNnpuY49K//Yjz4gtx8kf6Q23JRF Tsrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727991106; x=1728595906; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tlJnuYudkQcvSiXcbuQHiiS8kjmsY5u12FD20Oi4f1w=; b=UclkqaXzcfwIRVaKbroBrqXJ5FmO9T+kxQzjMl2yoydXZ8Vj7lihOE32j1JeS8C2yg rhWGo9G8nQUo8ZRKHVSIAkkcJRLirZ6MnAQMprjSFIIExCRsn30GtX408yCqdThHdOO9 DVuxjtBNZQ2gwfhjc6RJvF0hvSDDXBwjljhfWAxVazDUZbTDmBL//pkXbcYfi4vuB6hn ID5Yd1efJmRfYCSLvmGYAl41YaxGfdikkC3js21KtJMNP5R4Et7DbCLufSVZXhyJHCc/ E5xbF0so9Kh+isXJ2mo82k9Odli8WUxWXovIr/hspsLtRL4TODYfWyGPw4Hqw/hMK3ui HYpg== X-Forwarded-Encrypted: i=1; AJvYcCVMYiOwChD/0pBpWQuu9Rz2li1cX/s1i3NR8GcppFjvENLBOr7YVVTwhSUMzLWFBVhpA0ULacCI92u/Pfn+kTLr@lists.infradead.org X-Gm-Message-State: AOJu0YzxONlCArzaQ8LNsKGo2IMTngAS4AWQVEJCtOvU0YLjXuDNw0rH WXB2frL8nYD4+yj5j06r+ZOVGO9j/6Zco3usB6kBHa/8TOpFIekR X-Google-Smtp-Source: AGHT+IFiGdM+VQCNhgt4ZlgEkjHdFnPd8See17dNt2UuFCVzLRXPiZrBh0yv9L4vN8l521dlZfBxfw== X-Received: by 2002:a17:903:32cd:b0:20b:af36:ead with SMTP id d9443c01a7336-20bff194fd0mr7661645ad.44.1727991106195; Thu, 03 Oct 2024 14:31:46 -0700 (PDT) Received: from luna.turtle.lan ([2601:1c2:c184:dc00:b8ac:3fa:437b:85fa]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20beeca2fbfsm13285795ad.102.2024.10.03.14.31.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 14:31:45 -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] arm64: dts: broadcom: bcmbca: bcm4908: Reserve CFE stub area Date: Thu, 3 Oct 2024 14:30:07 -0700 Message-ID: <20241003213007.1339811-1-CFSworks@gmail.com> X-Mailer: git-send-email 2.44.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241003_143147_118232_5B975C6D X-CRM114-Status: GOOD ( 13.71 ) 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 CFE bootloader places a stub program at 0x0000-0xFFFF to hold the secondary CPUs until the boot CPU writes the release address. If Linux overwrites this program before execution reaches smp_prepare_cpus(), the secondary CPUs may become inaccessible. This is only a problem with CFE, and then only until the secondary CPUs are brought online. However, since it is such a small amount of memory, it is easiest to reserve it unconditionally. Therefore, add a /reserved-memory node to bcm4908.dtsi to protect this critical memory region. Signed-off-by: Sam Edwards --- arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi index 8b924812322c..326f84f746cb 100644 --- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi @@ -68,6 +68,16 @@ l2: l2-cache0 { }; }; + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + cfe-stub@0 { + reg = <0 0 0 0x10000>; + }; + }; + axi@81000000 { compatible = "simple-bus"; #address-cells = <1>;