Defines generic 32- and 64-bit riscv machine interfaces for machines to implement.
Signed-off-by: Anton Johansson <[email protected]> --- include/hw/riscv/machines-qom.h | 20 ++++++++++++++++++++ target-info-qom.c | 9 +++++++++ 2 files changed, 29 insertions(+) diff --git a/include/hw/riscv/machines-qom.h b/include/hw/riscv/machines-qom.h new file mode 100644 index 0000000000..6e2c542c87 --- /dev/null +++ b/include/hw/riscv/machines-qom.h @@ -0,0 +1,20 @@ +/* + * QOM type definitions for riscv32 / riscv64 machines + * + * Copyright (c) rev.ng Labs Srl. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef HW_RISCV_MACHINES_QOM_H +#define HW_RISCV_MACHINES_QOM_H + +#include "hw/boards.h" + +#define TYPE_TARGET_RISCV32_MACHINE \ + "target-info-riscv32-machine" + +#define TYPE_TARGET_RISCV64_MACHINE \ + "target-info-riscv64-machine" + +#endif diff --git a/target-info-qom.c b/target-info-qom.c index 7fd58d2481..aaaebd55c7 100644 --- a/target-info-qom.c +++ b/target-info-qom.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "qom/object.h" #include "hw/arm/machines-qom.h" +#include "hw/riscv/machines-qom.h" static const TypeInfo target_info_types[] = { { @@ -19,6 +20,14 @@ static const TypeInfo target_info_types[] = { .name = TYPE_TARGET_AARCH64_MACHINE, .parent = TYPE_INTERFACE, }, + { + .name = TYPE_TARGET_RISCV32_MACHINE, + .parent = TYPE_INTERFACE, + }, + { + .name = TYPE_TARGET_RISCV64_MACHINE, + .parent = TYPE_INTERFACE, + }, }; DEFINE_TYPES(target_info_types) -- 2.51.0
