Merge tag 'v8.2.0-rc0'
[qemu/ar7.git] / include / sysemu / sysemu.h
blob9279c80d3ff2445249a252467b445aaaa2e0048a
1 #ifndef SYSEMU_H
2 #define SYSEMU_H
3 /* Misc. things related to the system emulator. */
5 #include "qemu/timer.h"
6 #include "qemu/notify.h"
7 #include "qemu/uuid.h"
9 /* vl.c */
11 extern int only_migratable;
12 extern const char *qemu_name;
13 extern QemuUUID qemu_uuid;
14 extern bool trace_unassigned;
15 extern bool qemu_uuid_set;
17 const char *qemu_get_vm_name(void);
19 void qemu_add_exit_notifier(Notifier *notify);
20 void qemu_remove_exit_notifier(Notifier *notify);
22 void qemu_add_machine_init_done_notifier(Notifier *notify);
23 void qemu_remove_machine_init_done_notifier(Notifier *notify);
25 void configure_rtc(QemuOpts *opts);
27 void qemu_init_subsystems(void);
29 extern int autostart;
31 typedef enum {
32 VGA_NONE, VGA_STD, VGA_CIRRUS, VGA_VMWARE, VGA_XENFB, VGA_QXL,
33 VGA_TCX, VGA_CG3, VGA_DEVICE, VGA_VIRTIO,
34 VGA_TYPE_MAX,
35 } VGAInterfaceType;
37 extern int vga_interface_type;
38 extern bool vga_interface_created;
40 extern int graphic_width;
41 extern int graphic_height;
42 extern int graphic_depth;
43 extern int display_opengl;
44 extern const char *keyboard_layout;
45 extern int win2k_install_hack;
46 extern int graphic_rotate;
47 extern int old_param;
48 extern uint8_t *boot_splash_filedata;
49 extern bool enable_mlock;
50 extern bool enable_cpu_pm;
51 extern QEMUClockType rtc_clock;
53 #define MAX_OPTION_ROMS 16
54 typedef struct QEMUOptionRom {
55 const char *name;
56 int32_t bootindex;
57 } QEMUOptionRom;
58 extern QEMUOptionRom option_rom[MAX_OPTION_ROMS];
59 extern int nb_option_roms;
61 #define MAX_PROM_ENVS 128
62 extern const char *prom_envs[MAX_PROM_ENVS];
63 extern unsigned int nb_prom_envs;
65 /* serial ports */
67 /* Return the Chardev for serial port i, or NULL if none */
68 Chardev *serial_hd(int i);
70 /* parallel ports */
72 #define MAX_PARALLEL_PORTS 3
74 extern Chardev *parallel_hds[MAX_PARALLEL_PORTS];
76 void hmp_info_usb(Monitor *mon, const QDict *qdict);
78 void add_boot_device_path(int32_t bootindex, DeviceState *dev,
79 const char *suffix);
80 char *get_boot_devices_list(size_t *size);
82 DeviceState *get_boot_device(uint32_t position);
83 void check_boot_index(int32_t bootindex, Error **errp);
84 void del_boot_device_path(DeviceState *dev, const char *suffix);
85 void device_add_bootindex_property(Object *obj, int32_t *bootindex,
86 const char *name, const char *suffix,
87 DeviceState *dev);
88 void restore_boot_order(void *opaque);
89 void validate_bootdevices(const char *devices, Error **errp);
90 void add_boot_device_lchs(DeviceState *dev, const char *suffix,
91 uint32_t lcyls, uint32_t lheads, uint32_t lsecs);
92 void del_boot_device_lchs(DeviceState *dev, const char *suffix);
93 char *get_boot_devices_lchs_list(size_t *size);
95 /* handler to set the boot_device order for a specific type of MachineClass */
96 typedef void QEMUBootSetHandler(void *opaque, const char *boot_order,
97 Error **errp);
98 void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque);
99 void qemu_boot_set(const char *boot_order, Error **errp);
101 bool defaults_enabled(void);
103 void qemu_init(int argc, char **argv);
104 int qemu_main_loop(void);
105 void qemu_cleanup(int);
107 extern QemuOptsList qemu_legacy_drive_opts;
108 extern QemuOptsList qemu_common_drive_opts;
109 extern QemuOptsList qemu_drive_opts;
110 extern QemuOptsList bdrv_runtime_opts;
111 extern QemuOptsList qemu_chardev_opts;
112 extern QemuOptsList qemu_device_opts;
113 extern QemuOptsList qemu_netdev_opts;
114 extern QemuOptsList qemu_nic_opts;
115 extern QemuOptsList qemu_net_opts;
116 extern QemuOptsList qemu_global_opts;
117 extern QemuOptsList qemu_semihosting_config_opts;
119 #endif