aboutsummaryrefslogtreecommitdiff
path: root/include/hw/riscv/spike.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/riscv/spike.h')
-rw-r--r--include/hw/riscv/spike.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/hw/riscv/spike.h b/include/hw/riscv/spike.h
index b0a18a9c94..cddeca2e77 100644
--- a/include/hw/riscv/spike.h
+++ b/include/hw/riscv/spike.h
@@ -21,15 +21,17 @@
#include "hw/riscv/riscv_hart.h"
#include "hw/sysbus.h"
+#include "qom/object.h"
#define SPIKE_CPUS_MAX 8
#define SPIKE_SOCKETS_MAX 8
#define TYPE_SPIKE_MACHINE MACHINE_TYPE_NAME("spike")
-#define SPIKE_MACHINE(obj) \
- OBJECT_CHECK(SpikeState, (obj), TYPE_SPIKE_MACHINE)
+typedef struct SpikeState SpikeState;
+DECLARE_INSTANCE_CHECKER(SpikeState, SPIKE_MACHINE,
+ TYPE_SPIKE_MACHINE)
-typedef struct {
+struct SpikeState {
/*< private >*/
MachineState parent;
@@ -37,7 +39,7 @@ typedef struct {
RISCVHartArrayState soc[SPIKE_SOCKETS_MAX];
void *fdt;
int fdt_size;
-} SpikeState;
+};
enum {
SPIKE_MROM,