From patchwork Tue May 9 08:20:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Elwell X-Patchwork-Id: 9717243 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 ECBAA60365 for ; Tue, 9 May 2017 08:21:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAF8520572 for ; Tue, 9 May 2017 08:21:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE8D626E78; Tue, 9 May 2017 08:21:19 +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.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_SORBS_SPAM 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 2E56120572 for ; Tue, 9 May 2017 08:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:To:Subject :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7o7Ye0ShGMRBI+8qAiSETJCBICCwPHnq0m6TwOzcmKY=; b=X+v3s2YyUwCKpD TrCZOHkFsRFJG7x3VnWotQIycNLYJfL0hTdORWDTYtjKjuVMvH4CP/rhpS7oTCb7tcKj5wO/y6jsu nj2XcLMkJNRZ/ZlVTFqGTYS6DU+FVR6vM/G2liNVMvCvEYOk039wrfccHS28+v3jOQJziUeNXlIBd gGzlcAmp8YfS/N5/vMCs63/UP4AQlvfImRLtIWSZgISUBqVsJ2f7vuBFOb9fWGVlQZlywzpV65tLk xty7I9FcRVOoOD8qNj+kY/k94A+t0GB2/rcziJzs40J8/NHrAzWsZ7fV/t0ZkYiLbPmEmEd5vj0Fd rwj4xdLkSb4mpGoxrY3Q==; 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 1d80OT-00057w-J8; Tue, 09 May 2017 08:21:17 +0000 Received: from mx08-00252a01.pphosted.com ([91.207.212.211]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d80O3-0004E8-Vr for linux-arm-kernel@lists.infradead.org; Tue, 09 May 2017 08:20:58 +0000 Received: from pps.filterd (m0102629.ppops.net [127.0.0.1]) by mx08-00252a01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v498Iew9022356 for ; Tue, 9 May 2017 09:20:27 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; h=from : subject : to : message-id : date : mime-version : content-type : content-transfer-encoding; s=pp; bh=RFrbvPmffHoeqBDpmEJnT/Sc0xNrDA367+QFZ3/W4YE=; b=rtsxeQddpZtpONW5PYIXMnwteCZu4AzWKbIvsRIIApkdzYTraHA+SexQtAVmqfQipoU9 fX1ijlTLI2Xk+/RYGr8Gtl429oJTsfjnmE4U8G7CTSfpgw20Vs7y7NZubZiTtv2bCfQz F9B5Uhu0Y4yPUocjnivPTGWBNhVjbLmuRuYz43B5K9KdbXXUOr86BFpbFQqFbyW2QLr/ 6g0oDaO0uNSgacychC1+hlHYmh7pI5/cXok0D+O2mzxXp2GjZxA9UqHhxZz3fwegs3YW 0Mjvg+VLKs+Ag2bF/Uox36gG6B4SUc/rHnFaRnZhZMzjaEkusKGrC/dgK36QoItsy2lx zQ== Received: from mail-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by mx08-00252a01.pphosted.com with ESMTP id 2a92yf9f2c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Tue, 09 May 2017 09:20:26 +0100 Received: by mail-wm0-f70.google.com with SMTP id b86so13975861wmi.6 for ; Tue, 09 May 2017 01:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi-org.20150623.gappssmtp.com; s=20150623; h=from:subject:to:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=RFrbvPmffHoeqBDpmEJnT/Sc0xNrDA367+QFZ3/W4YE=; b=rQnK7wxUzXUrVU6WYiy6xPTmoNF89e/f5smzryewwJROEG20xKfd2UrPmNKD+bCVr9 +OQJF6Q1yZL0PagkMlbAHb0LYwEnGddOp3Kp0hEjAQhIas3R0/EQUyVDbqPNt6svwh9B EtFjezWItLOuZhkp/rhE6IX8bKM1UIB8w54jqi1paXhhNWiEjnKNQpm8M00lsnPf6Qo6 F5IEs2RZUoMqDAsm6+b5+MMria9dPqvEG6OX8D8rZwcnv73ssHX99GV0BZEhgHyD17rO 5xfHH1Av6aYO0iYyHqPLblV7Xi8p1jkBrA3XE2e1i9Ggz2g6Ar10YXpqW0ciCMe5CHDo z94w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=RFrbvPmffHoeqBDpmEJnT/Sc0xNrDA367+QFZ3/W4YE=; b=FJ7eldXvHJ8FbTusM2mpiwRVKh8TgxGsInbOnsPEBZpfS/UAggj/WYAKnP7AYTvgLZ 42pVaE+VSy2y4Nag6te4PD+QUX49HnxknG6YHg9Dx244eYja8HA6R+A/uLCtVwtX+R7M zARroxgxHsJG7cx9b2xqF9fvu8/S/ogPPH07j7Z55kc/LELwoLWeJ6I6CQ9Co+ZUn5IK W3eRS3tNUAS+2VT+TJuL54P1DN/SIKZhFo58ZYsO0hCCpmxOx3DN9fS0zJWFVtrG/Wwl CW5D8nhxSBV8ZmoqpnGfd+4ekQ5Sw2xc6DQkX9z9X57gQHO0bmidHR78b2Km7zW7mUe0 NJdQ== X-Gm-Message-State: AODbwcCcnoyDUeCJhQDE7awgb0ugP5cG0nndxfPpgqz3+lFspBDZhKJp WEI9lALkMvaE9yyARAIk65I3oYVdPK76G/LbcJcC1LjYMDzicMOp1Cz6cFLtYAEchGbJuDe9neo 6MvsVZf4oNk6gKJmQZxghb9FBog== X-Received: by 10.28.63.142 with SMTP id m136mr16088976wma.87.1494318026061; Tue, 09 May 2017 01:20:26 -0700 (PDT) X-Received: by 10.28.63.142 with SMTP id m136mr16088961wma.87.1494318025842; Tue, 09 May 2017 01:20:25 -0700 (PDT) Received: from ?IPv6:2a00:2381:fdf7:14:e08d:8399:99bd:3b24? ([2a00:2381:fdf7:14:e08d:8399:99bd:3b24]) by smtp.gmail.com with ESMTPSA id c37sm17520335wra.16.2017.05.09.01.20.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 May 2017 01:20:25 -0700 (PDT) From: Phil Elwell Subject: [PATCH] ARM: dts: bcm283x: Reserve first page for firmware To: Rob Herring , Mark Rutland , Russell King , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rpi-kernel@lists.infradead.org Message-ID: Date: Tue, 9 May 2017 09:20:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-05-09_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1705090043 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170509_012052_747065_A569C9B7 X-CRM114-Status: GOOD ( 12.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The Raspberry Pi startup stub files for multi-core BCM283X processors make the secondary CPUs spin until the corresponding mailbox is written. These stubs are loaded at physical address 0x00000xxx (as seen by the ARMs), but this page will be reused by the kernel unless it is explicitly reserved, causing the waiting cores to execute random code. Use the /memreserve/ Device Tree directive to mark the first page as off-limits to the kernel. See: https://github.com/raspberrypi/linux/issues/1989 Signed-off-by: Phil Elwell --- arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 4 ---- arch/arm/boot/dts/bcm283x.dtsi | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts index b21d286..cbec919 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -1,9 +1,5 @@ /dts-v1/; -#ifdef RPI364 -/memreserve/ 0x00000000 0x00001000; -#endif - #include "bcm2710.dtsi" #include "bcm283x-rpi-smsc9514.dtsi" diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index 7d58cd7..0bc1932 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi @@ -3,6 +3,8 @@ #include #include +/memreserve/ 0x00000000 0x00001000; + /* This include file covers the common peripherals and configuration between * bcm2835 and bcm2836 implementations, leaving the CPU configuration to * bcm2835.dtsi and bcm2836.dtsi.