Saurabh Gorecha | 70389ca | 2020-04-22 21:31:24 +0530 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. |
| 3 | # Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | # |
| 7 | |
| 8 | # Make for SC7180 QTI platform. |
| 9 | |
| 10 | QTI_PLAT_PATH := plat/qti |
| 11 | CHIPSET := ${PLAT} |
| 12 | |
| 13 | # Turn On Separate code & data. |
| 14 | SEPARATE_CODE_AND_RODATA := 1 |
Saurabh Gorecha | b849301 | 2022-04-05 00:11:52 +0530 | [diff] [blame] | 15 | USE_COHERENT_MEM := 0 |
Saurabh Gorecha | 70389ca | 2020-04-22 21:31:24 +0530 | [diff] [blame] | 16 | WARMBOOT_ENABLE_DCACHE_EARLY := 1 |
Saurabh Gorecha | b849301 | 2022-04-05 00:11:52 +0530 | [diff] [blame] | 17 | HW_ASSISTED_COHERENCY := 1 |
Saurabh Gorecha | 70389ca | 2020-04-22 21:31:24 +0530 | [diff] [blame] | 18 | |
| 19 | # Disable the PSCI platform compatibility layer |
| 20 | ENABLE_PLAT_COMPAT := 0 |
| 21 | |
Saurabh Gorecha | b849301 | 2022-04-05 00:11:52 +0530 | [diff] [blame] | 22 | #Enable errata for cortex_a55 and cortex_a76 |
| 23 | ERRATA_A55_1530923 := 1 |
| 24 | ERRATA_A76_1165522 := 1 |
| 25 | |
Saurabh Gorecha | 70389ca | 2020-04-22 21:31:24 +0530 | [diff] [blame] | 26 | # Enable PSCI v1.0 extended state ID format |
| 27 | PSCI_EXTENDED_STATE_ID := 1 |
| 28 | ARM_RECOM_STATE_ID_ENC := 1 |
| 29 | |
| 30 | COLD_BOOT_SINGLE_CPU := 1 |
| 31 | PROGRAMMABLE_RESET_ADDRESS := 1 |
| 32 | |
| 33 | RESET_TO_BL31 := 0 |
| 34 | |
Saurabh Gorecha | 70389ca | 2020-04-22 21:31:24 +0530 | [diff] [blame] | 35 | QTI_SDI_BUILD := 0 |
| 36 | $(eval $(call assert_boolean,QTI_SDI_BUILD)) |
| 37 | $(eval $(call add_define,QTI_SDI_BUILD)) |
| 38 | |
| 39 | #disable CTX_INCLUDE_AARCH32_REGS to support sc7180 gold cores |
| 40 | override CTX_INCLUDE_AARCH32_REGS := 0 |
| 41 | WORKAROUND_CVE_2017_5715 := 0 |
| 42 | DYNAMIC_WORKAROUND_CVE_2018_3639 := 1 |
| 43 | # Enable stack protector. |
| 44 | ENABLE_STACK_PROTECTOR := strong |
| 45 | |
| 46 | |
| 47 | QTI_EXTERNAL_INCLUDES := -I${QTI_PLAT_PATH}/${CHIPSET}/inc \ |
| 48 | -I${QTI_PLAT_PATH}/common/inc \ |
| 49 | -I${QTI_PLAT_PATH}/common/inc/$(ARCH) \ |
| 50 | -I${QTI_PLAT_PATH}/qtiseclib/inc \ |
| 51 | -I${QTI_PLAT_PATH}/qtiseclib/inc/${CHIPSET} \ |
| 52 | |
| 53 | QTI_BL31_SOURCES := $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_helpers.S \ |
| 54 | $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_kryo4_silver.S \ |
| 55 | $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_kryo4_gold.S \ |
| 56 | $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_uart_console.S \ |
Shelley Chen | 68afc06 | 2021-10-01 18:34:07 -0700 | [diff] [blame] | 57 | $(QTI_PLAT_PATH)/common/src/pm_ps_hold.c \ |
Saurabh Gorecha | 70389ca | 2020-04-22 21:31:24 +0530 | [diff] [blame] | 58 | $(QTI_PLAT_PATH)/common/src/qti_stack_protector.c \ |
| 59 | $(QTI_PLAT_PATH)/common/src/qti_common.c \ |
| 60 | $(QTI_PLAT_PATH)/common/src/qti_bl31_setup.c \ |
| 61 | $(QTI_PLAT_PATH)/common/src/qti_gic_v3.c \ |
| 62 | $(QTI_PLAT_PATH)/common/src/qti_interrupt_svc.c \ |
| 63 | $(QTI_PLAT_PATH)/common/src/qti_syscall.c \ |
| 64 | $(QTI_PLAT_PATH)/common/src/qti_topology.c \ |
| 65 | $(QTI_PLAT_PATH)/common/src/qti_pm.c \ |
Saurabh Gorecha | 87f4737 | 2020-07-09 02:20:08 +0530 | [diff] [blame] | 66 | $(QTI_PLAT_PATH)/common/src/qti_rng.c \ |
Julius Werner | 0375d32 | 2019-02-20 17:33:23 -0800 | [diff] [blame] | 67 | $(QTI_PLAT_PATH)/common/src/spmi_arb.c \ |
Saurabh Gorecha | 70389ca | 2020-04-22 21:31:24 +0530 | [diff] [blame] | 68 | $(QTI_PLAT_PATH)/qtiseclib/src/qtiseclib_cb_interface.c \ |
| 69 | |
| 70 | |
| 71 | PLAT_INCLUDES := -Iinclude/plat/common/ \ |
| 72 | |
| 73 | PLAT_INCLUDES += ${QTI_EXTERNAL_INCLUDES} |
| 74 | |
| 75 | include lib/xlat_tables_v2/xlat_tables.mk |
| 76 | PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} \ |
| 77 | plat/common/aarch64/crash_console_helpers.S \ |
| 78 | common/desc_image_load.c \ |
| 79 | lib/bl_aux_params/bl_aux_params.c \ |
| 80 | |
| 81 | include lib/coreboot/coreboot.mk |
| 82 | |
| 83 | #PSCI Sources. |
| 84 | PSCI_SOURCES := plat/common/plat_psci_common.c \ |
| 85 | |
| 86 | # GIC-600 configuration |
Julius Werner | 8793e2c | 2020-08-24 18:34:38 -0700 | [diff] [blame] | 87 | GICV3_SUPPORT_GIC600 := 1 |
Saurabh Gorecha | 70389ca | 2020-04-22 21:31:24 +0530 | [diff] [blame] | 88 | # Include GICv3 driver files |
| 89 | include drivers/arm/gic/v3/gicv3.mk |
| 90 | |
| 91 | #Timer sources |
| 92 | TIMER_SOURCES := drivers/delay_timer/generic_delay_timer.c \ |
| 93 | drivers/delay_timer/delay_timer.c \ |
| 94 | |
| 95 | #GIC sources. |
| 96 | GIC_SOURCES := plat/common/plat_gicv3.c \ |
| 97 | ${GICV3_SOURCES} \ |
| 98 | |
Saurabh Gorecha | b849301 | 2022-04-05 00:11:52 +0530 | [diff] [blame] | 99 | CPU_SOURCES := lib/cpus/aarch64/cortex_a76.S \ |
| 100 | lib/cpus/aarch64/cortex_a55.S \ |
| 101 | |
| 102 | BL31_SOURCES += ${QTI_BL31_SOURCES} \ |
| 103 | ${PSCI_SOURCES} \ |
| 104 | ${GIC_SOURCES} \ |
| 105 | ${TIMER_SOURCES} \ |
| 106 | ${CPU_SOURCES} \ |
Saurabh Gorecha | 70389ca | 2020-04-22 21:31:24 +0530 | [diff] [blame] | 107 | |
| 108 | LIB_QTI_PATH := ${QTI_PLAT_PATH}/qtiseclib/lib/${CHIPSET} |
| 109 | |
| 110 | |
| 111 | # Override this on the command line to point to the qtiseclib library which |
| 112 | # will be available in coreboot.org |
| 113 | QTISECLIB_PATH ?= |
| 114 | |
| 115 | ifeq ($(QTISECLIB_PATH),) |
| 116 | # if No lib then use stub implementation for qtiseclib interface |
| 117 | $(warning QTISECLIB_PATH is not provided while building, using stub implementation. \ |
| 118 | Please refer docs/plat/qti.rst for more details \ |
| 119 | THIS FIRMWARE WILL NOT BOOT!) |
| 120 | BL31_SOURCES += plat/qti/qtiseclib/src/qtiseclib_interface_stub.c |
| 121 | else |
| 122 | # use library provided by QTISECLIB_PATH |
| 123 | LDFLAGS += -L $(dir $(QTISECLIB_PATH)) |
| 124 | LDLIBS += -l$(patsubst lib%.a,%,$(notdir $(QTISECLIB_PATH))) |
| 125 | endif |
| 126 | |