mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-15 00:54:22 +00:00
feat(stm32mp2): disable PIE by default on STM32MP2 platform
Allow to disable ENABLE_PIE on STM32MP2. BL31 is loaded at the beginning of SYSRAM whatever the options set. Set ENABLE_PIE to 0 by default. This should allow us to reduce BL31 and BL2 size. Change-Id: Ie8c83c9205e81301eb1fdcf24b94216172586630 Signed-off-by: Maxime Méré <maxime.mere@foss.st.com>
This commit is contained in:
parent
104ec53ed1
commit
ac9abe7e59
3 changed files with 13 additions and 5 deletions
|
@ -73,8 +73,15 @@
|
|||
/*******************************************************************************
|
||||
* BL31 specific defines.
|
||||
******************************************************************************/
|
||||
#if ENABLE_PIE
|
||||
#define BL31_BASE 0
|
||||
#define BL31_LIMIT (STM32MP_SYSRAM_SIZE / 2)
|
||||
#else
|
||||
#define BL31_BASE STM32MP_SYSRAM_BASE
|
||||
#endif
|
||||
|
||||
#define BL31_LIMIT (BL31_BASE + (STM32MP_SYSRAM_SIZE / 2))
|
||||
|
||||
#define BL31_PROGBITS_LIMIT (BL31_BASE + STM32MP_BL31_SIZE)
|
||||
|
||||
/*******************************************************************************
|
||||
* BL33 specific defines.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2023-2024, STMicroelectronics - All Rights Reserved
|
||||
# Copyright (c) 2023-2025, STMicroelectronics - All Rights Reserved
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
|
@ -11,9 +11,12 @@ STM32_EXTRA_PARTS := 6
|
|||
include plat/st/common/common.mk
|
||||
|
||||
CRASH_REPORTING := 1
|
||||
ENABLE_PIE := 1
|
||||
# Disable PIE by default. To re-enable it, uncomment next line.
|
||||
#ENABLE_PIE := 1
|
||||
PROGRAMMABLE_RESET_ADDRESS := 1
|
||||
ifeq ($(ENABLE_PIE),1)
|
||||
BL2_IN_XIP_MEM := 1
|
||||
endif
|
||||
|
||||
STM32MP_BL33_EL1 ?= 1
|
||||
ifeq ($(STM32MP_BL33_EL1),1)
|
||||
|
|
|
@ -114,8 +114,6 @@ enum ddr_type {
|
|||
#define STM32MP_BL31_SIZE (STM32MP_SYSRAM_SIZE - \
|
||||
STM32MP_BL2_SIZE)
|
||||
|
||||
#define BL31_PROGBITS_LIMIT STM32MP_BL31_SIZE
|
||||
|
||||
#define STM32MP_BL2_BASE (STM32MP_SYSRAM_BASE + \
|
||||
STM32MP_SYSRAM_SIZE - \
|
||||
STM32MP_BL2_SIZE)
|
||||
|
|
Loading…
Add table
Reference in a new issue