Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2482780rdb; Wed, 21 Feb 2024 08:57:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWXBXWhJOqbgiLR7XW7lbK/a+bn6iAUGxfu1Dme4mLSO51z5tWxpge42Oq4dRhTqOEE48pRIyZjlkKv1g7+jlf4drbHrgDEGg4o4VCBPw== X-Google-Smtp-Source: AGHT+IF9Xy+gVZoonuVyuy7HnLpuI3/bbG2RBMJInT6JFXxwFQKICkFZEnj9Tul8QYkkn1UWhamQ X-Received: by 2002:a17:906:7191:b0:a3f:1139:5a6b with SMTP id h17-20020a170906719100b00a3f11395a6bmr54814ejk.32.1708534645142; Wed, 21 Feb 2024 08:57:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708534645; cv=pass; d=google.com; s=arc-20160816; b=lpsi3j5V3iusbT7lEWUrGncHGtHkhazVw+mUGjC5uCxbdh8C7rKOqPGVS9x3fA93VX hGXFyvYd+F/FJV4rSIrVKiROm67vbBO37Q5ol4EKCBVHMTG6zVDWjg4HgjdwBpOVCn4Z DBg6WZG5ro9jviBQlEtlLUp2AGdcH2YxYS5sAtsRoUHgF0qoXOYfkelArOcHBA1axCr+ QFZkkIlzQ8f/a6nv2Amdpx+XXGGJKvbyRdFiGZwpw3A6SzSg+gPRbB2AtqpBC3Xvri5n OoYZgaOLZ+EH+LWk3Y1tt+GMTPGUXQbKeHPoYOOqkkeOVh4LTDyVrOqa1DtYe2kcUI8V o8tA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:subject:to:from:date :message-id:dkim-signature; bh=EjEx5GdMf18n+MVcK0OG2gI0zxVtTpHLxuGAPIBqzlA=; fh=H7c6cAxYiRbk+lIhdZnLgudonQWTeEfSR8dYdjrIFq8=; b=TOJgwtAiIfCZ321EBbuftKBw9/W8/LvGiIadRKYhyoFCV3G+29IOpqcjI8OFbYSEC7 EwxSC5KRryGwNbK5Yn1TtLm3HhEBmor0DT2ndzW5e5jghrXlPjaB/DpOnrSrHxP28cz/ kt2/8zvHA7SvGQUPZ0g7ch72tf6yy1r7rznnnQM3Bc+Osz2du02Jsekt7zcVWNxc0/fw 0HTYy0x6t+7bGJMeyPQ9oOtgGhHIGhVZSRaQpeQ0mMrL3PXQ67BKOUwf4TytHod88/Ue htEgTgVobokbVSFLXspSJPy0sESwJl2srKfC5+U3Jey4ZpQDdDCF+OJiu0PxcwraJueM CrUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KISnUU3j; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-75149-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75149-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d13-20020a170906040d00b00a3d5b436455si4540374eja.153.2024.02.21.08.57.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 08:57:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75149-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KISnUU3j; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-75149-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75149-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B519E1F228B7 for ; Wed, 21 Feb 2024 16:57:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F12A839E5; Wed, 21 Feb 2024 16:57:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KISnUU3j" Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B30467E89 for ; Wed, 21 Feb 2024 16:57:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708534627; cv=none; b=uEd6zJjz1ZKZ75ddi19HV/1ma9gDnT+p8OXV//FkEnb6//olv1p9VH7+88huVG422v9MZcV0nOz7XFIFo3QC132YoXauAVOQV+g6mSoPeS3ChIIlaHgBeDEBX7Q2uwXNwyQqEYj2hP9ip0rdTJFYZSJzWXoDSNddOaQnRJKVjb0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708534627; c=relaxed/simple; bh=wh1Y68Qw9TiSpJkLvYzv56JbZYASbMgr3+trld1sEeM=; h=Message-ID:Date:From:To:Subject:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fvjzPdHMzDhepaflUWIXbzNXrxFqEZHPSW+Pb9QoerRpy6uZTIqfjk7IpXw6it3o4Li2YtFQZDx5Z9nrz5vtoGCUZykGhETMpltTuPzIa3H3X1y4wiOS3O5uOhaFZxTBeaDBEjbY9vUAZ69OaJI2J8HV2/ao7L/6+a39B05+Ung= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KISnUU3j; arc=none smtp.client-ip=209.85.222.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-7875c347a03so51322385a.0 for ; Wed, 21 Feb 2024 08:57:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708534625; x=1709139425; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:subject:to :from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=EjEx5GdMf18n+MVcK0OG2gI0zxVtTpHLxuGAPIBqzlA=; b=KISnUU3j9zVeCzJwsndVI6qgrq8GLvv0EmT28YyzoguHbELlLsIeMEhhrwX+fbaVso gfyBJq1b2MQESwvNmLXDxp1npvCnasxlgKsZ77byZzjSizwpdkZvVwDEj+p+qjIFkf6d Cok5agx7/UNT3+fYoxVpzHdnrc5xceTFquUAOdunL53wwePQ6VGcav0Eojc+954hTrIW 2pSUld51bKBY62FYbeFiOqNSf5rsOWgn5vWRmj987Bya6Yj+A6TrxJbi/nFikqPr7eCM c8a0H4emocmqcHrpORgdRX5TPnfCqOUOP10UOOZFAciD32EddOWeYKs7B+wuX7K9UVIX SaZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708534625; x=1709139425; h=in-reply-to:content-disposition:mime-version:references:subject:to :from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=EjEx5GdMf18n+MVcK0OG2gI0zxVtTpHLxuGAPIBqzlA=; b=FrfpgXgjR17rPJOnymlW+joG8VufrbtIbCiUNy+nfGD5o+3TFfumfVcdqKuGSVfDDD wnl6+rx23TEO46GQ9VFqXIbew2bx/Ui5xJIQ0dKeuOkxV34MSdJ5BX0lwhhcxIfiDUOk WUPqZWZfjCwi1Bd0mTxIKyU+/r2L3K3N/HkAc6wuiANNd4FFhw+XPRCu06/+EbWdxGQ4 UOKsvzVD4UZuA+MkorVpMyX1YS46vXRR3djVWbmO9++jqbhihY8pnAWLUQ6JibrEvlrw TOaPAVmgy3BFYLq6L/in1jJlPpFbgeBHnad60OsAGtRsVJEqZqwFhFkZWa/Bj6P1R6vE YK3w== X-Forwarded-Encrypted: i=1; AJvYcCXTiKx94pBvZhW1EWL5WOhzhwzbU7+8xOEbk+VXhwoI8Y+4eHeAKrWW1SII31ijhYOKm8KXqwWs55abFo0/J7IsoVPBLomyseZgwtgr X-Gm-Message-State: AOJu0YyUAzSmtrS5hq9d8881Gtka5E4kcz4uWfmXXDl8hnxUf+/QgjsS xWpQW/pgnfjGxM9dvgD7vHnLQJrqm93JnGdq7UfDmzChJcZK0PkI X-Received: by 2002:a05:620a:16b6:b0:787:7f9f:d5ed with SMTP id s22-20020a05620a16b600b007877f9fd5edmr4526752qkj.6.1708534624770; Wed, 21 Feb 2024 08:57:04 -0800 (PST) Received: from Ansuel-XPS. (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.gmail.com with ESMTPSA id os38-20020a05620a812600b0078722793b6csm4477618qkn.48.2024.02.21.08.57.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 08:57:04 -0800 (PST) Message-ID: <65d62b60.050a0220.c7b96.614e@mx.google.com> X-Google-Original-Message-ID: Date: Wed, 21 Feb 2024 17:57:00 +0100 From: Christian Marangi To: Russell King , Arnd Bergmann , Andrew Morton , Geert Uytterhoeven , Linus Walleij , "Kirill A. Shutemov" , Thomas Gleixner , Jonathan Corbet , Marc Zyngier , "Mike Rapoport (IBM)" , Eric DeVolder , Nathan Chancellor , Kees Cook , "Russell King (Oracle)" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Konrad Dybcio , John Crispin Subject: Re: [PATCH v2 0/2] ARM: decompressor: support AUTO_ZRELADDR and appended DTB References: <20240121203009.9257-1-ansuelsmth@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240121203009.9257-1-ansuelsmth@gmail.com> On Sun, Jan 21, 2024 at 09:29:32PM +0100, Christian Marangi wrote: > This series try to address a long lasting problem with legacy device > that require an appended DTB and the use of AUTO_ZRELADDR. > > With these device AUTO_ZRELADDR is not possible if for some reason at > the start of the RAM it's needed to reserve some space. (example qcom SoC > that allocate reserved space for SMEM) > > In the current implementation with appended DTB and AUTO_ZRELADDR, > the memory start is only derived from the PC register and it can't be > changed by declaring additional info in the DTS. > > In a normal setup, we have an intentional undocumented chosen property > to handle this and the memory node to declare the start of the memory. > > With this applied and ARM_ATAG_DTB_COMPAT_IGNORE_MEM enabled (more > info in the related patch) ipq806x can boot right away with AUTO_ZRELADDR > enabled and a correct memory node defined in DTS. > > It's needed to ignore MEM ATAGs as most of the time the values from the > bootloader are hardcoded and OEM didn't care to actually provide them > resulting in funny situation where a Netgear R7800 with 512Mb of RAM > have Uboot passing 1.7GB of RAM with ATAGS. > > While MEM ATAG may be broken, other ATAG like serial number or bootargs > might still be useful for partition declaration (cmdlinepart) or other > info hence DTB_COMPAT is still needed in these case and can't be > disabled. > > I'm open to any suggestion on how this can be improved and I would love > some additional testing on other legacy platform but I assume this will > permit many legacy device to be correctly supported without having to > hardcode address. > > Changes v2: > - Add Review and Ack Tags > - Use IS_ENABLED instead of global variable > > Christian Marangi (2): > ARM: decompressor: support memory start validation for appended DTB > ARM: decompressor: add option to ignore MEM ATAGs > > arch/arm/Kconfig | 12 ++++++++++++ > arch/arm/boot/compressed/atags_to_fdt.c | 4 ++++ > arch/arm/boot/compressed/head.S | 22 ++++++++++++++++++++++ > 3 files changed, 38 insertions(+) > > Any news for this? -- Ansuel