| #
dfdb73f7 |
| 16-Sep-2025 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "bk/no_blx_setup" into integration
* changes: fix: replace stray BL2_AT_EL3 with RESET_TO_BL2 refactor(aarch64): move BL31 specific setup out of the PSCI entrypoint re
Merge changes from topic "bk/no_blx_setup" into integration
* changes: fix: replace stray BL2_AT_EL3 with RESET_TO_BL2 refactor(aarch64): move BL31 specific setup out of the PSCI entrypoint refactor: unify blx_setup() and blx_main() fix(bl2): unify the BL2 EL3 and RME entrypoints
show more ...
|
| #
04cf04c7 |
| 13-Aug-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(bl2): unify the BL2 EL3 and RME entrypoints
BL2 has 3(!) entrypoints: 1) the regular EL1 entrypoint (once per AArch) 2) an EL3 entrypoint 3) an EL3 entrypoint with RME
The EL1 and EL3 entryp
fix(bl2): unify the BL2 EL3 and RME entrypoints
BL2 has 3(!) entrypoints: 1) the regular EL1 entrypoint (once per AArch) 2) an EL3 entrypoint 3) an EL3 entrypoint with RME
The EL1 and EL3 entrypoints are quite distinct so it's useful to keep them separate. But the EL3 and RME entrypoints are conceptually identical just configured differently and having slightly different assumptions (eg whether we can rely on BL1). So put them together with only the configuration as a difference. This has a few benefits: * makes the naming consistent - BL2 always runs at EL1, BL2_EL3 always runs at EL3. This is most important for the linker script. * paves the way for ENABLE_RME and RESET_TO_BL2 to coexist. * allows for more general refactors
Currently, ENABLE_RME and RESET_TO_BL2 are mutually exclusive (from a makefile constraint) so the checks are simplified to one or the other as there is no danger of their simultaneous use.
Change-Id: Iecffab2ff3a0bd7823f8277d9f66e22e4f42cc8c Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
8ddb02d5 |
| 30-Nov-2023 |
André Przywara <andre.przywara@arm.com> |
Merge changes from topic "fix-lto-build" into integration
* changes: fix(build): don't generate build-id fix(build): add forgotten BL_LDFLAGS to lto command line feat(build): check that .text
Merge changes from topic "fix-lto-build" into integration
* changes: fix(build): don't generate build-id fix(build): add forgotten BL_LDFLAGS to lto command line feat(build): check that .text section starts at page boundary
show more ...
|
| #
3d6edc32 |
| 05-Sep-2023 |
Andrey Skvortsov <andrej.skvortzov@gmail.com> |
feat(build): check that .text section starts at page boundary
Linker may decide to put new unspecified sections before .text section. That will cause non-working image, because entry point isn't at
feat(build): check that .text section starts at page boundary
Linker may decide to put new unspecified sections before .text section. That will cause non-working image, because entry point isn't at __BLXX_START__. Device just not booted with such image.
This happened for example with .note.gnu.build-id section generated for LTO build in some cases. Now linker will report this situation as an error.
``` /usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: .text is not aligned on a page boundary. collect2: error: ld returned 1 exit status ```
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Change-Id: I5ae46ddd1e6e431e1df1715d1d301f6dd7181cc7
show more ...
|
| #
7ae96dce |
| 12-Jun-2023 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge "chore(bl): add UNALIGNED symbols for TEXT/RODATA" into integration
|
| #
f7d445fc |
| 27-Apr-2023 |
Michal Simek <michal.simek@amd.com> |
chore(bl): add UNALIGNED symbols for TEXT/RODATA
Add symbols to mark end of TEXT/RODATA before page alignment. Similar change was done by commit 8d69a03f6a7d ("Various improvements/cleanups on the l
chore(bl): add UNALIGNED symbols for TEXT/RODATA
Add symbols to mark end of TEXT/RODATA before page alignment. Similar change was done by commit 8d69a03f6a7d ("Various improvements/cleanups on the linker scripts") for RO_END/COHERENT_RAM. These symbols help to know how much free space is in the final binary because of page alignment.
Also show all *UNALIGNED__ symbols via poetry. For example: poetry run memory -p zynqmp -b debug
Change-Id: I322beba37dad76be9f4e88ca7e5b3eff2df7d96e Signed-off-by: Michal Simek <michal.simek@amd.com>
show more ...
|
| #
9b5c0fcd |
| 01-Jun-2023 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge changes from topic "hm/memmap-feat" into integration
* changes: build(bl32): add symbols for memory layout build(bl31): add symbols for memory layout build(bl2): add symbols for memory l
Merge changes from topic "hm/memmap-feat" into integration
* changes: build(bl32): add symbols for memory layout build(bl31): add symbols for memory layout build(bl2): add symbols for memory layout build(bl1): add symbols for memory layout refactor: improve readability of symbol table
show more ...
|
| #
f6088168 |
| 19-Apr-2023 |
Harrison Mutai <harrison.mutai@arm.com> |
build(bl2): add symbols for memory layout
Add symbols for mapping the physical memory layout of BL2. There are symbols that partially satisfy this requirement, however, the naming of these is incons
build(bl2): add symbols for memory layout
Add symbols for mapping the physical memory layout of BL2. There are symbols that partially satisfy this requirement, however, the naming of these is inconsistent.
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com> Change-Id: I83ce5e3f5c45b71022279649f823ed0cb33a145d
show more ...
|
| #
338dbe2f |
| 22-Feb-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes I51c13c52,I3358c51e into integration
* changes: build: always prefix section names with `.` build: communicate correct page size to linker
|
| #
da04341e |
| 14-Feb-2023 |
Chris Kay <chris.kay@arm.com> |
build: always prefix section names with `.`
Some of our specialized sections are not prefixed with the conventional period. The compiler uses input section names to derive certain other section name
build: always prefix section names with `.`
Some of our specialized sections are not prefixed with the conventional period. The compiler uses input section names to derive certain other section names (e.g. `.rela.text`, `.relacpu_ops`), and these can be difficult to select in linker scripts when there is a lack of a delimiter.
This change introduces the period prefix to all specialized section names.
BREAKING-CHANGE: All input and output linker section names have been prefixed with the period character, e.g. `cpu_ops` -> `.cpu_ops`.
Change-Id: I51c13c5266d5975fbd944ef4961328e72f82fc1c Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| #
3cc02562 |
| 13-Feb-2023 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "mixed-rwx" into integration
* changes: build: permit multiple linker scripts build: clarify linker script generation style: normalize linker script code style fix(p
Merge changes from topic "mixed-rwx" into integration
* changes: build: permit multiple linker scripts build: clarify linker script generation style: normalize linker script code style fix(pie): pass `-fpie` to the preprocessor as well
show more ...
|
| #
f90fe02f |
| 29-Sep-2022 |
Chris Kay <chris.kay@arm.com> |
style: normalize linker script code style
There are a variety of code styles used by the various linker scripts around the code-base. This change brings them in line with one another and attempts to
style: normalize linker script code style
There are a variety of code styles used by the various linker scripts around the code-base. This change brings them in line with one another and attempts to make the scripts more friendly for skim-readers.
Change-Id: Ibee2afad0d543129c9ba5a8a22e3ec17d77e36ea Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| #
3368f42c |
| 28-Apr-2022 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge "fix(bl2): define RAM_NOLOAD for XIP" into integration
|
| #
cc562e74 |
| 31-Mar-2022 |
Yann Gautier <yann.gautier@st.com> |
fix(bl2): define RAM_NOLOAD for XIP
If BL2_IN_XIP_MEM is enabled, BL2 fails to compile because RAM_NOLOAD symbol is not defined. As we could have a no-load region even if BL2_IN_XIP_MEM is enabled,
fix(bl2): define RAM_NOLOAD for XIP
If BL2_IN_XIP_MEM is enabled, BL2 fails to compile because RAM_NOLOAD symbol is not defined. As we could have a no-load region even if BL2_IN_XIP_MEM is enabled, just put its definition outside the #if/#else for this flag.
Signed-off-by: Yann Gautier <yann.gautier@st.com> Change-Id: I9169ea799635f8a72790280f3f148d1cba4cd408
show more ...
|
| #
2ea18c7d |
| 28-Mar-2022 |
Joanna Farley <joanna.farley@arm.com> |
Merge changes from topics "ls1088a", "ls1088a-prepare" into integration
* changes: docs(layerscape): add ls1088a soc and board support feat(ls1088aqds): add ls1088aqds board support feat(ls108
Merge changes from topics "ls1088a", "ls1088a-prepare" into integration
* changes: docs(layerscape): add ls1088a soc and board support feat(ls1088aqds): add ls1088aqds board support feat(ls1088ardb): add ls1088ardb board support feat(ls1088a): add new SoC platform ls1088a build(changelog): add new scopes for ls1088a feat(bl2): add support to separate no-loadable sections refactor(layerscape): refine comparison of inerconnection feat(layerscape): add soc helper macro definition for chassis 3 feat(nxp-gic): add some macros definition for gicv3 feat(layerscape): add CHASSIS 3 support for tbbr feat(layerscape): define more chassis 3 hardware address feat(nxp-crypto): add chassis 3 support feat(nxp-dcfg): add Chassis 3 support feat(lx2): enable DDR erratas for lx2 platforms feat(layerscape): print DDR errata information feat(nxp-ddr): add workaround for errata A050958 feat(layerscape): add new soc errata a010539 support feat(layerscape): add new soc errata a009660 support feat(nxp-ddr): add rawcard 1F support fix(layerscape): fix build issue of mmap_add_ddr_region_dynamically fix(nxp-tools): fix create_pbl print log build(changelog): add new scopes for NXP driver
show more ...
|
| #
96a8ed14 |
| 24-Feb-2022 |
Jiafei Pan <Jiafei.Pan@nxp.com> |
feat(bl2): add support to separate no-loadable sections
Add new options SEPARATE_BL2_NOLOAD_REGION to separate no-loadable sections (.bss, stack, page tables) to a ram region specified by BL2_NOLOAD
feat(bl2): add support to separate no-loadable sections
Add new options SEPARATE_BL2_NOLOAD_REGION to separate no-loadable sections (.bss, stack, page tables) to a ram region specified by BL2_NOLOAD_START and BL2_NOLOAD_LIMIT.
Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com> Change-Id: I844ee0fc405474af0aff978d292c826fbe0a82fd
show more ...
|
| #
568a8817 |
| 30-Jun-2020 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge "linker_script: move .rela.dyn section to bl_common.ld.h" into integration
|
| #
e8ad6168 |
| 22-Apr-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
linker_script: move .rela.dyn section to bl_common.ld.h
The .rela.dyn section is the same for BL2-AT-EL3, BL31, TSP.
Move it to the common header file.
I slightly changed the definition so that we
linker_script: move .rela.dyn section to bl_common.ld.h
The .rela.dyn section is the same for BL2-AT-EL3, BL31, TSP.
Move it to the common header file.
I slightly changed the definition so that we can do "RELA_SECTION >RAM". It still produced equivalent elf images.
Please note I got rid of '.' from the VMA field. Otherwise, if the end of previous .data section is not 8-byte aligned, it fails to link.
aarch64-linux-gnu-ld.bfd: warning: changing start of section .rela.dyn by 4 bytes aarch64-linux-gnu-ld.bfd: warning: changing start of section .rela.dyn by 4 bytes aarch64-linux-gnu-ld.bfd: warning: changing start of section .rela.dyn by 4 bytes make: *** [Makefile:1071: build/qemu/release/bl31/bl31.elf] Error 1
Change-Id: Iba7422d99c0374d4d9e97e6fd47bae129dba5cc9 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| #
455a6f3b |
| 27-Apr-2020 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge changes from topic "linker-script" into integration
* changes: linker_script: move .data section to bl_common.ld.h linker_script: move stacks section to bl_common.ld.h bl1: remove '.' fr
Merge changes from topic "linker-script" into integration
* changes: linker_script: move .data section to bl_common.ld.h linker_script: move stacks section to bl_common.ld.h bl1: remove '.' from stacks section in linker script
show more ...
|
| #
caa3e7e0 |
| 22-Apr-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
linker_script: move .data section to bl_common.ld.h
Move the data section to the common header.
I slightly tweaked some scripts as follows:
[1] bl1.ld.S has ALIGN(16). I added DATA_ALIGN macro, wh
linker_script: move .data section to bl_common.ld.h
Move the data section to the common header.
I slightly tweaked some scripts as follows:
[1] bl1.ld.S has ALIGN(16). I added DATA_ALIGN macro, which is 1 by default, but overridden by bl1.ld.S. Currently, ALIGN(16) of the .data section is redundant because commit 412865907699 ("Fix boot failures on some builds linked with ld.lld.") padded out the previous section to work around the issue of LLD version <= 10.0. This will be fixed in the future release of LLVM, so I am keeping the proper way to align LMA.
[2] bl1.ld.S and bl2_el3.ld.S define __DATA_RAM_{START,END}__ instead of __DATA_{START,END}__. I put them out of the .data section.
[3] SORT_BY_ALIGNMENT() is missing tsp.ld.S, sp_min.ld.S, and mediatek/mt6795/bl31.ld.S. This commit adds SORT_BY_ALIGNMENT() for all images, so the symbol order in those three will change, but I do not think it is a big deal.
Change-Id: I215bb23c319f045cd88e6f4e8ee2518c67f03692 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| #
a926a9f6 |
| 07-Apr-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
linker_script: move stacks section to bl_common.ld.h
The stacks section is the same for all BL linker scripts.
Move it to the common header file.
Change-Id: Ibd253488667ab4f69702d56ff9e9929376704f
linker_script: move stacks section to bl_common.ld.h
The stacks section is the same for all BL linker scripts.
Move it to the common header file.
Change-Id: Ibd253488667ab4f69702d56ff9e9929376704f6c Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| #
ea7fc9d1 |
| 02-Apr-2020 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge changes from topic "xlat" into integration
* changes: xlat_tables_v2: fix assembler warning of PLAT_RO_XLAT_TABLES linker_script: move bss section to bl_common.ld.h linker_script: replac
Merge changes from topic "xlat" into integration
* changes: xlat_tables_v2: fix assembler warning of PLAT_RO_XLAT_TABLES linker_script: move bss section to bl_common.ld.h linker_script: replace common read-only data with RODATA_COMMON linker_script: move more common code to bl_common.ld.h
show more ...
|
| #
a7739bc7 |
| 26-Mar-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
linker_script: move bss section to bl_common.ld.h
Move the bss section to the common header. This adds BAKERY_LOCK_NORMAL and PMF_TIMESTAMP, which previously existed only in BL31. This is not a big
linker_script: move bss section to bl_common.ld.h
Move the bss section to the common header. This adds BAKERY_LOCK_NORMAL and PMF_TIMESTAMP, which previously existed only in BL31. This is not a big deal because unused data should not be compiled in the first place. I believe this should be controlled by BL*_SOURCES in Makefiles, not by linker scripts.
I investigated BL1, BL2, BL2U, BL31 for plat=fvp, and BL2-AT-EL3, BL31, BL31 for plat=uniphier. I did not see any more unexpected code addition.
The bss section has bigger alignment. I added BSS_ALIGN for this.
Currently, SORT_BY_ALIGNMENT() is missing in sp_min.ld.S, and with this change, the BSS symbols in SP_MIN will be sorted by the alignment. This is not a big deal (or, even better in terms of the image size).
Change-Id: I680ee61f84067a559bac0757f9d03e73119beb33 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| #
0a0a7a9a |
| 26-Mar-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
linker_script: replace common read-only data with RODATA_COMMON
The common section data are repeated in many linker scripts (often twice in each script to support SEPARATE_CODE_AND_RODATA). When you
linker_script: replace common read-only data with RODATA_COMMON
The common section data are repeated in many linker scripts (often twice in each script to support SEPARATE_CODE_AND_RODATA). When you add a new read-only data section, you end up with touching lots of places.
After this commit, you will only need to touch bl_common.ld.h when you add a new section to RODATA_COMMON.
Replace a series of RO section with RODATA_COMMON, which contains 6 sections, some of which did not exist before.
This is not a big deal because unneeded data should not be compiled in the first place. I believe this should be controlled by BL*_SOURCES in Makefiles, not by linker scripts.
When I was working on this commit, the BL1 image size increased due to the fconf_populator. Commit c452ba159c14 ("fconf: exclude fconf_dyn_cfg_getter.c from BL1_SOURCES") fixed this issue.
I investigated BL1, BL2, BL2U, BL31 for plat=fvp, and BL2-AT-EL3, BL31, BL31 for plat=uniphier. I did not see any more unexpected code addition.
Change-Id: I5d14d60dbe3c821765bce3ae538968ef266f1460 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| #
9fb288a0 |
| 26-Mar-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
linker_script: move more common code to bl_common.ld.h
These are mostly used to collect data from special structure, and repeated in many linker scripts.
To differentiate the alignment size between
linker_script: move more common code to bl_common.ld.h
These are mostly used to collect data from special structure, and repeated in many linker scripts.
To differentiate the alignment size between aarch32/aarch64, I added a new macro STRUCT_ALIGN.
While I moved the PMF_SVC_DESCS, I dropped #if ENABLE_PMF conditional. As you can see in include/lib/pmf/pmf_helpers.h, PMF_REGISTER_SERVICE* are no-op when ENABLE_PMF=0. So, pmf_svc_descs and pmf_timestamp_array data are not populated.
Change-Id: I3f4ab7fa18f76339f1789103407ba76bda7e56d0 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|