platform.mk 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #
  2. # Copyright (c) 2019-2023, Arm Limited and Contributors. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # Making sure the corstone700 platform type is specified
  7. ifeq ($(filter ${TARGET_PLATFORM}, fpga fvp),)
  8. $(error TARGET_PLATFORM must be fpga or fvp)
  9. endif
  10. CORSTONE700_CPU_LIBS += lib/cpus/aarch32/cortex_a32.S
  11. BL32_SOURCES += plat/arm/common/aarch32/arm_helpers.S \
  12. plat/arm/common/arm_console.c \
  13. plat/arm/common/arm_common.c \
  14. lib/xlat_tables/aarch32/xlat_tables.c \
  15. lib/xlat_tables/xlat_tables_common.c \
  16. ${CORSTONE700_CPU_LIBS} \
  17. plat/arm/board/corstone700/common/drivers/mhu/corstone700_mhu.c
  18. PLAT_INCLUDES := -Iplat/arm/board/corstone700/common/include \
  19. -Iinclude/plat/arm/common \
  20. -Iplat/arm/board/corstone700/common/drivers/mhu
  21. NEED_BL32 := yes
  22. ifeq (${AARCH32_SP},none)
  23. $(error Variable AARCH32_SP has to be set for AArch32)
  24. endif
  25. # Include GICv2 driver files
  26. include drivers/arm/gic/v2/gicv2.mk
  27. CORSTONE700_GIC_SOURCES := ${GICV2_SOURCES} \
  28. plat/common/plat_gicv2.c \
  29. plat/arm/common/arm_gicv2.c
  30. # BL1/BL2 Image not a part of the capsule Image for Corstone700
  31. override NEED_BL1 := no
  32. override NEED_BL2 := no
  33. override NEED_BL2U := no
  34. override NEED_BL33 := yes
  35. #TFA for Corstone700 starts from BL32
  36. override RESET_TO_SP_MIN := 1
  37. #Device tree
  38. CORSTONE700_HW_CONFIG_DTS := fdts/corstone700_${TARGET_PLATFORM}.dts
  39. CORSTONE700_HW_CONFIG := ${BUILD_PLAT}/fdts/corstone700_${TARGET_PLATFORM}.dtb
  40. FDT_SOURCES += ${CORSTONE700_HW_CONFIG_DTS}
  41. $(eval CORSTONE700_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb,$(CORSTONE700_HW_CONFIG_DTS)))
  42. # Add the HW_CONFIG to FIP and specify the same to certtool
  43. $(eval $(call TOOL_ADD_PAYLOAD,${CORSTONE700_HW_CONFIG},--hw-config,${CORSTONE700_HW_CONFIG}))
  44. # Check for Linux kernel as a BL33 image by default
  45. $(eval $(call add_define,ARM_LINUX_KERNEL_AS_BL33))
  46. ifndef ARM_PRELOADED_DTB_BASE
  47. $(error "ARM_PRELOADED_DTB_BASE must be set if ARM_LINUX_KERNEL_AS_BL33 is used.")
  48. endif
  49. $(eval $(call add_define,ARM_PRELOADED_DTB_BASE))
  50. # Adding TARGET_PLATFORM as a GCC define (-D option)
  51. $(eval $(call add_define,TARGET_PLATFORM_$(call uppercase,${TARGET_PLATFORM})))
  52. include plat/arm/board/common/board_common.mk