[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 08/19] target/arm: Add semihosting stub to allow building with
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 08/19] target/arm: Add semihosting stub to allow building without TCG |
Date: |
Mon, 16 Mar 2020 17:06:23 +0100 |
Semihosting requires TCG. When configured with --disable-tcg, the
build fails because the 'do_arm_semihosting' is missing. Instead
of adding more few more #ifdeffery to the helper code, add a stub.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
target/arm/arm-semi-stub.c | 13 +++++++++++++
target/arm/Makefile.objs | 3 ++-
2 files changed, 15 insertions(+), 1 deletion(-)
create mode 100644 target/arm/arm-semi-stub.c
diff --git a/target/arm/arm-semi-stub.c b/target/arm/arm-semi-stub.c
new file mode 100644
index 0000000000..47d042f942
--- /dev/null
+++ b/target/arm/arm-semi-stub.c
@@ -0,0 +1,13 @@
+/*
+ * Arm "Angel" semihosting syscalls stubs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#include "qemu/osdep.h"
+#include "cpu.h"
+#include "hw/semihosting/semihost.h"
+
+target_ulong do_arm_semihosting(CPUARMState *env)
+{
+ abort();
+}
diff --git a/target/arm/Makefile.objs b/target/arm/Makefile.objs
index 0c6f8c248d..fa278bb4c1 100644
--- a/target/arm/Makefile.objs
+++ b/target/arm/Makefile.objs
@@ -57,7 +57,8 @@ target/arm/translate.o: target/arm/decode-t16.inc.c
ifeq ($(CONFIG_TCG),y)
-obj-y += arm-semi.o
+obj-$(CONFIG_SEMIHOSTING) += arm-semi.o
+obj-$(call lnot,$(CONFIG_SEMIHOSTING)) += arm-semi-stub.o
endif # CONFIG_TCG
--
2.21.1
- Re: [PATCH v3 01/19] target/arm: Rename KVM set_feature() as kvm_set_feature(), (continued)
- [PATCH v3 02/19] target/arm: Make set_feature() available for other files, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 03/19] target/arm: Restrict DC-CVAP instruction to TCG accel, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 04/19] target/arm: Restric the Address Translate operations to TCG accel, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 05/19] target/arm: Restrict Virtualization Host Extensions instructions to TCG, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 06/19] target/arm: Move Makefile variable restricted to CONFIG_TCG, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 08/19] target/arm: Add semihosting stub to allow building without TCG,
Philippe Mathieu-Daudé <=
- [PATCH v3 07/19] target/arm: Make cpu_register() available for other files, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 09/19] target/arm: Move ARM_V7M Kconfig from hw/ to target/, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 11/19] target/arm: Restrict ARMv5 cpus to TCG accel, Philippe Mathieu-Daudé, 2020/03/16
- [PATCH v3 10/19] target/arm: Restrict ARMv4 cpus to TCG accel, Philippe Mathieu-Daudé, 2020/03/16