Merge tag 'for-upstream-rust' of https://gitlab.com/bonzini/qemu into staging
[qemu/kevin.git] / include / hw / riscv / spike.h
blob0c2a223763053b96928592d20e875f31b7bdb911
1 /*
2 * Spike machine interface
4 * Copyright (c) 2017 SiFive, Inc.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2 or later, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
15 * You should have received a copy of the GNU General Public License along with
16 * this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef HW_RISCV_SPIKE_H
20 #define HW_RISCV_SPIKE_H
22 #include "hw/boards.h"
23 #include "hw/riscv/riscv_hart.h"
24 #include "hw/sysbus.h"
26 #define SPIKE_CPUS_MAX 8
27 #define SPIKE_SOCKETS_MAX 8
29 #define TYPE_SPIKE_MACHINE MACHINE_TYPE_NAME("spike")
30 typedef struct SpikeState SpikeState;
31 DECLARE_INSTANCE_CHECKER(SpikeState, SPIKE_MACHINE,
32 TYPE_SPIKE_MACHINE)
34 struct SpikeState {
35 /*< private >*/
36 MachineState parent;
38 /*< public >*/
39 RISCVHartArrayState soc[SPIKE_SOCKETS_MAX];
42 enum {
43 SPIKE_MROM,
44 SPIKE_HTIF,
45 SPIKE_CLINT,
46 SPIKE_DRAM
49 #endif