Amit Nagal | 055796f | 2024-06-05 12:32:38 +0530 | [diff] [blame^] | 1 | # Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved. |
| 2 | # Copyright (c) 2021-2022, Xilinx, Inc. All rights reserved. |
| 3 | # Copyright (c) 2022-2024, Advanced Micro Devices, Inc. All rights reserved. |
| 4 | # |
| 5 | # SPDX-License-Identifier: BSD-3-Clause |
| 6 | |
| 7 | PLAT_PATH := plat/amd/versal2 |
| 8 | |
| 9 | # A78 Erratum for SoC |
| 10 | ERRATA_A78_AE_1941500 := 1 |
| 11 | ERRATA_A78_AE_1951502 := 1 |
| 12 | ERRATA_A78_AE_2376748 := 1 |
| 13 | ERRATA_A78_AE_2395408 := 1 |
| 14 | ERRATA_ABI_SUPPORT := 1 |
| 15 | |
| 16 | # Platform Supports Armv8.2 extensions |
| 17 | ARM_ARCH_MAJOR := 8 |
| 18 | ARM_ARCH_MINOR := 2 |
| 19 | |
| 20 | override PROGRAMMABLE_RESET_ADDRESS := 1 |
| 21 | PSCI_EXTENDED_STATE_ID := 1 |
| 22 | SEPARATE_CODE_AND_RODATA := 1 |
| 23 | override RESET_TO_BL31 := 1 |
| 24 | PL011_GENERIC_UART := 1 |
| 25 | IPI_CRC_CHECK := 0 |
| 26 | GIC_ENABLE_V4_EXTN := 0 |
| 27 | GICV3_SUPPORT_GIC600 := 1 |
| 28 | |
| 29 | override CTX_INCLUDE_AARCH32_REGS := 0 |
| 30 | |
| 31 | ifdef MEM_BASE |
| 32 | $(eval $(call add_define,MEM_BASE)) |
| 33 | |
| 34 | ifndef MEM_SIZE |
| 35 | $(error "ATF_BASE defined without ATF_SIZE") |
| 36 | endif |
| 37 | $(eval $(call add_define,MEM_SIZE)) |
| 38 | |
| 39 | ifdef MEM_PROGBITS_SIZE |
| 40 | $(eval $(call add_define,MEM_PROGBITS_SIZE)) |
| 41 | endif |
| 42 | endif |
| 43 | |
| 44 | ifdef BL32_MEM_BASE |
| 45 | $(eval $(call add_define,BL32_MEM_BASE)) |
| 46 | |
| 47 | ifndef BL32_MEM_SIZE |
| 48 | $(error "BL32_BASE defined without BL32_SIZE") |
| 49 | endif |
| 50 | $(eval $(call add_define,BL32_MEM_SIZE)) |
| 51 | endif |
| 52 | |
| 53 | ifdef IPI_CRC_CHECK |
| 54 | $(eval $(call add_define,IPI_CRC_CHECK)) |
| 55 | endif |
| 56 | |
| 57 | USE_COHERENT_MEM := 0 |
| 58 | HW_ASSISTED_COHERENCY := 1 |
| 59 | |
| 60 | CONSOLE ?= pl011 |
| 61 | ifeq (${CONSOLE}, $(filter ${CONSOLE},pl011 pl011_0 pl011_1 dcc)) |
| 62 | else |
| 63 | $(error Please define CONSOLE) |
| 64 | endif |
| 65 | |
| 66 | $(eval $(call add_define_val,CONSOLE,CONSOLE_ID_${CONSOLE})) |
| 67 | |
| 68 | ifdef XILINX_OF_BOARD_DTB_ADDR |
| 69 | $(eval $(call add_define,XILINX_OF_BOARD_DTB_ADDR)) |
| 70 | endif |
| 71 | |
| 72 | PLAT_INCLUDES := -Iinclude/plat/arm/common/ \ |
| 73 | -Iplat/xilinx/common/include/ \ |
| 74 | -Iplat/xilinx/common/ipi_mailbox_service/ \ |
| 75 | -I${PLAT_PATH}/include/ \ |
| 76 | -Iplat/xilinx/versal/pm_service/ |
| 77 | |
| 78 | # Include GICv3 driver files |
| 79 | include drivers/arm/gic/v3/gicv3.mk |
| 80 | include lib/xlat_tables_v2/xlat_tables.mk |
| 81 | include lib/libfdt/libfdt.mk |
| 82 | |
| 83 | PLAT_BL_COMMON_SOURCES := \ |
| 84 | drivers/arm/dcc/dcc_console.c \ |
| 85 | drivers/delay_timer/delay_timer.c \ |
| 86 | drivers/delay_timer/generic_delay_timer.c \ |
| 87 | ${GICV3_SOURCES} \ |
| 88 | drivers/arm/pl011/aarch64/pl011_console.S \ |
| 89 | plat/common/aarch64/crash_console_helpers.S \ |
| 90 | plat/arm/common/arm_common.c \ |
| 91 | plat/common/plat_gicv3.c \ |
| 92 | ${PLAT_PATH}/aarch64/helpers.S \ |
| 93 | ${PLAT_PATH}/aarch64/common.c \ |
| 94 | ${PLAT_PATH}/plat_topology.c \ |
| 95 | ${XLAT_TABLES_LIB_SRCS} |
| 96 | |
| 97 | BL31_SOURCES += drivers/arm/cci/cci.c \ |
| 98 | lib/cpus/aarch64/cortex_a78_ae.S \ |
| 99 | lib/cpus/aarch64/cortex_a78.S \ |
| 100 | plat/common/plat_psci_common.c \ |
| 101 | drivers/scmi-msg/base.c \ |
| 102 | drivers/scmi-msg/entry.c \ |
| 103 | drivers/scmi-msg/smt.c \ |
| 104 | drivers/scmi-msg/clock.c \ |
| 105 | drivers/scmi-msg/power_domain.c \ |
| 106 | drivers/scmi-msg/reset_domain.c \ |
| 107 | ${PLAT_PATH}/scmi.c |
| 108 | |
| 109 | BL31_SOURCES += ${PLAT_PATH}/plat_psci.c |
| 110 | |
| 111 | BL31_SOURCES += plat/xilinx/common/plat_fdt.c \ |
| 112 | plat/xilinx/common/plat_startup.c \ |
| 113 | plat/xilinx/common/ipi.c \ |
| 114 | plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \ |
| 115 | ${PLAT_PATH}/soc_ipi.c \ |
| 116 | plat/xilinx/common/versal.c \ |
| 117 | ${PLAT_PATH}/bl31_setup.c \ |
| 118 | common/fdt_fixup.c \ |
| 119 | ${LIBFDT_SRCS} \ |
| 120 | ${PLAT_PATH}/sip_svc_setup.c \ |
| 121 | ${PLAT_PATH}/gicv3.c |
| 122 | |
| 123 | ifeq (${ERRATA_ABI_SUPPORT}, 1) |
| 124 | # enable the cpu macros for errata abi interface |
| 125 | CORTEX_A78_AE_H_INC := 1 |
| 126 | $(eval $(call add_define, CORTEX_A78_AE_H_INC)) |
| 127 | endif |