xref: /openbmc/qemu/include/hw/boards.h (revision 1b111dc1)
1 /* Declarations for use by board files for creating devices.  */
2 
3 #ifndef HW_BOARDS_H
4 #define HW_BOARDS_H
5 
6 #include "sysemu/blockdev.h"
7 #include "hw/qdev.h"
8 
9 typedef struct QEMUMachine QEMUMachine;
10 
11 typedef struct QEMUMachineInitArgs {
12     const QEMUMachine *machine;
13     ram_addr_t ram_size;
14     const char *boot_order;
15     const char *kernel_filename;
16     const char *kernel_cmdline;
17     const char *initrd_filename;
18     const char *cpu_model;
19 } QEMUMachineInitArgs;
20 
21 typedef void QEMUMachineInitFunc(QEMUMachineInitArgs *args);
22 
23 typedef void QEMUMachineResetFunc(void);
24 
25 typedef void QEMUMachineHotAddCPUFunc(const int64_t id, Error **errp);
26 
27 struct QEMUMachine {
28     const char *name;
29     const char *alias;
30     const char *desc;
31     QEMUMachineInitFunc *init;
32     QEMUMachineResetFunc *reset;
33     QEMUMachineHotAddCPUFunc *hot_add_cpu;
34     BlockInterfaceType block_default_type;
35     int max_cpus;
36     unsigned int no_serial:1,
37         no_parallel:1,
38         use_virtcon:1,
39         use_sclp:1,
40         no_floppy:1,
41         no_cdrom:1,
42         no_sdcard:1;
43     int is_default;
44     const char *default_machine_opts;
45     const char *default_boot_order;
46     GlobalProperty *compat_props;
47     struct QEMUMachine *next;
48     const char *hw_version;
49 };
50 
51 int qemu_register_machine(QEMUMachine *m);
52 QEMUMachine *find_default_machine(void);
53 
54 extern QEMUMachine *current_machine;
55 
56 #endif
57