hw/elf_ops: Fix a typo
[qemu/ar7.git] / hw / core / null-machine.c
blob7e693523d75292915f1a311cdb3137c63053a3a5
1 /*
2 * Empty machine
4 * Copyright IBM, Corp. 2012
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
14 #include "qemu/osdep.h"
15 #include "qemu/error-report.h"
16 #include "hw/boards.h"
17 #include "sysemu/sysemu.h"
18 #include "exec/address-spaces.h"
19 #include "hw/core/cpu.h"
21 static void machine_none_init(MachineState *mch)
23 CPUState *cpu = NULL;
25 /* Initialize CPU (if user asked for it) */
26 if (mch->cpu_type) {
27 cpu = cpu_create(mch->cpu_type);
28 if (!cpu) {
29 error_report("Unable to initialize CPU");
30 exit(1);
34 /* RAM at address zero */
35 if (mch->ram) {
36 memory_region_add_subregion(get_system_memory(), 0, mch->ram);
39 if (mch->kernel_filename) {
40 error_report("The -kernel parameter is not supported "
41 "(use the generic 'loader' device instead).");
42 exit(1);
46 static void machine_none_machine_init(MachineClass *mc)
48 mc->desc = "empty machine";
49 mc->init = machine_none_init;
50 mc->max_cpus = 1;
51 mc->default_ram_size = 0;
52 mc->default_ram_id = "ram";
53 mc->no_serial = 1;
54 mc->no_parallel = 1;
55 mc->no_floppy = 1;
56 mc->no_cdrom = 1;
57 mc->no_sdcard = 1;
60 DEFINE_MACHINE("none", machine_none_machine_init)