| #
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 ...
|
| #
5b044227 |
| 03-Nov-2022 |
Joanna Farley <joanna.farley@arm.com> |
Merge "style(linker_script): fix indentation" into integration
|
| #
25135ceb |
| 21-Oct-2022 |
Jorge Troncoso <jatron@google.com> |
style(linker_script): fix indentation
Use four spaces for indentation to maintain a consistent style. This attempts to make the linker scripts more friendly for readers.
Signed-off-by: Jorge Tronco
style(linker_script): fix indentation
Use four spaces for indentation to maintain a consistent style. This attempts to make the linker scripts more friendly for readers.
Signed-off-by: Jorge Troncoso <jatron@google.com> Change-Id: Iaf26d3c8bd7053fd9605a64ebccdae0792a90b9e
show more ...
|
| #
1d651211 |
| 06-Oct-2021 |
Soby Mathew <soby.mathew@arm.com> |
Merge changes from topic "za/feat_rme" into integration
* changes: refactor(gpt): productize and refactor GPT library feat(rme): disable Watchdog for Arm platforms if FEAT_RME enabled docs(rme
Merge changes from topic "za/feat_rme" into integration
* changes: refactor(gpt): productize and refactor GPT library feat(rme): disable Watchdog for Arm platforms if FEAT_RME enabled docs(rme): add build and run instructions for FEAT_RME fix(plat/fvp): bump BL2 stack size fix(plat/fvp): allow changing the kernel DTB load address refactor(plat/arm): rename ARM_DTB_DRAM_NS region macros refactor(plat/fvp): update FVP platform DTS for FEAT_RME feat(plat/arm): add GPT initialization code for Arm platforms feat(plat/fvp): add memory map for FVP platform for FEAT_RME refactor(plat/arm): modify memory region attributes to account for FEAT_RME feat(plat/fvp): add RMM image support for FVP platform feat(rme): add GPT Library feat(rme): add ENABLE_RME build option and support for RMM image refactor(makefile): remove BL prefixes in build macros feat(rme): add context management changes for FEAT_RME feat(rme): add Test Realm Payload (TRP) feat(rme): add RMM dispatcher (RMMD) feat(rme): run BL2 in root world when FEAT_RME is enabled feat(rme): add xlat table library changes for FEAT_RME feat(rme): add Realm security state definition feat(rme): add register definitions and helper functions for FEAT_RME
show more ...
|
| #
6c09af9f |
| 09-Jul-2021 |
Zelalem Aweke <zelalem.aweke@arm.com> |
feat(rme): run BL2 in root world when FEAT_RME is enabled
This patch enables BL2 to run in root world (EL3) which is needed as per the security model of RME-enabled systems.
Using the existing BL2_
feat(rme): run BL2 in root world when FEAT_RME is enabled
This patch enables BL2 to run in root world (EL3) which is needed as per the security model of RME-enabled systems.
Using the existing BL2_AT_EL3 TF-A build option is not convenient because that option assumes TF-A BL1 doesn't exist, which is not the case for RME-enabled systems. For the purposes of RME, we use a normal BL1 image but we also want to run BL2 in EL3 as normally as possible, therefore rather than use the special bl2_entrypoint function in bl2_el3_entrypoint.S, we use a new bl2_entrypoint function (in bl2_rme_entrypoint.S) which doesn't need reset or mailbox initialization code seen in the el3_entrypoint_common macro.
The patch also cleans up bl2_el3_entrypoint.S, moving the bl2_run_next_image function to its own file to avoid duplicating code.
Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com> Change-Id: I99821b4cd550cadcb701f4c0c4dc36da81c7ef55
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 ...
|
| #
f56081e3 |
| 11-Mar-2020 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Merge changes from topic "xlat" into integration
* changes: Factor xlat_table sections in linker scripts out into a header file xlat_tables_v2: use ARRAY_SIZE in REGISTER_XLAT_CONTEXT_FULL_SPEC
Merge changes from topic "xlat" into integration
* changes: Factor xlat_table sections in linker scripts out into a header file xlat_tables_v2: use ARRAY_SIZE in REGISTER_XLAT_CONTEXT_FULL_SPEC xlat_tables_v2: merge REGISTER_XLAT_CONTEXT_{FULL_SPEC,RO_BASE_TABLE}
show more ...
|
| #
665e71b8 |
| 09-Mar-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
Factor xlat_table sections in linker scripts out into a header file
TF-A has so many linker scripts, at least one linker script for each BL image, and some platforms have their own ones. They duplic
Factor xlat_table sections in linker scripts out into a header file
TF-A has so many linker scripts, at least one linker script for each BL image, and some platforms have their own ones. They duplicate quite similar code (and comments).
When we add some changes to linker scripts, we end up with touching so many files. This is not nice in the maintainability perspective.
When you look at Linux kernel, the common code is macrofied in include/asm-generic/vmlinux.lds.h, which is included from each arch linker script, arch/*/kernel/vmlinux.lds.S
TF-A can follow this approach. Let's factor out the common code into include/common/bl_common.ld.h
As a start point, this commit factors out the xlat_table section.
Change-Id: Ifa369e9b48e8e12702535d721cc2a16d12397895 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|