| 66b9d889 | 17-Jan-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
uniphier: turn on ENABLE_PIE
Now that various issues in the PIE support have been fixed, this platform can enable ENABLE_PIE.
I tested BL2_AT_EL3, BL31, TSP, and all of them worked.
Change-Id: Ibc
uniphier: turn on ENABLE_PIE
Now that various issues in the PIE support have been fixed, this platform can enable ENABLE_PIE.
I tested BL2_AT_EL3, BL31, TSP, and all of them worked.
Change-Id: Ibc499c6bad30b7f81a42bfa7e435ce25f820bd9c Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| d974301d | 17-Jan-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
TSP: add PIE support
This implementation simply mimics that of BL31.
Change-Id: Ibbaa4ca012d38ac211c52b0b3e97449947160e07 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> |
| 69af7fcf | 17-Jan-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
BL2_AT_EL3: add PIE support
This implementation simply mimics that of BL31.
I did not implement the ENABLE_PIE support for BL2_IN_XIP_MEM=1 case. It would make the linker script a bit uglier.
Chan
BL2_AT_EL3: add PIE support
This implementation simply mimics that of BL31.
I did not implement the ENABLE_PIE support for BL2_IN_XIP_MEM=1 case. It would make the linker script a bit uglier.
Change-Id: If3215abd99f2758dfb232e44b50320d04eba808b Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| 511046ea | 17-Jan-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
BL31: discard .dynsym .dynstr .hash sections to make ENABLE_PIE work
When I tried ENABLE_PIE for my PLAT=uniphier platform, BL31 crashed at its entry. When it is built with ENABLE_PIE=1, some sectio
BL31: discard .dynsym .dynstr .hash sections to make ENABLE_PIE work
When I tried ENABLE_PIE for my PLAT=uniphier platform, BL31 crashed at its entry. When it is built with ENABLE_PIE=1, some sections are inserted before the executable code.
$ make PLAT=uniphier CROSS_COMPILE=aarch64-linux-gnu- ENABLE_PIE=1 bl31 $ aarch64-linux-gnu-objdump -h build/uniphier/release/bl31/bl31.elf | head -n 13
build/uniphier/release/bl31/bl31.elf: file format elf64-littleaarch64
Sections: Idx Name Size VMA LMA File off Algn 0 .dynsym 000002a0 0000000081000000 0000000081000000 00010000 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .dynstr 000002a0 00000000810002a0 00000000810002a0 000102a0 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .hash 00000124 0000000081000540 0000000081000540 00010540 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 ro 0000699c 0000000081000664 0000000081000664 00010664 2**11 CONTENTS, ALLOC, LOAD, CODE
The previous stage loader generally jumps over to the base address of BL31, where no valid instruction exists.
I checked the linker script of Linux (arch/arm64/kernel/vmlinux.lds.S) and U-Boot (arch/arm/cpu/armv8/u-boot.lds), both of which support relocation. They simply discard those sections.
Do similar in TF-A too.
Change-Id: I6c33e9143856765d4ffa24f3924b0ab51a17cde9 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| 320920c1 | 17-Jan-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
PIE: pass PIE options only to BL31
docs/getting_started/build-options.rst clearly says ENABLE_PIE is currently only supported in BL31, but in fact, it has a stronger limitation:
Defining ENABLE_P
PIE: pass PIE options only to BL31
docs/getting_started/build-options.rst clearly says ENABLE_PIE is currently only supported in BL31, but in fact, it has a stronger limitation:
Defining ENABLE_PIE may corrupt BL1 and BL2. So, ENABLE_PIE is supported only for platforms where BL31 is the only image built in the TF-A tree.
Currently, ENABLE_PIE is enabled by two platforms, plat/arm/common/arm_common.mk and ti/k3/common/plat_common.mk, both of which enable ENABLE_PIE together with RESET_TO_BL31.
For platforms with the full boot sequence, ENABLE_PIE may break earlier BL stages. For example, if I build PLAT=qemu with ENABLE_PIE=1, it fails in BL1.
When ENABLE_PIE is enabled, PIE options are added to TF_CFLAGS and TF_LDFLAGS, so all BL images are affected. It is problematic because currently only the BL31 linker script handles it. Even if BL1/BL2 works, the image size would increase needlessly, at least.
Pass the PIE options only to BL images that support it.
Change-Id: I550e95148aa3c63571c8ad2081082c554a848f57 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| d986bae4 | 17-Jan-2020 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
Build: support per-BL LDFLAGS
make_helpers/build_macros.mk supports per-BL CFLAGS. For example, you can pass compiler flags only to BL31 by using BL31_CFLAGS.
This commit adds per-BL LDFLAGS suppor
Build: support per-BL LDFLAGS
make_helpers/build_macros.mk supports per-BL CFLAGS. For example, you can pass compiler flags only to BL31 by using BL31_CFLAGS.
This commit adds per-BL LDFLAGS support, which is useful as well.
My main motivation of this addition is to use it for ENABLE_PIE. When ENABLE_PIE is enabled, some linker flags are added to TF_LDFLAGS, which affects all the TF images. It will make more sense to pass the relevant options only to BL images that support it.
Change-Id: I203acaab0091db5ae0ea6e66460ee7dc8d9c4d75 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| 262c5d30 | 24-Jan-2020 |
Soby Mathew <soby.mathew@arm.com> |
Merge "ti: Unify Platform specific defines for PSCI module" into integration |
| 79fadd8f | 13-Dec-2019 |
Deepika Bhavnani <deepika.bhavnani@arm.com> |
ti: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUS
ti: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUSTER - Unsigned int
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com> Change-Id: Ia7072d82116b03904c1b3982f37d96347203e621
show more ...
|
| 63c17293 | 24-Jan-2020 |
Soby Mathew <soby.mathew@arm.com> |
Merge "st: Unify Platform specific defines for PSCI module" into integration |
| f4f1d88d | 13-Dec-2019 |
Deepika Bhavnani <deepika.bhavnani@arm.com> |
st: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUS
st: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUSTER - Unsigned int
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com> Change-Id: I3421336230981d4cda301fa2cef24b94b08353b1
show more ...
|
| 596561b0 | 24-Jan-2020 |
Soby Mathew <soby.mathew@arm.com> |
Merge "layerscape: Unify Platform specific defines for PSCI module" into integration |
| 08a64471 | 13-Dec-2019 |
Deepika Bhavnani <deepika.bhavnani@arm.com> |
layerscape: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_
layerscape: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUSTER - Unsigned int
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com> Change-Id: Ib9f97be1972405e54dc9550266f5b8a6a55b93bf
show more ...
|
| 47eb2288 | 24-Jan-2020 |
Soby Mathew <soby.mathew@arm.com> |
Merge "qemu: Unify Platform specific defines for PSCI module" into integration |
| 645ac02d | 13-Dec-2019 |
Deepika Bhavnani <deepika.bhavnani@arm.com> |
qemu: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CL
qemu: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUSTER - Unsigned int
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com> Change-Id: I460b35f5a4ec47b13d4e811bb20881ce314e9259
show more ...
|
| 88ea77e0 | 24-Jan-2020 |
Soby Mathew <soby.mathew@arm.com> |
Merge "socionext: Unify Platform specific defines for PSCI module" into integration |
| 50dae22e | 13-Dec-2019 |
Deepika Bhavnani <deepika.bhavnani@arm.com> |
socionext: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_P
socionext: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUSTER - Unsigned int
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com> Change-Id: Iad91e99e9d13254de23eb10e5f655253f253cf0d
show more ...
|
| b55d71ba | 24-Jan-2020 |
Soby Mathew <soby.mathew@arm.com> |
Merge "mediatek: Unify Platform specific defines for PSCI module" into integration |
| 4dc3a961 | 13-Dec-2019 |
Deepika Bhavnani <deepika.bhavnani@arm.com> |
mediatek: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PE
mediatek: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUSTER - Unsigned int
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com> Change-Id: Iee98ded027c049d9f12d4bb5888c0496b3251b4e
show more ...
|
| 1b567d3e | 24-Jan-2020 |
Soby Mathew <soby.mathew@arm.com> |
Merge "intel: Unify Platform specific defines for PSCI module" into integration |
| dc2d366f | 13-Dec-2019 |
Deepika Bhavnani <deepika.bhavnani@arm.com> |
intel: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_C
intel: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUSTER - Unsigned int
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com> Change-Id: Id3d3efc7e7711d19f0223da823713b8390ad2f47
show more ...
|
| 076d8975 | 24-Jan-2020 |
Soby Mathew <soby.mathew@arm.com> |
Merge "marvell: Unify Platform specific defines for PSCI module" into integration |
| ac2f6d43 | 13-Dec-2019 |
Deepika Bhavnani <deepika.bhavnani@arm.com> |
marvell: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER
marvell: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUSTER - Unsigned int
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com> Change-Id: I7d660d5a9d7e44601353c77e9b6ee4096a277d76
show more ...
|
| 713403cb | 24-Jan-2020 |
Soby Mathew <soby.mathew@arm.com> |
Merge "rockchip: Unify Platform specific defines for PSCI module" into integration |
| ed7a5636 | 13-Dec-2019 |
Deepika Bhavnani <deepika.bhavnani@arm.com> |
rockchip: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PE
rockchip: Unify Platform specific defines for PSCI module
PLATFORM_CORE_COUNT - Unsigned int PLATFORM_CLUSTER_COUNT - Unsigned int PLATFORM_MAX_CPUS_PER_CLUSTER - Unsigned int PLATFORM_CORE_COUNT_PER_CLUSTER - Unsigned int
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com> Change-Id: I624c15d569db477506a74964bc828e1a932181d4
show more ...
|
| 133e6f7e | 24-Jan-2020 |
Soby Mathew <soby.mathew@arm.com> |
Merge "allwinner: Unify Platform specific defines for PSCI module" into integration |