188a07990SMichael Clark /* 288a07990SMichael Clark * QEMU Test Finisher interface 388a07990SMichael Clark * 488a07990SMichael Clark * Copyright (c) 2018 SiFive, Inc. 588a07990SMichael Clark * 688a07990SMichael Clark * This program is free software; you can redistribute it and/or modify it 788a07990SMichael Clark * under the terms and conditions of the GNU General Public License, 888a07990SMichael Clark * version 2 or later, as published by the Free Software Foundation. 988a07990SMichael Clark * 1088a07990SMichael Clark * This program is distributed in the hope it will be useful, but WITHOUT 1188a07990SMichael Clark * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1288a07990SMichael Clark * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 1388a07990SMichael Clark * more details. 1488a07990SMichael Clark * 1588a07990SMichael Clark * You should have received a copy of the GNU General Public License along with 1688a07990SMichael Clark * this program. If not, see <http://www.gnu.org/licenses/>. 1788a07990SMichael Clark */ 1888a07990SMichael Clark 1988a07990SMichael Clark #ifndef HW_SIFIVE_TEST_H 2088a07990SMichael Clark #define HW_SIFIVE_TEST_H 2188a07990SMichael Clark 22ec150c7eSMarkus Armbruster #include "hw/sysbus.h" 23ac900edeSEduardo Habkost #include "qom/object.h" 24ec150c7eSMarkus Armbruster 2588a07990SMichael Clark #define TYPE_SIFIVE_TEST "riscv.sifive.test" 2688a07990SMichael Clark 27ac900edeSEduardo Habkost typedef struct SiFiveTestState SiFiveTestState; 28*e38d3c5cSEduardo Habkost DECLARE_INSTANCE_CHECKER(SiFiveTestState, SIFIVE_TEST, 29*e38d3c5cSEduardo Habkost TYPE_SIFIVE_TEST) 3088a07990SMichael Clark 31ac900edeSEduardo Habkost struct SiFiveTestState { 3288a07990SMichael Clark /*< private >*/ 3388a07990SMichael Clark SysBusDevice parent_obj; 3488a07990SMichael Clark 3588a07990SMichael Clark /*< public >*/ 3688a07990SMichael Clark MemoryRegion mmio; 37ac900edeSEduardo Habkost }; 3888a07990SMichael Clark 3988a07990SMichael Clark enum { 4088a07990SMichael Clark FINISHER_FAIL = 0x3333, 419a2551edSBin Meng FINISHER_PASS = 0x5555, 429a2551edSBin Meng FINISHER_RESET = 0x7777 4388a07990SMichael Clark }; 4488a07990SMichael Clark 4588a07990SMichael Clark DeviceState *sifive_test_create(hwaddr addr); 4688a07990SMichael Clark 4788a07990SMichael Clark #endif 48