blob: 8b279d9197bcf70f1e9fa5c2f7fd0a6a64d10998 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001LOCAL_DIR := $(GET_LOCAL_DIR)
2MODULE := ${LOCAL_DIR}
3
4GLOBAL_INCLUDES += \
5 $(LOCAL_DIR)/include
6
7MODULE_SRCS += \
8 $(LOCAL_DIR)/target.c
9
10PLATFORM := mt8518
11
12TZ_PART_NAME := TEE1
13RECOVERY_TZ_PART_NAME = TEE2
14DTBO_PART_NAME := DTBO
15BOOT_PART_NAME := BOOTIMG1
16RECOVERY_BOOT_PART_NAME = BOOTIMG2
17
18ifeq ($(WITH_KERNEL_VM),1)
19# The physical dram address is 0x40000000 and its virtual address 0xffff00000d600000
20# The CACHED_MEMPOOL_ADDR virtual address would be 0xffff00000d600000 + 0x4000000 = 0xffff000011600000
21# The BL33_ADDR virtual address would be 0xffff00000d600000 + 0x1e00000 = 0xffff00000f400000
22CACHED_MEMPOOL_ADDR := 0xffff000011600000UL
23BL33_ADDR := 0xffff00000f400000UL
24NAND_BUF_ADDR := 0xffff00000fa00000UL
25else
26CACHED_MEMPOOL_ADDR := 0x44000000
27BL33_ADDR := 0x41e00000
28NAND_BUF_ADDR := 0x4e300000
29endif
30CACHED_MEMPOOL_SIZE := 0x0AA00000 # 170MB
31
32SCRATCH_SIZE := 0x1E00000 # 30MB
33
34MAX_TEE_DRAM_SIZE := 0x04000000 # 64M
35MAX_KERNEL_SIZE := 0x02000000 # 32M
36MAX_DTB_SIZE := 0x00200000 # 2M
37MAX_LZ4_BUF_SIZE := 0x00100000 # 1M
38MAX_NAND_BUF_SIZE := 0x00100000 # 1M
39
40# CACHED_MEMPOOL_ADDR + CACHED_MEMPOOL_SIZE for upgrade
41# CACHED_MEMPOOL_ADDR + MAX_TEE_DRAM_SIZE + MAX_KERNEL_SIZE
42# + MAX_DTB_SIZE + MAX_LZ4_BUF_SIZE for boot
43
44GLOBAL_CFLAGS += -DTZ_PART_NAME=\"$(TZ_PART_NAME)\" \
45 -DDTBO_PART_NAME=\"$(DTBO_PART_NAME)\" \
46 -DBOOT_PART_NAME=\"$(BOOT_PART_NAME)\" \
47 -DRECOVERY_BOOT_PART_NAME=\"$(RECOVERY_BOOT_PART_NAME)\" \
48 -DRECOVERY_TZ_PART_NAME=\"$(RECOVERY_TZ_PART_NAME)\" \
49
50GLOBAL_DEFINES += CACHED_MEMPOOL_ADDR=$(CACHED_MEMPOOL_ADDR) \
51 CACHED_MEMPOOL_SIZE=$(CACHED_MEMPOOL_SIZE) \
52 BL33_ADDR=$(BL33_ADDR) \
53 SCRATCH_SIZE=$(SCRATCH_SIZE) \
54 NAND_BUF_ADDR=$(NAND_BUF_ADDR)
55
56MODULE_DEPS += \
57 platform/$(PLATFORM)/drivers/nand
58
59include make/module.mk