blob: 58d4b2e54dbf549fda23651fef0c0bee7e66191c [file] [log] [blame]
Jit Loon Lim4c249f12023-05-17 12:26:11 +08001#
2# Copyright (c) 2019-2020, ARM Limited and Contributors. All rights reserved.
3# Copyright (c) 2019-2023, Intel Corporation. All rights reserved.
Jit Loon Lim65b49f42025-02-10 15:15:31 +08004# Copyright (c) 2024-2025, Altera Corporation. All rights reserved.
Jit Loon Lim4c249f12023-05-17 12:26:11 +08005#
6# SPDX-License-Identifier: BSD-3-Clause
7#
8include lib/xlat_tables_v2/xlat_tables.mk
Jit Loon Lim65b49f42025-02-10 15:15:31 +08009include lib/libfdt/libfdt.mk
Jit Loon Lim4c249f12023-05-17 12:26:11 +080010PLAT_INCLUDES := \
11 -Iplat/intel/soc/agilex5/include/ \
12 -Iplat/intel/soc/common/drivers/ \
Sieu Mun Tang6848bd62024-07-20 00:43:43 +080013 -Iplat/intel/soc/common/lib/sha/ \
Jit Loon Lim4c249f12023-05-17 12:26:11 +080014 -Iplat/intel/soc/common/include/
15
16# GIC-600 configuration
17GICV3_SUPPORT_GIC600 := 1
18# Include GICv3 driver files
19include drivers/arm/gic/v3/gicv3.mk
20AGX5_GICv3_SOURCES := \
21 ${GICV3_SOURCES} \
22 plat/common/plat_gicv3.c
23
24PLAT_BL_COMMON_SOURCES := \
25 ${AGX5_GICv3_SOURCES} \
Jit Loon Lim65b49f42025-02-10 15:15:31 +080026 common/fdt_wrappers.c \
Jit Loon Lim4c249f12023-05-17 12:26:11 +080027 drivers/cadence/combo_phy/cdns_combo_phy.c \
28 drivers/cadence/emmc/cdns_sdmmc.c \
29 drivers/cadence/nand/cdns_nand.c \
30 drivers/delay_timer/delay_timer.c \
31 drivers/delay_timer/generic_delay_timer.c \
32 drivers/ti/uart/aarch64/16550_console.S \
33 plat/intel/soc/common/aarch64/platform_common.c \
34 plat/intel/soc/common/aarch64/plat_helpers.S \
35 plat/intel/soc/common/drivers/ccu/ncore_ccu.c \
36 plat/intel/soc/common/drivers/combophy/combophy.c \
37 plat/intel/soc/common/drivers/sdmmc/sdmmc.c \
38 plat/intel/soc/common/drivers/ddr/ddr.c \
39 plat/intel/soc/common/drivers/nand/nand.c \
Sieu Mun Tang6848bd62024-07-20 00:43:43 +080040 plat/intel/soc/common/lib/sha/sha.c \
Jit Loon Lim65b49f42025-02-10 15:15:31 +080041 plat/intel/soc/common/socfpga_delay_timer.c \
42 plat/intel/soc/common/socfpga_dt.c
Jit Loon Lim4c249f12023-05-17 12:26:11 +080043
44BL2_SOURCES += \
45 common/desc_image_load.c \
46 lib/xlat_tables_v2/aarch64/enable_mmu.S \
47 lib/xlat_tables_v2/xlat_tables_context.c \
48 lib/xlat_tables_v2/xlat_tables_core.c \
49 lib/xlat_tables_v2/aarch64/xlat_tables_arch.c \
50 lib/xlat_tables_v2/xlat_tables_utils.c \
51 drivers/mmc/mmc.c \
52 drivers/intel/soc/stratix10/io/s10_memmap_qspi.c \
53 drivers/io/io_storage.c \
54 drivers/io/io_block.c \
55 drivers/io/io_fip.c \
56 drivers/io/io_mtd.c \
57 drivers/partition/partition.c \
58 drivers/partition/gpt.c \
59 drivers/synopsys/emmc/dw_mmc.c \
60 lib/cpus/aarch64/cortex_a55.S \
61 lib/cpus/aarch64/cortex_a76.S \
62 plat/intel/soc/agilex5/soc/agilex5_clock_manager.c \
63 plat/intel/soc/agilex5/soc/agilex5_memory_controller.c \
Sieu Mun Tang7bb345c2024-08-26 22:51:16 +080064 plat/intel/soc/agilex5/soc/agilex5_mmc.c \
Jit Loon Lim4c249f12023-05-17 12:26:11 +080065 plat/intel/soc/agilex5/soc/agilex5_pinmux.c \
66 plat/intel/soc/agilex5/soc/agilex5_power_manager.c \
Sieu Mun Tang7bb345c2024-08-26 22:51:16 +080067 plat/intel/soc/agilex5/soc/agilex5_ddr.c \
68 plat/intel/soc/agilex5/soc/agilex5_iossm_mailbox.c \
Jit Loon Lim4c249f12023-05-17 12:26:11 +080069 plat/intel/soc/common/bl2_plat_mem_params_desc.c \
70 plat/intel/soc/common/socfpga_image_load.c \
Mahesh Raoc2715992023-08-22 17:26:23 +080071 plat/intel/soc/common/socfpga_ros.c \
Jit Loon Lim4c249f12023-05-17 12:26:11 +080072 plat/intel/soc/common/socfpga_storage.c \
Sieu Mun Tang7bb345c2024-08-26 22:51:16 +080073 plat/intel/soc/common/socfpga_vab.c \
Jit Loon Lim4c249f12023-05-17 12:26:11 +080074 plat/intel/soc/common/soc/socfpga_emac.c \
75 plat/intel/soc/common/soc/socfpga_firewall.c \
76 plat/intel/soc/common/soc/socfpga_handoff.c \
77 plat/intel/soc/common/soc/socfpga_mailbox.c \
78 plat/intel/soc/common/soc/socfpga_reset_manager.c \
79 plat/intel/soc/common/drivers/qspi/cadence_qspi.c \
80 plat/intel/soc/agilex5/bl2_plat_setup.c \
81 plat/intel/soc/common/drivers/wdt/watchdog.c
82
83include lib/zlib/zlib.mk
84PLAT_INCLUDES += -Ilib/zlib
85BL2_SOURCES += $(ZLIB_SOURCES)
86
87BL31_SOURCES += \
88 drivers/arm/cci/cci.c \
89 ${XLAT_TABLES_LIB_SRCS} \
90 lib/cpus/aarch64/aem_generic.S \
91 lib/cpus/aarch64/cortex_a55.S \
92 lib/cpus/aarch64/cortex_a76.S \
93 plat/common/plat_psci_common.c \
94 plat/intel/soc/agilex5/bl31_plat_setup.c \
Tanmay Kathpaliad22ff662024-05-31 10:40:22 +000095 plat/intel/soc/agilex5/soc/agilex5_cache.S \
Jit Loon Limffa06e72023-07-07 17:15:26 +080096 plat/intel/soc/agilex5/soc/agilex5_clock_manager.c \
Jit Loon Lim4c249f12023-05-17 12:26:11 +080097 plat/intel/soc/agilex5/soc/agilex5_power_manager.c \
98 plat/intel/soc/common/socfpga_psci.c \
99 plat/intel/soc/common/socfpga_sip_svc.c \
100 plat/intel/soc/common/socfpga_sip_svc_v2.c \
101 plat/intel/soc/common/socfpga_topology.c \
102 plat/intel/soc/common/sip/socfpga_sip_ecc.c \
103 plat/intel/soc/common/sip/socfpga_sip_fcs.c \
104 plat/intel/soc/common/soc/socfpga_mailbox.c \
Sieu Mun Tang25613692024-10-04 18:38:21 +0800105 plat/intel/soc/common/soc/socfpga_system_manager.c \
Jit Loon Lim4c249f12023-05-17 12:26:11 +0800106 plat/intel/soc/common/soc/socfpga_reset_manager.c
107
108# Configs for A76 and A55
109HW_ASSISTED_COHERENCY := 1
110USE_COHERENT_MEM := 0
111CTX_INCLUDE_AARCH32_REGS := 0
112ERRATA_A55_1530923 := 1
113
Jit Loon Limc5a3e3a2023-10-16 00:19:34 +0800114# Don't have the Linux kernel as a BL33 image by default
115ARM_LINUX_KERNEL_AS_BL33 := 0
116$(eval $(call assert_boolean,ARM_LINUX_KERNEL_AS_BL33))
117$(eval $(call add_define,ARM_LINUX_KERNEL_AS_BL33))
Jit Loon Lim4c249f12023-05-17 12:26:11 +0800118$(eval $(call add_define,ARM_PRELOADED_DTB_BASE))
119
Sieu Mun Tangd52f2482024-10-24 22:16:50 +0800120# Configs for Boot Source
121SOCFPGA_BOOT_SOURCE_SDMMC ?= 0
122SOCFPGA_BOOT_SOURCE_QSPI ?= 0
123SOCFPGA_BOOT_SOURCE_NAND ?= 0
124
125$(eval $(call assert_booleans,\
126 $(sort \
127 SOCFPGA_BOOT_SOURCE_SDMMC \
128 SOCFPGA_BOOT_SOURCE_QSPI \
129 SOCFPGA_BOOT_SOURCE_NAND \
130)))
131$(eval $(call add_defines,\
132 $(sort \
133 SOCFPGA_BOOT_SOURCE_SDMMC \
134 SOCFPGA_BOOT_SOURCE_QSPI \
135 SOCFPGA_BOOT_SOURCE_NAND \
136)))
137
Sieu Mun Tang6848bd62024-07-20 00:43:43 +0800138# Configs for VAB Authentication
139SOCFPGA_SECURE_VAB_AUTH := 0
140$(eval $(call assert_boolean,SOCFPGA_SECURE_VAB_AUTH))
141$(eval $(call add_define,SOCFPGA_SECURE_VAB_AUTH))
142
Jit Loon Lim4c249f12023-05-17 12:26:11 +0800143PROGRAMMABLE_RESET_ADDRESS := 0
144RESET_TO_BL2 := 1
Sieu Mun Tang6848bd62024-07-20 00:43:43 +0800145BL2_INV_DCACHE := 0