boardf: Modify DRAM message
PATCH 1/1 boardf: Modify DRAM message
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)"
--- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/board_f.c +1 -1
@@ -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 );
Signature · 1 line
2.34.1
Quoted 4 lines · Neha Malcom Francis
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)"
Still confusing for me atleast :) can this be
"DRAM: 2 GiB available for U-Boot, out of total 32 GiB"
Quoted 19 lines
Signed-off-by Neha Malcom Francis <[email protected]>--- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +1
-1@@ -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 );
Hi Udit
Quoted 5 lines · Udit
Quoted 3 lines · Neha Malcom Francis
The message "DRAM: 2 GiB (effective 32 GiB)" can be a little confusing, modify the message to show exactly what is meant:
Quoted 7 lines
Quoted 1 line
"DRAM: 2 GiB (available for U-Boot out of total 32 GiB)"
Still confusing for me atleast :) can this be
"DRAM: 2 GiB available for U-Boot, out of total 32 GiB"
According to Tom, growing this string is not a good option; I agree as well, we can choose a different approach.
Quoted 19 lines
Quoted 19 lines
Signed-off-by Neha Malcom Francis <[email protected]>---
common/board_f.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +1
-1@@ -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);
Signature · 2 lines
Thanking You Neha Malcom Francis
Quoted 15 lines · Neha Malcom Francis
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 <[email protected]>--- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +0
-0
common/board_f.c static int show_dram_config(void) · line 260
Quoted 8 lines
common/board_f.c +1
-1@@ -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 );
We're growing a constant string in every build here. I would rather see doc/develop/memory.rst start to get updated to spell out that when we print "effective" here it's because we do not have the full 64bit address space available, only 2GiB.
Signature · 1 line
Tom
Hi Tom
Quoted 18 lines · Tom Rini
Quoted 16 lines · Neha Malcom Francis
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 <[email protected]>--- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +0
-0@@ -254,7 +254,7 @@ static int show_dram_config(void)
Quoted 13 lines
common/board_f.c static int show_dram_config(void) · line 260
Quoted 7 lines
common/board_f.c +1
-1print_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 );We're growing a constant string in every build here. I would rather see
doc/develop/memory.rststart to get updated to spell out that when we print "effective" here it's because we do not have the full 64bit address space available, only 2GiB.
Agreed, maybe we can take both updation of memory.rst as well as Simon's suggestion of s/effective/total to clear things out.
Signature · 2 lines
Thanking You Neha Malcom Francis
Hi Neha,
Quoted 25 lines · Neha Malcom Francis
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 <[email protected]>--- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +1
-2@@ -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 ); --
Quoted 2 lines
2.34.1
I've forgotten why the first number can be so much lower than the second. What is causing that?
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
Quoted 34 lines · Simon Glass
Hi Neha,
Quoted 25 lines · Neha Malcom Francis
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 <[email protected]>--- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +1
-2@@ -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 ); --Quoted 2 lines
2.34.1
I've forgotten why the first number can be so much lower than the second. What is causing that?
Quoted 4 lines
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?
Why not just only print the total number? The amount available to U-Boot seems like an internal detail, I'd guess most folks just what to see at a glance how much DDR was detected on their system.
Andrew
Quoted 2 lines
Regards,
Simon
Hi Andrew
Quoted 35 lines · Andrew Davis
Quoted 34 lines · Simon Glass
Hi Neha,
Quoted 27 lines · Neha Malcom Francis
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 <[email protected]>---
common/board_f.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +1
-1@@ -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);Signature · 1 line
2.34.1I've forgotten why the first number can be so much lower than the second. What is causing that?
Quoted 9 lines
Quoted 4 lines
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?
Why not just only print the total number? The amount available to U-Boot seems like an internal detail, I'd guess most folks just what to see at a glance how much DDR was detected on their system.
Looking at the git history of this line, seems like we were printing U-Boot available size first and then modified it to show the entire DRAM available as "effective size"... quite possibly directly showing the total is a better idea.
Unless anyone has any reason to have this detail?
Quoted 4 lines
Andrew
Quoted 2 lines
Regards,
Simon
Signature · 2 lines
Thanking You Neha Malcom Francis
Quoted 48 lines · Neha Malcom Francis
Hi Andrew
Quoted 35 lines · Andrew Davis
Quoted 34 lines · Simon Glass
Hi Neha,
Quoted 27 lines · Neha Malcom Francis
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 <[email protected]>---
common/board_f.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +1
-1@@ -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);Signature · 1 line
2.34.1I've forgotten why the first number can be so much lower than the second. What is causing that?
Quoted 9 lines
Quoted 4 lines
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?
Why not just only print the total number? The amount available to U-Boot seems like an internal detail, I'd guess most folks just what to see at a glance how much DDR was detected on their system.
Quoted 6 lines
Looking at the git history of this line, seems like we were printing U-Boot available size first and then modified it to show the entire DRAM available as "effective size"... quite possibly directly showing the total is a better idea.
Unless anyone has any reason to have this detail?
There's probably more history as well, but not totally relevant these days. Some solution that starts from "most SoCs are 64bit and can easily address all memory" and goes from there to not grow the overall U-Boot binary much would be good.
Signature · 1 line
Tom
Hi,
Quoted 44 lines · Tom Rini
Quoted 43 lines · Neha Malcom Francis
Hi Andrew
Quoted 40 lines · Andrew Davis
Quoted 38 lines · Simon Glass
Hi Neha,
Quoted 27 lines · Neha Malcom Francis
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 <[email protected]>---
common/board_f.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +1
-1@@ -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);Signature · 1 line
2.34.1I've forgotten why the first number can be so much lower than the second. What is causing that?
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?
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Why not just only print the total number? The amount available to U-Boot seems like an internal detail, I'd guess most folks just what to see at a glance how much DDR was detected on their system.
Knowing how much u-boot is using might help someone who is working on some memory map related stuff or if they want to stop at u-boot prompt and tweak environment variables related to memory map (e.g. load address for kernel, dtb, load bitmap to DDR etc). Overall I personally don't see much harm on keeping both the information (DDR available to u-boot and total available DDR). If the word effective is confusing than the print can be made more verbose as being intended in this patch-set or by following the suggestions given by Simon and Udit.
Regards
Devarsh
Quoted 52 lines · Devarsh Thakkar
Hi,
Quoted 44 lines · Tom Rini
Quoted 43 lines · Neha Malcom Francis
Hi Andrew
Quoted 40 lines · Andrew Davis
Quoted 38 lines · Simon Glass
Hi Neha,
Quoted 27 lines · Neha Malcom Francis
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 <[email protected]>---
common/board_f.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +1
-1@@ -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);Signature · 1 line
2.34.1I've forgotten why the first number can be so much lower than the second. What is causing that?
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?
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Why not just only print the total number? The amount available to U-Boot seems like an internal detail, I'd guess most folks just what to see at a glance how much DDR was detected on their system.
Quoted 8 lines
Knowing how much u-boot is using might help someone who is working on some memory map related stuff or if they want to stop at u-boot prompt and tweak environment variables related to memory map (e.g. load address for kernel, dtb, load bitmap to DDR etc). Overall I personally don't see much harm on keeping both the information (DDR available to u-boot and total available DDR). If the word effective is confusing than the print can be made more verbose as being intended in this patch-set or by following the suggestions given by Simon and Udit.
U-Boot isn't "using" 2GiB however. And in fact the command Simon is working on to dump the memory table and what's where, as far as U-Boot knows, would be helpful in that case.
Signature · 1 line
Tom
Hi all,
Quoted 62 lines · Tom Rini
Quoted 52 lines · Devarsh Thakkar
Hi,
Quoted 44 lines · Tom Rini
Quoted 43 lines · Neha Malcom Francis
Hi Andrew
Quoted 40 lines · Andrew Davis
Quoted 38 lines · Simon Glass
Hi Neha,
Quoted 27 lines · Neha Malcom Francis
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 <[email protected]>--- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +1
-1@@ -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);Signature · 1 line
2.34.1I've forgotten why the first number can be so much lower than the second. What is causing that?
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?
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Why not just only print the total number? The amount available to U-Boot seems like an internal detail, I'd guess most folks just what to see at a glance how much DDR was detected on their system.
Quoted 8 lines
Knowing how much u-boot is using might help someone who is working on some memory map related stuff or if they want to stop at u-boot prompt and tweak environment variables related to memory map (e.g. load address for kernel, dtb, load bitmap to DDR etc). Overall I personally don't see much harm on keeping both the information (DDR available to u-boot and total available DDR). If the word effective is confusing than the print can be made more verbose as being intended in this patch-set or by following the suggestions given by Simon and Udit.
Quoted 4 lines
U-Boot isn't "using" 2GiB however. And in fact the command Simon is working on to dump the memory table and what's where, as far as U-Boot knows, would be helpful in that case.
"Available" and "Total" would be matching the terms used by "free" in Linux for example.
I still think both are valuable pieces of information (what's populated and what is usable by U-Boot AFAIR).
Cheers,
Quentin
Quoted 70 lines · Quentin Schulz
Hi all,
Quoted 62 lines · Tom Rini
Quoted 52 lines · Devarsh Thakkar
Hi,
Quoted 44 lines · Tom Rini
Quoted 43 lines · Neha Malcom Francis
Hi Andrew
Quoted 40 lines · Andrew Davis
Quoted 38 lines · Simon Glass
Hi Neha,
Quoted 27 lines · Neha Malcom Francis
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 <[email protected]>--- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +1
-1@@ -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);Signature · 1 line
2.34.1I've forgotten why the first number can be so much lower than the second. What is causing that?
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?
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Why not just only print the total number? The amount available to U-Boot seems like an internal detail, I'd guess most folks just what to see at a glance how much DDR was detected on their system.
Quoted 8 lines
Knowing how much u-boot is using might help someone who is working on some memory map related stuff or if they want to stop at u-boot prompt and tweak environment variables related to memory map (e.g. load address for kernel, dtb, load bitmap to DDR etc). Overall I personally don't see much harm on keeping both the information (DDR available to u-boot and total available DDR). If the word effective is confusing than the print can be made more verbose as being intended in this patch-set or by following the suggestions given by Simon and Udit.
Quoted 4 lines
U-Boot isn't "using" 2GiB however. And in fact the command Simon is working on to dump the memory table and what's where, as far as U-Boot knows, would be helpful in that case.
Quoted 5 lines
"Available" and "Total" would be matching the terms used by "free" in Linux for example.
I still think both are valuable pieces of information (what's populated and what is usable by U-Boot AFAIR).
Yes, and that won't change the binary size much, thanks.
Signature · 1 line
Tom
Hi Tom, Devarsh, Quentin
Quoted 71 lines · Tom Rini
Quoted 70 lines · Quentin Schulz
Hi all,
Quoted 66 lines · Tom Rini
Quoted 52 lines · Devarsh Thakkar
Hi,
Quoted 44 lines · Tom Rini
Quoted 43 lines · Neha Malcom Francis
Hi Andrew
Quoted 40 lines · Andrew Davis
Quoted 38 lines · Simon Glass
Hi Neha,
Quoted 27 lines · Neha Malcom Francis
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 <[email protected]>--- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +1
-1@@ -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);Signature · 1 line
2.34.1I've forgotten why the first number can be so much lower than the second. What is causing that?
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?
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
Why not just only print the total number? The amount available to U-Boot seems like an internal detail, I'd guess most folks just what to see at a glance how much DDR was detected on their system.
Quoted 8 lines
Knowing how much u-boot is using might help someone who is working on some memory map related stuff or if they want to stop at u-boot prompt and tweak environment variables related to memory map (e.g. load address for kernel, dtb, load bitmap to DDR etc). Overall I personally don't see much harm on keeping both the information (DDR available to u-boot and total available DDR). If the word effective is confusing than the print can be made more verbose as being intended in this patch-set or by following the suggestions given by Simon and Udit.
U-Boot isn't "using" 2GiB however. And in fact the command Simon is working on to dump the memory table and what's where, as far as U-Boot knows, would be helpful in that case.
Quoted 8 lines
Quoted 5 lines
"Available" and "Total" would be matching the terms used by "free" in Linux for example.
I still think both are valuable pieces of information (what's populated and what is usable by U-Boot AFAIR).
Yes, and that won't change the binary size much, thanks.
Thank you for the inputs. I think we can go with s/effective/total and updating the documentation.
Signature · 2 lines
Thanking You Neha Malcom Francis
Hi Simon
+ Vignesh
Quoted 20 lines · Simon Glass
Hi Neha,
Quoted 17 lines · Neha Malcom Francis
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 <[email protected]>--- common/board_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/board_f.c +0
-0@@ -254,7 +254,7 @@ static int show_dram_config(void)
Quoted 14 lines
Quoted 10 lines
common/board_f.c +1
-2print_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.
Quoted 6 lines
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
Signature · 2 lines
Thanking You Neha Malcom Francis