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=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 75300C388F9 for ; Mon, 16 Nov 2020 23:34:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 1C0432223C for ; Mon, 16 Nov 2020 23:34:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FGEPB7PD"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CnH+c8pO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C0432223C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=b1Kf2V6GbrvDspYY7cjKTWAb9k9cZUyta3Xeuj1qLP8=; b=FGEPB7PDkMpJMgPWLZE6K5v81 gn4uCTFm+uDiaR1e0OqgU1Xk8AqUl05AgpvPUr6GTv23a+xPGLQR5B4zR/RrwZ2RVAlzF7MBmokUb Mw1o7BYarm8RXDavSvSuVO6CQ6M9rTSYVQcg0jpxXjNT8TWq3a0iCoXBd6SNcqCPgt2QXZ8V0FKIo DDaBEyagGXX4tvVUXOB60scSRuHRdBDTCXw/6LRKVenKulmhTbBvhVpVvRx8g5HymUfXOwYANneIe JUUDhBIXB8NJc4tPycCs9HRyq7BYPCqLlLeYdWJzhhts8k4Z+XAGeh5s8MyVKAqJpSs0fJT5nGxR2 1lhLoFfPA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1keo0W-0005Ba-82; Mon, 16 Nov 2020 23:34:00 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1keo0S-0005Aq-QL for linux-arm-kernel@lists.infradead.org; Mon, 16 Nov 2020 23:33:58 +0000 Received: by mail-lf1-x144.google.com with SMTP id z21so27542849lfe.12 for ; Mon, 16 Nov 2020 15:33:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NOqcXi7JorxVC1OLhfwyPd2k6DgNpu3fKbX0ysTO7is=; b=CnH+c8pOp1r9GV5+mYYtptnrPklFNl/u+z1/ZhkkrmsCEunIpwNxD1DKRBa5JFxfxH UF+h8S6Z7c0NIUaMbJo3h4OGCE8Yys84bcU/zPmdoX3SSqCByflxO7bbqojNee9kxenv 4Lg/FdOIpS1lJFBbfmvcqKFDvvrmdwmo+pGFdcU86kUvSZLjnClamKhCZPNPoUp3syHI xINYqx+LdzSGJ0U8Vla7kf/cmd/xU1vbSSD3FCrACn/hWzcZ5+tuz/R6wbVGtQla+q2i ERR8hdagyQi9ZsMD843G4X9n5YOse6Yh92idYaYyc4ZO8++Ra8eQF1IDdXTSnY1XXJqK uYEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NOqcXi7JorxVC1OLhfwyPd2k6DgNpu3fKbX0ysTO7is=; b=Z3reeDh8wv74Vnhx+HuBOmoOBWx3p8xH+mLhmncb/fPU1SWumoG9d0LM9KQtbw0axJ 7XkofHyPGm8xiXYkFGz0SA0bJVhJQuO3gB8qCMD3ViwkEUbfD+lIj6sTJfDY+Qsr3tQF X/pKEC11pwB8bJ1LUKJSTpsLxHiLb4amb2OaRJLKCdGHVvvh4+Okp2jOsXc3WsEu6fDz ThLMRuOLgQ8Bq/ILwMzTUP2iUwCB2iG3x/bLu+RkBBNz75rXz/97c8AoXM0M2zfDLxJE 8E3NbrhhOuBteewyhD2f/Pwwix6ZTxKTxBU4XhClGKJlUroP/dV20TsMpiHak3JwzPRr dgnA== X-Gm-Message-State: AOAM531H+NSHJ63et+NWz2u5JDIIXvJYZtaUeIK/P6D5M6stuOx4Ac/7 VTNKSHh0Y4rHLfX/W50LU9hXmsDCzl99zKY7weh+RQ== X-Google-Smtp-Source: ABdhPJzivkY0Pw5w3CBt53491IiqYDd6uJJ8nj3Dv2MMiE5vfRz7wwBd0adkYPcjDQL7eDhsii+j5s6PR92BiK+1suk= X-Received: by 2002:ac2:4ac7:: with SMTP id m7mr622969lfp.572.1605569632474; Mon, 16 Nov 2020 15:33:52 -0800 (PST) MIME-Version: 1.0 References: <20201116145650.25513-1-ardb@kernel.org> In-Reply-To: <20201116145650.25513-1-ardb@kernel.org> From: Linus Walleij Date: Tue, 17 Nov 2020 00:33:41 +0100 Message-ID: Subject: Re: [PATCH] ARM: head.S: explicitly map DT even if it lives in the first physical section To: Ard Biesheuvel X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201116_183357_213513_B80348D0 X-CRM114-Status: GOOD ( 16.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guillaume Tucker , Russell King , Linux ARM , Nicolas Pitre 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 On Mon, Nov 16, 2020 at 3:57 PM Ard Biesheuvel wrote: > The early ATAGS/DT mapping code uses SECTION_SHIFT to mask low order > bits of R2, and decides that no ATAGS/DTB were provided if the resulting > value is 0x0. > > This means that on systems where DRAM starts at 0x0 (such as Raspberry > Pi), no explicit mapping of the DT will be created if R2 points into the > first 1 MB section of memory. This was not a problem before, because the > decompressed kernel is loaded at the base of DRAM and mapped using > sections as well, and so as long as the DT is referenced via a virtual > address that uses the same translation (the linear map, in this case), > things work fine. > > However, commit 149a3ffe62b9dbc3 ("9012/1: move device tree mapping out of > linear region") changes this, and now the DT is referenced via a virtual > address that is disjoint from the linear mapping of DRAM, and so we need > the early code to create the DT mapping unconditionally. > > So let's create the early DT mapping for any value of R2 != 0x0. > > Fixes: 149a3ffe62b9dbc3 ("9012/1: move device tree mapping out of linear region") > Reported-by: Guillaume Tucker > Signed-off-by: Ard Biesheuvel That's a good catch! Reviewed-by: Linus Walleij Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel