2007-11-17 20:14:51 +03:00
|
|
|
/* Declarations for use by board files for creating devices. */
|
|
|
|
|
|
|
|
#ifndef HW_BOARDS_H
|
|
|
|
#define HW_BOARDS_H
|
|
|
|
|
2012-12-17 21:20:04 +04:00
|
|
|
#include "sysemu/blockdev.h"
|
2013-02-04 18:40:22 +04:00
|
|
|
#include "hw/qdev.h"
|
2009-07-15 15:48:21 +04:00
|
|
|
|
2013-01-08 11:06:30 +04:00
|
|
|
#define DEFAULT_MACHINE_OPTIONS \
|
|
|
|
.boot_order = "cad"
|
|
|
|
|
2012-10-16 00:22:02 +04:00
|
|
|
typedef struct QEMUMachineInitArgs {
|
|
|
|
ram_addr_t ram_size;
|
|
|
|
const char *boot_device;
|
|
|
|
const char *kernel_filename;
|
|
|
|
const char *kernel_cmdline;
|
|
|
|
const char *initrd_filename;
|
|
|
|
const char *cpu_model;
|
|
|
|
} QEMUMachineInitArgs;
|
|
|
|
|
|
|
|
typedef void QEMUMachineInitFunc(QEMUMachineInitArgs *args);
|
2007-11-17 20:14:51 +03:00
|
|
|
|
2012-08-07 10:41:51 +04:00
|
|
|
typedef void QEMUMachineResetFunc(void);
|
|
|
|
|
2013-04-30 17:41:24 +04:00
|
|
|
typedef void QEMUMachineHotAddCPUFunc(const int64_t id, Error **errp);
|
|
|
|
|
2007-11-17 20:14:51 +03:00
|
|
|
typedef struct QEMUMachine {
|
|
|
|
const char *name;
|
2009-07-22 13:02:50 +04:00
|
|
|
const char *alias;
|
2007-11-17 20:14:51 +03:00
|
|
|
const char *desc;
|
|
|
|
QEMUMachineInitFunc *init;
|
2012-08-07 10:41:51 +04:00
|
|
|
QEMUMachineResetFunc *reset;
|
2013-04-30 17:41:24 +04:00
|
|
|
QEMUMachineHotAddCPUFunc *hot_add_cpu;
|
2012-11-20 18:30:34 +04:00
|
|
|
BlockInterfaceType block_default_type;
|
2008-10-08 00:39:39 +04:00
|
|
|
int max_cpus;
|
2009-12-25 19:12:26 +03:00
|
|
|
unsigned int no_serial:1,
|
2009-12-08 15:11:54 +03:00
|
|
|
no_parallel:1,
|
|
|
|
use_virtcon:1,
|
2013-01-24 15:18:52 +04:00
|
|
|
use_sclp:1,
|
2009-12-16 16:25:39 +03:00
|
|
|
no_floppy:1,
|
|
|
|
no_cdrom:1,
|
|
|
|
no_sdcard:1;
|
2009-05-22 05:41:01 +04:00
|
|
|
int is_default;
|
2010-11-22 18:44:15 +03:00
|
|
|
const char *default_machine_opts;
|
2013-01-08 11:06:30 +04:00
|
|
|
const char *boot_order;
|
2009-12-08 15:11:33 +03:00
|
|
|
GlobalProperty *compat_props;
|
2007-11-17 20:14:51 +03:00
|
|
|
struct QEMUMachine *next;
|
2012-05-30 07:35:51 +04:00
|
|
|
const char *hw_version;
|
2007-11-17 20:14:51 +03:00
|
|
|
} QEMUMachine;
|
|
|
|
|
|
|
|
int qemu_register_machine(QEMUMachine *m);
|
2012-02-22 11:18:50 +04:00
|
|
|
QEMUMachine *find_default_machine(void);
|
2007-11-17 20:14:51 +03:00
|
|
|
|
2009-02-11 18:21:54 +03:00
|
|
|
extern QEMUMachine *current_machine;
|
|
|
|
|
2007-11-17 20:14:51 +03:00
|
|
|
#endif
|