feat: remove patch application during RAS related tests

Currently RAS Firmware First Handling(FFH) related tests has some
patches which were applied through CI scripts.

Remove these patch application as these patches are now be part of
tf-a code under PLATFORM_TEST_RAS_FFH macro.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I5f4ea9debb93a32ec6f9bec8040b67c7ad291421
diff --git a/group/tf-l3-boot-tests-ras/fvp-ras-ffh,fvp-single-fault:fvp-tftf-fip.tftf-ras_ffh.patch-aemv8a.fi-debug b/group/tf-l3-boot-tests-ras/fvp-ras-ffh,fvp-single-fault:fvp-tftf-fip.tftf-aemv8a.fi-debug
similarity index 100%
rename from group/tf-l3-boot-tests-ras/fvp-ras-ffh,fvp-single-fault:fvp-tftf-fip.tftf-ras_ffh.patch-aemv8a.fi-debug
rename to group/tf-l3-boot-tests-ras/fvp-ras-ffh,fvp-single-fault:fvp-tftf-fip.tftf-aemv8a.fi-debug
diff --git a/group/tf-l3-boot-tests-ras/fvp-ras-ffh,fvp-uncontainable:fvp-tftf.fault-fip.tftf-ras_ffh.patch-aemv8a.fi-debug b/group/tf-l3-boot-tests-ras/fvp-ras-ffh,fvp-uncontainable:fvp-tftf.fault-fip.tftf-aemv8a.fi-debug
similarity index 100%
rename from group/tf-l3-boot-tests-ras/fvp-ras-ffh,fvp-uncontainable:fvp-tftf.fault-fip.tftf-ras_ffh.patch-aemv8a.fi-debug
rename to group/tf-l3-boot-tests-ras/fvp-ras-ffh,fvp-uncontainable:fvp-tftf.fault-fip.tftf-aemv8a.fi-debug
diff --git a/patch/fault_inject/explicit-events.patch b/patch/fault_inject/explicit-events.patch
deleted file mode 100644
index 80acc20..0000000
--- a/patch/fault_inject/explicit-events.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/plat/arm/common/aarch64/arm_sdei.c
-+++ b/plat/arm/common/aarch64/arm_sdei.c
-@@ -48,7 +48,12 @@ void plat_sdei_setup(void)
- #else
- /* Private event mappings */
- static sdei_ev_map_t arm_sdei_private[] = {
--	PLAT_ARM_PRIVATE_SDEI_EVENTS
-+	PLAT_ARM_PRIVATE_SDEI_EVENTS,
-+	SDEI_EXPLICIT_EVENT(5000, SDEI_MAPF_NORMAL),
-+	SDEI_EXPLICIT_EVENT(5001, SDEI_MAPF_NORMAL),
-+	SDEI_EXPLICIT_EVENT(5002, SDEI_MAPF_NORMAL),
-+	SDEI_EXPLICIT_EVENT(5003, SDEI_MAPF_CRITICAL),
-+	SDEI_EXPLICIT_EVENT(5004, SDEI_MAPF_CRITICAL),
- };
- 
- /* Shared event mappings */
diff --git a/patch/fault_inject/fvp-fault-handlers.patch b/patch/fault_inject/fvp-fault-handlers.patch
deleted file mode 100644
index 215a047..0000000
--- a/patch/fault_inject/fvp-fault-handlers.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-diff --git a/plat/arm/board/fvp/aarch64/fvp_fault.S b/plat/arm/board/fvp/aarch64/fvp_fault.S
-new file mode 100644
-index 000000000..f6e6bee1e
---- /dev/null
-+++ b/plat/arm/board/fvp/aarch64/fvp_fault.S
-@@ -0,0 +1,42 @@
-+
-+#include <asm_macros.S>
-+
-+	.globl	plat_handle_uncontainable_ea
-+
-+str_uncontainable:
-+	.byte	10 /* Log marker */
-+	.asciz "Injected Uncontainable Error\n"
-+
-+str_double_fault:
-+	.byte	10 /* Log marker */
-+	.asciz "Injected Double Fault\n"
-+
-+	/* -----------------------------------------------------
-+	 * Platform handler for Uncontainable External Abort.
-+	 *
-+	 * x0: EA reason
-+	 * x1: EA syndrome
-+	 * -----------------------------------------------------
-+	 */
-+func plat_handle_uncontainable_ea
-+	adr	x0, str_uncontainable
-+	bl	tf_log
-+1:
-+	wfe
-+	b	1b
-+endfunc plat_handle_uncontainable_ea
-+
-+	/* -----------------------------------------------------
-+	 * Platform handler for Double Fault.
-+	 *
-+	 * x0: EA reason
-+	 * x1: EA syndrome
-+	 * -----------------------------------------------------
-+	 */
-+func plat_handle_double_fault
-+	adr	x0, str_double_fault
-+	bl	tf_log
-+1:
-+	wfe
-+	b	1b
-+endfunc plat_handle_double_fault
-diff --git a/plat/arm/board/fvp/platform.mk b/plat/arm/board/fvp/platform.mk
-index 0d2c31971..3f90c7ef0 100644
---- a/plat/arm/board/fvp/platform.mk
-+++ b/plat/arm/board/fvp/platform.mk
-@@ -6,6 +6,8 @@
-
- include common/fdt_wrappers.mk
- 
-+BL31_SOURCES		+=	plat/arm/board/fvp/aarch64/fvp_fault.S
-+
- # Use the GICv3 driver on the FVP by default
- FVP_USE_GIC_DRIVER	:= FVP_GICV3
- 
diff --git a/patch/fault_inject/injected-fault-record-and-handler.patch b/patch/fault_inject/injected-fault-record-and-handler.patch
deleted file mode 100644
index 1cbf9b7..0000000
--- a/patch/fault_inject/injected-fault-record-and-handler.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- a/plat/arm/board/fvp/aarch64/fvp_ras.c
-+++ b/plat/arm/board/fvp/aarch64/fvp_ras.c
-@@ -4,12 +4,50 @@
-  * SPDX-License-Identifier: BSD-3-Clause
-  */
- 
-+#include <inttypes.h>
-+#include <stdint.h>
-+
- #include <lib/extensions/ras.h>
-+#include <services/sdei.h>
-+
-+static int injected_fault_handler(const struct err_record_info *info,
-+		int probe_data, const struct err_handler_data *const data)
-+{
-+	uint64_t status;
-+	int ret __unused;
-+
-+	/*
-+	 * The faulting error record is already selected by the SER probe
-+	 * function.
-+	 */
-+	status = read_erxstatus_el1();
-+
-+	ERROR("Fault reported by system error record %d on 0x%lx: status=0x%" PRIx64 "\n",
-+			probe_data, read_mpidr_el1(), status);
-+	ERROR(" exception reason=%u syndrome=0x%" PRIx64 "\n", data->ea_reason,
-+			data->flags);
-+
-+	/* Clear error */
-+	write_erxstatus_el1(status);
-+
-+	ret = sdei_dispatch_event(5000);
-+	if (ret < 0) {
-+		ERROR("Can't dispatch event to SDEI\n");
-+		panic();
-+	} else {
-+		INFO("SDEI event dispatched\n");
-+	}
-+
-+	return 0;
-+}
- 
- struct ras_interrupt fvp_ras_interrupts[] = {
- };
- 
- struct err_record_info fvp_err_records[] = {
-+	/* Record for injected fault */
-+	ERR_RECORD_SYSREG_V1(0, 2, ras_err_ser_probe_sysreg,
-+			injected_fault_handler, NULL),
- };
- 
- REGISTER_ERR_RECORD_INFO(fvp_err_records);
diff --git a/run_config/fvp-ras_ffh.patch b/run_config/fvp-ras_ffh.patch
deleted file mode 100644
index 246598e..0000000
--- a/run_config/fvp-ras_ffh.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) 2023, Arm Limited. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-3-Clause
-#
-
-pre_tf_build() {
-	# Apply fault injection patches
-	apply_tf_patch "fault_inject/injected-fault-record-and-handler.patch"
-	apply_tf_patch "fault_inject/explicit-events.patch"
-	apply_tf_patch "fault_inject/fvp-fault-handlers.patch"
-}
diff --git a/script/tf-coverity/tf-cov-make b/script/tf-coverity/tf-cov-make
index a3f790e..e6d739e 100755
--- a/script/tf-coverity/tf-cov-make
+++ b/script/tf-coverity/tf-cov-make
@@ -148,7 +148,7 @@
 # RAS Extension Support
 clean_build $fvp_common_flags EL3_EXCEPTION_HANDLING=1 \
     FAULT_INJECTION_SUPPORT=1 HANDLE_EA_EL3_FIRST_NS=1 RAS_EXTENSION=1 \
-    SDEI_SUPPORT=1
+    SDEI_SUPPORT=1 PLATFORM_TEST_RAS_FFH=1
 
 # EA handled in EL3 first
 clean_build $fvp_common_flags HANDLE_EA_EL3_FIRST_NS=1 PLATFORM_TEST_EA_FFH=1
diff --git a/tf_config/fvp-ras-ffh b/tf_config/fvp-ras-ffh
index b22ac2a..4c2063b 100644
--- a/tf_config/fvp-ras-ffh
+++ b/tf_config/fvp-ras-ffh
@@ -3,5 +3,6 @@
 FAULT_INJECTION_SUPPORT=1
 HANDLE_EA_EL3_FIRST_NS=1
 PLAT=fvp
+PLATFORM_TEST_RAS_FFH=1
 RAS_EXTENSION=1
 SDEI_SUPPORT=1