| Message ID | 20240825122617.3708982-1-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRB5WFVS3AMGQERZXQX5Q@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com
[209.85.208.197])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4A2744173F
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 25 Aug 2024 14:26:32 +0200 (CEST)
Received: by mail-lj1-f197.google.com with SMTP id
38308e7fff4ca-2f3f1bbe2e2sf24132551fa.0
for <linux-amarula@patchwork.amarulasolutions.com>;
Sun, 25 Aug 2024 05:26:32 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1724588791; cv=pass;
d=google.com; s=arc-20160816;
b=Ig5kZkRI61brgYEqSNgGMW9pbd968D+pNCHAXjF5ZQCXrvkeF8YRYDqsf3bB8VEVfo
Jr4TDQG4Dnd1MORtzXVCkpbcNNE5xua2x34ouJip37g4iZvyl9ZyL+dS9yrgV4k433f9
s4YR1Sr6+g4K6+T1UeoRQktRdRIfaFViqkBpO7Pr5QB8e7zMPfxzLKSFUxu8Rjyf0yNR
nskwE7IPOqQ8YyToGLNas3jbR37h5+JrELJs5KviCpuU0uoKBP4pkW9B+5lBqfsMGsU5
M4Kh/2ZtgqH1pbI8xrgqjTGpYZ4k40KW/EEY8LY3YrCS8ilkS4+jyZ+Sh58HR8N8xvBr
tmwQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:mime-version:message-id:date:subject:cc:to
:from:dkim-signature;
bh=MTilHYh7G8HN7k0FRTSWixEMUh/b/ekPRvEMtvX8BJQ=;
fh=I06GzSmZlUGQnMaRzxVzHb3j/42A+CjZs7XWpblN2DU=;
b=PMrJ1c9r9A1CPYQIGWE94b9YSYKOxlMIcxAVJhJqfkmCubD8s/xrpVPNfMUlZd5bTq
mkKBmscpPBM5YIYyhtMA4FM8qHeoO8tOM454R3RCc+uWPRZIYr7KgoMZATLeRSTHz0li
D0sGvcdH//iYLDEqVLYG7vmf/muVpv25mjZ0v1F+0LCgmmscCANQU9P4WNyAJi/sORuo
nAWgZ7R9zKGJlhO+vTbAz61i1C1wMj8haZPpJeUF91S9zX82WqpMp7Znee3Qx1aZ+lvX
O64h6/Z4AVtSjdcYzez1n3zCEIpavRoI/Q1wkJ31PQ5IUq2bK4E87RucVQ5LBiWmMdFc
MBMw==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=qo999Yq5;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=amarulasolutions.com; s=google; t=1724588791; x=1725193591;
darn=patchwork.amarulasolutions.com;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:x-original-authentication-results
:x-original-sender:mime-version:message-id:date:subject:cc:to:from
:from:to:cc:subject:date:message-id:reply-to;
bh=MTilHYh7G8HN7k0FRTSWixEMUh/b/ekPRvEMtvX8BJQ=;
b=L6trCAW/c4zZ5a9yK77Z7N5JZV++Z+zhjF4tHGJ7W5mtYeC92WtrLokkO6y+bn8VF5
6mzLCPllnYzQORar74qo2669upHrfkb4vY43rsuSj7Mw3IbANmwb6xM5n6PFz1p829rg
YQtVGaRKhxKXjKJ1+ljZNqwO/jnNrORRUoHD0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1724588791; x=1725193591;
h=list-unsubscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:x-original-authentication-results:x-original-sender:mime-version
:message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=MTilHYh7G8HN7k0FRTSWixEMUh/b/ekPRvEMtvX8BJQ=;
b=T57OsmmAV15csMRFE2oUCrQmU1LcILqSMM7zSYbEMQHXeAO+5prR5LghnuPVhkKIC1
+x2twk26jbbquLEDp9dsAXJhkaDDoD4PurXS1kguoRvhg727zlgFo4jozxESfyb0Ymjv
Ob/KAqpgjJIEMzHTbnoJ9N2JD42Q7q3ZtKpTAXHL/6bQhnHa4MhMwLov2yj4F3qLngdt
ad5mYeznK5M5X7t8Kekvx54TBv1/UtZj56XekmOGKAnYoy9367uJa6UzzFmePemHcX+M
DRSu9Fg3Grn5NvFirsn6LzKOyZhtzLQrh6MB1imVmyh3Y2DAb6ud7M+mMVJPeIY8lHoc
6YRA==
X-Forwarded-Encrypted: i=2;
AJvYcCUn8s5ZcVZVzcPBqGt7FWqxDgf3bzsKIoToe+F2KK1UW65s6+hmkmoiyBaoT6r9Tp69LGosGWEf9LUHmKXt@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0YyQzk8AvEgxtflCSQoyMbrXZduQlZdNkuOFaTEOZaWdw11yqJ3g
B9R7qJhkf+ZH/Pm2Ko8UJUz0yMR+mi22+gAD2olpnVhPsULx0J/yqw0l3O4RD9JVeg==
X-Google-Smtp-Source:
AGHT+IGWbgqh73Wnfj8NUFYyjQNd0qwJkOA3Mf8PV5RYvehwQjTrUshjYw6mxbQKUN47i9J0WaMvig==
X-Received: by 2002:a2e:86d7:0:b0:2f3:b8dd:1fbf with SMTP id
38308e7fff4ca-2f4f491016cmr42307061fa.23.1724588790725;
Sun, 25 Aug 2024 05:26:30 -0700 (PDT)
X-BeenThere: linux-amarula@amarulasolutions.com
Received: by 2002:a2e:2a44:0:b0:2f3:ee66:7cd with SMTP id
38308e7fff4ca-2f4035ac174ls10353751fa.1.-pod-prod-07-eu;
Sun, 25 Aug 2024 05:26:29 -0700 (PDT)
X-Received: by 2002:a2e:86d7:0:b0:2f3:b8dd:1fbf with SMTP id
38308e7fff4ca-2f4f491016cmr42306711fa.23.1724588788938;
Sun, 25 Aug 2024 05:26:28 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1724588788; cv=none;
d=google.com; s=arc-20160816;
b=bO69OfRBa7iRWkdNVkMGcOZj0p3Xo3ig5qqykmKpbknRSpyDA70Qaby1qmc/yzNPjW
QyX22qaLR2VPfh5lNV8srsMhhTaApveqVqbgsXSUir1dK1EdsqUDFLOfuw0FhOWd8VP0
tG+zbNc2a/WeosuZvz8KSNGshtIUryC7judrYBA3kYGBtUHMDDUxx0eCdXf0bpQpcTrC
53GAV3Kg4gOcSVdeiLlUjx4UJgT404aBbXSwlblSwBSyvNl3s28eo/8LFnce6LW62wl9
/47PjGQtnx8iIim300E6B3HRZ2BrpY4OiQfDdVKbppMTZE8HWrHreTY8iZPxuRjiITa9
5D8Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:dkim-signature;
bh=iMK0oinWbrB6qtCxO2LJDruapOwMRD+CxR6o8GzfA/E=;
fh=z2/SguXvwxrJoNKnyiQ88p4gYR8000z1DeBKVVa/z3Y=;
b=iJIjNXo28HZYomFEz5EApBFj1rXLAyRe1dhJO+ltyG3WvshC3WCVs4k6v2S16a0H6T
T1IJzd2H9fRPcMug6yI7Q9Ipk4DT6ciYfgq4LifKX1VGLW7xXNeS6nq+/n1xFBWIUBIx
v5CNHHkqeoP77TmtBuZoMCWJh4IhfFlCEjUu/2CKnSljPoM6yTU2g70wUuV5LOGa/7SL
WezW5NXVdCbvzwW5d+Khu1PWahxfum48Gm4sVYqiihjoR03/iQTYO5l8IDjlJsNzorMM
43ZFf4dntvd/SONfQC7qTrUufSltEkPdhCz+41b/slqsazgAJGtZiqvBb871Qjto5RLp
57vw==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=qo999Yq5;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com.
[209.85.220.41])
by mx.google.com with SMTPS id
38308e7fff4ca-2f4047c67c5sor11276421fa.4.2024.08.25.05.26.28
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Sun, 25 Aug 2024 05:26:28 -0700 (PDT)
Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a2e:6102:0:b0:2ef:2e1c:79b5 with SMTP id
38308e7fff4ca-2f4f4902e6bmr44780371fa.14.1724588788012;
Sun, 25 Aug 2024 05:26:28 -0700 (PDT)
Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it
(host-79-25-99-149.retail.telecomitalia.it. [79.25.99.149])
by smtp.gmail.com with ESMTPSA id
4fb4d7f45d1cf-5c04a4c4377sm4651563a12.74.2024.08.25.05.26.26
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 25 Aug 2024 05:26:27 -0700 (PDT)
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: u-boot@lists.denx.de
Cc: linux-amarula@amarulasolutions.com,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Eddie James <eajames@linux.ibm.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Mattijs Korpershoek <mkorpershoek@baylibre.com>,
Simon Glass <sjg@chromium.org>,
Tom Rini <trini@konsulko.com>
Subject: [PATCH 1/2] bootm: adjust the print format
Date: Sun, 25 Aug 2024 14:26:07 +0200
Message-ID: <20240825122617.3708982-1-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
MIME-Version: 1.0
X-Original-Sender: dario.binacchi@amarulasolutions.com
X-Original-Authentication-Results: mx.google.com; dkim=pass
header.i=@amarulasolutions.com header.s=google header.b=qo999Yq5;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
Content-Type: text/plain; charset="UTF-8"
Precedence: list
Mailing-list: list linux-amarula@amarulasolutions.com;
contact linux-amarula+owners@amarulasolutions.com
List-ID: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
| Series |
[1/2] bootm: adjust the print format
|
|
Commit Message
Dario Binacchi
Aug. 25, 2024, 12:26 p.m. UTC
All three addresses printed are in hexadecimal format, but only the
first two have the "0x" prefix. The patch aligns the format of the
"end" address with the other two by adding the "0x" prefix.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
boot/bootm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Sun, Aug 25, 2024 at 5:26 AM Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote: > > All three addresses printed are in hexadecimal format, but only the > first two have the "0x" prefix. The patch aligns the format of the > "end" address with the other two by adding the "0x" prefix. > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > --- > > boot/bootm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/boot/bootm.c b/boot/bootm.c > index 480f8e6a0e6e..951e549f19ff 100644 > --- a/boot/bootm.c > +++ b/boot/bootm.c > @@ -703,7 +703,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) > > /* Handle BOOTM_STATE_LOADOS */ > if (relocated_addr != load) { > - printf("Moving Image from 0x%lx to 0x%lx, end=%lx\n", > + printf("Moving Image from 0x%lx to 0x%lx, end=0x%lx\n", > load, relocated_addr, > relocated_addr + image_size); > memmove((void *)relocated_addr, load_buf, image_size); > -- > 2.43.0 > From U-Boot documentation, alpha-numeric input is assumed to be hexadecimal except when it is not, and generally does not accept "0x" prefix on input. So the correct action would be to make this consistent over the whole U-Boot code base, or remove the "0x" prefixes (not add more of them) ? -E To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
Hi Dario, Thank you for the patch. On dim., août 25, 2024 at 14:26, Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote: > All three addresses printed are in hexadecimal format, but only the > first two have the "0x" prefix. The patch aligns the format of the > "end" address with the other two by adding the "0x" prefix. > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> > --- > > boot/bootm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/boot/bootm.c b/boot/bootm.c > index 480f8e6a0e6e..951e549f19ff 100644 > --- a/boot/bootm.c > +++ b/boot/bootm.c > @@ -703,7 +703,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) > > /* Handle BOOTM_STATE_LOADOS */ > if (relocated_addr != load) { > - printf("Moving Image from 0x%lx to 0x%lx, end=%lx\n", > + printf("Moving Image from 0x%lx to 0x%lx, end=0x%lx\n", > load, relocated_addr, > relocated_addr + image_size); > memmove((void *)relocated_addr, load_buf, image_size); > -- > 2.43.0 To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On 25/08/2024 19:36, E Shattow wrote: > On Sun, Aug 25, 2024 at 5:26 AM Dario Binacchi > <dario.binacchi@amarulasolutions.com> wrote: >> >> All three addresses printed are in hexadecimal format, but only the >> first two have the "0x" prefix. The patch aligns the format of the >> "end" address with the other two by adding the "0x" prefix. >> >> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> >> --- >> >> boot/bootm.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/boot/bootm.c b/boot/bootm.c >> index 480f8e6a0e6e..951e549f19ff 100644 >> --- a/boot/bootm.c >> +++ b/boot/bootm.c >> @@ -703,7 +703,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) >> >> /* Handle BOOTM_STATE_LOADOS */ >> if (relocated_addr != load) { >> - printf("Moving Image from 0x%lx to 0x%lx, end=%lx\n", >> + printf("Moving Image from 0x%lx to 0x%lx, end=0x%lx\n", >> load, relocated_addr, >> relocated_addr + image_size); >> memmove((void *)relocated_addr, load_buf, image_size); >> -- >> 2.43.0 >> > > From U-Boot documentation, alpha-numeric input is assumed to be > hexadecimal except when it is not, and generally does not accept "0x" > prefix on input. So the correct action would be to make this > consistent over the whole U-Boot code base, or remove the "0x" > prefixes (not add more of them) ? Most(?) U-Boot commands accept the 0x prefix. I don't think stripping it is sensible, I myself have gotten confused many times over hex values that lack the leading 0x in U-Boot output. Maybe unavailable in SPL (not sure) but I prefer the "%#lx" format which prepends the 0x automatically. > > -E
On Mon, Aug 26, 2024 at 02:26:10PM +0100, Caleb Connolly wrote: > > > On 25/08/2024 19:36, E Shattow wrote: > > On Sun, Aug 25, 2024 at 5:26 AM Dario Binacchi > > <dario.binacchi@amarulasolutions.com> wrote: > > > > > > All three addresses printed are in hexadecimal format, but only the > > > first two have the "0x" prefix. The patch aligns the format of the > > > "end" address with the other two by adding the "0x" prefix. > > > > > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > > --- > > > > > > boot/bootm.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/boot/bootm.c b/boot/bootm.c > > > index 480f8e6a0e6e..951e549f19ff 100644 > > > --- a/boot/bootm.c > > > +++ b/boot/bootm.c > > > @@ -703,7 +703,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) > > > > > > /* Handle BOOTM_STATE_LOADOS */ > > > if (relocated_addr != load) { > > > - printf("Moving Image from 0x%lx to 0x%lx, end=%lx\n", > > > + printf("Moving Image from 0x%lx to 0x%lx, end=0x%lx\n", > > > load, relocated_addr, > > > relocated_addr + image_size); > > > memmove((void *)relocated_addr, load_buf, image_size); > > > -- > > > 2.43.0 > > > > > > > From U-Boot documentation, alpha-numeric input is assumed to be > > hexadecimal except when it is not, and generally does not accept "0x" > > prefix on input. So the correct action would be to make this While there was some point in history where I'm sure we got confused by "0x" input I don't think that's true anymore (and everything should be using some strto function that works as expected, not a custom parser). So the docs should be updated there. > > consistent over the whole U-Boot code base, or remove the "0x" > > prefixes (not add more of them) ? > > Most(?) U-Boot commands accept the 0x prefix. I don't think stripping it is > sensible, I myself have gotten confused many times over hex values that lack > the leading 0x in U-Boot output. > > Maybe unavailable in SPL (not sure) but I prefer the "%#lx" format which > prepends the 0x automatically. That we assume input is hex is just what it is these days. Output really ought to be prefixed with 0x because that's just common convention (and whatever we assumed people would Just Know 25+ years ago may not be true today). Since updating this output really shouldn't change our ABI, it's conceptually fine with me but we don't use "%#lx" a lot and so I don't know if tiny-printf handles it and so that might not be the right call for SPL code and so lets not change this patch. Reviewed-by: Tom Rini <trini@konsulko.com>
Hi, On Sun, 25 Aug 2024 at 12:36, E Shattow <lucent@gmail.com> wrote: > > On Sun, Aug 25, 2024 at 5:26 AM Dario Binacchi > <dario.binacchi@amarulasolutions.com> wrote: > > > > All three addresses printed are in hexadecimal format, but only the > > first two have the "0x" prefix. The patch aligns the format of the > > "end" address with the other two by adding the "0x" prefix. > > > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > --- > > > > boot/bootm.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/boot/bootm.c b/boot/bootm.c > > index 480f8e6a0e6e..951e549f19ff 100644 > > --- a/boot/bootm.c > > +++ b/boot/bootm.c > > @@ -703,7 +703,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) > > > > /* Handle BOOTM_STATE_LOADOS */ > > if (relocated_addr != load) { > > - printf("Moving Image from 0x%lx to 0x%lx, end=%lx\n", > > + printf("Moving Image from 0x%lx to 0x%lx, end=0x%lx\n", > > load, relocated_addr, > > relocated_addr + image_size); > > memmove((void *)relocated_addr, load_buf, image_size); > > -- > > 2.43.0 > > > > From U-Boot documentation, alpha-numeric input is assumed to be > hexadecimal except when it is not, and generally does not accept "0x" > prefix on input. So the correct action would be to make this > consistent over the whole U-Boot code base, or remove the "0x" > prefixes (not add more of them) ? Yes, we should avoid these prefixes as they can confuse people into thinking that hex is not the default. In other cases where this is needed, for 0x you can use %#x Regards, Simon To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
Hello Tom, On Mon, Aug 26, 2024 at 5:01 PM Tom Rini <trini@konsulko.com> wrote: > > On Mon, Aug 26, 2024 at 02:26:10PM +0100, Caleb Connolly wrote: > > > > > > On 25/08/2024 19:36, E Shattow wrote: > > > On Sun, Aug 25, 2024 at 5:26 AM Dario Binacchi > > > <dario.binacchi@amarulasolutions.com> wrote: > > > > > > > > All three addresses printed are in hexadecimal format, but only the > > > > first two have the "0x" prefix. The patch aligns the format of the > > > > "end" address with the other two by adding the "0x" prefix. > > > > > > > > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > > > --- > > > > > > > > boot/bootm.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/boot/bootm.c b/boot/bootm.c > > > > index 480f8e6a0e6e..951e549f19ff 100644 > > > > --- a/boot/bootm.c > > > > +++ b/boot/bootm.c > > > > @@ -703,7 +703,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) > > > > > > > > /* Handle BOOTM_STATE_LOADOS */ > > > > if (relocated_addr != load) { > > > > - printf("Moving Image from 0x%lx to 0x%lx, end=%lx\n", > > > > + printf("Moving Image from 0x%lx to 0x%lx, end=0x%lx\n", > > > > load, relocated_addr, > > > > relocated_addr + image_size); > > > > memmove((void *)relocated_addr, load_buf, image_size); > > > > -- > > > > 2.43.0 > > > > > > > > > > From U-Boot documentation, alpha-numeric input is assumed to be > > > hexadecimal except when it is not, and generally does not accept "0x" > > > prefix on input. So the correct action would be to make this > > While there was some point in history where I'm sure we got confused by > "0x" input I don't think that's true anymore (and everything should be > using some strto function that works as expected, not a custom parser). > So the docs should be updated there. > > > > consistent over the whole U-Boot code base, or remove the "0x" > > > prefixes (not add more of them) ? > > > > Most(?) U-Boot commands accept the 0x prefix. I don't think stripping it is > > sensible, I myself have gotten confused many times over hex values that lack > > the leading 0x in U-Boot output. > > > > Maybe unavailable in SPL (not sure) but I prefer the "%#lx" format which > > prepends the 0x automatically. > > That we assume input is hex is just what it is these days. Output really > ought to be prefixed with 0x because that's just common convention (and > whatever we assumed people would Just Know 25+ years ago may not be true > today). Since updating this output really shouldn't change our ABI, it's > conceptually fine with me but we don't use "%#lx" a lot and so I don't > know if tiny-printf handles it and so that might not be the right call > for SPL code and so lets not change this patch. > > Reviewed-by: Tom Rini <trini@konsulko.com> > > -- > Tom Can this patch be merged? I've seen both Review tags and conflicting opinions, and I haven't understood whether it can be accepted or not. Thanks and regards, Dario
On Sun, 25 Aug 2024 14:26:07 +0200, Dario Binacchi wrote: > All three addresses printed are in hexadecimal format, but only the > first two have the "0x" prefix. The patch aligns the format of the > "end" address with the other two by adding the "0x" prefix. > > Applied to u-boot/next, thanks!
diff --git a/boot/bootm.c b/boot/bootm.c index 480f8e6a0e6e..951e549f19ff 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -703,7 +703,7 @@ static int bootm_load_os(struct bootm_headers *images, int boot_progress) /* Handle BOOTM_STATE_LOADOS */ if (relocated_addr != load) { - printf("Moving Image from 0x%lx to 0x%lx, end=%lx\n", + printf("Moving Image from 0x%lx to 0x%lx, end=0x%lx\n", load, relocated_addr, relocated_addr + image_size); memmove((void *)relocated_addr, load_buf, image_size);