]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
feat(qemu): add A76/N1 cpu support for virt
authorChen Baozi <chenbaozi@phytium.com.cn>
Sun, 12 Mar 2023 15:19:28 +0000 (23:19 +0800)
committerChen Baozi <chenbaozi@phytium.com.cn>
Thu, 16 Mar 2023 01:17:24 +0000 (03:17 +0200)
Add support to "cortex-a76" and "neoverse-n1" cpu for "qemu" ('virt')
platform.

Signed-off-by: Chen Baozi <chenbaozi@phytium.com.cn>
Change-Id: I77a3e0bb8397a2fb45a2caa7d93ba38e39297f93

plat/qemu/qemu/platform.mk

index 4cbce9d04af93e7490909ee5e170c48c2f81c2e5..92b41ef77fd945b75d9b98923bdfdb84e61a8186 100644 (file)
@@ -18,6 +18,17 @@ $(eval $(call add_define,ARMV7_SUPPORTS_GENERIC_TIMER))
 $(eval $(call add_define,ARMV7_SUPPORTS_VFP))
 # Qemu expects a BL32 boot stage.
 NEED_BL32              :=      yes
+else
+CTX_INCLUDE_AARCH32_REGS := 0
+ifeq (${CTX_INCLUDE_AARCH32_REGS}, 1)
+$(error "This is an AArch64-only port; CTX_INCLUDE_AARCH32_REGS must be disabled")
+endif
+
+# Treating this as a memory-constrained port for now
+USE_COHERENT_MEM       :=      0
+
+# This can be overridden depending on CPU(s) used in the QEMU image
+HW_ASSISTED_COHERENCY  :=      1
 endif # ARMv7
 
 ifeq (${SPD},opteed)
@@ -46,6 +57,17 @@ PLAT_INCLUDES                :=      -Iinclude/plat/arm/common/              \
 
 ifeq (${ARM_ARCH_MAJOR},8)
 PLAT_INCLUDES          +=      -Iinclude/plat/arm/common/${ARCH}
+
+QEMU_CPU_LIBS          :=      lib/cpus/aarch64/aem_generic.S          \
+                               lib/cpus/aarch64/cortex_a53.S           \
+                               lib/cpus/aarch64/cortex_a57.S           \
+                               lib/cpus/aarch64/cortex_a72.S           \
+                               lib/cpus/aarch64/cortex_a76.S           \
+                               lib/cpus/aarch64/neoverse_n_common.S    \
+                               lib/cpus/aarch64/neoverse_n1.S          \
+                               lib/cpus/aarch64/qemu_max.S
+else
+QEMU_CPU_LIBS          :=      lib/cpus/${ARCH}/cortex_a15.S
 endif
 
 PLAT_BL_COMMON_SOURCES :=      ${PLAT_QEMU_COMMON_PATH}/qemu_common.c                  \
@@ -135,18 +157,8 @@ BL1_SOURCES                +=      drivers/io/io_semihosting.c             \
                                lib/semihosting/${ARCH}/semihosting_call.S \
                                ${PLAT_QEMU_COMMON_PATH}/qemu_io_storage.c              \
                                ${PLAT_QEMU_COMMON_PATH}/${ARCH}/plat_helpers.S \
-                               ${PLAT_QEMU_COMMON_PATH}/qemu_bl1_setup.c
-
-ifeq (${ARM_ARCH_MAJOR},8)
-BL1_SOURCES            +=      lib/cpus/aarch64/aem_generic.S          \
-                               lib/cpus/aarch64/cortex_a53.S           \
-                               lib/cpus/aarch64/cortex_a57.S           \
-                               lib/cpus/aarch64/cortex_a72.S           \
-                               lib/cpus/aarch64/qemu_max.S             \
-
-else
-BL1_SOURCES            +=      lib/cpus/${ARCH}/cortex_a15.S
-endif
+                               ${PLAT_QEMU_COMMON_PATH}/qemu_bl1_setup.c       \
+                               ${QEMU_CPU_LIBS}
 
 BL2_SOURCES            +=      drivers/io/io_semihosting.c             \
                                drivers/io/io_storage.c                 \
@@ -195,11 +207,7 @@ $(error "Incorrect GIC driver chosen for QEMU platform")
 endif
 
 ifeq (${ARM_ARCH_MAJOR},8)
-BL31_SOURCES           +=      lib/cpus/aarch64/aem_generic.S          \
-                               lib/cpus/aarch64/cortex_a53.S           \
-                               lib/cpus/aarch64/cortex_a57.S           \
-                               lib/cpus/aarch64/cortex_a72.S           \
-                               lib/cpus/aarch64/qemu_max.S             \
+BL31_SOURCES           +=      ${QEMU_CPU_LIBS}                        \
                                lib/semihosting/semihosting.c           \
                                lib/semihosting/${ARCH}/semihosting_call.S \
                                plat/common/plat_psci_common.c          \