summary refs log tree commit diff stats
path: root/semihosting/user.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-03-12 17:16:05 -0700
committerRichard Henderson <richard.henderson@linaro.org>2025-04-23 14:08:32 -0700
commitd0b4cfa62937ce59bd88de5928ada687329be194 (patch)
tree040a995ef039dc4e5c4247e5e31f6141abdd20c1 /semihosting/user.c
parent690793e005e004f749aa963ea0040f18e067c98e (diff)
downloadfocaccia-qemu-d0b4cfa62937ce59bd88de5928ada687329be194.tar.gz
focaccia-qemu-d0b4cfa62937ce59bd88de5928ada687329be194.zip
semihosting: Move user-only implementation out-of-line
Avoid testing CONFIG_USER_ONLY in semihost.h.
The only function that's required is semihosting_enabled.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'semihosting/user.c')
-rw-r--r--semihosting/user.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/semihosting/user.c b/semihosting/user.c
new file mode 100644
index 0000000000..515de3d2c0
--- /dev/null
+++ b/semihosting/user.c
@@ -0,0 +1,20 @@
+/*
+ * Semihosting for user emulation
+ *
+ * Copyright (c) 2019 Linaro Ltd
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "semihosting/semihost.h"
+
+bool semihosting_enabled(bool is_user)
+{
+    return true;
+}
+
+SemihostingTarget semihosting_get_target(void)
+{
+    return SEMIHOSTING_TARGET_AUTO;
+}