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 |
| 15 | USE_COHERENT_MEM := 1 |
| 16 | WARMBOOT_ENABLE_DCACHE_EARLY := 1 |
| 17 | |
| 18 | # Disable the PSCI platform compatibility layer |
| 19 | ENABLE_PLAT_COMPAT := 0 |
| 20 | |
| 21 | # Enable PSCI v1.0 extended state ID format |
| 22 | PSCI_EXTENDED_STATE_ID := 1 |
| 23 | ARM_RECOM_STATE_ID_ENC := 1 |
| 24 | |
| 25 | COLD_BOOT_SINGLE_CPU := 1 |
| 26 | PROGRAMMABLE_RESET_ADDRESS := 1 |
| 27 | |
| 28 | RESET_TO_BL31 := 0 |
| 29 | |
| 30 | MULTI_CONSOLE_API := 1 |
| 31 | |
| 32 | QTI_SDI_BUILD := 0 |
| 33 | $(eval $(call assert_boolean,QTI_SDI_BUILD)) |
| 34 | $(eval $(call add_define,QTI_SDI_BUILD)) |
| 35 | |
| 36 | #disable CTX_INCLUDE_AARCH32_REGS to support sc7180 gold cores |
| 37 | override CTX_INCLUDE_AARCH32_REGS := 0 |
| 38 | WORKAROUND_CVE_2017_5715 := 0 |
| 39 | DYNAMIC_WORKAROUND_CVE_2018_3639 := 1 |
| 40 | # Enable stack protector. |
| 41 | ENABLE_STACK_PROTECTOR := strong |
| 42 | |
| 43 | |
| 44 | QTI_EXTERNAL_INCLUDES := -I${QTI_PLAT_PATH}/${CHIPSET}/inc \ |
| 45 | -I${QTI_PLAT_PATH}/common/inc \ |
| 46 | -I${QTI_PLAT_PATH}/common/inc/$(ARCH) \ |
| 47 | -I${QTI_PLAT_PATH}/qtiseclib/inc \ |
| 48 | -I${QTI_PLAT_PATH}/qtiseclib/inc/${CHIPSET} \ |
| 49 | |
| 50 | QTI_BL31_SOURCES := $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_helpers.S \ |
| 51 | $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_kryo4_silver.S \ |
| 52 | $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_kryo4_gold.S \ |
| 53 | $(QTI_PLAT_PATH)/common/src/$(ARCH)/qti_uart_console.S \ |
| 54 | $(QTI_PLAT_PATH)/common/src/qti_stack_protector.c \ |
| 55 | $(QTI_PLAT_PATH)/common/src/qti_common.c \ |
| 56 | $(QTI_PLAT_PATH)/common/src/qti_bl31_setup.c \ |
| 57 | $(QTI_PLAT_PATH)/common/src/qti_gic_v3.c \ |
| 58 | $(QTI_PLAT_PATH)/common/src/qti_interrupt_svc.c \ |
| 59 | $(QTI_PLAT_PATH)/common/src/qti_syscall.c \ |
| 60 | $(QTI_PLAT_PATH)/common/src/qti_topology.c \ |
| 61 | $(QTI_PLAT_PATH)/common/src/qti_pm.c \ |
Saurabh Gorecha | 87f4737 | 2020-07-09 02:20:08 +0530 | [diff] [blame] | 62 | $(QTI_PLAT_PATH)/common/src/qti_rng.c \ |
Saurabh Gorecha | 70389ca | 2020-04-22 21:31:24 +0530 | [diff] [blame] | 63 | $(QTI_PLAT_PATH)/qtiseclib/src/qtiseclib_cb_interface.c \ |
| 64 | |
| 65 | |
| 66 | PLAT_INCLUDES := -Iinclude/plat/common/ \ |
| 67 | |
| 68 | PLAT_INCLUDES += ${QTI_EXTERNAL_INCLUDES} |
| 69 | |
| 70 | include lib/xlat_tables_v2/xlat_tables.mk |
| 71 | PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} \ |
| 72 | plat/common/aarch64/crash_console_helpers.S \ |
| 73 | common/desc_image_load.c \ |
| 74 | lib/bl_aux_params/bl_aux_params.c \ |
| 75 | |
| 76 | include lib/coreboot/coreboot.mk |
| 77 | |
| 78 | #PSCI Sources. |
| 79 | PSCI_SOURCES := plat/common/plat_psci_common.c \ |
| 80 | |
| 81 | # GIC-600 configuration |
Julius Werner | 8793e2c | 2020-08-24 18:34:38 -0700 | [diff] [blame] | 82 | GICV3_SUPPORT_GIC600 := 1 |
Saurabh Gorecha | 70389ca | 2020-04-22 21:31:24 +0530 | [diff] [blame] | 83 | # Include GICv3 driver files |
| 84 | include drivers/arm/gic/v3/gicv3.mk |
| 85 | |
| 86 | #Timer sources |
| 87 | TIMER_SOURCES := drivers/delay_timer/generic_delay_timer.c \ |
| 88 | drivers/delay_timer/delay_timer.c \ |
| 89 | |
| 90 | #GIC sources. |
| 91 | GIC_SOURCES := plat/common/plat_gicv3.c \ |
| 92 | ${GICV3_SOURCES} \ |
| 93 | |
| 94 | BL31_SOURCES += ${QTI_BL31_SOURCES} \ |
| 95 | ${PSCI_SOURCES} \ |
| 96 | ${GIC_SOURCES} \ |
| 97 | ${TIMER_SOURCES} \ |
| 98 | |
| 99 | LIB_QTI_PATH := ${QTI_PLAT_PATH}/qtiseclib/lib/${CHIPSET} |
| 100 | |
| 101 | |
| 102 | # Override this on the command line to point to the qtiseclib library which |
| 103 | # will be available in coreboot.org |
| 104 | QTISECLIB_PATH ?= |
| 105 | |
| 106 | ifeq ($(QTISECLIB_PATH),) |
| 107 | # if No lib then use stub implementation for qtiseclib interface |
| 108 | $(warning QTISECLIB_PATH is not provided while building, using stub implementation. \ |
| 109 | Please refer docs/plat/qti.rst for more details \ |
| 110 | THIS FIRMWARE WILL NOT BOOT!) |
| 111 | BL31_SOURCES += plat/qti/qtiseclib/src/qtiseclib_interface_stub.c |
| 112 | else |
| 113 | # use library provided by QTISECLIB_PATH |
| 114 | LDFLAGS += -L $(dir $(QTISECLIB_PATH)) |
| 115 | LDLIBS += -l$(patsubst lib%.a,%,$(notdir $(QTISECLIB_PATH))) |
| 116 | endif |
| 117 | |