Define the TYPE_TARGET_ARM_MACHINE and TYPE_TARGET_AARCH64_MACHINE QOM interface names to allow machines to implement them.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> --- meson.build | 1 + include/hw/boards.h | 1 + include/qemu/target_info-qom.h | 18 ++++++++++++++++++ target_info-qom.c | 24 ++++++++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 include/qemu/target_info-qom.h create mode 100644 target_info-qom.c diff --git a/meson.build b/meson.build index 49a050a28a3..168b07b5887 100644 --- a/meson.build +++ b/meson.build @@ -3808,6 +3808,7 @@ common_ss.add(pagevary) specific_ss.add(files('page-target.c', 'page-vary-target.c')) common_ss.add(files('target_info.c')) +system_ss.add(files('target_info-qom.c')) specific_ss.add(files('target_info-stub.c')) subdir('backends') diff --git a/include/hw/boards.h b/include/hw/boards.h index 02f43ac5d4d..b1bbf3c34d4 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -7,6 +7,7 @@ #include "system/hostmem.h" #include "system/blockdev.h" #include "qapi/qapi-types-machine.h" +#include "qemu/target_info-qom.h" #include "qemu/module.h" #include "qom/object.h" #include "hw/core/cpu.h" diff --git a/include/qemu/target_info-qom.h b/include/qemu/target_info-qom.h new file mode 100644 index 00000000000..7eb9b6bd254 --- /dev/null +++ b/include/qemu/target_info-qom.h @@ -0,0 +1,18 @@ +/* + * QEMU binary/target API (QOM types) + * + * Copyright (c) Linaro + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef QEMU_TARGET_INFO_QOM_H +#define QEMU_TARGET_INFO_QOM_H + +#define TYPE_TARGET_ARM_MACHINE \ + "target-info-arm-machine" + +#define TYPE_TARGET_AARCH64_MACHINE \ + "target-info-aarch64-machine" + +#endif diff --git a/target_info-qom.c b/target_info-qom.c new file mode 100644 index 00000000000..d3fee57361b --- /dev/null +++ b/target_info-qom.c @@ -0,0 +1,24 @@ +/* + * QEMU binary/target API (QOM types) + * + * Copyright (c) Linaro + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qemu/target_info-qom.h" +#include "qom/object.h" + +static const TypeInfo target_info_types[] = { + { + .name = TYPE_TARGET_ARM_MACHINE, + .parent = TYPE_INTERFACE, + }, + { + .name = TYPE_TARGET_AARCH64_MACHINE, + .parent = TYPE_INTERFACE, + }, +}; + +DEFINE_TYPES(target_info_types) -- 2.47.1