blob: 411949c12c7ab0425495563b1bb7c75074b37512 [file] [log] [blame]
mardyk0182389fb2023-09-25 16:34:56 -05001/*
mardyk017b51dbe2024-01-17 15:25:36 -06002 * Copyright (c) 2024, Arm Limited. All rights reserved.
mardyk0182389fb2023-09-25 16:34:56 -05003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
mardyk01f5b46352023-10-24 16:23:23 -05007#include <sdei_fuzz_helper.h>
Mark Dykes50297972024-03-15 12:49:22 -05008#include "smcmalloc.h"
mardyk01f5b46352023-10-24 16:23:23 -05009#include <tsp_fuzz_helper.h>
mardyk0182389fb2023-09-25 16:34:56 -050010
Alex Liang0fa7d212024-06-18 11:17:01 -050011int cntid = 0;
12
Alex Liang1d40d722024-07-23 16:42:16 -050013#include <vendor_fuzz_helper.h>
14
mardyk0182389fb2023-09-25 16:34:56 -050015/*
16 * Invoke the SMC call based on the function name specified.
17 */
Mark Dykes50297972024-03-15 12:49:22 -050018void runtestfunction(int funcid, struct memmod *mmod)
mardyk0182389fb2023-09-25 16:34:56 -050019{
Alex Liang0fa7d212024-06-18 11:17:01 -050020 bool inrange = (cntid >= SMC_FUZZ_CALL_START) && (cntid < SMC_FUZZ_CALL_END);
21 inrange = inrange && (funcid != EXCLUDE_FUNCID);
22
23 run_sdei_fuzz(funcid, mmod, inrange, cntid);
mardyk017b51dbe2024-01-17 15:25:36 -060024 run_tsp_fuzz(funcid);
Alex Liang1d40d722024-07-23 16:42:16 -050025 run_ven_el3_fuzz(funcid, mmod);
Alex Liang0fa7d212024-06-18 11:17:01 -050026
27 cntid++;
mardyk0182389fb2023-09-25 16:34:56 -050028}