From d0b4cfa62937ce59bd88de5928ada687329be194 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 12 Mar 2025 17:16:05 -0700 Subject: semihosting: Move user-only implementation out-of-line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid testing CONFIG_USER_ONLY in semihost.h. The only function that's required is semihosting_enabled. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- semihosting/user.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 semihosting/user.c (limited to 'semihosting/user.c') 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; +} -- cgit 1.4.1