target/arm/vfp_helper: Restrict the SoftFloat use to TCG
[qemu/ar7.git] / include / hw / riscv / sifive_clint.h
blobe2865be1d18b3a2f7bd5d2933f0c252e5010a22d
1 /*
2 * SiFive CLINT (Core Local Interruptor) interface
4 * Copyright (c) 2016-2017 Sagar Karandikar, sagark@eecs.berkeley.edu
5 * Copyright (c) 2017 SiFive, Inc.
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2 or later, as published by the Free Software Foundation.
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
16 * You should have received a copy of the GNU General Public License along with
17 * this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef HW_SIFIVE_CLINT_H
21 #define HW_SIFIVE_CLINT_H
23 #define TYPE_SIFIVE_CLINT "riscv.sifive.clint"
25 #define SIFIVE_CLINT(obj) \
26 OBJECT_CHECK(SiFiveCLINTState, (obj), TYPE_SIFIVE_CLINT)
28 typedef struct SiFiveCLINTState {
29 /*< private >*/
30 SysBusDevice parent_obj;
32 /*< public >*/
33 MemoryRegion mmio;
34 uint32_t num_harts;
35 uint32_t sip_base;
36 uint32_t timecmp_base;
37 uint32_t time_base;
38 uint32_t aperture_size;
39 } SiFiveCLINTState;
41 DeviceState *sifive_clint_create(hwaddr addr, hwaddr size, uint32_t num_harts,
42 uint32_t sip_base, uint32_t timecmp_base, uint32_t time_base);
44 enum {
45 SIFIVE_SIP_BASE = 0x0,
46 SIFIVE_TIMECMP_BASE = 0x4000,
47 SIFIVE_TIME_BASE = 0xBFF8
50 enum {
51 SIFIVE_CLINT_TIMEBASE_FREQ = 10000000
54 #endif