diff mbox series

[RFC,v4,08/19] config/target: Implement per-binary TargetInfo structure (ARM, AARCH64)

Message ID 20250422145502.70770-9-philmd@linaro.org
State New
Headers show
Series single-binary: Make hw/arm/ common | expand

Commit Message

Philippe Mathieu-Daudé April 22, 2025, 2:54 p.m. UTC
Implement the TargetInfo structure for qemu-system-arm
and qemu-system-aarch64 binaries.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 MAINTAINERS                       |  1 +
 configs/targets/aarch64-softmmu.c | 22 ++++++++++++++++++++++
 configs/targets/arm-softmmu.c     | 22 ++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 configs/targets/aarch64-softmmu.c
 create mode 100644 configs/targets/arm-softmmu.c

Comments

Richard Henderson April 22, 2025, 5:42 p.m. UTC | #1
On 4/22/25 07:54, Philippe Mathieu-Daudé wrote:
> Implement the TargetInfo structure for qemu-system-arm
> and qemu-system-aarch64 binaries.
> 
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> Reviewed-by: Pierrick Bouvier<pierrick.bouvier@linaro.org>
> ---
>   MAINTAINERS                       |  1 +
>   configs/targets/aarch64-softmmu.c | 22 ++++++++++++++++++++++
>   configs/targets/arm-softmmu.c     | 22 ++++++++++++++++++++++
>   3 files changed, 45 insertions(+)
>   create mode 100644 configs/targets/aarch64-softmmu.c
>   create mode 100644 configs/targets/arm-softmmu.c

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index a055f67b5fc..4edd1ba696a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1919,6 +1919,7 @@  M: Philippe Mathieu-Daudé <philmd@linaro.org>
 S: Supported
 F: include/qemu/target-info*.h
 F: target-info*.c
+F: configs/targets/*.c
 
 Xtensa Machines
 ---------------
diff --git a/configs/targets/aarch64-softmmu.c b/configs/targets/aarch64-softmmu.c
new file mode 100644
index 00000000000..375e6fa0b7b
--- /dev/null
+++ b/configs/targets/aarch64-softmmu.c
@@ -0,0 +1,22 @@ 
+/*
+ * QEMU binary/target API (qemu-system-aarch64)
+ *
+ *  Copyright (c) Linaro
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/target-info-impl.h"
+#include "hw/arm/machines-qom.h"
+#include "target/arm/cpu-qom.h"
+
+static const TargetInfo target_info_aarch64_system = {
+    .target_name = "aarch64",
+    .machine_typename = TYPE_TARGET_AARCH64_MACHINE,
+};
+
+const TargetInfo *target_info(void)
+{
+    return &target_info_aarch64_system;
+}
diff --git a/configs/targets/arm-softmmu.c b/configs/targets/arm-softmmu.c
new file mode 100644
index 00000000000..d4acdae64f3
--- /dev/null
+++ b/configs/targets/arm-softmmu.c
@@ -0,0 +1,22 @@ 
+/*
+ * QEMU binary/target API (qemu-system-arm)
+ *
+ *  Copyright (c) Linaro
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/target-info-impl.h"
+#include "hw/arm/machines-qom.h"
+#include "target/arm/cpu-qom.h"
+
+static const TargetInfo target_info_arm_system = {
+    .target_name = "arm",
+    .machine_typename = TYPE_TARGET_ARM_MACHINE,
+};
+
+const TargetInfo *target_info(void)
+{
+    return &target_info_arm_system;
+}