]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
optee: adjust dependencies and default values for dram
authorRui Miguel Silva <rui.silva@linaro.org>
Wed, 5 Sep 2018 10:56:06 +0000 (11:56 +0100)
committerStefano Babic <sbabic@denx.de>
Mon, 22 Oct 2018 12:37:28 +0000 (14:37 +0200)
We may have, the not yet considered, scenario where OPTEE is loaded before
u-boot and *not* by u-boot, e.g, the boot flow using the ARM Trusted
Firmware (ATF), where in the 32bit flow is:
BootRom->ATF(BL2)->Optee(BL32)->u-boot(BL33)

In this case we need still to reserve the memory used by optee, to avoid
for example to realocate ourself to the same address at the end of DRAM.
So, we change here the dependencies on the OPTEE lib and we set the default
size and base of TZRAM to zero.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Cc: u-boot@lists.denx.de
configs/warp7_defconfig
lib/optee/Kconfig

index 15a66739f8533747715336d9a461cfbd3802fa7d..a1c0b69ea805c3f2255daff39a9eabe522ed05e5 100644 (file)
@@ -46,5 +46,7 @@ CONFIG_USB_ETH_CDC=y
 CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
 CONFIG_OF_LIBFDT=y
 CONFIG_OPTEE=y
+CONFIG_OPTEE_TZDRAM_SIZE=0x3000000
+CONFIG_OPTEE_TZDRAM_BASE=0x9d000000
 CONFIG_OPTEE_LOAD_ADDR=0x84000000
 CONFIG_BOOTM_OPTEE=y
index 1e5ab45c3d77c84f42d6607c7dff78d6886754d4..3773d89c313f083e3516abf332978bcfffefe4e4 100644 (file)
@@ -10,21 +10,20 @@ config OPTEE
 config OPTEE_LOAD_ADDR
        hex "OPTEE load address"
        default 0x00000000
+       depends on OPTEE
        help
          The load address of the bootable OPTEE binary.
 
 config OPTEE_TZDRAM_SIZE
        hex "Amount of Trust-Zone RAM for the OPTEE image"
-       depends on OPTEE
-       default 0x3000000
+       default 0x0000000
        help
          The size of pre-allocated Trust Zone DRAM to allocate for the OPTEE
          runtime.
 
 config OPTEE_TZDRAM_BASE
        hex "Base address of Trust-Zone RAM for the OPTEE image"
-       depends on OPTEE
-       default 0x9d000000
+       default 0x00000000
        help
          The base address of pre-allocated Trust Zone DRAM for
          the OPTEE runtime.
@@ -32,6 +31,7 @@ config OPTEE_TZDRAM_BASE
 config BOOTM_OPTEE
        bool "Support OPTEE bootm command"
        select BOOTM_LINUX
+       depends on OPTEE
        default n
        help
          Select this command to enable chain-loading of a Linux kernel