Re: [ANN] U-Boot v2024.07-rc3 released

2024-05-21 Thread Tom Rini
On Tue, May 21, 2024 at 02:16:25PM +0200, quentin.sch...@cherry.de wrote:

[snip]
> I'm also a bit confused as to why we need to specify the size of the
> allocation pool pre-relocation? Why is this important?

To this point, there are platforms where at this point we don't have
DRAM available yet and so are very constrained.

-- 
Tom


signature.asc
Description: PGP signature


Re: [ANN] U-Boot v2024.07-rc3 released

2024-05-21 Thread quentin . schulz

Hi Jonas,

On 5/21/24 1:57 PM, Jonas Karlman  wrote:

Hi Quentin,

On 2024-05-21 11:53, Quentin Schulz wrote:
> Hi all,
>
> On 5/20/24 6:06 PM, Tom Rini wrote:
>> Hey all,
>>
>> It's release day and here is -rc3. At this point, I think we're firmly
>> on "bug fix and documentation" ground moving forward for changes to
>> v2024.07 and the next branch is open and ready for use and pull
>> requests.
>>
>> In terms of a changelog,
>> git log --merges v2024.07-rc2..v2024.07-rc3
>> contains what I've pulled but as always, better PR messages and tags
>> will provide better results here.
>>
>> I hope to remain on schedule and that means the rest of the rcs every
>> other Monday, and with final release on Monday, July 1st, 2024. Thanks
>> all!
>>
>
> Just to let you know that Rockchip PX30 support is broken since
> 
https://source.denx.de/u-boot/u-boot/-/commit/1d01440b3f14f6648cd672da619489f635cb209c
> (at the very least on Ringneck, haven't tested on PX30 Mini-EVB yet).
>
> U-Boot proper pre-reloc seems to be running out of memory and we cannot
> reach U-Boot CLI anymore.
>
> I hope I'll have time to look into this before v2024.07 is released but
> cannot promise anything.

On Rockchip platform all DRAM is available at U-Boot proper pre-reloc,
so there is no need to limit SYS_MALLOC_F_LEN to a small amount.

Ringneck seem to use 8 KiB for pre-reloc malloc() pool, please try with
a 64 KiB pool, same as rk3308/rk3328/rk3399/rk356x/rk3588 all now use.

   CONFIG_SYS_MALLOC_F_LEN=0x1



This made it work, thanks for the hint.


malloc() pool size used by TPL/SPL should still work:

   CONFIG_TPL_SYS_MALLOC_F_LEN=0x600
   CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000

Also check the "Early malloc usage" from bdinfo cmd, should show how
much memory was actually allocated at pre-reloc, from a rk3308 board:

   Early malloc usage: 2060 / 1



"""
=> bdinfo
boot_params = 0x
DRAM bank   = 0x
-> start= 0x0020
-> size = 0x7fe0
flashstart  = 0x
flashsize   = 0x
flashoffset = 0x
baudrate= 115200 bps
relocaddr   = 0x7ff53000
reloc off   = 0x7fd53000
Build   = 64-bit
current eth = ethernet@ff36
ethaddr = f6:3c:b5:0d:0a:13
IP addr = 
fdt_blob= 0x7df43bd0
new_fdt = 0x7df43bd0
fdt_size= 0xc1e0
lmb_dump_all:
memory.cnt = 0x1 / max = 0x10
memory[0]   [0x20-0x7fff], 0x7fe0 bytes flags: 0
reserved.cnt = 0x1 / max = 0x10
reserved[0] [0x7df3f580-0x7fff], 0x020c0a80 bytes flags: 0
devicetree  = separate
serial addr = 0xff03
width  = 0x0004
shift  = 0x0002
offset = 0x
clock  = 0x016e3600
arch_number = 0x
TLB addr= 0x7fff
irq_sp  = 0x7df43bc0
sp start= 0x7df43bc0
Early malloc usage: 2250 / 1
"""

The default on PX30 for SYS_MALLOC_F_LEN is 0x400 (both from 
arch/arm/mach-rockchip/px30/Kconfig and Kconfig).

The default for SPL_SYS_MALLOC_F_LEN is SYS_MALLOC_F_LEN.

The default for TPL_SYS_MALLOC_F_LEN is SPL_SYS_MALLOC_F_LEN.

I suggest we change the default SYS_MALLOC_F_LEN to be 0x2 then, on PX30.

Since we have forced TPL support on PX30, we can keep SPL_SYS_MALLOC_F_LEN is 
SYS_MALLOC_F_LEN, because we necessarily have DRAM support in SPL so we are 
much less limited in allocation.

Since all PX30 boards have 0x600 for TPL_SYS_MALLOC_F_LEN I suggest to make 
this the default as well?

Anything against this?

I'm also a bit confused as to why we need to specify the size of the allocation 
pool pre-relocation? Why is this important?

Thanks a lot for the hint, I can now work on migrating PX30 to OF_UPSTREAM :)

