]> git.proxmox.com Git - mirror_qemu.git/blame - hw/core/null-machine.c
numa: Teach ram block notifiers about resizeable ram blocks
[mirror_qemu.git] / hw / core / null-machine.c
CommitLineData
b4a738bf
AL
1/*
2 * Empty machine
3 *
4 * Copyright IBM, Corp. 2012
5 *
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
8 *
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.
11 *
12 */
13
18c86e2b 14#include "qemu/osdep.h"
3964ec6c 15#include "qemu/error-report.h"
b4a738bf 16#include "hw/boards.h"
3964ec6c 17#include "exec/address-spaces.h"
2e5b09fd 18#include "hw/core/cpu.h"
b4a738bf 19
3964ec6c 20static void machine_none_init(MachineState *mch)
b4a738bf 21{
3964ec6c
TH
22 CPUState *cpu = NULL;
23
2278b939
IM
24 /* Initialize CPU (if user asked for it) */
25 if (mch->cpu_type) {
26 cpu = cpu_create(mch->cpu_type);
3964ec6c
TH
27 if (!cpu) {
28 error_report("Unable to initialize CPU");
29 exit(1);
30 }
31 }
32
33 /* RAM at address zero */
c74e7190
IM
34 if (mch->ram) {
35 memory_region_add_subregion(get_system_memory(), 0, mch->ram);
3964ec6c 36 }
991db247
TH
37
38 if (mch->kernel_filename) {
39 error_report("The -kernel parameter is not supported "
40 "(use the generic 'loader' device instead).");
41 exit(1);
42 }
b4a738bf
AL
43}
44
e264d29d 45static void machine_none_machine_init(MachineClass *mc)
b4a738bf 46{
e264d29d
EH
47 mc->desc = "empty machine";
48 mc->init = machine_none_init;
3964ec6c
TH
49 mc->max_cpus = 1;
50 mc->default_ram_size = 0;
c74e7190 51 mc->default_ram_id = "ram";
9e7871b1
PMD
52 mc->no_serial = 1;
53 mc->no_parallel = 1;
54 mc->no_floppy = 1;
55 mc->no_cdrom = 1;
56 mc->no_sdcard = 1;
b4a738bf
AL
57}
58
e264d29d 59DEFINE_MACHINE("none", machine_none_machine_init)