[PATCH] boardf: Modify DRAM message

Neha Malcom Francis n-francis at ti.com
Mon Oct 14 06:34:29 CEST 2024


Hi Simon

+ Vignesh

On 11/10/24 00:20, Simon Glass wrote:
> Hi Neha,
> 
> On Thu, 10 Oct 2024 at 01:09, Neha Malcom Francis <n-francis at ti.com> wrote:
>>
>> The message "DRAM:  2 GiB (effective 32 GiB)" can be a little confusing,
>> modify the message to show exactly what is meant:
>>
>> "DRAM:  2 GiB (available for U-Boot out of total 32 GiB)"
>>
>> Signed-off-by: Neha Malcom Francis <n-francis at ti.com>
>> ---
>>   common/board_f.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/common/board_f.c b/common/board_f.c
>> index 154675d0e40..b7add8f7d3d 100644
>> --- a/common/board_f.c
>> +++ b/common/board_f.c
>> @@ -254,7 +254,7 @@ static int show_dram_config(void)
>>
>>          print_size(gd->ram_size, "");
>>          if (!sizes_near(gd->ram_size, size)) {
>> -               printf(" (effective ");
>> +               printf(" (available for U-Boot out of total ");
>>                  print_size(size, ")");
>>          }
>>          board_add_ram_info(0);
>> --
>> 2.34.1
>>
> 
> I've forgotten why the first number can be so much lower than the
> second. What is causing that?
> 

AFAIK, U-Boot supports up to 39-bit addressing and possibly since there are 
systems that have RAM sizes exceeding 39-bit, addressing has been capped to the 
first bank to avoid any possible problems. So U-Boot sets gd->ram_size to the 
first bank while it acknowledges that the system RAM is more than that. Tom can 
probably confirm if this is right.

In an offline discussion with Vignesh, he mentioned that a cleaner solution 
would be to extend out fdtdec_* functions to support all memory within a 39-bit 
address space.

> This is quite a long string...could we say "(total 32 GiB)" ? Then
> perhaps add something to doc/ to talk about the banner that U-Boot
> prints?
> 
> Regards,
> Simon

-- 
Thanking You
Neha Malcom Francis


More information about the U-Boot mailing list