aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/acpi/acpi.h3
-rw-r--r--include/hw/acpi/pcihp.h1
-rw-r--r--include/hw/acpi/piix4.h2
-rw-r--r--include/hw/acpi/tco.h1
-rw-r--r--include/hw/boards.h1
-rw-r--r--include/hw/char/digic-uart.h1
-rw-r--r--include/hw/hotplug.h1
-rw-r--r--include/hw/hw.h4
-rw-r--r--include/hw/i386/pc.h1
-rw-r--r--include/hw/isa/i8257.h2
-rw-r--r--include/hw/isa/isa.h5
-rw-r--r--include/hw/nvram/fw_cfg.h50
-rw-r--r--include/hw/nvram/fw_cfg_keys.h46
-rw-r--r--include/hw/pci/pci.h11
-rw-r--r--include/hw/ppc/mac_dbdma.h1
-rw-r--r--include/hw/qdev-core.h1
-rw-r--r--include/hw/scsi/scsi.h1
-rw-r--r--include/hw/timer/digic-timer.h1
-rw-r--r--include/hw/usb.h1
-rw-r--r--include/hw/vfio/vfio.h2
-rw-r--r--include/hw/xen/xen.h1
21 files changed, 67 insertions, 70 deletions
diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h
index 7462e20fe3..e0978c8b92 100644
--- a/include/hw/acpi/acpi.h
+++ b/include/hw/acpi/acpi.h
@@ -19,7 +19,6 @@
* <http://www.gnu.org/licenses/>.
*/
-#include "qemu/typedefs.h"
#include "qemu/notify.h"
#include "qemu/option.h"
#include "exec/memory.h"
@@ -155,7 +154,7 @@ void acpi_pm_tmr_reset(ACPIREGS *ar);
static inline int64_t acpi_pm_tmr_get_clock(void)
{
return muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), PM_TIMER_FREQUENCY,
- get_ticks_per_sec());
+ NANOSECONDS_PER_SECOND);
}
/* PM1a_EVT: piix and ich9 don't implement PM1b. */
diff --git a/include/hw/acpi/pcihp.h b/include/hw/acpi/pcihp.h
index 31b7820b6f..79a43923e8 100644
--- a/include/hw/acpi/pcihp.h
+++ b/include/hw/acpi/pcihp.h
@@ -27,7 +27,6 @@
#ifndef HW_ACPI_PCIHP_H
#define HW_ACPI_PCIHP_H
-#include <qemu/typedefs.h>
#include "hw/acpi/acpi.h"
#include "migration/vmstate.h"
diff --git a/include/hw/acpi/piix4.h b/include/hw/acpi/piix4.h
index 65e6fd7aa0..26c2370e30 100644
--- a/include/hw/acpi/piix4.h
+++ b/include/hw/acpi/piix4.h
@@ -1,8 +1,6 @@
#ifndef HW_ACPI_PIIX4_H
#define HW_ACPI_PIIX4_H
-#include "qemu/typedefs.h"
-
Object *piix4_pm_find(void);
#endif
diff --git a/include/hw/acpi/tco.h b/include/hw/acpi/tco.h
index c63afc8ca3..52ad767ddd 100644
--- a/include/hw/acpi/tco.h
+++ b/include/hw/acpi/tco.h
@@ -9,7 +9,6 @@
#ifndef HW_ACPI_TCO_H
#define HW_ACPI_TCO_H
-#include "qemu/typedefs.h"
#include "qemu-common.h"
/* As per ICH9 spec, the internal timer has an error of ~0.6s on every tick */
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 8efce0f91e..aad5f2a99f 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -3,7 +3,6 @@
#ifndef HW_BOARDS_H
#define HW_BOARDS_H
-#include "qemu/typedefs.h"
#include "sysemu/blockdev.h"
#include "sysemu/accel.h"
#include "hw/qdev.h"
diff --git a/include/hw/char/digic-uart.h b/include/hw/char/digic-uart.h
index ef83a3059c..7b3f145372 100644
--- a/include/hw/char/digic-uart.h
+++ b/include/hw/char/digic-uart.h
@@ -19,7 +19,6 @@
#define HW_CHAR_DIGIC_UART_H
#include "hw/sysbus.h"
-#include "qemu/typedefs.h"
#define TYPE_DIGIC_UART "digic-uart"
#define DIGIC_UART(obj) \
diff --git a/include/hw/hotplug.h b/include/hw/hotplug.h
index 2db025d0bd..da1d0e4ab8 100644
--- a/include/hw/hotplug.h
+++ b/include/hw/hotplug.h
@@ -13,7 +13,6 @@
#define HOTPLUG_H
#include "qom/object.h"
-#include "qemu/typedefs.h"
#define TYPE_HOTPLUG_HANDLER "hotplug-handler"
diff --git a/include/hw/hw.h b/include/hw/hw.h
index cd3d410f97..2cb69d5f5b 100644
--- a/include/hw/hw.h
+++ b/include/hw/hw.h
@@ -2,7 +2,6 @@
#ifndef QEMU_HW_H
#define QEMU_HW_H
-#include "qemu-common.h"
#if !defined(CONFIG_USER_ONLY) && !defined(NEED_CPU_H)
#include "exec/cpu-common.h"
@@ -13,6 +12,7 @@
#include "block/aio.h"
#include "migration/vmstate.h"
#include "qemu/log.h"
+#include "qemu/module.h"
#ifdef NEED_CPU_H
#if TARGET_LONG_BITS == 64
@@ -41,6 +41,8 @@ typedef void QEMUResetHandler(void *opaque);
void qemu_register_reset(QEMUResetHandler *func, void *opaque);
void qemu_unregister_reset(QEMUResetHandler *func, void *opaque);
+void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
+
#ifdef NEED_CPU_H
#if TARGET_LONG_BITS == 64
#define VMSTATE_UINTTL_V(_f, _s, _v) \
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 847d92f550..96f0b66c77 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -2,7 +2,6 @@
#define HW_PC_H
#include "qemu-common.h"
-#include "qemu/typedefs.h"
#include "exec/memory.h"
#include "hw/boards.h"
#include "hw/isa/isa.h"
diff --git a/include/hw/isa/i8257.h b/include/hw/isa/i8257.h
index 8d34ed17b7..8c44d36282 100644
--- a/include/hw/isa/i8257.h
+++ b/include/hw/isa/i8257.h
@@ -11,7 +11,7 @@ typedef struct I8257Regs {
uint8_t pageh;
uint8_t dack;
uint8_t eop;
- DMA_transfer_handler transfer_handler;
+ IsaDmaTransferHandler transfer_handler;
void *opaque;
} I8257Regs;
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h
index 0bbe21cd48..ffb2ea7cdf 100644
--- a/include/hw/isa/isa.h
+++ b/include/hw/isa/isa.h
@@ -54,6 +54,9 @@ typedef enum {
ISADMA_TRANSFER_ILLEGAL,
} IsaDmaTransferMode;
+typedef int (*IsaDmaTransferHandler)(void *opaque, int nchan, int pos,
+ int size);
+
typedef struct IsaDmaClass {
InterfaceClass parent;
@@ -65,7 +68,7 @@ typedef struct IsaDmaClass {
void (*release_DREQ)(IsaDma *obj, int nchan);
void (*schedule)(IsaDma *obj);
void (*register_channel)(IsaDma *obj, int nchan,
- DMA_transfer_handler transfer_handler,
+ IsaDmaTransferHandler transfer_handler,
void *opaque);
} IsaDmaClass;
diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
index 4315f4e582..d5169895dc 100644
--- a/include/hw/nvram/fw_cfg.h
+++ b/include/hw/nvram/fw_cfg.h
@@ -1,55 +1,9 @@
#ifndef FW_CFG_H
#define FW_CFG_H
-#ifndef NO_QEMU_PROTOS
-
#include "exec/hwaddr.h"
-#include "qemu/typedefs.h"
-#endif
+#include "hw/nvram/fw_cfg_keys.h"
-#define FW_CFG_SIGNATURE 0x00
-#define FW_CFG_ID 0x01
-#define FW_CFG_UUID 0x02
-#define FW_CFG_RAM_SIZE 0x03
-#define FW_CFG_NOGRAPHIC 0x04
-#define FW_CFG_NB_CPUS 0x05
-#define FW_CFG_MACHINE_ID 0x06
-#define FW_CFG_KERNEL_ADDR 0x07
-#define FW_CFG_KERNEL_SIZE 0x08
-#define FW_CFG_KERNEL_CMDLINE 0x09
-#define FW_CFG_INITRD_ADDR 0x0a
-#define FW_CFG_INITRD_SIZE 0x0b
-#define FW_CFG_BOOT_DEVICE 0x0c
-#define FW_CFG_NUMA 0x0d
-#define FW_CFG_BOOT_MENU 0x0e
-#define FW_CFG_MAX_CPUS 0x0f
-#define FW_CFG_KERNEL_ENTRY 0x10
-#define FW_CFG_KERNEL_DATA 0x11
-#define FW_CFG_INITRD_DATA 0x12
-#define FW_CFG_CMDLINE_ADDR 0x13
-#define FW_CFG_CMDLINE_SIZE 0x14
-#define FW_CFG_CMDLINE_DATA 0x15
-#define FW_CFG_SETUP_ADDR 0x16
-#define FW_CFG_SETUP_SIZE 0x17
-#define FW_CFG_SETUP_DATA 0x18
-#define FW_CFG_FILE_DIR 0x19
-
-#define FW_CFG_FILE_FIRST 0x20
-#define FW_CFG_FILE_SLOTS 0x10
-#define FW_CFG_MAX_ENTRY (FW_CFG_FILE_FIRST+FW_CFG_FILE_SLOTS)
-
-#define FW_CFG_WRITE_CHANNEL 0x4000
-#define FW_CFG_ARCH_LOCAL 0x8000
-#define FW_CFG_ENTRY_MASK ~(FW_CFG_WRITE_CHANNEL | FW_CFG_ARCH_LOCAL)
-
-#define FW_CFG_INVALID 0xffff
-
-/* width in bytes of fw_cfg control register */
-#define FW_CFG_CTL_SIZE 0x02
-
-#define FW_CFG_MAX_FILE_PATH 56
-
-#ifndef NO_QEMU_PROTOS
typedef struct FWCfgFile {
uint32_t size; /* file size */
uint16_t select; /* write this to 0x510 to read it */
@@ -221,6 +175,4 @@ FWCfgState *fw_cfg_init_mem_wide(hwaddr ctl_addr,
FWCfgState *fw_cfg_find(void);
-#endif /* NO_QEMU_PROTOS */
-
#endif
diff --git a/include/hw/nvram/fw_cfg_keys.h b/include/hw/nvram/fw_cfg_keys.h
new file mode 100644
index 0000000000..0f3e871884
--- /dev/null
+++ b/include/hw/nvram/fw_cfg_keys.h
@@ -0,0 +1,46 @@
+#ifndef FW_CFG_KEYS_H
+#define FW_CFG_KEYS_H
+
+#define FW_CFG_SIGNATURE 0x00
+#define FW_CFG_ID 0x01
+#define FW_CFG_UUID 0x02
+#define FW_CFG_RAM_SIZE 0x03
+#define FW_CFG_NOGRAPHIC 0x04
+#define FW_CFG_NB_CPUS 0x05
+#define FW_CFG_MACHINE_ID 0x06
+#define FW_CFG_KERNEL_ADDR 0x07
+#define FW_CFG_KERNEL_SIZE 0x08
+#define FW_CFG_KERNEL_CMDLINE 0x09
+#define FW_CFG_INITRD_ADDR 0x0a
+#define FW_CFG_INITRD_SIZE 0x0b
+#define FW_CFG_BOOT_DEVICE 0x0c
+#define FW_CFG_NUMA 0x0d
+#define FW_CFG_BOOT_MENU 0x0e
+#define FW_CFG_MAX_CPUS 0x0f
+#define FW_CFG_KERNEL_ENTRY 0x10
+#define FW_CFG_KERNEL_DATA 0x11
+#define FW_CFG_INITRD_DATA 0x12
+#define FW_CFG_CMDLINE_ADDR 0x13
+#define FW_CFG_CMDLINE_SIZE 0x14
+#define FW_CFG_CMDLINE_DATA 0x15
+#define FW_CFG_SETUP_ADDR 0x16
+#define FW_CFG_SETUP_SIZE 0x17
+#define FW_CFG_SETUP_DATA 0x18
+#define FW_CFG_FILE_DIR 0x19
+
+#define FW_CFG_FILE_FIRST 0x20
+#define FW_CFG_FILE_SLOTS 0x10
+#define FW_CFG_MAX_ENTRY (FW_CFG_FILE_FIRST + FW_CFG_FILE_SLOTS)
+
+#define FW_CFG_WRITE_CHANNEL 0x4000
+#define FW_CFG_ARCH_LOCAL 0x8000
+#define FW_CFG_ENTRY_MASK (~(FW_CFG_WRITE_CHANNEL | FW_CFG_ARCH_LOCAL))
+
+#define FW_CFG_INVALID 0xffff
+
+/* width in bytes of fw_cfg control register */
+#define FW_CFG_CTL_SIZE 0x02
+
+#define FW_CFG_MAX_FILE_PATH 56
+
+#endif
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index 0be07c8352..ef6ba51f6c 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -1,8 +1,6 @@
#ifndef QEMU_PCI_H
#define QEMU_PCI_H
-#include "qemu-common.h"
-
#include "hw/qdev.h"
#include "exec/memory.h"
#include "sysemu/dma.h"
@@ -97,6 +95,15 @@
#define FMT_PCIBUS PRIx64
+typedef uint64_t pcibus_t;
+
+struct PCIHostDeviceAddress {
+ unsigned int domain;
+ unsigned int bus;
+ unsigned int slot;
+ unsigned int function;
+};
+
typedef void PCIConfigWriteFunc(PCIDevice *pci_dev,
uint32_t address, uint32_t data, int len);
typedef uint32_t PCIConfigReadFunc(PCIDevice *pci_dev,
diff --git a/include/hw/ppc/mac_dbdma.h b/include/hw/ppc/mac_dbdma.h
index c6870212e9..0cce4e8bb4 100644
--- a/include/hw/ppc/mac_dbdma.h
+++ b/include/hw/ppc/mac_dbdma.h
@@ -23,6 +23,7 @@
#define HW_MAC_DBDMA_H 1
#include "exec/memory.h"
+#include "qemu/iov.h"
typedef struct DBDMA_io DBDMA_io;
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index c3ff99f975..1ce02b20da 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -3,7 +3,6 @@
#include "qemu/queue.h"
#include "qemu/option.h"
-#include "qemu/typedefs.h"
#include "qemu/bitmap.h"
#include "qom/object.h"
#include "hw/irq.h"
diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h
index 29052f81a5..8acd3fa998 100644
--- a/include/hw/scsi/scsi.h
+++ b/include/hw/scsi/scsi.h
@@ -2,7 +2,6 @@
#define QEMU_HW_SCSI_H
#include "hw/qdev.h"
-#include "qemu/typedefs.h"
#include "hw/block/block.h"
#include "sysemu/sysemu.h"
#include "qemu/notify.h"
diff --git a/include/hw/timer/digic-timer.h b/include/hw/timer/digic-timer.h
index ae913482c6..d9e67fe291 100644
--- a/include/hw/timer/digic-timer.h
+++ b/include/hw/timer/digic-timer.h
@@ -19,7 +19,6 @@
#define HW_TIMER_DIGIC_TIMER_H
#include "hw/sysbus.h"
-#include "qemu/typedefs.h"
#include "hw/ptimer.h"
#define TYPE_DIGIC_TIMER "digic-timer"
diff --git a/include/hw/usb.h b/include/hw/usb.h
index c8b6e7b571..163fe0490b 100644
--- a/include/hw/usb.h
+++ b/include/hw/usb.h
@@ -26,6 +26,7 @@
*/
#include "hw/qdev.h"
+#include "qemu/iov.h"
#include "qemu/queue.h"
/* Constants related to the USB / PCI interaction */
diff --git a/include/hw/vfio/vfio.h b/include/hw/vfio/vfio.h
index 7153604cd1..f27d599220 100644
--- a/include/hw/vfio/vfio.h
+++ b/include/hw/vfio/vfio.h
@@ -1,8 +1,6 @@
#ifndef VFIO_API_H
#define VFIO_API_H
-#include "qemu/typedefs.h"
-
bool vfio_eeh_as_ok(AddressSpace *as);
int vfio_eeh_as_op(AddressSpace *as, uint32_t op);
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index bf3fe97927..6eb815aace 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -9,7 +9,6 @@
#include "hw/irq.h"
#include "qemu-common.h"
-#include "qemu/typedefs.h"
/* xen-machine.c */
enum xen_mode {