diff mbox series

[10/10] arm64: versal: Set initrd_high to as high as possible

Message ID 3412d4c15201c3e3d73f63b6c8128849d4b2776d.1603362738.git.michal.simek@xilinx.com
State Rejected
Delegated to: Michal Simek
Headers show
Series xilinx: common: Several minor fixups | expand

Commit Message

Michal Simek Oct. 22, 2020, 10:32 a.m. UTC
From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

This patch is setting up the initrd_high to as high as possible by leaving
max stack size for u-boot so that bigger rootfs can also be loaded by
u-boot for booting kernel.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 board/xilinx/versal/board.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Tom Rini Oct. 22, 2020, 5:45 p.m. UTC | #1
On Thu, Oct 22, 2020 at 12:32:22PM +0200, Michal Simek wrote:

> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> 
> This patch is setting up the initrd_high to as high as possible by leaving
> max stack size for u-boot so that bigger rootfs can also be loaded by
> u-boot for booting kernel.
> 
> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
>  board/xilinx/versal/board.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
> index 912c1143a8ad..09229e0a75a4 100644
> --- a/board/xilinx/versal/board.c
> +++ b/board/xilinx/versal/board.c
> @@ -217,6 +217,10 @@ int board_late_init(void)
>  
>  	env_set("boot_targets", new_targets);
>  
> +	initrd_hi = gd->start_addr_sp - CONFIG_STACK_SIZE;
> +	initrd_hi = round_down(initrd_hi, SZ_16M);
> +	env_set_addr("initrd_high", (void *)initrd_hi);
> +
>  	return board_late_init_xilinx();
>  }

My concern here (and also microblaze-generic, after some grepping) is
that wouldn't it be best to set bootm_size and let fdt and initrd be
relocated as needed?
Michal Simek Oct. 23, 2020, 5:43 a.m. UTC | #2
On 22. 10. 20 19:45, Tom Rini wrote:
> On Thu, Oct 22, 2020 at 12:32:22PM +0200, Michal Simek wrote:
>
>> From: Siva Durga Prasad Paladugu
>> <siva.durga.paladugu@xilinx.com>
>>
>> This patch is setting up the initrd_high to as high as possible
>> by leaving max stack size for u-boot so that bigger rootfs can
>> also be loaded by u-boot for booting kernel.
>>
>> Signed-off-by: Siva Durga Prasad Paladugu
>> <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek
>> <michal.simek@xilinx.com> ---
>>
>> board/xilinx/versal/board.c | 4 ++++ 1 file changed, 4
>> insertions(+)
>>
>> diff --git a/board/xilinx/versal/board.c
>> b/board/xilinx/versal/board.c index 912c1143a8ad..09229e0a75a4
>> 100644 --- a/board/xilinx/versal/board.c +++
>> b/board/xilinx/versal/board.c @@ -217,6 +217,10 @@ int
>> board_late_init(void)
>>
>> env_set("boot_targets", new_targets);
>>
>> +	initrd_hi = gd->start_addr_sp - CONFIG_STACK_SIZE; +	initrd_hi
>> = round_down(initrd_hi, SZ_16M); +	env_set_addr("initrd_high",
>> (void *)initrd_hi); + return board_late_init_xilinx(); }
>
> My concern here (and also microblaze-generic, after some grepping)
> is that wouldn't it be best to set bootm_size and let fdt and
> initrd be relocated as needed?

You are right and I have already done it in this way but forget to
remove this patch from my queue. Will drop this patch.

Thanks,
Michal
Michal Simek Oct. 27, 2020, 7:29 a.m. UTC | #3
pá 23. 10. 2020 v 7:44 odesílatel Michal Simek <michal.simek@xilinx.com> napsal:
>
>
>
> On 22. 10. 20 19:45, Tom Rini wrote:
> > On Thu, Oct 22, 2020 at 12:32:22PM +0200, Michal Simek wrote:
> >
> >> From: Siva Durga Prasad Paladugu
> >> <siva.durga.paladugu@xilinx.com>
> >>
> >> This patch is setting up the initrd_high to as high as possible
> >> by leaving max stack size for u-boot so that bigger rootfs can
> >> also be loaded by u-boot for booting kernel.
> >>
> >> Signed-off-by: Siva Durga Prasad Paladugu
> >> <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek
> >> <michal.simek@xilinx.com> ---
> >>
> >> board/xilinx/versal/board.c | 4 ++++ 1 file changed, 4
> >> insertions(+)
> >>
> >> diff --git a/board/xilinx/versal/board.c
> >> b/board/xilinx/versal/board.c index 912c1143a8ad..09229e0a75a4
> >> 100644 --- a/board/xilinx/versal/board.c +++
> >> b/board/xilinx/versal/board.c @@ -217,6 +217,10 @@ int
> >> board_late_init(void)
> >>
> >> env_set("boot_targets", new_targets);
> >>
> >> +    initrd_hi = gd->start_addr_sp - CONFIG_STACK_SIZE; +    initrd_hi
> >> = round_down(initrd_hi, SZ_16M); +   env_set_addr("initrd_high",
> >> (void *)initrd_hi); + return board_late_init_xilinx(); }
> >
> > My concern here (and also microblaze-generic, after some grepping)
> > is that wouldn't it be best to set bootm_size and let fdt and
> > initrd be relocated as needed?
>
> You are right and I have already done it in this way but forget to
> remove this patch from my queue. Will drop this patch.
>
> Thanks,
> Michal

This patch has been dropped from the series.
1-9 applied.
M
diff mbox series

Patch

diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 912c1143a8ad..09229e0a75a4 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -217,6 +217,10 @@  int board_late_init(void)
 
 	env_set("boot_targets", new_targets);
 
+	initrd_hi = gd->start_addr_sp - CONFIG_STACK_SIZE;
+	initrd_hi = round_down(initrd_hi, SZ_16M);
+	env_set_addr("initrd_high", (void *)initrd_hi);
+
 	return board_late_init_xilinx();
 }