From patchwork Fri Jan 20 16:20:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 9528913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 79CE760434 for ; Fri, 20 Jan 2017 16:22:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AC5828653 for ; Fri, 20 Jan 2017 16:22:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FCDA28665; Fri, 20 Jan 2017 16:22:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D320728653 for ; Fri, 20 Jan 2017 16:22:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cUbwv-0001Ea-SE; Fri, 20 Jan 2017 16:22:01 +0000 Received: from mail-pg0-f43.google.com ([74.125.83.43]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cUbwj-0000qI-Dl for linux-amlogic@lists.infradead.org; Fri, 20 Jan 2017 16:21:53 +0000 Received: by mail-pg0-f43.google.com with SMTP id 194so24721698pgd.2 for ; Fri, 20 Jan 2017 08:21:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JRLSJ0UnqB9EC0QIfnnq4MBYCX8lsEGOen2EUVqZoJg=; b=E83iIlKTPKf6N6CDP7Fn2DzE7PnfvDkkoCYRo17C2fBEtDukhopHimSolxL165PH7K i3PxcB2vKe6+xkZDQennfWNaVY1kju+kE+TWdSQCt5rMLob7eOq4K0nvViq2d4h4RK/+ dAIp3r6H+HhXgVSx6u/+vTPxzIxfwURjZSrAbhB7GbWmDkEi6vd4EL+BeQGz5eOIr+Gc X+NWWebLi+p4hKtOuZqzxloA24kDCrtaNdAH3nRgP43hMZ4AA4UU/vfWNzL6fXjMR2el NtmunRRsMD2hPuEWqZ+1ry2J//6IjSnSbirFF2u/ii3zuVVahrwvNm7Za94VvxGXXYwZ xYKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JRLSJ0UnqB9EC0QIfnnq4MBYCX8lsEGOen2EUVqZoJg=; b=KzM7mXxGrcXU3R3SNKGtDm06JngVWaUfaXcu1xWUfvsPCKtbl38K1ew9YSVSJqnu5f J9bXTAoB1Oc5lwE26M0DpoSkP4GeOs0FKup5Qgj384owM3HeMzZlDdcXULMNFYtIdhoM eewzQpJNixo3/LiudEznnjEvGTkeE+6UMGxEOcEQDjDc05i8WeZy4F1fXKpDP9OKF4e/ hxykhOZ7h0GU/G6H/4Vj/fbl1Z29htEi7BlAl348pH4EFKNzDLhsMMIvETVw/hhdRtbU VdZAnDjhrvV8QtWXcZyR0DN0PasXgs/ZMJXZkHJncF+cH5+LVhTkqhPscMYC5Bu3WAwD 73dA== X-Gm-Message-State: AIkVDXL1Ct5lK2MuKYKwY6x1bneUnFFj1AmXmIlrzGWz3wBtiZ1Yp7nS+7sp1mUpL/tituhE X-Received: by 10.98.112.134 with SMTP id l128mr17284448pfc.81.1484929228521; Fri, 20 Jan 2017 08:20:28 -0800 (PST) Received: from localhost (c-98-203-232-209.hsd1.wa.comcast.net. [98.203.232.209]) by smtp.gmail.com with ESMTPSA id f65sm18050883pfk.5.2017.01.20.08.20.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2017 08:20:28 -0800 (PST) From: Kevin Hilman To: arm@kernel.org Subject: [PATCH 2/2] ARM64: dts: meson-gx: Add firmware reserved memory zones Date: Fri, 20 Jan 2017 08:20:25 -0800 Message-Id: <20170120162025.31806-3-khilman@baylibre.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170120162025.31806-1-khilman@baylibre.com> References: <20170120162025.31806-1-khilman@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170120_082151_631208_932D9B69 X-CRM114-Status: UNSURE ( 8.57 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, Neil Armstrong Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Neil Armstrong The Amlogic Meson GXBB/GXL/GXM secure monitor uses part of the memory space, this patch adds these reserved zones. Without such reserved memory zones, running the following stress command : $ stress-ng --vm 16 --vm-bytes 128M --timeout 10s multiple times: Could lead to the following kernel crashes : [ 46.937975] Bad mode in Error handler detected on CPU1, code 0xbf000000 -- SError ... [ 47.058536] Internal error: Attempting to execute userspace memory: 8600000f [#3] PREEMPT SMP ... Instead of the OOM killer. Fixes: 4f24eda8401f ("ARM64: dts: Prepare configs for Amlogic Meson GXBaby") Signed-off-by: Neil Armstrong Reviewed-by: Andreas Färber [khilman: added Fixes tag, added _reserved and unit addresses] Signed-off-by: Kevin Hilman --- arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi index eada0b58ba1c..0cbe24b49710 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi @@ -55,6 +55,24 @@ #address-cells = <2>; #size-cells = <2>; + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /* 16 MiB reserved for Hardware ROM Firmware */ + hwrom_reserved: hwrom@0 { + reg = <0x0 0x0 0x0 0x1000000>; + no-map; + }; + + /* 2 MiB reserved for ARM Trusted Firmware (BL31) */ + secmon_reserved: secmon@10000000 { + reg = <0x0 0x10000000 0x0 0x200000>; + no-map; + }; + }; + cpus { #address-cells = <0x2>; #size-cells = <0x0>;