Sheetal Tigadoli | 13680c9 | 2019-12-13 10:39:06 +0530 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2015 - 2020, Broadcom |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | PLAT_BL_COMMON_SOURCES += plat/brcm/board/common/board_common.c |
| 8 | |
| 9 | # If no board config makefile, do not include it |
| 10 | ifneq (${BOARD_CFG},) |
| 11 | BOARD_CFG_MAKE := $(shell find plat/brcm/board/${PLAT} -name '${BOARD_CFG}.mk') |
| 12 | $(eval $(call add_define,BOARD_CFG)) |
| 13 | ifneq (${BOARD_CFG_MAKE},) |
| 14 | $(info Including ${BOARD_CFG_MAKE}) |
| 15 | include ${BOARD_CFG_MAKE} |
| 16 | else |
| 17 | $(error Error: File ${BOARD_CFG}.mk not found in plat/brcm/board/${PLAT}) |
| 18 | endif |
| 19 | endif |
| 20 | |
| 21 | # To compile with highest log level (VERBOSE) set value to 50 |
| 22 | LOG_LEVEL := 40 |
| 23 | |
| 24 | # Use custom generic timer clock |
| 25 | ifneq (${GENTIMER_ACTUAL_CLOCK},) |
| 26 | $(info Using GENTIMER_ACTUAL_CLOCK=$(GENTIMER_ACTUAL_CLOCK)) |
| 27 | SYSCNT_FREQ := $(GENTIMER_ACTUAL_CLOCK) |
| 28 | $(eval $(call add_define,SYSCNT_FREQ)) |
| 29 | endif |
| 30 | |
Sheetal Tigadoli | 2a96dc2 | 2019-12-18 12:01:01 +0530 | [diff] [blame^] | 31 | # Process ARM_BL31_IN_DRAM flag |
| 32 | ifeq (${ARM_BL31_IN_DRAM},) |
| 33 | ARM_BL31_IN_DRAM := 0 |
| 34 | endif |
| 35 | $(eval $(call assert_boolean,ARM_BL31_IN_DRAM)) |
| 36 | $(eval $(call add_define,ARM_BL31_IN_DRAM)) |
| 37 | |
Sheetal Tigadoli | 13680c9 | 2019-12-13 10:39:06 +0530 | [diff] [blame] | 38 | ifeq (${STANDALONE_BL2},yes) |
| 39 | $(eval $(call add_define,MMU_DISABLED)) |
| 40 | endif |
| 41 | |
| 42 | # BL2 XIP from QSPI |
| 43 | RUN_BL2_FROM_QSPI := 0 |
| 44 | ifeq (${RUN_BL2_FROM_QSPI},1) |
| 45 | $(eval $(call add_define,RUN_BL2_FROM_QSPI)) |
| 46 | endif |
| 47 | |
| 48 | # Use CRMU SRAM from iHOST |
| 49 | ifneq (${USE_CRMU_SRAM},) |
| 50 | $(eval $(call add_define,USE_CRMU_SRAM)) |
| 51 | endif |
| 52 | |
| 53 | # On BRCM platforms, separate the code and read-only data sections to allow |
| 54 | # mapping the former as executable and the latter as execute-never. |
| 55 | SEPARATE_CODE_AND_RODATA := 1 |
| 56 | |
| 57 | # Use generic OID definition (tbbr_oid.h) |
| 58 | USE_TBBR_DEFS := 1 |
| 59 | |
Sheetal Tigadoli | 2a96dc2 | 2019-12-18 12:01:01 +0530 | [diff] [blame^] | 60 | PLAT_INCLUDES += -Iplat/brcm/board/common \ |
| 61 | -Iinclude/drivers/brcm |
Sheetal Tigadoli | 13680c9 | 2019-12-13 10:39:06 +0530 | [diff] [blame] | 62 | |
| 63 | PLAT_BL_COMMON_SOURCES += plat/brcm/common/brcm_common.c \ |
| 64 | plat/brcm/board/common/cmn_sec.c \ |
| 65 | plat/brcm/board/common/bcm_console.c \ |
| 66 | plat/brcm/board/common/plat_setup.c \ |
| 67 | plat/brcm/board/common/platform_common.c \ |
| 68 | drivers/arm/sp804/sp804_delay_timer.c \ |
| 69 | drivers/delay_timer/delay_timer.c \ |
| 70 | drivers/io/io_fip.c \ |
| 71 | drivers/io/io_memmap.c \ |
| 72 | drivers/io/io_storage.c \ |
| 73 | plat/brcm/common/brcm_io_storage.c \ |
| 74 | plat/brcm/board/common/err.c \ |
| 75 | drivers/arm/sp805/sp805.c |
| 76 | |
| 77 | BL2_SOURCES += plat/brcm/common/brcm_bl2_mem_params_desc.c \ |
| 78 | plat/brcm/common/brcm_image_load.c \ |
| 79 | common/desc_image_load.c |
| 80 | |
| 81 | BL2_SOURCES += plat/brcm/common/brcm_bl2_setup.c |
| 82 | |
Sheetal Tigadoli | 2a96dc2 | 2019-12-18 12:01:01 +0530 | [diff] [blame^] | 83 | BL31_SOURCES += plat/brcm/common/brcm_bl31_setup.c |
| 84 | |
| 85 | #M0 runtime firmware |
| 86 | ifdef SCP_BL2 |
| 87 | $(eval $(call add_define,NEED_SCP_BL2)) |
| 88 | SCP_CFG_DIR=$(dir ${SCP_BL2}) |
| 89 | PLAT_INCLUDES += -I${SCP_CFG_DIR} |
| 90 | endif |
| 91 | |
| 92 | ifneq (${NEED_BL33},yes) |
| 93 | # If there is no BL33, BL31 will jump to this address. |
| 94 | ifeq (${USE_DDR},yes) |
| 95 | PRELOADED_BL33_BASE := 0x80000000 |
| 96 | else |
| 97 | PRELOADED_BL33_BASE := 0x74000000 |
| 98 | endif |
| 99 | endif |
| 100 | |
Sheetal Tigadoli | 13680c9 | 2019-12-13 10:39:06 +0530 | [diff] [blame] | 101 | # Use translation tables library v1 by default |
| 102 | ARM_XLAT_TABLES_LIB_V1 := 1 |
| 103 | ifeq (${ARM_XLAT_TABLES_LIB_V1}, 1) |
| 104 | $(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1)) |
| 105 | $(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1)) |
| 106 | PLAT_BL_COMMON_SOURCES += lib/xlat_tables/aarch64/xlat_tables.c \ |
| 107 | lib/xlat_tables/xlat_tables_common.c |
| 108 | endif |