Merge changes from topic "unify-qemu-machines" into integration

* changes:
  refactor(qemu): move options to start of file
  refactor(qemu): keep AArch64 cpu flags in one section
diff --git a/plat/qemu/common/common.mk b/plat/qemu/common/common.mk
index 9d5e647..fca512b 100644
--- a/plat/qemu/common/common.mk
+++ b/plat/qemu/common/common.mk
@@ -85,7 +85,6 @@
 	ENABLE_SVE_FOR_NS	:= 2
 	ENABLE_SME_FOR_NS	:= 2
 endif
-endif
 
 # QEMU will use the RNDR instruction for the stack protector canary.
 ENABLE_FEAT_RNG			:= 2
@@ -93,7 +92,6 @@
 # QEMU 7.2+ has support for FGT and Linux needs it enabled to boot on max
 ENABLE_FEAT_FGT			:= 2
 
-ifeq (${ARCH},aarch64)
 # Treating this as a memory-constrained port for now
 USE_COHERENT_MEM	:=	0
 
diff --git a/plat/qemu/qemu/platform.mk b/plat/qemu/qemu/platform.mk
index 05ab1f9..d941f81 100644
--- a/plat/qemu/qemu/platform.mk
+++ b/plat/qemu/qemu/platform.mk
@@ -7,6 +7,9 @@
 PLAT_QEMU_PATH		:=      plat/qemu/qemu
 PLAT_QEMU_COMMON_PATH	:=      plat/qemu/common
 
+SEPARATE_CODE_AND_RODATA := 1
+ENABLE_STACK_PROTECTOR	 := 0
+
 include plat/qemu/common/common.mk
 
 # Use the GICv2 driver on QEMU by default
@@ -200,9 +203,6 @@
 $(eval $(call TOOL_ADD_PAYLOAD,${QEMU_TOS_FW_CONFIG},--tos-fw-config,${QEMU_TOS_FW_CONFIG}))
 endif
 
-SEPARATE_CODE_AND_RODATA := 1
-ENABLE_STACK_PROTECTOR	 := 0
-
 BL32_RAM_LOCATION	:=	tdram
 ifeq (${BL32_RAM_LOCATION}, tsram)
   BL32_RAM_LOCATION_ID = SEC_SRAM_ID
diff --git a/plat/qemu/qemu_sbsa/platform.mk b/plat/qemu/qemu_sbsa/platform.mk
index b4d9138..4a8df46 100644
--- a/plat/qemu/qemu_sbsa/platform.mk
+++ b/plat/qemu/qemu_sbsa/platform.mk
@@ -7,6 +7,15 @@
 PLAT_QEMU_PATH		:=	plat/qemu/qemu_sbsa
 PLAT_QEMU_COMMON_PATH	:=	plat/qemu/common
 
+MULTI_CONSOLE_API	:= 1
+CRASH_REPORTING		:= 1
+
+# Disable the PSCI platform compatibility layer
+ENABLE_PLAT_COMPAT	:= 0
+
+SEPARATE_CODE_AND_RODATA := 1
+ENABLE_STACK_PROTECTOR	 := 0
+
 ifeq (${SPM_MM},1)
 NEED_BL32		:=	yes
 EL3_EXCEPTION_HANDLING	:=	1
@@ -15,9 +24,6 @@
 
 include plat/qemu/common/common.mk
 
-CRASH_REPORTING	:=	1
-
-
 # Enable new version of image loading on QEMU platforms
 LOAD_IMAGE_V2		:=	1
 
@@ -44,14 +50,6 @@
 	BL31_SOURCES		+=	${PLAT_QEMU_COMMON_PATH}/qemu_spm.c
 endif
 
-SEPARATE_CODE_AND_RODATA	:= 1
-ENABLE_STACK_PROTECTOR		:= 0
-
-MULTI_CONSOLE_API	:= 1
-
-# Disable the PSCI platform compatibility layer
-ENABLE_PLAT_COMPAT	:= 0
-
 # Use known base for UEFI if not given from command line
 # By default BL33 is at FLASH1 base
 PRELOADED_BL33_BASE	?= 0x10000000