10d5d8a3aSPhilippe Mathieu-Daudé /* 20d5d8a3aSPhilippe Mathieu-Daudé * QEMU simulated pvpanic device. 30d5d8a3aSPhilippe Mathieu-Daudé * 40d5d8a3aSPhilippe Mathieu-Daudé * Copyright Fujitsu, Corp. 2013 50d5d8a3aSPhilippe Mathieu-Daudé * 60d5d8a3aSPhilippe Mathieu-Daudé * Authors: 70d5d8a3aSPhilippe Mathieu-Daudé * Wen Congyang <wency@cn.fujitsu.com> 80d5d8a3aSPhilippe Mathieu-Daudé * Hu Tao <hutao@cn.fujitsu.com> 90d5d8a3aSPhilippe Mathieu-Daudé * 100d5d8a3aSPhilippe Mathieu-Daudé * This work is licensed under the terms of the GNU GPL, version 2 or later. 110d5d8a3aSPhilippe Mathieu-Daudé * See the COPYING file in the top-level directory. 120d5d8a3aSPhilippe Mathieu-Daudé * 130d5d8a3aSPhilippe Mathieu-Daudé */ 14ec150c7eSMarkus Armbruster 150d5d8a3aSPhilippe Mathieu-Daudé #ifndef HW_MISC_PVPANIC_H 160d5d8a3aSPhilippe Mathieu-Daudé #define HW_MISC_PVPANIC_H 170d5d8a3aSPhilippe Mathieu-Daudé 187a5951f6SMarkus Armbruster #include "exec/memory.h" 19ec150c7eSMarkus Armbruster #include "qom/object.h" 20ec150c7eSMarkus Armbruster 219b13640dSThomas Weißschuh #include "standard-headers/misc/pvpanic.h" 229b13640dSThomas Weißschuh 23*6269086bSThomas Weißschuh #define PVPANIC_EVENTS (PVPANIC_PANICKED | \ 24*6269086bSThomas Weißschuh PVPANIC_CRASH_LOADED | \ 25*6269086bSThomas Weißschuh PVPANIC_SHUTDOWN) 269b13640dSThomas Weißschuh 27677726efSMihai Carabas #define TYPE_PVPANIC_ISA_DEVICE "pvpanic" 28d097b3dcSMihai Carabas #define TYPE_PVPANIC_PCI_DEVICE "pvpanic-pci" 290d5d8a3aSPhilippe Mathieu-Daudé 30c0b5be52SJuan Quintela #define PVPANIC_IOPORT_PROP "ioport" 31c0b5be52SJuan Quintela 32677726efSMihai Carabas /* 33677726efSMihai Carabas * PVPanicState for any device type 34677726efSMihai Carabas */ 35677726efSMihai Carabas typedef struct PVPanicState PVPanicState; 36677726efSMihai Carabas struct PVPanicState { 37677726efSMihai Carabas MemoryRegion mr; 38677726efSMihai Carabas uint8_t events; 39677726efSMihai Carabas }; 40677726efSMihai Carabas 41677726efSMihai Carabas void pvpanic_setup_io(PVPanicState *s, DeviceState *dev, unsigned size); 42677726efSMihai Carabas 430d5d8a3aSPhilippe Mathieu-Daudé #endif 44