From 4d4821569d15c3411a6fe5dcfc791d6b28c6d6a9 Mon Sep 17 00:00:00 2001 From: Daniel Boulby Date: Fri, 22 Oct 2021 11:37:34 +0100 Subject: test(el3-runtime): dit is retained on world switch Add tsp service to check the value of the PSTATE DIT bit is as expected and toggle it's value. This is used to ensure that the DIT bit is maintained during a switch from the Normal to Secure worlds and back. Change-Id: I4e8bdfa6530e5e75925c0079d4fa2795133c5105 Signed-off-by: Daniel Boulby --- services/spd/tspd/tspd_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'services/spd') diff --git a/services/spd/tspd/tspd_main.c b/services/spd/tspd/tspd_main.c index 29fc238ae..6cb4992a2 100644 --- a/services/spd/tspd/tspd_main.c +++ b/services/spd/tspd/tspd_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2021, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2022, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -570,6 +570,11 @@ static uintptr_t tspd_smc_handler(uint32_t smc_fid, case TSP_YIELD_FID(TSP_SUB): case TSP_YIELD_FID(TSP_MUL): case TSP_YIELD_FID(TSP_DIV): + /* + * Request from non-secure client to perform a check + * of the DIT PSTATE bit. + */ + case TSP_YIELD_FID(TSP_CHECK_DIT): if (ns) { /* * This is a fresh request from the non-secure client. -- cgit v1.2.3