Debian Codegraph @

plat/marvell/armada/common/marvell_common.mk

raw symbols SCIP
1 # Copyright (C) 2018 Marvell International Ltd.
2 #
3 # SPDX-License-Identifier: BSD-3-Clause
4 # https://spdx.org/licenses
5
6 MARVELL_PLAT_BASE := plat/marvell/armada
7 MARVELL_PLAT_INCLUDE_BASE := include/plat/marvell/armada
8
9 SEPARATE_CODE_AND_RODATA := 1
10
11 # flag to switch from PLL to ARO
12 ARO_ENABLE := 0
13 $(eval $(call add_define,ARO_ENABLE))
14
15 # Convert LLC to secure SRAM
16 LLC_SRAM := 0
17 $(eval $(call add_define,LLC_SRAM))
18
19 # Enable/Disable LLC
20 LLC_ENABLE := 1
21 $(eval $(call add_define,LLC_ENABLE))
22
23 include lib/xlat_tables_v2/xlat_tables.mk
24
25 PLAT_INCLUDES += -I$(MARVELL_PLAT_INCLUDE_BASE)/common \
26 -I$(MARVELL_PLAT_INCLUDE_BASE)/common/aarch64
27
28
29 PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS} \
30 $(MARVELL_PLAT_BASE)/common/aarch64/marvell_common.c \
31 $(MARVELL_PLAT_BASE)/common/aarch64/marvell_helpers.S \
32 $(MARVELL_COMMON_BASE)/marvell_console.c
33
34 BL1_SOURCES += drivers/delay_timer/delay_timer.c \
35 drivers/io/io_fip.c \
36 drivers/io/io_memmap.c \
37 drivers/io/io_storage.c \
38 $(MARVELL_PLAT_BASE)/common/marvell_bl1_setup.c \
39 $(MARVELL_PLAT_BASE)/common/marvell_io_storage.c \
40 $(MARVELL_PLAT_BASE)/common/plat_delay_timer.c
41
42 ifdef EL3_PAYLOAD_BASE
43 # Need the arm_program_trusted_mailbox() function to release secondary CPUs from
44 # their holding pen
45 endif
46
47 BL2_SOURCES += drivers/io/io_fip.c \
48 drivers/io/io_memmap.c \
49 drivers/io/io_storage.c \
50 common/desc_image_load.c \
51 $(MARVELL_PLAT_BASE)/common/marvell_bl2_setup.c \
52 $(MARVELL_PLAT_BASE)/common/marvell_io_storage.c \
53 $(MARVELL_PLAT_BASE)/common/aarch64/marvell_bl2_mem_params_desc.c \
54 $(MARVELL_PLAT_BASE)/common/marvell_image_load.c
55
56 ifeq (${SPD},opteed)
57 PLAT_INCLUDES += -Iinclude/lib
58 BL2_SOURCES += lib/optee/optee_utils.c
59 endif
60
61 BL31_SOURCES += $(MARVELL_PLAT_BASE)/common/marvell_bl31_setup.c \
62 $(MARVELL_PLAT_BASE)/common/marvell_pm.c \
63 $(MARVELL_PLAT_BASE)/common/marvell_topology.c \
64 plat/common/plat_psci_common.c \
65 $(MARVELL_PLAT_BASE)/common/plat_delay_timer.c \
66 drivers/delay_timer/delay_timer.c
67
68 # PSCI functionality
69 $(eval $(call add_define,CONFIG_ARM64))
70
71 # Add the build options to pack Trusted OS Extra1 and Trusted OS Extra2 images
72 # in the FIP if the platform requires.
73 ifneq ($(BL32_EXTRA1),)
74 $(eval $(call TOOL_ADD_IMG,bl32_extra1,--tos-fw-extra1))
75 endif
76 ifneq ($(BL32_EXTRA2),)
77 $(eval $(call TOOL_ADD_IMG,bl32_extra2,--tos-fw-extra2))
78 endif
79
80 # MSS (SCP) build
81 ifeq (${MSS_SUPPORT}, 1)
82 include $(MARVELL_PLAT_BASE)/common/mss/mss_common.mk
83 endif
84
85 $(BUILD_PLAT)/$(BOOT_IMAGE): $(BUILD_PLAT)/bl1.bin $(BUILD_PLAT)/$(FIP_NAME)
86 $(if $(shell find $(BUILD_PLAT)/bl1.bin -type f -size +128k),$(error "Image '$(BUILD_PLAT)/bl1.bin' is bigger than 128kB"))
87 $(q)cp $(BUILD_PLAT)/bl1.bin $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
88 $(q)truncate -s %128K $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
89 $(q)cat $(BUILD_PLAT)/$(FIP_NAME) >> $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
90 $(q)truncate -s %4 $(BUILD_PLAT)/$(BOOT_IMAGE) || { rm -f $(BUILD_PLAT)/$(BOOT_IMAGE); false; }
91 $(s)echo
92 $(s)echo "Built $@ successfully"
93 $(s)echo
94
95 .PHONY: mrvl_bootimage
96 mrvl_bootimage: $(BUILD_PLAT)/$(BOOT_IMAGE)
97
98 .PHONY: mrvl_flash
99 mrvl_flash: $(BUILD_PLAT)/$(FLASH_IMAGE)