Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 1 | # |
Arvind Ram Prakash | 11b9b49 | 2022-11-22 14:41:00 -0600 | [diff] [blame] | 2 | # Copyright (c) 2018-2023, ARM Limited and Contributors. All rights reserved. |
Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 7 | override PROGRAMMABLE_RESET_ADDRESS := 1 |
| 8 | override USE_COHERENT_MEM := 1 |
| 9 | override SEPARATE_CODE_AND_RODATA := 1 |
| 10 | override ENABLE_SVE_FOR_NS := 0 |
Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 11 | # Enable workarounds for selected Cortex-A53 erratas. |
| 12 | ERRATA_A53_855873 := 1 |
Jassi Brar | 2244bf1 | 2022-03-03 15:24:31 -0600 | [diff] [blame] | 13 | |
| 14 | ifeq (${RESET_TO_BL31}, 1) |
| 15 | override RESET_TO_BL31 := 1 |
| 16 | override TRUSTED_BOARD_BOOT := 0 |
| 17 | SQ_USE_SCMI_DRIVER ?= 0 |
| 18 | else |
| 19 | override RESET_TO_BL31 := 0 |
Arvind Ram Prakash | 11b9b49 | 2022-11-22 14:41:00 -0600 | [diff] [blame] | 20 | override RESET_TO_BL2 := 1 |
Jassi Brar | 2244bf1 | 2022-03-03 15:24:31 -0600 | [diff] [blame] | 21 | SQ_USE_SCMI_DRIVER := 1 |
| 22 | BL2_CPPFLAGS += -DPLAT_XLAT_TABLES_DYNAMIC |
| 23 | endif |
Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 24 | |
| 25 | # Libraries |
| 26 | include lib/xlat_tables_v2/xlat_tables.mk |
| 27 | |
Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 28 | PLAT_PATH := plat/socionext/synquacer |
| 29 | PLAT_INCLUDES := -I$(PLAT_PATH)/include \ |
| 30 | -I$(PLAT_PATH)/drivers/scpi \ |
Masahisa Kojima | ebfd8eb | 2019-03-07 10:41:54 +0900 | [diff] [blame] | 31 | -I$(PLAT_PATH)/drivers/mhu \ |
| 32 | -Idrivers/arm/css/scmi \ |
| 33 | -Idrivers/arm/css/scmi/vendor |
Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 34 | |
| 35 | PLAT_BL_COMMON_SOURCES += $(PLAT_PATH)/sq_helpers.S \ |
Antonio Nino Diaz | 1d1b4f6 | 2018-09-24 17:16:30 +0100 | [diff] [blame] | 36 | drivers/arm/pl011/aarch64/pl011_console.S \ |
Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 37 | drivers/delay_timer/delay_timer.c \ |
| 38 | drivers/delay_timer/generic_delay_timer.c \ |
Jassi Brar | 1bc8db8 | 2022-03-03 15:24:31 -0600 | [diff] [blame] | 39 | lib/cpus/aarch64/cortex_a53.S \ |
| 40 | $(PLAT_PATH)/sq_xlat_setup.c \ |
Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 41 | ${XLAT_TABLES_LIB_SRCS} |
| 42 | |
Alexei Fedorov | 84f1b5d | 2020-03-23 18:45:17 +0000 | [diff] [blame] | 43 | # Include GICv3 driver files |
| 44 | include drivers/arm/gic/v3/gicv3.mk |
| 45 | |
Jassi Brar | 2244bf1 | 2022-03-03 15:24:31 -0600 | [diff] [blame] | 46 | ifneq (${RESET_TO_BL31}, 1) |
| 47 | BL2_SOURCES += common/desc_image_load.c \ |
| 48 | drivers/io/io_fip.c \ |
| 49 | drivers/io/io_memmap.c \ |
| 50 | drivers/io/io_storage.c \ |
| 51 | $(PLAT_PATH)/sq_bl2_setup.c \ |
| 52 | $(PLAT_PATH)/sq_image_desc.c \ |
| 53 | $(PLAT_PATH)/sq_io_storage.c |
Jassi Brar | 554f172 | 2022-03-03 15:24:31 -0600 | [diff] [blame] | 54 | |
| 55 | ifeq (${TRUSTED_BOARD_BOOT},1) |
| 56 | include drivers/auth/mbedtls/mbedtls_crypto.mk |
| 57 | include drivers/auth/mbedtls/mbedtls_x509.mk |
| 58 | BL2_SOURCES += drivers/auth/auth_mod.c \ |
| 59 | drivers/auth/crypto_mod.c \ |
| 60 | drivers/auth/img_parser_mod.c \ |
| 61 | drivers/auth/tbbr/tbbr_cot_common.c \ |
| 62 | drivers/auth/tbbr/tbbr_cot_bl2.c \ |
| 63 | plat/common/tbbr/plat_tbbr.c \ |
| 64 | $(PLAT_PATH)/sq_rotpk.S \ |
| 65 | $(PLAT_PATH)/sq_tbbr.c |
| 66 | |
| 67 | ROT_KEY = $(BUILD_PLAT)/rot_key.pem |
| 68 | ROTPK_HASH = $(BUILD_PLAT)/rotpk_sha256.bin |
| 69 | |
| 70 | $(eval $(call add_define_val,ROTPK_HASH,'"$(ROTPK_HASH)"')) |
| 71 | $(BUILD_PLAT)/bl2/sq_rotpk.o: $(ROTPK_HASH) |
| 72 | |
| 73 | certificates: $(ROT_KEY) |
| 74 | $(ROT_KEY): | $(BUILD_PLAT) |
| 75 | @echo " OPENSSL $@" |
Salome Thirot | 0b35da3 | 2022-07-14 16:14:15 +0100 | [diff] [blame] | 76 | $(Q)${OPENSSL_BIN_PATH}/openssl genrsa 2048 > $@ 2>/dev/null |
Jassi Brar | 554f172 | 2022-03-03 15:24:31 -0600 | [diff] [blame] | 77 | |
| 78 | $(ROTPK_HASH): $(ROT_KEY) |
| 79 | @echo " OPENSSL $@" |
Salome Thirot | 0b35da3 | 2022-07-14 16:14:15 +0100 | [diff] [blame] | 80 | $(Q)${OPENSSL_BIN_PATH}/openssl rsa -in $< -pubout -outform DER 2>/dev/null |\ |
| 81 | ${OPENSSL_BIN_PATH}/openssl dgst -sha256 -binary > $@ 2>/dev/null |
Jassi Brar | 554f172 | 2022-03-03 15:24:31 -0600 | [diff] [blame] | 82 | |
| 83 | endif # TRUSTED_BOARD_BOOT |
Jassi Brar | 2244bf1 | 2022-03-03 15:24:31 -0600 | [diff] [blame] | 84 | endif |
| 85 | |
Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 86 | BL31_SOURCES += drivers/arm/ccn/ccn.c \ |
Alexei Fedorov | 84f1b5d | 2020-03-23 18:45:17 +0000 | [diff] [blame] | 87 | ${GICV3_SOURCES} \ |
Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 88 | plat/common/plat_gicv3.c \ |
| 89 | plat/common/plat_psci_common.c \ |
| 90 | $(PLAT_PATH)/sq_bl31_setup.c \ |
| 91 | $(PLAT_PATH)/sq_ccn.c \ |
| 92 | $(PLAT_PATH)/sq_topology.c \ |
| 93 | $(PLAT_PATH)/sq_psci.c \ |
| 94 | $(PLAT_PATH)/sq_gicv3.c \ |
Masahisa Kojima | ebfd8eb | 2019-03-07 10:41:54 +0900 | [diff] [blame] | 95 | $(PLAT_PATH)/drivers/scp/sq_scp.c |
| 96 | |
| 97 | ifeq (${SQ_USE_SCMI_DRIVER},0) |
| 98 | BL31_SOURCES += $(PLAT_PATH)/drivers/scpi/sq_scpi.c \ |
Sumit Garg | 760c1d3 | 2018-06-21 11:28:18 +0530 | [diff] [blame] | 99 | $(PLAT_PATH)/drivers/mhu/sq_mhu.c |
Masahisa Kojima | ebfd8eb | 2019-03-07 10:41:54 +0900 | [diff] [blame] | 100 | else |
| 101 | BL31_SOURCES += $(PLAT_PATH)/drivers/scp/sq_scmi.c \ |
| 102 | drivers/arm/css/scmi/scmi_common.c \ |
| 103 | drivers/arm/css/scmi/scmi_pwr_dmn_proto.c \ |
| 104 | drivers/arm/css/scmi/scmi_sys_pwr_proto.c \ |
| 105 | drivers/arm/css/scmi/vendor/scmi_sq.c \ |
| 106 | drivers/arm/css/mhu/css_mhu_doorbell.c |
| 107 | endif |
Ard Biesheuvel | c0415c6 | 2018-12-29 19:44:35 +0100 | [diff] [blame] | 108 | |
Paul Beesley | fe975b4 | 2019-09-16 11:29:03 +0000 | [diff] [blame] | 109 | ifeq (${SPM_MM},1) |
Ard Biesheuvel | c0415c6 | 2018-12-29 19:44:35 +0100 | [diff] [blame] | 110 | $(eval $(call add_define,PLAT_EXTRA_LD_SCRIPT)) |
| 111 | |
| 112 | BL31_SOURCES += $(PLAT_PATH)/sq_spm.c |
| 113 | endif |
Masahisa Kojima | ebfd8eb | 2019-03-07 10:41:54 +0900 | [diff] [blame] | 114 | |
| 115 | ifeq (${SQ_USE_SCMI_DRIVER},1) |
| 116 | $(eval $(call add_define,SQ_USE_SCMI_DRIVER)) |
| 117 | endif |