blob: 7b03d1624331468b2a9cdd94e755d90988a29e27 [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 := tee_a
13RECOVERY_TZ_PART_NAME = tee_b
14DTBO_PART_NAME := dtbo
15BOOT_PART_NAME := boot_a
16RECOVERY_BOOT_PART_NAME = boot_b
17SPM_PART_NAME := spmfw
18
19ifeq ($(WITH_KERNEL_VM),1)
20# The physical dram address is 0x40000000 and its virtual address 0xffff00000d600000
21# The CACHED_MEMPOOL_ADDR virtual address would be 0xffff00000d600000 + 0x4000000 = 0xffff000011600000
22
23# The BL33_ADDR virtual address would be 0xffff00000d600000 + 0x1e00000 = 0xffff00000f400000
24# The NAND_BUF_ADDR virtual address would be 0xffff00001C000000UL + 0x00200000 = 0xffff00001C200000UL
25CACHED_MEMPOOL_ADDR := 0xffff000011600000UL
26BL33_ADDR := 0xffff00000f400000UL
27NAND_BUF_ADDR := 0xffff000010900000UL
28else
29CACHED_MEMPOOL_ADDR := 0x44000000
30BL33_ADDR := 0x41e00000
31NAND_BUF_ADDR := 0x43300000
32endif
33
34CACHED_MEMPOOL_SIZE := 0x2000000 # 48MB
35
36
37SCRATCH_SIZE := 0x800000 # 8MB
38
39MAX_TEE_DRAM_SIZE := 0x00400000 # 4M
40MAX_KERNEL_SIZE := 0x01000000 # 16M
41MAX_DTB_SIZE := 0x00200000 # 2M
42MAX_LZ4_BUF_SIZE := 0x00100000 # 1M
43MAX_NAND_BUF_SIZE := 0x00100000 # 1M
44
45# CACHED_MEMPOOL_ADDR + CACHED_MEMPOOL_SIZE for upgrade
46# CACHED_MEMPOOL_ADDR + MAX_TEE_DRAM_SIZE + MAX_KERNEL_SIZE
47# + MAX_DTB_SIZE + MAX_LZ4_BUF_SIZE for boot
48
49GLOBAL_CFLAGS += -DTZ_PART_NAME=\"$(TZ_PART_NAME)\" \
50 -DDTBO_PART_NAME=\"$(DTBO_PART_NAME)\" \
51 -DBOOT_PART_NAME=\"$(BOOT_PART_NAME)\" \
52 -DRECOVERY_BOOT_PART_NAME=\"$(RECOVERY_BOOT_PART_NAME)\" \
53 -DSPM_PART_NAME=\"$(SPM_PART_NAME)\" \
54 -DRECOVERY_TZ_PART_NAME=\"$(RECOVERY_TZ_PART_NAME)\" \
55
56GLOBAL_DEFINES += CACHED_MEMPOOL_ADDR=$(CACHED_MEMPOOL_ADDR) \
57 CACHED_MEMPOOL_SIZE=$(CACHED_MEMPOOL_SIZE) \
58 BL33_ADDR=$(BL33_ADDR) \
59 SCRATCH_SIZE=$(SCRATCH_SIZE) \
60 NAND_BUF_ADDR=$(NAND_BUF_ADDR)
61
62MODULE_DEPS += \
63 platform/$(PLATFORM)/drivers/nand
64
65include make/module.mk