rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | LOCAL_DIR := $(GET_LOCAL_DIR) |
| 2 | MODULE := ${LOCAL_DIR} |
| 3 | |
| 4 | GLOBAL_INCLUDES += \ |
| 5 | $(LOCAL_DIR)/include |
| 6 | |
| 7 | MODULE_SRCS += \ |
| 8 | $(LOCAL_DIR)/target.c |
| 9 | |
| 10 | PLATFORM := mt8512 |
| 11 | |
| 12 | SPI_NAND_PROJECT := y |
| 13 | |
| 14 | TZ_PART_NAME := tee_a |
| 15 | RECOVERY_TZ_PART_NAME = tee_b |
| 16 | DTBO_PART_NAME := dtbo |
| 17 | BOOT_PART_NAME := boot_a |
| 18 | RECOVERY_BOOT_PART_NAME = boot_b |
| 19 | |
| 20 | ifeq ($(WITH_KERNEL_VM),1) |
| 21 | # The physical dram address is 0x40000000 and its virtual address 0xffff00000d600000 |
| 22 | # The CACHED_MEMPOOL_ADDR virtual address would be 0xffff00000d600000 + 0x4000000 = 0xffff000011600000 |
| 23 | # The UNCACHED_MEMPOOL_ADDR virtual address would be 0xffff000011600000UL + 0x0AA00000 = 0xffff00001C000000UL |
| 24 | # The BL33_ADDR virtual address would be 0xffff00000d600000 + 0x1e00000 = 0xffff00000f400000 |
| 25 | # The NAND_BUF_ADDR virtual address would be 0xffff00001C000000UL + 0x00200000 = 0xffff00001C200000UL |
| 26 | CACHED_MEMPOOL_ADDR := 0xffff00000e600000UL |
| 27 | UNCACHED_MEMPOOL_ADDR := 0xffff000010600000UL |
| 28 | BL33_ADDR := 0xffff000011000000UL |
| 29 | NAND_BUF_ADDR := 0xffff000010900000UL |
| 30 | else |
| 31 | CACHED_MEMPOOL_ADDR := 0x41000000 |
| 32 | UNCACHED_MEMPOOL_ADDR := 0x43000000 |
| 33 | BL33_ADDR := 0x43a00000 |
| 34 | NAND_BUF_ADDR := 0x43300000 |
| 35 | endif |
| 36 | |
| 37 | CACHED_MEMPOOL_SIZE := 0x2000000 # 48MB |
| 38 | UNCACHED_MEMPOOL_SIZE := 0x0007D000 # 500k |
| 39 | |
| 40 | SCRATCH_SIZE := 0x800000 # 8MB |
| 41 | |
| 42 | MAX_TEE_DRAM_SIZE := 0x00400000 # 4M |
| 43 | MAX_KERNEL_SIZE := 0x01000000 # 16M |
| 44 | MAX_DTB_SIZE := 0x00200000 # 2M |
| 45 | MAX_LZ4_BUF_SIZE := 0x00100000 # 1M |
| 46 | MAX_NAND_BUF_SIZE := 0x00100000 # 1M |
| 47 | |
| 48 | # CACHED_MEMPOOL_ADDR + CACHED_MEMPOOL_SIZE for upgrade |
| 49 | # CACHED_MEMPOOL_ADDR + MAX_TEE_DRAM_SIZE + MAX_KERNEL_SIZE |
| 50 | # + MAX_DTB_SIZE + MAX_LZ4_BUF_SIZE for boot |
| 51 | |
| 52 | GLOBAL_CFLAGS += -DTZ_PART_NAME=\"$(TZ_PART_NAME)\" \ |
| 53 | -DDTBO_PART_NAME=\"$(DTBO_PART_NAME)\" \ |
| 54 | -DBOOT_PART_NAME=\"$(BOOT_PART_NAME)\" \ |
| 55 | -DRECOVERY_BOOT_PART_NAME=\"$(RECOVERY_BOOT_PART_NAME)\" \ |
| 56 | -DRECOVERY_TZ_PART_NAME=\"$(RECOVERY_TZ_PART_NAME)\" \ |
| 57 | |
| 58 | GLOBAL_DEFINES += CACHED_MEMPOOL_ADDR=$(CACHED_MEMPOOL_ADDR) \ |
| 59 | CACHED_MEMPOOL_SIZE=$(CACHED_MEMPOOL_SIZE) \ |
| 60 | UNCACHED_MEMPOOL_ADDR=$(UNCACHED_MEMPOOL_ADDR) \ |
| 61 | UNCACHED_MEMPOOL_SIZE=$(UNCACHED_MEMPOOL_SIZE) \ |
| 62 | SCRATCH_SIZE=$(SCRATCH_SIZE) \ |
| 63 | BL33_ADDR=$(BL33_ADDR) \ |
| 64 | NAND_BUF_ADDR=$(NAND_BUF_ADDR) |
| 65 | |
| 66 | include make/module.mk |