* [RFC PATCH] tests/tcg: fix semihosting SYS_EXIT for aarch64 in boot.S
@ 2025-04-04 11:56 Alex Bennée
2025-04-04 14:29 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2025-04-04 11:56 UTC (permalink / raw)
To: qemu-devel; +Cc: Alex Bennée, Peter Maydell, open list:ARM TCG CPUs
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>
---
tests/tcg/aarch64/system/boot.S | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/tcg/aarch64/system/boot.S b/tests/tcg/aarch64/system/boot.S
index 8fbcba757e..81a60b9c43 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
+ bl _exit
/* never returns */
.section .rodata
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC PATCH] tests/tcg: fix semihosting SYS_EXIT for aarch64 in boot.S
2025-04-04 11:56 [RFC PATCH] tests/tcg: fix semihosting SYS_EXIT for aarch64 in boot.S Alex Bennée
@ 2025-04-04 14:29 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2025-04-04 14:29 UTC (permalink / raw)
To: qemu-devel
On 4/4/25 04:56, Alex Bennée wrote:
> 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>
> ---
> tests/tcg/aarch64/system/boot.S | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tests/tcg/aarch64/system/boot.S b/tests/tcg/aarch64/system/boot.S
> index 8fbcba757e..81a60b9c43 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
> + bl _exit
1 would be EXIT_FAILURE. Otherwise,
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-04 14:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-04 11:56 [RFC PATCH] tests/tcg: fix semihosting SYS_EXIT for aarch64 in boot.S Alex Bennée
2025-04-04 14:29 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).