Kiwi Liu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/78801?usp=email )
Change subject: optee: mt8188: mt8195: loading of BL32 image from rootfs ......................................................................
optee: mt8188: mt8195: loading of BL32 image from rootfs
loading of BL32 image from rootfs
Change-Id: Ic38c8beb59c090ae56c5be6821dd8625435609e9 Signed-off-by: Kiwi Liu kiwi.liu@mediatek.com --- M src/soc/mediatek/mt8188/Kconfig M src/soc/mediatek/mt8188/Makefile.inc M src/soc/mediatek/mt8188/soc.c M src/soc/mediatek/mt8195/Kconfig M src/soc/mediatek/mt8195/Makefile.inc M src/soc/mediatek/mt8195/soc.c 6 files changed, 13 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/78801/1
diff --git a/src/soc/mediatek/mt8188/Kconfig b/src/soc/mediatek/mt8188/Kconfig index 0568cd6..7de64aa 100644 --- a/src/soc/mediatek/mt8188/Kconfig +++ b/src/soc/mediatek/mt8188/Kconfig @@ -22,6 +22,7 @@ select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_SEPARATE_VERSTAGE select VBOOT_RETURN_FROM_VERSTAGE + select VBOOT_DEFINE_WIDEVINE_COUNTERS
config DPM_DM_FIRMWARE string diff --git a/src/soc/mediatek/mt8188/Makefile.inc b/src/soc/mediatek/mt8188/Makefile.inc index 1426b83..59f106e 100644 --- a/src/soc/mediatek/mt8188/Makefile.inc +++ b/src/soc/mediatek/mt8188/Makefile.inc @@ -58,7 +58,7 @@ ramstage-y += ../common/tps65132s.c ramstage-y += ../common/usb.c usb.c
-BL31_MAKEARGS += PLAT=mt8188 +BL31_MAKEARGS += PLAT=mt8188 SPD=opteed OPTEE_ALLOW_SMC_LOAD=1 PLAT_XLAT_TABLES_DYNAMIC=1 CROS_WIDEVINE_SMC=1
CPPFLAGS_common += -Isrc/soc/mediatek/mt8188/include CPPFLAGS_common += -Isrc/soc/mediatek/common/dp/include diff --git a/src/soc/mediatek/mt8188/soc.c b/src/soc/mediatek/mt8188/soc.c index c63b5ca..d0a29c5 100644 --- a/src/soc/mediatek/mt8188/soc.c +++ b/src/soc/mediatek/mt8188/soc.c @@ -14,10 +14,14 @@ #include <soc/sspm.h> #include <symbols.h>
+#define OPTEE_ADDRESS 0x43000000 +#define OPTEE_SIZE (80 * MiB) + void bootmem_platform_add_ranges(void) { if (CONFIG(MTK_DFD)) bootmem_add_range(DFD_DUMP_ADDRESS, DFD_DUMP_SIZE, BM_MEM_RESERVED); + bootmem_add_range(OPTEE_ADDRESS, OPTEE_SIZE, BM_MEM_RESERVED); }
static void soc_read_resources(struct device *dev) diff --git a/src/soc/mediatek/mt8195/Kconfig b/src/soc/mediatek/mt8195/Kconfig index 5aea90b..3b7d274 100644 --- a/src/soc/mediatek/mt8195/Kconfig +++ b/src/soc/mediatek/mt8195/Kconfig @@ -20,6 +20,7 @@ select VBOOT_STARTS_IN_BOOTBLOCK select VBOOT_SEPARATE_VERSTAGE select VBOOT_RETURN_FROM_VERSTAGE + select VBOOT_DEFINE_WIDEVINE_COUNTERS
config DPM_DM_FIRMWARE string diff --git a/src/soc/mediatek/mt8195/Makefile.inc b/src/soc/mediatek/mt8195/Makefile.inc index 73ea6fa..f55b117 100644 --- a/src/soc/mediatek/mt8195/Makefile.inc +++ b/src/soc/mediatek/mt8195/Makefile.inc @@ -71,7 +71,7 @@ CPPFLAGS_common += -Isrc/soc/mediatek/common/include CPPFLAGS_common += -Isrc/vendorcode/mediatek/mt8195/include
-BL31_MAKEARGS += PLAT=mt8195 +BL31_MAKEARGS += PLAT=mt8195 SPD=opteed OPTEE_ALLOW_SMC_LOAD=1 PLAT_XLAT_TABLES_DYNAMIC=1 CROS_WIDEVINE_SMC=1
MT8195_BLOB_DIR := 3rdparty/blobs/soc/mediatek/mt8195
diff --git a/src/soc/mediatek/mt8195/soc.c b/src/soc/mediatek/mt8195/soc.c index 5425695..0d551ea 100644 --- a/src/soc/mediatek/mt8195/soc.c +++ b/src/soc/mediatek/mt8195/soc.c @@ -17,10 +17,15 @@ #include <soc/ufs.h> #include <symbols.h>
+#define OPTEE_ADDRESS 0x43000000 +#define OPTEE_SIZE (80 * MiB) + void bootmem_platform_add_ranges(void) { if (CONFIG(MTK_DFD)) bootmem_add_range(DFD_DUMP_ADDRESS, DFD_DUMP_SIZE, BM_MEM_RESERVED); + + bootmem_add_range(OPTEE_ADDRESS, OPTEE_SIZE, BM_MEM_RESERVED); }
static void soc_read_resources(struct device *dev)