2007-11-17 18:14:51 +01:00
|
|
|
/* Declarations for use by hardware emulation. */
|
|
|
|
#ifndef QEMU_HW_H
|
|
|
|
#define QEMU_HW_H
|
|
|
|
|
|
|
|
#include "qemu-common.h"
|
2009-05-19 17:17:58 +02:00
|
|
|
|
|
|
|
#if defined(TARGET_PHYS_ADDR_BITS) && !defined(NEED_CPU_H)
|
|
|
|
#include "cpu-common.h"
|
|
|
|
#endif
|
|
|
|
|
2009-07-02 12:32:06 +02:00
|
|
|
#include "ioport.h"
|
2007-11-17 18:14:51 +01:00
|
|
|
#include "irq.h"
|
2012-01-13 17:07:20 +01:00
|
|
|
#include "qemu-file.h"
|
|
|
|
#include "vmstate.h"
|
2008-10-02 21:14:17 +02:00
|
|
|
|
2007-11-17 18:14:51 +01:00
|
|
|
#ifdef NEED_CPU_H
|
|
|
|
#if TARGET_LONG_BITS == 64
|
|
|
|
#define qemu_put_betl qemu_put_be64
|
|
|
|
#define qemu_get_betl qemu_get_be64
|
|
|
|
#define qemu_put_betls qemu_put_be64s
|
|
|
|
#define qemu_get_betls qemu_get_be64s
|
2008-10-02 21:14:17 +02:00
|
|
|
#define qemu_put_sbetl qemu_put_sbe64
|
|
|
|
#define qemu_get_sbetl qemu_get_sbe64
|
|
|
|
#define qemu_put_sbetls qemu_put_sbe64s
|
|
|
|
#define qemu_get_sbetls qemu_get_sbe64s
|
2007-11-17 18:14:51 +01:00
|
|
|
#else
|
|
|
|
#define qemu_put_betl qemu_put_be32
|
|
|
|
#define qemu_get_betl qemu_get_be32
|
|
|
|
#define qemu_put_betls qemu_put_be32s
|
|
|
|
#define qemu_get_betls qemu_get_be32s
|
2008-10-02 21:14:17 +02:00
|
|
|
#define qemu_put_sbetl qemu_put_sbe32
|
|
|
|
#define qemu_get_sbetl qemu_get_sbe32
|
|
|
|
#define qemu_put_sbetls qemu_put_sbe32s
|
|
|
|
#define qemu_get_sbetls qemu_get_sbe32s
|
2007-11-17 18:14:51 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef void QEMUResetHandler(void *opaque);
|
|
|
|
|
2009-06-27 09:25:07 +02:00
|
|
|
void qemu_register_reset(QEMUResetHandler *func, void *opaque);
|
2009-07-02 00:19:02 +02:00
|
|
|
void qemu_unregister_reset(QEMUResetHandler *func, void *opaque);
|
2007-11-17 18:14:51 +01:00
|
|
|
|
2009-07-02 00:19:02 +02:00
|
|
|
/* handler to set the boot_device order for a specific type of QEMUMachine */
|
2008-05-04 22:11:34 +02:00
|
|
|
/* return 0 if success */
|
2009-07-02 00:19:02 +02:00
|
|
|
typedef int QEMUBootSetHandler(void *opaque, const char *boot_devices);
|
2008-06-20 18:25:06 +02:00
|
|
|
void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque);
|
2009-07-02 00:19:02 +02:00
|
|
|
int qemu_boot_set(const char *boot_devices);
|
2008-05-04 22:11:34 +02:00
|
|
|
|
2009-09-29 22:49:00 +02:00
|
|
|
#ifdef NEED_CPU_H
|
|
|
|
#if TARGET_LONG_BITS == 64
|
|
|
|
#define VMSTATE_UINTTL_V(_f, _s, _v) \
|
|
|
|
VMSTATE_UINT64_V(_f, _s, _v)
|
|
|
|
#define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v) \
|
|
|
|
VMSTATE_UINT64_ARRAY_V(_f, _s, _n, _v)
|
|
|
|
#else
|
|
|
|
#define VMSTATE_UINTTL_V(_f, _s, _v) \
|
|
|
|
VMSTATE_UINT32_V(_f, _s, _v)
|
|
|
|
#define VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, _v) \
|
|
|
|
VMSTATE_UINT32_ARRAY_V(_f, _s, _n, _v)
|
|
|
|
#endif
|
|
|
|
#define VMSTATE_UINTTL(_f, _s) \
|
|
|
|
VMSTATE_UINTTL_V(_f, _s, 0)
|
|
|
|
#define VMSTATE_UINTTL_ARRAY(_f, _s, _n) \
|
|
|
|
VMSTATE_UINTTL_ARRAY_V(_f, _s, _n, 0)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2007-11-17 18:14:51 +01:00
|
|
|
#endif
|