Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-06 Thread Patrick DELAUNAY
ound for master branch and v2023.01 delivery. but the initial commit 777706b ("common/memsize.c: Fix get_effective_memsize() to check should be revisited or reverted (in master or in next ?). For details see comments in patch "arm: stm32mp: Fix board_get_usable_ram_top() a

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-06 Thread Pali Rohar
On Friday 06 January 2023 10:13:34 Patrick DELAUNAY wrote: > Hi, > > On 1/5/23 20:25, Pali Rohar wrote: > > Ok, so it is working... > > > > On Thursday 05 January 2023 19:31:19 Patrick DELAUNAY wrote: > > > I tested on STM32MP157C-EV1 on my side... > > > > > > with 1GiB mermory size > > > > > >

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-06 Thread Marek Vasut
On 1/6/23 10:13, Patrick DELAUNAY wrote: Hi, Hi, For me: get_effective_memsize() must return the effective size of the DDR and NOT -4KiB to avoid side effects in other part of the code (LMB for example) I think today we need to revert your patch. I agree it would be good to revert the

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-06 Thread Patrick DELAUNAY
Hi, On 1/5/23 20:16, Pali Rohar wrote: Hello! On Thursday 05 January 2023 11:03:07 Patrick DELAUNAY wrote: Hi, On 1/5/23 02:22, Marek Vasut wrote: Do not access gd->ram_size and assume this is actual valid RAM size. Since commit 777706b ("common/memsize.c: Fix get_effective_memsize() to

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-06 Thread Patrick DELAUNAY
Hi, On 1/5/23 20:25, Pali Rohar wrote: Ok, so it is working... On Thursday 05 January 2023 19:31:19 Patrick DELAUNAY wrote: I tested on STM32MP157C-EV1 on my side... with 1GiB mermory size U-Boot is booting on next TOP (for trusted boot with TF-A and OP-TEE) U-Boot 2023.01-rc4-00386-gb429

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-06 Thread Patrick DELAUNAY
Hi, On 1/5/23 21:35, Marek Vasut wrote: On 1/5/23 19:31, Patrick DELAUNAY wrote: Hi Marek, Hi, [...] I tested on STM32MP157C-EV1 on my side... with 1GiB mermory size U-Boot is booting on next TOP (for trusted boot with TF-A and OP-TEE) U-Boot 2023.01-rc4-00386-gb429e78942de (Jan 05 2

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-05 Thread Marek Vasut
On 1/5/23 20:25, Pali Rohar wrote: Ok, so it is working... No, it is NOT working because the test performed is using completely different codebase. The STM32MP15xx platform I have on my desk is hanging on boot with current U-Boot master, i.e upcoming release. With commit 777706b ("commo

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-05 Thread Marek Vasut
On 1/5/23 19:31, Patrick DELAUNAY wrote: Hi Marek, Hi, [...] I tested on STM32MP157C-EV1 on my side... with 1GiB mermory size U-Boot is booting on next TOP (for trusted boot with TF-A and OP-TEE) U-Boot 2023.01-rc4-00386-gb429e78942de (Jan 05 2023 - 17:44:04 +0100) Note that I am not

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-05 Thread Pali Rohar
Ok, so it is working... On Thursday 05 January 2023 19:31:19 Patrick DELAUNAY wrote: > I tested on STM32MP157C-EV1 on my side... > > with 1GiB mermory size > > U-Boot is booting on next TOP (for trusted boot with TF-A and OP-TEE) > > > > U-Boot 2023.01-rc4-00386-gb429e78942de (Jan 05 2023 - 1

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-05 Thread Pali Rohar
Hello! On Thursday 05 January 2023 11:03:07 Patrick DELAUNAY wrote: > Hi, > > On 1/5/23 02:22, Marek Vasut wrote: > > Do not access gd->ram_size and assume this is actual valid RAM size. Since > > commit > > 777706b ("common/memsize.c: Fix get_effective_memsize() to check for > > overflow")

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-05 Thread Patrick DELAUNAY
Hi Marek, On 1/5/23 13:11, Marek Vasut wrote: On 1/5/23 11:03, Patrick DELAUNAY wrote: Hi, Hi, On 1/5/23 02:22, Marek Vasut wrote: Do not access gd->ram_size and assume this is actual valid RAM size. Since commit 777706b ("common/memsize.c: Fix get_effective_memsize() to check for ove

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-05 Thread Marek Vasut
On 1/5/23 11:03, Patrick DELAUNAY wrote: Hi, Hi, On 1/5/23 02:22, Marek Vasut wrote: Do not access gd->ram_size and assume this is actual valid RAM size. Since commit 777706b ("common/memsize.c: Fix get_effective_memsize() to check for overflow") the RAM size may be less than gd->ram_si

Re: [PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-05 Thread Patrick DELAUNAY
Hi, On 1/5/23 02:22, Marek Vasut wrote: Do not access gd->ram_size and assume this is actual valid RAM size. Since commit 777706b ("common/memsize.c: Fix get_effective_memsize() to check for overflow") the RAM size may be less than gd->ram_size , call get_effective_memsize() to get the lim

[PATCH] arm: stm32mp: Fix board_get_usable_ram_top() again

2023-01-04 Thread Marek Vasut
Do not access gd->ram_size and assume this is actual valid RAM size. Since commit 777706b ("common/memsize.c: Fix get_effective_memsize() to check for overflow") the RAM size may be less than gd->ram_size , call get_effective_memsize() to get the limited value instead. The aforementioned com