cmd: fdt: Fix fdt address information after the movement
PATCH 1/1 cmd: fdt: Fix fdt address information after the movement
From: Hiroyuki Yokoyama <[email protected]>
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.
--- cmd/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/fdt.c +1 -1
@@ -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 ) {
Signature · 1 line
2.18.0
PATCH 1/1 cmd: fdt: Fix fdt address information after the movement
Quoted 13 lines · Marek Vasut
From: Hiroyuki Yokoyama <[email protected]>
This patch fixes the address information of fdt.
wrong case:
=> fdt addr0x48000000
=> fdt move0x480000000x410000000xa000
=> fdt addr
The address of the fdt is 48000000Active address in this case is
0x41000000.
Quoted 9 lines
Signed-off-by Hiroyuki Yokoyama <[email protected]>Signed-off-by Marek Vasut <[email protected]>Cc Hiroyuki Yokoyama <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>Cc Pantelis Antoniou <[email protected]>--- cmd/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Also, the cast to struct fdt_header * in the code above looks wrong. I think it should have a map_sysmem() in there.
PATCH 1/1 cmd: fdt: Fix fdt address information after the movement
Quoted 24 lines · Simon Glass
Quoted 13 lines · Marek Vasut
From: Hiroyuki Yokoyama <[email protected]>
This patch fixes the address information of fdt.
wrong case:
=> fdt addr0x48000000
=> fdt move0x480000000x410000000xa000
=> fdt addr
The address of the fdt is 48000000Active address in this case is
0x41000000.Quoted 9 lines
Signed-off-by Hiroyuki Yokoyama <[email protected]>Signed-off-by Marek Vasut <[email protected]>Cc Hiroyuki Yokoyama <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>Cc Pantelis Antoniou <[email protected]>--- cmd/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines
Reviewed-by Simon Glass <[email protected]>Also, the cast to struct
fdt_header* in the code above looks wrong. I think it should have amap_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 ...
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 cmd: fdt: Fix fdt address information after the movement
Hi Marek,
Quoted 26 lines · Marek Vasut
Quoted 24 lines · Simon Glass
Quoted 22 lines · Marek Vasut
From: Hiroyuki Yokoyama <[email protected]>
This patch fixes the address information of fdt.
wrong case:
=> fdt addr0x48000000
=> fdt move0x480000000x410000000xa000
=> fdt addr
The address of the fdt is 48000000Active address in this case is
0x41000000.Signed-off-by Hiroyuki Yokoyama <[email protected]>Signed-off-by Marek Vasut <[email protected]>Cc Hiroyuki Yokoyama <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>Cc Pantelis Antoniou <[email protected]>--- cmd/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 8 lines
Quoted 4 lines
Reviewed-by Simon Glass <[email protected]>Also, the cast to struct
fdt_header* in the code above looks wrong. I think it should have amap_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
PATCH 1/1 cmd: fdt: Fix fdt address information after the movement
Quoted 32 lines · Simon Glass
Hi Marek,
Quoted 28 lines · Marek Vasut
Quoted 26 lines · Simon Glass
Quoted 13 lines · Marek Vasut
From: Hiroyuki Yokoyama <[email protected]>
This patch fixes the address information of fdt.
wrong case:
=> fdt addr0x48000000
=> fdt move0x480000000x410000000xa000
=> fdt addr
The address of the fdt is 48000000Active address in this case is
0x41000000.Quoted 9 lines
Signed-off-by Hiroyuki Yokoyama <[email protected]>Signed-off-by Marek Vasut <[email protected]>Cc Hiroyuki Yokoyama <[email protected]>Cc Nobuhiro Iwamatsu <[email protected]>Cc Pantelis Antoniou <[email protected]>--- cmd/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Reviewed-by Simon Glass <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Also, the cast to struct
fdt_header* in the code above looks wrong. I think it should have amap_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!