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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1163DC4332F for ; Mon, 11 Oct 2021 14:00:56 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E2F66121E for ; Mon, 11 Oct 2021 14:00:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2E2F66121E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BC4AA83252; Mon, 11 Oct 2021 16:00:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="IbQtcOGJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 51E6983252; Mon, 11 Oct 2021 16:00:50 +0200 (CEST) Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E48968311B for ; Mon, 11 Oct 2021 16:00:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf2c.google.com with SMTP id m13so9960943qvk.1 for ; Mon, 11 Oct 2021 07:00:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ruo6D2c3VpuDvd5YtURPg2BAT59Ouw9VISbr+mEKEpc=; b=IbQtcOGJaBRj7OejXZ+zpiZF6rru/BWb5ZQe+ONTj5cHFRYhvkiBQohoYwynp1RVe1 475GzrZqzmceP2+wSB4fG+ZI5o3PYMhN6wkakUTtpfOWbp541xqEpA2ZfKlaR2UnL+ay +GPrylVID6SKt/TDyq0bo87lFUSg3BcWbIaP8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ruo6D2c3VpuDvd5YtURPg2BAT59Ouw9VISbr+mEKEpc=; b=Lv9BN3lZZI1D8jAaK/Q4nkMJi6TxZpAJSmuVPbFz77iZ3UAQaO12880ZyXDxTjhdjh wRt9rSKLfUUqY1yPaWRh6QC6MfZZtGvRHzIolqyFnAH8SshLc3s42/+2Pjhp7LVSIgC4 Vd5lT0smN+V8HI/H2etnc+vqk7kTxeWfRLQwdMwDMkH6U/e0U7dPorCTQaK+SN32D1XO WWRdkY9Ui+RWDiDJuxLDAP/Nb/otgtojECJYcaob4QscnlwE7f/YkMapoa4lJi4Sb2br zyUQ3MhqgvMgriCX7pqi4DwE+zgnbzhfslYXVdd8hvmim4REOSB25IGdWrX46MlQ0eW5 EkdA== X-Gm-Message-State: AOAM533CKAPi7QzBHwGovdnk2gqqpVxC+uP4QdB+Z2IPkvi5lG5yuEU6 1tKEvWPzvByPa+1nGeX1O/338w== X-Google-Smtp-Source: ABdhPJyonDajO0ZhZX6JdUl8jTngnf2OlvHhYAu654OISczUuEZ6S1K726MVDDxRUR2ffgZdTGn5JA== X-Received: by 2002:a0c:ea8f:: with SMTP id d15mr5985178qvp.43.1633960845734; Mon, 11 Oct 2021 07:00:45 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-7461-ba79-88cf-55cd.res6.spectrum.com. [2603:6081:7b01:cbda:7461:ba79:88cf:55cd]) by smtp.gmail.com with ESMTPSA id h4sm4561066qtj.83.2021.10.11.07.00.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 07:00:45 -0700 (PDT) Date: Mon, 11 Oct 2021 10:00:43 -0400 From: Tom Rini To: marek.vasut@gmail.com Cc: u-boot@lists.denx.de, Marek Vasut , Simon Glass Subject: Re: [PATCH 2/2] arm64: lmb: Reserve U-Boot separately if relocation is disabled Message-ID: <20211011140043.GX7964@bill-the-cat> References: <20211010215209.872181-1-marek.vasut@gmail.com> <20211010215209.872181-2-marek.vasut@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DWnKfPfB2seWFM1r" Content-Disposition: inline In-Reply-To: <20211010215209.872181-2-marek.vasut@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --DWnKfPfB2seWFM1r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 10, 2021 at 11:52:09PM +0200, marek.vasut@gmail.com wrote: > From: Marek Vasut >=20 > In case U-Boot starts with GD_FLG_SKIP_RELOC, the U-Boot code is > not relocated, however the stack and heap is at the end of DRAM > after relocation. Reserve a LMB area for the non-relocated U-Boot > code so it won't be overwritten. >=20 > Signed-off-by: Marek Vasut > Cc: Simon Glass > Cc: Tom Rini > --- > arch/arm/lib/stack.c | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > diff --git a/arch/arm/lib/stack.c b/arch/arm/lib/stack.c > index 656084c7e5..d2e2715ecf 100644 > --- a/arch/arm/lib/stack.c > +++ b/arch/arm/lib/stack.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > =20 > DECLARE_GLOBAL_DATA_PTR; > =20 > @@ -46,4 +47,12 @@ static ulong get_sp(void) > void arch_lmb_reserve(struct lmb *lmb) > { > arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 16384); > + > +#ifdef CONFIG_ARM > + if (gd->flags & GD_FLG_SKIP_RELOC) { > + lmb_reserve(lmb, (phys_addr_t)__image_copy_start, > + (phys_addr_t)__image_copy_end - > + (phys_addr_t)__image_copy_start); > + } > +#endif > } Erm, this is in the arm code, the patch subject says arm64 and you're testing for CONFIG_ARM (which will always be true here). Can you please respin? Also, the whitespace of the new code is too indented. Thanks. --=20 Tom --DWnKfPfB2seWFM1r Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFkQ4QACgkQFHw5/5Y0 tywdJwwAmAFD0jPpt8nKRzn/Sj0S57o0x+liIj8oZT2U7oaKRQcu7kPQYBr9ydNY nHJcV2SmywLYzfxdqZNsmBz+KeyQN1mJvtBLNHbQA2hHFEZ+qfg8Zin6Ctt7LDcZ KmINSLpfuMc4gYrMaBhaS5SS/iZ/rPwD4U2BWYLlD+F6vOata2DQGkpdBsAafdOM ehv0A4rY2drSSvvhjm4yDlRNtp/lsXHXzVZCgmLFabhBhNMiDAeaUlvyo4Lr3Jq6 xJRjbB/1IbPTVSVS+D3iPFQF0qYM56fUY6C+VoNXh2M2L95Fbhn/+9SFnq+H5Txf 0op0aab3N3yfLqfV+iy8F38nXqM6GfSO0blxYM1tgRslZ7YlWJmMY0QmTROrsBzE 8qPu/i4xDaEE4V4AMbLmhVjJkYRM23Qy22pIvea2XUvs7gIXLzy3UumQUBfsN5K0 FkppFoTyNbDlc913WgVPBQKGsj+g869Pl+IZ6x4uOlhSRng7aGV/3xHnCO5r1RhI aTr3W/NW =cmr0 -----END PGP SIGNATURE----- --DWnKfPfB2seWFM1r--