Cheers,
Quentin


Re: [ANN] U-Boot v2024.07-rc3 released

2024-05-21 Thread Jonas Karlman
Hi Quentin,

On 2024-05-21 11:53, Quentin Schulz wrote:
> Hi all,
> 
> On 5/20/24 6:06 PM, Tom Rini wrote:
>> Hey all,
>>
>> It's release day and here is -rc3. At this point, I think we're firmly
>> on "bug fix and documentation" ground moving forward for changes to
>> v2024.07 and the next branch is open and ready for use and pull
>> requests.
>>
>> In terms of a changelog,
>> git log --merges v2024.07-rc2..v2024.07-rc3
>> contains what I've pulled but as always, better PR messages and tags
>> will provide better results here.
>>
>> I hope to remain on schedule and that means the rest of the rcs every
>> other Monday, and with final release on Monday, July 1st, 2024. Thanks
>> all!
>>
> 
> Just to let you know that Rockchip PX30 support is broken since 
> https://source.denx.de/u-boot/u-boot/-/commit/1d01440b3f14f6648cd672da619489f635cb209c
>  
> (at the very least on Ringneck, haven't tested on PX30 Mini-EVB yet).
> 
> U-Boot proper pre-reloc seems to be running out of memory and we cannot 
> reach U-Boot CLI anymore.
> 
> I hope I'll have time to look into this before v2024.07 is released but 
> cannot promise anything.

On Rockchip platform all DRAM is available at U-Boot proper pre-reloc,
so there is no need to limit SYS_MALLOC_F_LEN to a small amount.

Ringneck seem to use 8 KiB for pre-reloc malloc() pool, please try with
a 64 KiB pool, same as rk3308/rk3328/rk3399/rk356x/rk3588 all now use.

  CONFIG_SYS_MALLOC_F_LEN=0x1

malloc() pool size used by TPL/SPL should still work:

  CONFIG_TPL_SYS_MALLOC_F_LEN=0x600
  CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000

Also check the "Early malloc usage" from bdinfo cmd, should show how
much memory was actually allocated at pre-reloc, from a rk3308 board:

  Early malloc usage: 2060 / 1

Regards,
Jonas

> 
> Cheers,
> Quentin



Re: [ANN] U-Boot v2024.07-rc3 released

2024-05-21 Thread Quentin Schulz

Hi all,

On 5/20/24 6:06 PM, Tom Rini wrote:

Hey all,

It's release day and here is -rc3. At this point, I think we're firmly
on "bug fix and documentation" ground moving forward for changes to
v2024.07 and the next branch is open and ready for use and pull
requests.

In terms of a changelog,
git log --merges v2024.07-rc2..v2024.07-rc3
contains what I've pulled but as always, better PR messages and tags
will provide better results here.

I hope to remain on schedule and that means the rest of the rcs every
other Monday, and with final release on Monday, July 1st, 2024. Thanks
all!



Just to let you know that Rockchip PX30 support is broken since 
https://source.denx.de/u-boot/u-boot/-/commit/1d01440b3f14f6648cd672da619489f635cb209c 
(at the very least on Ringneck, haven't tested on PX30 Mini-EVB yet).


U-Boot proper pre-reloc seems to be running out of memory and we cannot 
reach U-Boot CLI anymore.


I hope I'll have time to look into this before v2024.07 is released but 
cannot promise anything.


Cheers,
Quentin