Revision 0c257437
b/hw/boards.h | ||
---|---|---|
16 | 16 |
QEMUMachineInitFunc *init; |
17 | 17 |
int use_scsi; |
18 | 18 |
int max_cpus; |
19 |
int is_default; |
|
19 | 20 |
struct QEMUMachine *next; |
20 | 21 |
} QEMUMachine; |
21 | 22 |
|
22 | 23 |
int qemu_register_machine(QEMUMachine *m); |
23 |
void register_machines(void); |
|
24 | 24 |
|
25 | 25 |
extern QEMUMachine *current_machine; |
26 | 26 |
|
b/hw/etraxfs.c | ||
---|---|---|
162 | 162 |
.name = "bareetraxfs", |
163 | 163 |
.desc = "Bare ETRAX FS board", |
164 | 164 |
.init = bareetraxfs_init, |
165 |
.is_default = 1, |
|
165 | 166 |
}; |
166 | 167 |
|
167 | 168 |
static void bareetraxfs_machine_init(void) |
b/hw/integratorcp.c | ||
---|---|---|
512 | 512 |
.name = "integratorcp", |
513 | 513 |
.desc = "ARM Integrator/CP (ARM926EJ-S)", |
514 | 514 |
.init = integratorcp_init, |
515 |
.is_default = 1, |
|
515 | 516 |
}; |
516 | 517 |
|
517 | 518 |
static void integratorcp_machine_init(void) |
b/hw/mcf5208.c | ||
---|---|---|
290 | 290 |
.name = "mcf5208evb", |
291 | 291 |
.desc = "MCF5206EVB", |
292 | 292 |
.init = mcf5208evb_init, |
293 |
.is_default = 1, |
|
293 | 294 |
}; |
294 | 295 |
|
295 | 296 |
static void mcf5208evb_machine_init(void) |
b/hw/mips_malta.c | ||
---|---|---|
953 | 953 |
.name = "malta", |
954 | 954 |
.desc = "MIPS Malta Core LV", |
955 | 955 |
.init = mips_malta_init, |
956 |
.is_default = 1, |
|
956 | 957 |
}; |
957 | 958 |
|
958 | 959 |
static void mips_malta_machine_init(void) |
b/hw/pc.c | ||
---|---|---|
1189 | 1189 |
.desc = "Standard PC", |
1190 | 1190 |
.init = pc_init_pci, |
1191 | 1191 |
.max_cpus = 255, |
1192 |
.is_default = 1, |
|
1192 | 1193 |
}; |
1193 | 1194 |
|
1194 | 1195 |
static QEMUMachine isapc_machine = { |
b/hw/ppc_oldworld.c | ||
---|---|---|
386 | 386 |
.desc = "Heathrow based PowerMAC", |
387 | 387 |
.init = ppc_heathrow_init, |
388 | 388 |
.max_cpus = MAX_CPUS, |
389 |
.is_default = 1, |
|
389 | 390 |
}; |
390 | 391 |
|
391 | 392 |
static void heathrow_machine_init(void) |
b/hw/shix.c | ||
---|---|---|
92 | 92 |
.name = "shix", |
93 | 93 |
.desc = "shix card", |
94 | 94 |
.init = shix_init, |
95 |
.is_default = 1, |
|
95 | 96 |
}; |
96 | 97 |
|
97 | 98 |
static void shix_machine_init(void) |
b/hw/sun4m.c | ||
---|---|---|
1037 | 1037 |
.desc = "Sun4m platform, SPARCstation 5", |
1038 | 1038 |
.init = ss5_init, |
1039 | 1039 |
.use_scsi = 1, |
1040 |
.is_default = 1, |
|
1040 | 1041 |
}; |
1041 | 1042 |
|
1042 | 1043 |
static QEMUMachine ss10_machine = { |
b/hw/sun4u.c | ||
---|---|---|
594 | 594 |
.desc = "Sun4u platform", |
595 | 595 |
.init = sun4u_init, |
596 | 596 |
.max_cpus = 1, // XXX for now |
597 |
.is_default = 1, |
|
597 | 598 |
}; |
598 | 599 |
|
599 | 600 |
static QEMUMachine sun4v_machine = { |
b/vl.c | ||
---|---|---|
3497 | 3497 |
return NULL; |
3498 | 3498 |
} |
3499 | 3499 |
|
3500 |
static QEMUMachine *find_default_machine(void) |
|
3501 |
{ |
|
3502 |
QEMUMachine *m; |
|
3503 |
|
|
3504 |
for(m = first_machine; m != NULL; m = m->next) { |
|
3505 |
if (m->is_default) { |
|
3506 |
return m; |
|
3507 |
} |
|
3508 |
} |
|
3509 |
return NULL; |
|
3510 |
} |
|
3511 |
|
|
3500 | 3512 |
/***********************************************************/ |
3501 | 3513 |
/* main execution loop */ |
3502 | 3514 |
|
... | ... | |
4876 | 4888 |
#endif |
4877 | 4889 |
|
4878 | 4890 |
module_call_init(MODULE_INIT_MACHINE); |
4879 |
machine = first_machine;
|
|
4891 |
machine = find_default_machine();
|
|
4880 | 4892 |
cpu_model = NULL; |
4881 | 4893 |
initrd_filename = NULL; |
4882 | 4894 |
ram_size = 0; |
... | ... | |
4967 | 4979 |
for(m = first_machine; m != NULL; m = m->next) { |
4968 | 4980 |
printf("%-10s %s%s\n", |
4969 | 4981 |
m->name, m->desc, |
4970 |
m == first_machine ? " (default)" : "");
|
|
4982 |
m->is_default ? " (default)" : "");
|
|
4971 | 4983 |
} |
4972 | 4984 |
exit(*optarg != '?'); |
4973 | 4985 |
} |
Also available in: Unified diff