1 /* 2 * QEMU simulated pvpanic device. 3 * 4 * Copyright Fujitsu, Corp. 2013 5 * 6 * Authors: 7 * Wen Congyang <wency@cn.fujitsu.com> 8 * Hu Tao <hutao@cn.fujitsu.com> 9 * 10 * This work is licensed under the terms of the GNU GPL, version 2 or later. 11 * See the COPYING file in the top-level directory. 12 * 13 */ 14 15 #ifndef HW_MISC_PVPANIC_H 16 #define HW_MISC_PVPANIC_H 17 18 #include "exec/memory.h" 19 #include "qom/object.h" 20 21 #include "standard-headers/misc/pvpanic.h" 22 23 #define PVPANIC_EVENTS (PVPANIC_PANICKED | PVPANIC_CRASH_LOADED) 24 25 #define TYPE_PVPANIC_ISA_DEVICE "pvpanic" 26 #define TYPE_PVPANIC_PCI_DEVICE "pvpanic-pci" 27 28 #define PVPANIC_IOPORT_PROP "ioport" 29 30 /* 31 * PVPanicState for any device type 32 */ 33 typedef struct PVPanicState PVPanicState; 34 struct PVPanicState { 35 MemoryRegion mr; 36 uint8_t events; 37 }; 38 39 void pvpanic_setup_io(PVPanicState *s, DeviceState *dev, unsigned size); 40 41 #endif 42