Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.1-sf1-v3' into...
[qemu/ar7.git] / include / hw / misc / pvpanic.h
blob1ee071a70313e24a97a03e776bc90f08f4636ee7
1 /*
2 * QEMU simulated pvpanic device.
4 * Copyright Fujitsu, Corp. 2013
6 * Authors:
7 * Wen Congyang <wency@cn.fujitsu.com>
8 * Hu Tao <hutao@cn.fujitsu.com>
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.
14 #ifndef HW_MISC_PVPANIC_H
15 #define HW_MISC_PVPANIC_H
17 #define TYPE_PVPANIC "pvpanic"
19 #define PVPANIC_IOPORT_PROP "ioport"
21 static inline uint16_t pvpanic_port(void)
23 Object *o = object_resolve_path_type("", TYPE_PVPANIC, NULL);
24 if (!o) {
25 return 0;
27 return object_property_get_uint(o, PVPANIC_IOPORT_PROP, NULL);
30 #endif