sunxi: u-boot-spl.lds: Pass _image_binary_end
PATCH v2 1/3 sunxi: u-boot-spl.lds: Pass _image_binary_end
From: Fabio Estevam <[email protected]>
Pass _image_binary_end to make a standard way to indicate the end of the text section in SPL.
The motivation for this is to have a uniform way to handle the SPL boundary checks.
---
Changes since v1:
- Newly introduced to avoid build failure.
arch/arm/cpu/arm926ejs/sunxi/u-boot-spl.lds | 1 + arch/arm/cpu/armv7/sunxi/u-boot-spl.lds | 1 + 2 files changed, 2 insertions(+)
arch/arm/cpu/arm926ejs/sunxi/u-boot-spl.lds +1 -0
@@ -36,6 +36,7 @@ SECTIONS . = ALIGN(4); __image_copy_end = .; _end = .; + _image_binary_end = .; .bss : {
arch/arm/cpu/armv7/sunxi/u-boot-spl.lds +1 -0
@@ -45,6 +45,7 @@ SECTIONS . = ALIGN(4); __image_copy_end = .; _end = .; + _image_binary_end = .; .bss : {
Signature · 1 line
2.34.1
PATCH v2 2/3 microblaze: u-boot-spl.lds: Pass _image_binary_end
From: Fabio Estevam <[email protected]>
Pass _image_binary_end to make a standard way to indicate the end of the text section in SPL.
The motivation for this is to have a uniform way to handle the SPL boundary checks.
---
Changes since v1:
- Newly introduced to avoid build failure.
arch/microblaze/cpu/u-boot-spl.lds | 1 + 1 file changed, 1 insertion(+)
arch/microblaze/cpu/u-boot-spl.lds +1 -0
@@ -54,6 +54,7 @@ SECTIONS __bss_end = .; } _end = . ; + _image_binary_end = .; } #if defined(CONFIG_SPL_MAX_FOOTPRINT)
Signature · 1 line
2.34.1
Re: [PATCH v2 2/3] microblaze: u-boot-spl.lds: Pass _image_binary_end
Quoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Pass
_image_binary_endto make a standard way to indicate the end of the text section in SPL.The motivation for this is to have a uniform way to handle the SPL boundary checks.
Signed-off-by Fabio Estevam <[email protected]>
Re: [PATCH v2 2/3] microblaze: u-boot-spl.lds: Pass _image_binary_end
In reply to Fabio EstevamQuoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Pass
_image_binary_endto make a standard way to indicate the end of the text section in SPL.The motivation for this is to have a uniform way to handle the SPL boundary checks.
Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Marek Vasut <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom
PATCH v2 3/3 spl: spl_legacy: Fix spl_end address
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Currently, spl_end points to the __bss_end address, which is an external RAM address instead of the end of the SPL text section in the internal RAM.
This causes boot failures on imx6-colibri, for example:
``` Trying to boot from MMC1 SPL: Image overlaps SPL resetting ... ```
Fix this problem by assigning spl_end to _image_binary_end, as this symbol properly represents the end of the SPL text section.
From u-boot-spl.map:
.end
*(.__end)
0x00000000009121a4 _image_binary_end = .
---
Changes since v1:
- None.
common/spl/spl_legacy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/spl_legacy.c +1 -1
@@ -19,7 +19,7 @@static void spl_parse_legacy_validate (uintptr_t start,uintptr_t size) {uintptr_t spl_start = (uintptr_t )_start; -uintptr_t spl_end = (uintptr_t )__bss_end; +uintptr_t spl_end = (uintptr_t )_image_binary_end;uintptr_t end = start + size; if ((start >= spl_start && start < spl_end) ||
Signature · 1 line
2.34.1
Re: [PATCH v2 3/3] spl: spl_legacy: Fix spl_end address
Quoted 18 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Currently,
spl_endpoints to the__bss_endaddress, which is an external RAM address instead of the end of the SPL text section in the internal RAM.This causes boot failures on imx6-colibri, for example:
``` Trying to boot from MMC1 SPL: Image overlaps SPL resetting ... ```Fix this problem by assigning
spl_endto_image_binary_end, as this symbol properly represents the end of the SPL text section.Quoted 1 line
From u-boot-spl.map:
Quoted 8 lines
.end
*(.__end)0x00000000009121a4 _image_binary_end = .Fixes 77aed22b48ab ("spl: spl_legacy: Add extra address checks")Reported-by Francesco Dolcini <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Tested-by Tom Rini <[email protected]>
Re: [PATCH v2 3/3] spl: spl_legacy: Fix spl_end address
In reply to Fabio EstevamQuoted 20 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Currently,
spl_endpoints to the__bss_endaddress, which is an external RAM address instead of the end of the SPL text section in the internal RAM.This causes boot failures on imx6-colibri, for example:
``` Trying to boot from MMC1 SPL: Image overlaps SPL resetting ... ```Fix this problem by assigning
spl_endto_image_binary_end, as this symbol properly represents the end of the SPL text section.From u-boot-spl.map:
.end
*(.__end)
Quoted 8 lines
0x00000000009121a4 _image_binary_end = .Fixes 77aed22b48ab ("spl: spl_legacy: Add extra address checks")Reported-by Francesco Dolcini <[email protected]>Signed-off-by Fabio Estevam <[email protected]>Tested-by Tom Rini <[email protected]>Reviewed-by Marek Vasut <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom
Quoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Pass
_image_binary_endto make a standard way to indicate the end of the text section in SPL.The motivation for this is to have a uniform way to handle the SPL boundary checks.
Signed-off-by Fabio Estevam <[email protected]>
Quoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
Pass
_image_binary_endto make a standard way to indicate the end of the text section in SPL.The motivation for this is to have a uniform way to handle the SPL boundary checks.
Signed-off-by Fabio Estevam <[email protected]>Reviewed-by Marek Vasut <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom