diff mbox series

[v6,02/10] optee: Add CONFIG_OPTEE_TZDRAM_SIZE

Message ID 1520959836-16105-3-git-send-email-bryan.odonoghue@linaro.org
State Accepted
Commit d89a5aa6d086e4b3242dbdbe97183f5b25468299
Headers show
Series Add new OPTEE bootm support to u-boot | expand

Commit Message

Bryan O'Donoghue March 13, 2018, 4:50 p.m. UTC
OPTEE is currently linked to a specific area of memory called the TrustZone
DRAM. This patch adds a CONFIG entry for the default size of TrustZone DRAM
that a board-port can over-ride. The region that U-Boot sets aside for the
OPTEE run-time should be verified before attempting to hand off to the
OPTEE run-time. Each board-port should carefully ensure that the TZDRAM
size specified in the OPTEE build and the TZDRAM size specified in U-Boot
match-up.

Further patches will use TZDRAM size with other defines and variables to
carry out a degree of automated verification in U-Boot prior to trying to
boot an OPTEE image.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Harinarayan Bhatta <harinarayan@ti.com>
Cc: Andrew F. Davis <afd@ti.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Peng Fan <peng.fan@nxp.com>
Tested-by: Peng Fan <peng.fan@nxp.com>
---
 lib/optee/Kconfig | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Tom Rini March 19, 2018, 10:36 p.m. UTC | #1
On Tue, Mar 13, 2018 at 04:50:28PM +0000, Bryan O'Donoghue wrote:

> OPTEE is currently linked to a specific area of memory called the TrustZone

> DRAM. This patch adds a CONFIG entry for the default size of TrustZone DRAM

> that a board-port can over-ride. The region that U-Boot sets aside for the

> OPTEE run-time should be verified before attempting to hand off to the

> OPTEE run-time. Each board-port should carefully ensure that the TZDRAM

> size specified in the OPTEE build and the TZDRAM size specified in U-Boot

> match-up.

> 

> Further patches will use TZDRAM size with other defines and variables to

> carry out a degree of automated verification in U-Boot prior to trying to

> boot an OPTEE image.

> 

> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

> Cc: Harinarayan Bhatta <harinarayan@ti.com>

> Cc: Andrew F. Davis <afd@ti.com>

> Cc: Tom Rini <trini@konsulko.com>

> Cc: Kever Yang <kever.yang@rock-chips.com>

> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

> Cc: Peng Fan <peng.fan@nxp.com>

> Tested-by: Peng Fan <peng.fan@nxp.com>


Applied to u-boot/master, thanks!

-- 
Tom
diff mbox series

Patch

diff --git a/lib/optee/Kconfig b/lib/optee/Kconfig
index 2e406fe..41c0ab7 100644
--- a/lib/optee/Kconfig
+++ b/lib/optee/Kconfig
@@ -6,3 +6,11 @@  config OPTEE
           enable an OPTEE specific bootm command that will perform additional
           OPTEE specific checks before booting an OPTEE image created with
           mkimage.
+
+config OPTEE_TZDRAM_SIZE
+	hex "Amount of Trust-Zone RAM for the OPTEE image"
+	depends on OPTEE
+	default 0x3000000
+	help
+	  The size of pre-allocated Trust Zone DRAM to allocate for the OPTEE
+	  runtime.