ci(cm): add test configs to report max ctx memory usage

This patch adds two test configs that enable reporting
context memory usage.
It ensures all the context entries related feature flags are
enabled and reports the maximum memory consumption.

It has two variants:
* One works without SPMC at S-EL2 (no EL2 context)
* One works with SPMC at S-EL2 (EL2 context).

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: I2735012330672ef8ca1f2c6869eb02948f99a2aa
diff --git a/group/spm-l2-boot-tests/fvp-default,fvp-spm-report-ctx-mem-use,fvp-template:fvp-spm-debug b/group/spm-l2-boot-tests/fvp-default,fvp-spm-report-ctx-mem-use,fvp-template:fvp-spm-debug
deleted file mode 100644
index c473896..0000000
--- a/group/spm-l2-boot-tests/fvp-default,fvp-spm-report-ctx-mem-use,fvp-template:fvp-spm-debug
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# Copyright (c) 2023, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-
diff --git a/group/spm-l2-boot-tests/fvp-default,fvp-spm-report-max-ctx-mem-use,fvp-template:fvp-spm-debug b/group/spm-l2-boot-tests/fvp-default,fvp-spm-report-max-ctx-mem-use,fvp-template:fvp-spm-debug
new file mode 100644
index 0000000..e337bb0
--- /dev/null
+++ b/group/spm-l2-boot-tests/fvp-default,fvp-spm-report-max-ctx-mem-use,fvp-template:fvp-spm-debug
@@ -0,0 +1,5 @@
+#
+# Copyright (c) 2024, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
diff --git a/group/tf-l2-boot-tests-misc/fvp-report-ctx-mem-use,fvp-template:fvp-tftf-fip.tftf-aemv8a-debug b/group/tf-l2-boot-tests-misc/fvp-report-ctx-mem-use,fvp-template:fvp-tftf-fip.tftf-aemv8a-debug
deleted file mode 100644
index c473896..0000000
--- a/group/tf-l2-boot-tests-misc/fvp-report-ctx-mem-use,fvp-template:fvp-tftf-fip.tftf-aemv8a-debug
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# Copyright (c) 2023, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-
diff --git a/group/tf-l2-boot-tests-misc/fvp-report-max-ctx-mem-use,fvp-template:fvp-tftf-fip.tftf-aemv8a.ctx_memuse-debug b/group/tf-l2-boot-tests-misc/fvp-report-max-ctx-mem-use,fvp-template:fvp-tftf-fip.tftf-aemv8a.ctx_memuse-debug
new file mode 100644
index 0000000..19363ec
--- /dev/null
+++ b/group/tf-l2-boot-tests-misc/fvp-report-max-ctx-mem-use,fvp-template:fvp-tftf-fip.tftf-aemv8a.ctx_memuse-debug
@@ -0,0 +1,5 @@
+#
+# Copyright (c) 2024 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
diff --git a/run_config/fvp-aemv8a.ctx_memuse b/run_config/fvp-aemv8a.ctx_memuse
new file mode 100644
index 0000000..799199a
--- /dev/null
+++ b/run_config/fvp-aemv8a.ctx_memuse
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2024, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+generate_lava_job() {
+	local model="base-aemv8a"
+
+	model="$model" \
+		arch_version="8.7" \
+		memory_tagging_support_level="3" \
+		gen_model_params
+
+	model="$model" gen_fvp_yaml
+}
diff --git a/tf_config/fvp-report-ctx-mem-use b/tf_config/fvp-report-ctx-mem-use
deleted file mode 100644
index 2035e25..0000000
--- a/tf_config/fvp-report-ctx-mem-use
+++ /dev/null
@@ -1,3 +0,0 @@
-CROSS_COMPILE=aarch64-none-elf-
-PLAT=fvp
-PLATFORM_REPORT_CTX_MEM_USE=1
diff --git a/tf_config/fvp-report-max-ctx-mem-use b/tf_config/fvp-report-max-ctx-mem-use
new file mode 100644
index 0000000..84aa87c
--- /dev/null
+++ b/tf_config/fvp-report-max-ctx-mem-use
@@ -0,0 +1,11 @@
+CROSS_COMPILE=aarch64-none-elf-
+CTX_INCLUDE_AARCH32_REGS=0
+CTX_INCLUDE_PAUTH_REGS=1
+CTX_INCLUDE_MPAM_REGS=1
+ENABLE_FEAT_RAS=1
+ENABLE_FEAT_MTE2=1
+ERRATA_SPECULATIVE_AT=1
+PLAT=fvp
+PLATFORM_REPORT_CTX_MEM_USE=1
+NS_TIMER_SWITCH=1
+SPD=tspd
diff --git a/tf_config/fvp-spm-report-ctx-mem-use b/tf_config/fvp-spm-report-max-ctx-mem-use
similarity index 77%
rename from tf_config/fvp-spm-report-ctx-mem-use
rename to tf_config/fvp-spm-report-max-ctx-mem-use
index 5293356..315d4f8 100644
--- a/tf_config/fvp-spm-report-ctx-mem-use
+++ b/tf_config/fvp-spm-report-max-ctx-mem-use
@@ -1,14 +1,18 @@
-CROSS_COMPILE=aarch64-none-elf-
-PLAT=fvp
-SPD=spmd
-SPMD_SPM_AT_SEL2=1
-CTX_INCLUDE_EL2_REGS=1
 ARM_ARCH_MAJOR=8
 ARM_ARCH_MINOR=5
+BRANCH_PROTECTION=1
+CROSS_COMPILE=aarch64-none-elf-
+CTX_INCLUDE_AARCH32_REGS=0
+CTX_INCLUDE_EL2_REGS=1
+CTX_INCLUDE_MPAM_REGS=1
 CTX_INCLUDE_PAUTH_REGS=1
 ENABLE_FEAT_MTE2=1
-BRANCH_PROTECTION=1
-SP_LAYOUT_FILE=${tftf_root}/build/fvp/${bin_mode}/sp_layout.json
-PLATFORM_REPORT_CTX_MEM_USE=1
+ENABLE_FEAT_RAS=1
+ERRATA_SPECULATIVE_AT=1
 GIC_EXT_INTID=1
+PLAT=fvp
 PLAT_TEST_SPM=1
+PLATFORM_REPORT_CTX_MEM_USE=1
+SPD=spmd
+SPMD_SPM_AT_SEL2=1
+SP_LAYOUT_FILE=${tftf_root}/build/fvp/${bin_mode}/sp_layout.json