* [PATCH] xilinx: Setup bootm variables
@ 2020-07-10 11:20 Michal Simek
2020-07-24 12:14 ` Michal Simek
0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2020-07-10 11:20 UTC (permalink / raw)
To: u-boot
On system with PL DDR which is placed before PS DDR in DT
env_get_bootm_size() and env_get_bootm_low() without specifying bootm_low
and bootm_size variables are taking by default gd->bd->bi_dram[0].start and
gd->bd->bi_dram[0].size. As you see 0 means bank 0 which doesn't need to be
PS ddr and even can be memory above 39bit VA which is what U-Boot supports
now.
That's why setup bootm variables based on ram_base/ram_size setting to make
sure that boot images are placed to the same location as U-Boot is placed.
This location should be by default location where OS can boot from.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
board/xilinx/common/board.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 0469e2e7ac9b..3bca3a25a97b 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -86,5 +86,8 @@ int board_late_init_xilinx(void)
initrd_hi = round_down(initrd_hi, SZ_16M);
env_set_addr("initrd_high", (void *)initrd_hi);
+ env_set_addr("bootm_low", (void *)gd->ram_base);
+ env_set_addr("bootm_size", (void *)gd->ram_size);
+
return 0;
}
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] xilinx: Setup bootm variables
2020-07-10 11:20 [PATCH] xilinx: Setup bootm variables Michal Simek
@ 2020-07-24 12:14 ` Michal Simek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2020-07-24 12:14 UTC (permalink / raw)
To: u-boot
p? 10. 7. 2020 v 13:20 odes?latel Michal Simek <michal.simek@xilinx.com> napsal:
>
> On system with PL DDR which is placed before PS DDR in DT
> env_get_bootm_size() and env_get_bootm_low() without specifying bootm_low
> and bootm_size variables are taking by default gd->bd->bi_dram[0].start and
> gd->bd->bi_dram[0].size. As you see 0 means bank 0 which doesn't need to be
> PS ddr and even can be memory above 39bit VA which is what U-Boot supports
> now.
> That's why setup bootm variables based on ram_base/ram_size setting to make
> sure that boot images are placed to the same location as U-Boot is placed.
> This location should be by default location where OS can boot from.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> board/xilinx/common/board.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
> index 0469e2e7ac9b..3bca3a25a97b 100644
> --- a/board/xilinx/common/board.c
> +++ b/board/xilinx/common/board.c
> @@ -86,5 +86,8 @@ int board_late_init_xilinx(void)
> initrd_hi = round_down(initrd_hi, SZ_16M);
> env_set_addr("initrd_high", (void *)initrd_hi);
>
> + env_set_addr("bootm_low", (void *)gd->ram_base);
> + env_set_addr("bootm_size", (void *)gd->ram_size);
> +
> return 0;
> }
> --
> 2.27.0
>
Applied.
M
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-24 12:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 11:20 [PATCH] xilinx: Setup bootm variables Michal Simek
2020-07-24 12:14 ` Michal Simek
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.