blob: 2ee26cd98adc51e1f737c0a79ca26824a65393d2 [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 := mt8516
11
12DDR_TYPE := COMMON_DDR3_16BIT
13TZ_PART_NAME := TEE1
14RECOVERY_TZ_PART_NAME = TEE2
15DTBO_PART_NAME := DTBO
16BOOT_PART_NAME := BOOTIMG1
17RECOVERY_BOOT_PART_NAME = BOOTIMG2
18
19ifeq ($(WITH_KERNEL_VM),1)
20# The physical dram address is 0x40000000 and its virtual address 0xffff00000d600000
21# The SCRATCH_ADDR virtual address would be 0xffff00000d600000 + 0x4000000 = 0xffff00000f400000
22# The BL33_ADDR virtual address would be 0xffff00000d600000 + 0x1e00000 = 0xffff00000f400000
23SCRATCH_ADDR := 0xffff000011600000UL
24BL33_ADDR := 0xffff00000f400000UL
25NAND_BUF_ADDR := 0xffff00001b900000UL
26else
27SCRATCH_ADDR := 0x44000000
28BL33_ADDR := 0x41e00000
29NAND_BUF_ADDR := 0x4e300000
30endif
31SCRATCH_SIZE := 0x04000000 # 64MB
32
33MAX_TEE_DRAM_SIZE := 0x04000000 # reduce to 64M since DRAM in mt2635 only 256M
34MAX_KERNEL_SIZE := 0x02000000 # 32M
35MAX_DTB_SIZE := 0x00200000 # 2M
36MAX_LZ4_BUF_SIZE := 0x00100000 # 1M
37
38# SCRATCH_ADDR + SCRATCH_SIZE for upgrade
39# SCRATCH_ADDR + MAX_TEE_DRAM_SIZE + MAX_KERNEL_SIZE
40# + MAX_DTB_SIZE + MAX_LZ4_BUF_SIZE for boot
41# NAND_BUF_ADDR + MAX_NAND_BUF_SIZE for nand reserved dram buffer
42
43GLOBAL_CFLAGS += -DTZ_PART_NAME=\"$(TZ_PART_NAME)\" \
44 -DDTBO_PART_NAME=\"$(DTBO_PART_NAME)\" \
45 -DBOOT_PART_NAME=\"$(BOOT_PART_NAME)\" \
46 -DRECOVERY_BOOT_PART_NAME=\"$(RECOVERY_BOOT_PART_NAME)\" \
47 -DRECOVERY_TZ_PART_NAME=\"$(RECOVERY_TZ_PART_NAME)\" \
48
49GLOBAL_DEFINES += SCRATCH_SIZE=$(SCRATCH_SIZE) \
50 SCRATCH_ADDR=$(SCRATCH_ADDR) \
51 BL33_ADDR=$(BL33_ADDR) \
52 MAX_TEE_DRAM_SIZE=$(MAX_TEE_DRAM_SIZE) \
53 MAX_KERNEL_SIZE=$(MAX_KERNEL_SIZE) \
54 MAX_DTB_SIZE=$(MAX_DTB_SIZE) \
55 MAX_LZ4_BUF_SIZE=$(MAX_LZ4_BUF_SIZE) \
56
57MODULE_DEPS += \
58 platform/$(PLATFORM)/drivers/mmc \
59
60include make/module.mk