board_f: Only reserve memory for U-Boot if we're going to relocate
PATCH v2 1/1 board_f: Only reserve memory for U-Boot if we're going to relocate
In case of no relocation we'll just waste some space at the very end of usable memory area. If target device has very limited amount of memory (for example 256 kB) this loss will be pretty inconvenient.
---
Changes v1 -> v2:
* Updated commit message as suggested by Simon
common/board_f.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-)
common/board_f.c +15 -13
@@ -394,19 +394,21 @@ static int reserve_trace(void)static int reserve_uboot (void ) { -/* -* reserve memory for U-Boot code, data & bss -* round down to next 4 kB limit -*/ - gd->relocaddr -= gd->mon_len; - gd->relocaddr &= ~(4096 -1 ); -#if defined(CONFIG_E500 ) || defined(CONFIG_MIPS ) -/* round down to next 64 kB limit so that IVPR stays aligned */ - gd->relocaddr &= ~(65536 -1 ); -#endif - -debug ("Reserving %ldk for U-Boot at: %08lx\n" , gd->mon_len >>10 , - gd->relocaddr); +if (!(gd->flags &GD_FLG_SKIP_RELOC )) { +/* +* reserve memory for U-Boot code, data & bss +* round down to next 4 kB limit +*/ + gd->relocaddr -= gd->mon_len; + gd->relocaddr &= ~(4096 -1 ); +#if defined(CONFIG_E500 ) || defined(CONFIG_MIPS ) +/* round down to next 64 kB limit so that IVPR stays aligned */ + gd->relocaddr &= ~(65536 -1 ); +#endif + +debug ("Reserving %ldk for U-Boot at: %08lx\n" , + gd->mon_len >>10 , gd->relocaddr); + } gd->start_addr_sp = gd->relocaddr;
Signature · 1 line
2.17.0
PATCH v2 1/1 board_f: Only reserve memory for U-Boot if we're going to relocate
Quoted 10 lines · Alexey Brodkin
In case of no relocation we'll just waste some space at the very end of usable memory area. If target device has very limited amount of memory (for example 256 kB) this loss will be pretty inconvenient.
Signed-off-by Alexey Brodkin <[email protected]>Reviewed-by Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Heiko Schocher <[email protected]>Cc York Sun <[email protected]>Cc Stefan Roese <[email protected]>
Quoted 7 lines
---
Changes v1 -> v2:
* Updated commit message as suggested by Simoncommon/board_f.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-)
PATCH v2 1/1 board_f: Only reserve memory for U-Boot if we're going to relocate
Hi Tom,
Quoted 13 lines · Simon Glass
Quoted 12 lines · Alexey Brodkin
In case of no relocation we'll just waste some space at the very end of usable memory area. If target device has very limited amount of memory (for example 256 kB) this loss will be pretty inconvenient.
Signed-off-by Alexey Brodkin <[email protected]>Reviewed-by Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Heiko Schocher <[email protected]>Cc York Sun <[email protected]>Cc Stefan Roese <[email protected]>---
Quoted 7 lines
Quoted 5 lines
Changes v1 -> v2:
* Updated commit message as suggested by Simoncommon/board_f.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-)Reviewed-by Simon Glass <[email protected]>
Any chance to get this one applied?
It's been sitting in patchwork for some time now.
-Alexey
PATCH v2 1/1 board_f: Only reserve memory for U-Boot if we're going to relocate
In reply to Alexey BrodkinQuoted 11 lines · Alexey Brodkin
In case of no relocation we'll just waste some space at the very end of usable memory area. If target device has very limited amount of memory (for example 256 kB) this loss will be pretty inconvenient.
Signed-off-by Alexey Brodkin <[email protected]>Reviewed-by Simon Glass <[email protected]>Cc Bin Meng <[email protected]>Cc Heiko Schocher <[email protected]>Cc York Sun <[email protected]>Cc Stefan Roese <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180606/f6fcc305/attachment.sig>