* [U-Boot] [PATCH] cmd: fdt: Fix fdt address information after the movement
@ 2018-10-18 18:43 Marek Vasut
2018-11-17 0:13 ` Simon Glass
0 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2018-10-18 18:43 UTC (permalink / raw)
To: u-boot
From: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
This patch fixes the address information of fdt.
wrong case:
=> fdt addr 0x48000000
=> fdt move 0x48000000 0x41000000 0xa000
=> fdt addr
The address of the fdt is 48000000
Active address in this case is 0x41000000.
Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
---
cmd/fdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/fdt.c b/cmd/fdt.c
index 8a19a3fdbf..84be26f4f1 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -202,7 +202,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
fdt_strerror(err));
return 1;
}
- working_fdt = newaddr;
+ set_working_fdt_addr((ulong)newaddr);
#ifdef CONFIG_OF_SYSTEM_SETUP
/* Call the board-specific fixup routine */
} else if (strncmp(argv[1], "sys", 3) == 0) {
--
2.18.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] cmd: fdt: Fix fdt address information after the movement
2018-10-18 18:43 [U-Boot] [PATCH] cmd: fdt: Fix fdt address information after the movement Marek Vasut
@ 2018-11-17 0:13 ` Simon Glass
2018-11-18 15:02 ` Marek Vasut
0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2018-11-17 0:13 UTC (permalink / raw)
To: u-boot
On Thu, 18 Oct 2018 at 12:44, Marek Vasut <marek.vasut@gmail.com> wrote:
>
> From: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
>
> This patch fixes the address information of fdt.
>
> wrong case:
> => fdt addr 0x48000000
> => fdt move 0x48000000 0x41000000 0xa000
> => fdt addr
> The address of the fdt is 48000000
>
> Active address in this case is 0x41000000.
>
> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> ---
> cmd/fdt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Simon Glass <sjg@chromium.org>
Also, the cast to struct fdt_header * in the code above looks wrong. I
think it should have a map_sysmem() in there.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] cmd: fdt: Fix fdt address information after the movement
2018-11-17 0:13 ` Simon Glass
@ 2018-11-18 15:02 ` Marek Vasut
2018-11-18 21:22 ` Simon Glass
0 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2018-11-18 15:02 UTC (permalink / raw)
To: u-boot
On 11/17/2018 01:13 AM, Simon Glass wrote:
> On Thu, 18 Oct 2018 at 12:44, Marek Vasut <marek.vasut@gmail.com> wrote:
>>
>> From: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
>>
>> This patch fixes the address information of fdt.
>>
>> wrong case:
>> => fdt addr 0x48000000
>> => fdt move 0x48000000 0x41000000 0xa000
>> => fdt addr
>> The address of the fdt is 48000000
>>
>> Active address in this case is 0x41000000.
>>
>> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
>> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
>> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
>> ---
>> cmd/fdt.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> Also, the cast to struct fdt_header * in the code above looks wrong. I
> think it should have a map_sysmem() in there.
Rather than that, I wonder, what would happen if we put FDT above 32bit
address space and used the 'fdt' command ? Would that work or not ? I
suspect the later ...
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] cmd: fdt: Fix fdt address information after the movement
2018-11-18 15:02 ` Marek Vasut
@ 2018-11-18 21:22 ` Simon Glass
2018-11-22 20:22 ` Simon Glass
0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2018-11-18 21:22 UTC (permalink / raw)
To: u-boot
Hi Marek,
On Sun, 18 Nov 2018 at 08:02, Marek Vasut <marek.vasut@gmail.com> wrote:
>
> On 11/17/2018 01:13 AM, Simon Glass wrote:
> > On Thu, 18 Oct 2018 at 12:44, Marek Vasut <marek.vasut@gmail.com> wrote:
> >>
> >> From: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> >>
> >> This patch fixes the address information of fdt.
> >>
> >> wrong case:
> >> => fdt addr 0x48000000
> >> => fdt move 0x48000000 0x41000000 0xa000
> >> => fdt addr
> >> The address of the fdt is 48000000
> >>
> >> Active address in this case is 0x41000000.
> >>
> >> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> >> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> >> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> >> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> >> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> >> ---
> >> cmd/fdt.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> >
> > Also, the cast to struct fdt_header * in the code above looks wrong. I
> > think it should have a map_sysmem() in there.
>
> Rather than that, I wonder, what would happen if we put FDT above 32bit
> address space and used the 'fdt' command ? Would that work or not ? I
> suspect the later ...
I don't know. I'm looking forward to having tests for all these cases one day.
Regards,
Simon
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] cmd: fdt: Fix fdt address information after the movement
2018-11-18 21:22 ` Simon Glass
@ 2018-11-22 20:22 ` Simon Glass
0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2018-11-22 20:22 UTC (permalink / raw)
To: u-boot
On Sun, 18 Nov 2018 at 14:22, Simon Glass <sjg@chromium.org> wrote:
>
> Hi Marek,
>
> On Sun, 18 Nov 2018 at 08:02, Marek Vasut <marek.vasut@gmail.com> wrote:
> >
> > On 11/17/2018 01:13 AM, Simon Glass wrote:
> > > On Thu, 18 Oct 2018 at 12:44, Marek Vasut <marek.vasut@gmail.com> wrote:
> > >>
> > >> From: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> > >>
> > >> This patch fixes the address information of fdt.
> > >>
> > >> wrong case:
> > >> => fdt addr 0x48000000
> > >> => fdt move 0x48000000 0x41000000 0xa000
> > >> => fdt addr
> > >> The address of the fdt is 48000000
> > >>
> > >> Active address in this case is 0x41000000.
> > >>
> > >> Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> > >> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> > >> Cc: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
> > >> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
> > >> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
> > >> ---
> > >> cmd/fdt.c | 2 +-
> > >> 1 file changed, 1 insertion(+), 1 deletion(-)
> > >>
> > >
> > > Reviewed-by: Simon Glass <sjg@chromium.org>
> > >
> > > Also, the cast to struct fdt_header * in the code above looks wrong. I
> > > think it should have a map_sysmem() in there.
> >
> > Rather than that, I wonder, what would happen if we put FDT above 32bit
> > address space and used the 'fdt' command ? Would that work or not ? I
> > suspect the later ...
>
> I don't know. I'm looking forward to having tests for all these cases one day.
Applied to u-boot-dm, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-22 20:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 18:43 [U-Boot] [PATCH] cmd: fdt: Fix fdt address information after the movement Marek Vasut
2018-11-17 0:13 ` Simon Glass
2018-11-18 15:02 ` Marek Vasut
2018-11-18 21:22 ` Simon Glass
2018-11-22 20:22 ` Simon Glass
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.