summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2025-04-04 12:51:12 +0100
committerAlex Bennée <alex.bennee@linaro.org>2025-04-09 10:35:16 +0100
commit9edb9c2a6a0ceec9ca41705ba4990041bee1d690 (patch)
treef7f97f1d1d1b38842269e77db069132bd07de448
parentc302660920acf48425a1317d56122ea8af60fbc4 (diff)
downloadfocaccia-qemu-9edb9c2a6a0ceec9ca41705ba4990041bee1d690.tar.gz
focaccia-qemu-9edb9c2a6a0ceec9ca41705ba4990041bee1d690.zip
tests/tcg: fix semihosting SYS_EXIT for aarch64 in boot.S
We don't expect to hit exceptions in our testing so currently all the
vectors report an un-expected exception and then attempt to exit.
However for aarch64 we should always use the extended information
block as we do in _exit. Rather than duplicate the code on the error
handler just branch to the _exit handler with a failing status code.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250404115641.258048-1-alex.bennee@linaro.org>
-rw-r--r--tests/tcg/aarch64/system/boot.S5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/tcg/aarch64/system/boot.S b/tests/tcg/aarch64/system/boot.S
index 4eb1b35b88..a5df9c173d 100644
--- a/tests/tcg/aarch64/system/boot.S
+++ b/tests/tcg/aarch64/system/boot.S
@@ -73,9 +73,8 @@ lower_a32_serror:
 	mov	x0, SYS_WRITE0
 	adr	x1, .error
 	semihosting_call
-	mov	x0, SYS_EXIT
-	mov	x1, 1
-	semihosting_call
+	mov	x0, 1 /* EXIT_FAILURE */
+	bl 	_exit
 	/* never returns */
 
 	.section .rodata