xref: /qemu/include/hw/misc/sifive_test.h (revision 88a07990fa282e4b63845223e90d759ef6811264)
1*88a07990SMichael Clark /*
2*88a07990SMichael Clark  * QEMU Test Finisher interface
3*88a07990SMichael Clark  *
4*88a07990SMichael Clark  * Copyright (c) 2018 SiFive, Inc.
5*88a07990SMichael Clark  *
6*88a07990SMichael Clark  * This program is free software; you can redistribute it and/or modify it
7*88a07990SMichael Clark  * under the terms and conditions of the GNU General Public License,
8*88a07990SMichael Clark  * version 2 or later, as published by the Free Software Foundation.
9*88a07990SMichael Clark  *
10*88a07990SMichael Clark  * This program is distributed in the hope it will be useful, but WITHOUT
11*88a07990SMichael Clark  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12*88a07990SMichael Clark  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13*88a07990SMichael Clark  * more details.
14*88a07990SMichael Clark  *
15*88a07990SMichael Clark  * You should have received a copy of the GNU General Public License along with
16*88a07990SMichael Clark  * this program.  If not, see <http://www.gnu.org/licenses/>.
17*88a07990SMichael Clark  */
18*88a07990SMichael Clark 
19*88a07990SMichael Clark #ifndef HW_SIFIVE_TEST_H
20*88a07990SMichael Clark #define HW_SIFIVE_TEST_H
21*88a07990SMichael Clark 
22*88a07990SMichael Clark #define TYPE_SIFIVE_TEST "riscv.sifive.test"
23*88a07990SMichael Clark 
24*88a07990SMichael Clark #define SIFIVE_TEST(obj) \
25*88a07990SMichael Clark     OBJECT_CHECK(SiFiveTestState, (obj), TYPE_SIFIVE_TEST)
26*88a07990SMichael Clark 
27*88a07990SMichael Clark typedef struct SiFiveTestState {
28*88a07990SMichael Clark     /*< private >*/
29*88a07990SMichael Clark     SysBusDevice parent_obj;
30*88a07990SMichael Clark 
31*88a07990SMichael Clark     /*< public >*/
32*88a07990SMichael Clark     MemoryRegion mmio;
33*88a07990SMichael Clark } SiFiveTestState;
34*88a07990SMichael Clark 
35*88a07990SMichael Clark enum {
36*88a07990SMichael Clark     FINISHER_FAIL = 0x3333,
37*88a07990SMichael Clark     FINISHER_PASS = 0x5555
38*88a07990SMichael Clark };
39*88a07990SMichael Clark 
40*88a07990SMichael Clark DeviceState *sifive_test_create(hwaddr addr);
41*88a07990SMichael Clark 
42*88a07990SMichael Clark #endif
43