platform.mk 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #
  2. # Copyright (c) 2019-2023, Linaro Limited and Contributors. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. PLAT_QEMU_PATH := plat/qemu/qemu_sbsa
  7. PLAT_QEMU_COMMON_PATH := plat/qemu/common
  8. CRASH_REPORTING := 1
  9. # Disable the PSCI platform compatibility layer
  10. ENABLE_PLAT_COMPAT := 0
  11. SEPARATE_CODE_AND_RODATA := 1
  12. ENABLE_STACK_PROTECTOR := 0
  13. ifeq (${SPM_MM},1)
  14. NEED_BL32 := yes
  15. EL3_EXCEPTION_HANDLING := 1
  16. endif
  17. include plat/qemu/common/common.mk
  18. # Enable new version of image loading on QEMU platforms
  19. LOAD_IMAGE_V2 := 1
  20. ifeq ($(NEED_BL32),yes)
  21. $(eval $(call add_define,QEMU_LOAD_BL32))
  22. endif
  23. BL2_SOURCES += $(LIBFDT_SRCS)
  24. # Include GICv3 driver files
  25. include drivers/arm/gic/v3/gicv3.mk
  26. QEMU_GIC_SOURCES := ${GICV3_SOURCES} \
  27. plat/common/plat_gicv3.c
  28. BL31_SOURCES += ${PLAT_QEMU_PATH}/sbsa_gic.c \
  29. ${PLAT_QEMU_PATH}/sbsa_pm.c \
  30. ${PLAT_QEMU_PATH}/sbsa_sip_svc.c \
  31. ${PLAT_QEMU_PATH}/sbsa_topology.c
  32. BL31_SOURCES += ${FDT_WRAPPERS_SOURCES}
  33. ifeq (${SPM_MM},1)
  34. BL31_SOURCES += ${PLAT_QEMU_COMMON_PATH}/qemu_spm.c
  35. endif
  36. # Use known base for UEFI if not given from command line
  37. # By default BL33 is at FLASH1 base
  38. PRELOADED_BL33_BASE ?= 0x10000000
  39. # Qemu SBSA plafrom only support SEC_SRAM
  40. BL32_RAM_LOCATION_ID = SEC_SRAM_ID
  41. $(eval $(call add_define,BL32_RAM_LOCATION_ID))
  42. # Don't have the Linux kernel as a BL33 image by default
  43. ARM_LINUX_KERNEL_AS_BL33 := 0
  44. $(eval $(call assert_boolean,ARM_LINUX_KERNEL_AS_BL33))
  45. $(eval $(call add_define,ARM_LINUX_KERNEL_AS_BL33))
  46. ARM_PRELOADED_DTB_BASE := PLAT_QEMU_DT_BASE
  47. $(eval $(call add_define,ARM_PRELOADED_DTB_BASE))