refactor(smc_fuzz): performance enhancement

Add the ability to return integer rather than string from fuzzer
function. This will improve performance especially for larger fuzz
based testing. This will work in tandem with the changes to the CI where
the script flows provide additional support for the change. Modifications
to the device tree files have been made to prevent name clashes with
the function names.

Change-Id: I95aaf23c95943f944d5837e2a8440514aafd6dde
Signed-off-by: mardyk01 <mark.dykes@arm.com>
diff --git a/smc_fuzz/src/sdei_fuzz_helper.c b/smc_fuzz/src/sdei_fuzz_helper.c
index cb634dc..1d22335 100644
--- a/smc_fuzz/src/sdei_fuzz_helper.c
+++ b/smc_fuzz/src/sdei_fuzz_helper.c
@@ -1,11 +1,15 @@
 /*
- * Copyright (c) 2023, Arm Limited. All rights reserved.
+ * Copyright (c) 2023-2024, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
 
+#include <fuzz_names.h>
 #include <sdei_fuzz_helper.h>
 
+/*
+ * SDEI function that has no arguments
+ */
 void tftf_test_sdei_noarg(int64_t (*sdei_func)(void), char *funcstr)
 {
 		int64_t ret = (*sdei_func)();
@@ -15,6 +19,9 @@
 		}
 }
 
+/*
+ * SDEI function that has single argument
+ */
 void tftf_test_sdei_singlearg(int64_t (*sdei_func)(uint64_t), char *funcstr)
 {
 		int64_t ret = (*sdei_func)(0);
@@ -24,28 +31,30 @@
 		}
 }
 
-
-void run_sdei_fuzz(char *funcstr)
+/*
+ * SDEI function called from fuzzer
+ */
+void run_sdei_fuzz(int funcid)
 {
-	if (strcmp(funcstr, "sdei_version") == CMP_SUCCESS) {
+	if (funcid == sdei_version_funcid) {
 		long long ret = sdei_version();
 
 		if (ret != MAKE_SDEI_VERSION(1, 0, 0)) {
 			tftf_testcase_printf("Unexpected SDEI version: 0x%llx\n",
 					     ret);
 		}
-	} else if (strcmp(funcstr, "sdei_pe_unmask") == CMP_SUCCESS) {
-		tftf_test_sdei_noarg(sdei_pe_unmask, "sdei_pe_unmask");
-	} else if (strcmp(funcstr, "sdei_pe_mask") == CMP_SUCCESS) {
+	} else if (funcid == sdei_pe_unmask_funcid) {
+		tftf_test_sdei_noarg(sdei_pe_unmask, "sdei_pe_unmuask");
+	} else if (funcid == sdei_pe_mask_funcid) {
 		tftf_test_sdei_noarg(sdei_pe_mask, "sdei_pe_mask");
-	} else if (strcmp(funcstr, "sdei_event_status") == CMP_SUCCESS) {
+	} else if (funcid == sdei_event_status_funcid) {
 		tftf_test_sdei_singlearg((int64_t (*)(uint64_t))sdei_event_status,
 		"sdei_event_status");
-	} else if (strcmp(funcstr, "sdei_event_signal") == CMP_SUCCESS) {
+	} else if (funcid == sdei_event_signal_funcid) {
 		tftf_test_sdei_singlearg(sdei_event_signal, "sdei_event_signal");
-	} else if (strcmp(funcstr, "sdei_private_reset") == CMP_SUCCESS) {
+	} else if (funcid == sdei_private_reset_funcid) {
 		tftf_test_sdei_noarg(sdei_private_reset, "sdei_private_reset");
-	} else if (strcmp(funcstr, "sdei_shared_reset") == CMP_SUCCESS) {
+	} else if (funcid == sdei_shared_reset_funcid) {
 		tftf_test_sdei_noarg(sdei_shared_reset, "sdei_shared_reset");
 	}
 }