Skip to content

Commit

Permalink
SMC0001: Remove test of clobbered registers
Browse files Browse the repository at this point in the history
ATF implementations don't clobber x2 and x3 registers in response to
ARM_STD_SVC_VERSION calls.

Signed-off-by: Kent McLeod <[email protected]>
  • Loading branch information
kent-mcleod committed Feb 20, 2024
1 parent f1fa98c commit eb1b944
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions apps/sel4test-tests/src/tests/smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ static int test_smc_calls(env_t env)
/* Set function and arguments */
smc_args.x0 = ARM_STD_SVC_VERSION;
smc_args.x1 = 0;
smc_args.x2 = 2;
smc_args.x3 = 3;
smc_args.x2 = 0;
smc_args.x3 = 0;
smc_args.x4 = 0;
smc_args.x5 = 0;
smc_args.x6 = 0;
Expand All @@ -56,10 +56,6 @@ static int test_smc_calls(env_t env)
seL4_Word version_sum = smc_results.x0 + smc_results.x1;
test_geq(version_sum, 1UL);

/* Check that the remaining result registers are clobbered */
test_eq(smc_results.x2, 0UL);
test_eq(smc_results.x3, 0UL);

/* This should fail - SMC call with a different function id from badge */
smc_args.x0 = UNASSIGNED_SMC;
error = seL4_ARM_SMC_Call(badged_smc_cap, &smc_args, &smc_results);
Expand Down

0 comments on commit eb1b944

Please sign in to comment.