diff mbox series

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

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

Commit Message

Philippe Mathieu-Daudé April 18, 2025, 5:29 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>
---
 configs/targets/aarch64-softmmu.c | 22 ++++++++++++++++++++++
 configs/targets/arm-softmmu.c     | 22 ++++++++++++++++++++++
 2 files changed, 44 insertions(+)
 create mode 100644 configs/targets/aarch64-softmmu.c
 create mode 100644 configs/targets/arm-softmmu.c

Comments

Pierrick Bouvier April 19, 2025, 1 a.m. UTC | #1
On 4/18/25 10:29, 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>
> ---
>   configs/targets/aarch64-softmmu.c | 22 ++++++++++++++++++++++
>   configs/targets/arm-softmmu.c     | 22 ++++++++++++++++++++++
>   2 files changed, 44 insertions(+)
>   create mode 100644 configs/targets/aarch64-softmmu.c
>   create mode 100644 configs/targets/arm-softmmu.c
> 
> diff --git a/configs/targets/aarch64-softmmu.c b/configs/targets/aarch64-softmmu.c
> new file mode 100644
> index 00000000000..03f48bad326
> --- /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..07285f7f3b3
> --- /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;
> +}

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
diff mbox series

Patch

diff --git a/configs/targets/aarch64-softmmu.c b/configs/targets/aarch64-softmmu.c
new file mode 100644
index 00000000000..03f48bad326
--- /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..07285f7f3b3
--- /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;
+}