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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BF81C38A2D for ; Fri, 21 Oct 2022 21:55:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229776AbiJUVzW (ORCPT ); Fri, 21 Oct 2022 17:55:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbiJUVzU (ORCPT ); Fri, 21 Oct 2022 17:55:20 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87CF5125036; Fri, 21 Oct 2022 14:55:18 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id a3so7149208wrt.0; Fri, 21 Oct 2022 14:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=uywRKkGBOBzaRpAeKnVzx5xH6NmY5amHDeoPWUqrzj4=; b=obZPWL4hwjCx5D18OHcuK4+/lvgCkHJOTkz7r2RXH1oV+8ut6II7Dl8Ih48l7WzHtE 2FqsaH+FBrdORZ8E/hQC9qDozE92aWbtncThnynxxzCCd62XnRS9a/TnECJBzKNdVu6n M8Due3bQKWefFH5YkkyjB7Z9P2PhEgbmXpPJ6o7Dmg9JjNjCj46+E1Bb1oo1CQ7XShgh kphPLzJ/iIBiEuNOLfu1whjwuuB0DaazLRhfkZSEUvu+VKfwFTSlCDY8TttZFxKG4xsZ 71PATjaDxtUslEVEY0r/gdNR7sa8jsJfQp9kzUDeRxBlGrh//8j6Wn+/6C8YOIxSSHD8 dtWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uywRKkGBOBzaRpAeKnVzx5xH6NmY5amHDeoPWUqrzj4=; b=KaNM34wZYLaoSxVp1ejcTf7Kba+oyfN5czDLmzC6SCYIRvU0KVbFd9DT/dEUBD7DXn tvkEAc1cwsELTEyXOfsaRW6yOW9RE8noOUa19DA0PD7XHRAdhaHe7WbG0Apzg2cwG8UT A+vcB2GNA03RtlrxLrCruj6Saz1aRRb9PbQEAVVpiszPwaPK//c6fnNShg71rDGJ6fUL xy1MBCzcUjSSuR9qf0ty8vKxg7DRdFk4qt5PCUI2GjA9iFIBi8FlSbV0DHAQJnGKMw1d AzDomwpKYC7q2TNhtEF0alspdey/qvGsXzgZAE36qLWPuL49iCiaASIrbu0AtXhrQHrq cEDA== X-Gm-Message-State: ACrzQf3P7pfLjQg2d1tJUJBK4+KLpNPOdDc/XgBny4QkUbOOl2LjeGjV XJjRTREcUsjtjUrDsxWZrSE= X-Google-Smtp-Source: AMsMyM5uO/Cq/xpoxJsZqWshH6/XzN1MINSem+X1Eg/d08U/P7gOiM/jicaRCqTzSbJaTlGTOEy32Q== X-Received: by 2002:a5d:6c62:0:b0:230:55fc:748a with SMTP id r2-20020a5d6c62000000b0023055fc748amr14091890wrz.15.1666389315677; Fri, 21 Oct 2022 14:55:15 -0700 (PDT) Received: from Ansuel-xps. (93-42-70-134.ip85.fastwebnet.it. [93.42.70.134]) by smtp.gmail.com with ESMTPSA id p16-20020a05600c359000b003b4ac05a8a4sm897677wmq.27.2022.10.21.14.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 14:55:15 -0700 (PDT) Message-ID: <63531543.050a0220.b6bf5.284d@mx.google.com> X-Google-Original-Message-ID: Date: Fri, 21 Oct 2022 23:55:07 +0200 From: Christian Marangi To: Linus Walleij Cc: Geert Uytterhoeven , Russell King , Andy Gross , Bjorn Andersson , Konrad Dybcio , Arnd Bergmann , Ard Biesheuvel , "Russell King (Oracle)" , Nick Hawkins , John Crispin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] ARM: mach-qcom: fix support for ipq806x References: <20221021181016.14740-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Fri, Oct 21, 2022 at 11:44:56PM +0200, Linus Walleij wrote: > On Fri, Oct 21, 2022 at 8:10 PM Christian Marangi wrote: > > > Add a specific config flag for Qcom IPQ806x as this SoC can't use > > AUTO_ZRELADDR and require the PHYS_OFFSET set to 0x42000000. > > > > This is needed as some legacy board (or some wrongly configured > > bootloader) pass the wrong memory map and doesn't exclude the first > > ~20MB of RAM reserved for the hardware network accellerators. > > > > With this change we can correctly support each board and prevent any > > kind of misconfiguration done by the OEM. > > > > Signed-off-by: Christian Marangi > > I had exactly this problem with the APQ8060 as well, then my problem > went away. I was under the impression that this was solved. > > Is it not possible to use Geert's linux,usable-memory-range in > the chosen node to make the kernel stay off the memory? > (See examples by grep usable-memory in the kernel.) > Hi, just to confirm this is one of the example you are suggesting? chosen { bootargs = "console=ttyS0,115200 earlycon"; stdout-path = "serial0:115200n8"; linux,usable-memory-range = <0x80200000 0x1fe00000>; }; Main problem here is that uboot in some case doesn't support dt and pass wrong ATAGS (with the memory not reserved) and AUTO_ZRELADDR calculate the wrong addr I assume? I will test the usable-memory-range but isn't the same of declaring reserved space in the dts? Or the zimage decompressor checks linux,usable-memory-range bypassing atags? -- Ansuel 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 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 83FCDC38A2D for ; Fri, 21 Oct 2022 21:56:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6kRJmgZ8ouA+Wac+ygpggdjq833LMdpUngmfrFHZQrQ=; b=zJ7LBriRTvTHAB a8/FRFxXEzYSatYZrC36LDyxKoluu9Y26LywX4c8iww0DLFXEmh3fbEkke5cg/fZ2T1ZL2m8Zd329 UtGDSoQtBLCmi3rw+bJ0mCtr4nEv1NNVmxeqDzDH4wuf/JHQqnL/PTIMvtBFJT+6FzfS4Swd8NYxH kMcIz9FUQaZ/nEe1jXXHRXgNl0vf8Ov2KwEAPYZpuJ9knjT0qSvLDXSEAeUVz4KXDCfeOEl2/U2pf XH2pMfVs4jDdH4DatNsvi+MJ8Ke2Q+n2ZtpxB1y9qP+MZY50/2fJD0PSAhUw65ZS9TXxCszH6iqiu xEWM1DQXUO+bE5tnZ2yQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olzzP-00A4WL-JF; Fri, 21 Oct 2022 21:55:39 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olzz5-00A4T4-EU for linux-arm-kernel@lists.infradead.org; Fri, 21 Oct 2022 21:55:20 +0000 Received: by mail-wr1-x42b.google.com with SMTP id f11so6554403wrm.6 for ; Fri, 21 Oct 2022 14:55:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=uywRKkGBOBzaRpAeKnVzx5xH6NmY5amHDeoPWUqrzj4=; b=obZPWL4hwjCx5D18OHcuK4+/lvgCkHJOTkz7r2RXH1oV+8ut6II7Dl8Ih48l7WzHtE 2FqsaH+FBrdORZ8E/hQC9qDozE92aWbtncThnynxxzCCd62XnRS9a/TnECJBzKNdVu6n M8Due3bQKWefFH5YkkyjB7Z9P2PhEgbmXpPJ6o7Dmg9JjNjCj46+E1Bb1oo1CQ7XShgh kphPLzJ/iIBiEuNOLfu1whjwuuB0DaazLRhfkZSEUvu+VKfwFTSlCDY8TttZFxKG4xsZ 71PATjaDxtUslEVEY0r/gdNR7sa8jsJfQp9kzUDeRxBlGrh//8j6Wn+/6C8YOIxSSHD8 dtWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uywRKkGBOBzaRpAeKnVzx5xH6NmY5amHDeoPWUqrzj4=; b=JIZHajk3atAe+AGr36nihwGqVO0M7hv4kQv1ka5bEVQgMT0+xxv3k4ZMo6cBIWiQWi zGNPewMSeI8TCm99zqUm8l51tK+ERu1u8+6qD+nN6ilVXmf44dm7vc14VSnDmm2nnOFy YaZyH/NMbdi+z7dl2FqlRvPqWTvrXsV+MiuwpTNePk+Kxtt5QMmUIA67d5q+pYIlfFb8 tLRqSw8iniTiQrzJagRixyZs+9oHsoYCoJmTov38ik84mB0AsRunfO/qnOtxJoc3vi22 rCwvBd+lpyM4BXwlp0Rawd0hD3GvnYCvoDL4gZvPupehrf4fWiJ8MlrVPhSAxhlnwjul ZkVg== X-Gm-Message-State: ACrzQf27hFjFRievhIaiaqvsn07c8dKHbyROu+twKcqbxWTlos571BMn ddziXupafCEi0oq8LAI68l0= X-Google-Smtp-Source: AMsMyM5uO/Cq/xpoxJsZqWshH6/XzN1MINSem+X1Eg/d08U/P7gOiM/jicaRCqTzSbJaTlGTOEy32Q== X-Received: by 2002:a5d:6c62:0:b0:230:55fc:748a with SMTP id r2-20020a5d6c62000000b0023055fc748amr14091890wrz.15.1666389315677; Fri, 21 Oct 2022 14:55:15 -0700 (PDT) Received: from Ansuel-xps. (93-42-70-134.ip85.fastwebnet.it. [93.42.70.134]) by smtp.gmail.com with ESMTPSA id p16-20020a05600c359000b003b4ac05a8a4sm897677wmq.27.2022.10.21.14.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 14:55:15 -0700 (PDT) Message-ID: <63531543.050a0220.b6bf5.284d@mx.google.com> X-Google-Original-Message-ID: Date: Fri, 21 Oct 2022 23:55:07 +0200 From: Christian Marangi To: Linus Walleij Cc: Geert Uytterhoeven , Russell King , Andy Gross , Bjorn Andersson , Konrad Dybcio , Arnd Bergmann , Ard Biesheuvel , "Russell King (Oracle)" , Nick Hawkins , John Crispin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] ARM: mach-qcom: fix support for ipq806x References: <20221021181016.14740-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221021_145519_525947_C886F5C0 X-CRM114-Status: GOOD ( 22.86 ) 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: , 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 Fri, Oct 21, 2022 at 11:44:56PM +0200, Linus Walleij wrote: > On Fri, Oct 21, 2022 at 8:10 PM Christian Marangi wrote: > > > Add a specific config flag for Qcom IPQ806x as this SoC can't use > > AUTO_ZRELADDR and require the PHYS_OFFSET set to 0x42000000. > > > > This is needed as some legacy board (or some wrongly configured > > bootloader) pass the wrong memory map and doesn't exclude the first > > ~20MB of RAM reserved for the hardware network accellerators. > > > > With this change we can correctly support each board and prevent any > > kind of misconfiguration done by the OEM. > > > > Signed-off-by: Christian Marangi > > I had exactly this problem with the APQ8060 as well, then my problem > went away. I was under the impression that this was solved. > > Is it not possible to use Geert's linux,usable-memory-range in > the chosen node to make the kernel stay off the memory? > (See examples by grep usable-memory in the kernel.) > Hi, just to confirm this is one of the example you are suggesting? chosen { bootargs = "console=ttyS0,115200 earlycon"; stdout-path = "serial0:115200n8"; linux,usable-memory-range = <0x80200000 0x1fe00000>; }; Main problem here is that uboot in some case doesn't support dt and pass wrong ATAGS (with the memory not reserved) and AUTO_ZRELADDR calculate the wrong addr I assume? I will test the usable-memory-range but isn't the same of declaring reserved space in the dts? Or the zimage decompressor checks linux,usable-memory-range bypassing atags? -- Ansuel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel