Commit b2097003 authored by aliguori's avatar aliguori
Browse files

machine struct - specify max_cpus at the per machine level (Jes Sorensen)



Introduce a max_cpus per-machine variable, allowing individual boards
to limit it's number of CPUs. Check requested number of CPUs in setup
code and exit if it exceeds the supported number for the machine.
This also renders the static MAX_CPUS check obsolete, so remove this
from vl.c.
Signed-off-by: default avatarJes Sorensen <jes@sgi.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5443 c046a42c-6fe2-441c-8c8c-71466251a162
parent 4b32e168
......@@ -92,4 +92,5 @@ QEMUMachine an5206_machine = {
.desc = "Arnewsh 5206",
.init = an5206_init,
.ram_require = 512,
.max_cpus = 1,
};
......@@ -18,6 +18,7 @@ typedef struct QEMUMachine {
ram_addr_t ram_require;
int nodisk_ok;
int use_scsi;
int max_cpus;
struct QEMUMachine *next;
} QEMUMachine;
......
......@@ -66,4 +66,5 @@ QEMUMachine dummy_m68k_machine = {
.name = "dummy",
.desc = "Dummy board",
.init = dummy_m68k_init,
.max_cpus = 1,
};
......@@ -145,4 +145,5 @@ QEMUMachine bareetraxfs_machine = {
.desc = "Bare ETRAX FS board",
.init = bareetraxfs_init,
.ram_require = 0x8000000,
.max_cpus = 1,
};
......@@ -126,6 +126,7 @@ QEMUMachine connex_machine = {
.desc = "Gumstix Connex (PXA255)",
.init = connex_init,
.ram_require = (0x05000000 + PXA2XX_INTERNAL_SIZE) | RAMSIZE_FIXED,
.max_cpus = 1,
};
QEMUMachine verdex_machine = {
......@@ -133,4 +134,5 @@ QEMUMachine verdex_machine = {
.desc = "Gumstix Verdex (PXA270)",
.init = verdex_init,
.ram_require = (0x12000000 + PXA2XX_INTERNAL_SIZE) | RAMSIZE_FIXED,
.max_cpus = 1,
};
......@@ -544,4 +544,5 @@ QEMUMachine integratorcp_machine = {
.desc = "ARM Integrator/CP (ARM926EJ-S)",
.init = integratorcp_init,
.ram_require = 0x100000,
.max_cpus = 1,
};
......@@ -149,4 +149,5 @@ QEMUMachine mainstone2_machine = {
.init = mainstone_init,
.ram_require = (MAINSTONE_RAM + MAINSTONE_ROM + 2 * MAINSTONE_FLASH +
PXA2XX_INTERNAL_SIZE) | RAMSIZE_FIXED,
.max_cpus = 1,
};
......@@ -309,4 +309,5 @@ QEMUMachine mcf5208evb_machine = {
.desc = "MCF5206EVB",
.init = mcf5208evb_init,
.ram_require = 16384,
.max_cpus = 1,
};
......@@ -278,6 +278,7 @@ QEMUMachine mips_magnum_machine = {
.init = mips_magnum_init,
.ram_require = MAGNUM_BIOS_SIZE + VGA_RAM_SIZE,
.nodisk_ok = 1,
.max_cpus = 1,
};
QEMUMachine mips_pica61_machine = {
......@@ -286,4 +287,5 @@ QEMUMachine mips_pica61_machine = {
.init = mips_pica61_init,
.ram_require = MAGNUM_BIOS_SIZE + VGA_RAM_SIZE,
.nodisk_ok = 1,
.max_cpus = 1,
};
......@@ -950,4 +950,5 @@ QEMUMachine mips_malta_machine = {
.init = mips_malta_init,
.ram_require = VGA_RAM_SIZE + BIOS_SIZE,
.nodisk_ok = 1,
.max_cpus = 1,
};
......@@ -196,4 +196,5 @@ QEMUMachine mips_mipssim_machine = {
.init = mips_mipssim_init,
.ram_require = BIOS_SIZE + VGA_RAM_SIZE /* unused */,
.nodisk_ok = 1,
.max_cpus = 1,
};
......@@ -287,4 +287,5 @@ QEMUMachine mips_machine = {
.init = mips_r4k_init,
.ram_require = VGA_RAM_SIZE + BIOS_SIZE,
.nodisk_ok = 1,
.max_cpus = 1,
};
......@@ -1513,4 +1513,5 @@ QEMUMachine musicpal_machine = {
.desc = "Marvell 88w8618 / MusicPal (ARM926EJ-S)",
.init = musicpal_init,
.ram_require = MP_RAM_DEFAULT_SIZE + MP_SRAM_SIZE + MP_FLASH_SIZE_MAX + RAMSIZE_FIXED,
.max_cpus = 1,
};
......@@ -1408,6 +1408,7 @@ QEMUMachine n800_machine = {
.desc = "Nokia N800 tablet aka. RX-34 (OMAP2420)",
.init = n800_init,
.ram_require = (0x08000000 + 0x00010000 + OMAP242X_SRAM_SIZE) | RAMSIZE_FIXED,
.max_cpus = 1,
};
QEMUMachine n810_machine = {
......@@ -1415,4 +1416,5 @@ QEMUMachine n810_machine = {
.desc = "Nokia N810 tablet aka. RX-44 (OMAP2420)",
.init = n810_init,
.ram_require = (0x08000000 + 0x00010000 + OMAP242X_SRAM_SIZE) | RAMSIZE_FIXED,
.max_cpus = 1,
};
......@@ -286,4 +286,5 @@ QEMUMachine palmte_machine = {
.desc = "Palm Tungsten|E aka. Cheetah PDA (OMAP310)",
.init = palmte_init,
.ram_require = (0x02000000 + 0x00800000 + OMAP15XX_SRAM_SIZE) | RAMSIZE_FIXED,
.max_cpus = 1,
};
......@@ -1097,6 +1097,7 @@ QEMUMachine pc_machine = {
.desc = "Standard PC",
.init = pc_init_pci,
.ram_require = VGA_RAM_SIZE + PC_MAX_BIOS_SIZE,
.max_cpus = 255,
};
QEMUMachine isapc_machine = {
......@@ -1104,4 +1105,5 @@ QEMUMachine isapc_machine = {
.desc = "ISA-only PC",
.init = pc_init_isa,
.ram_require = VGA_RAM_SIZE + PC_MAX_BIOS_SIZE,
.max_cpus = 1,
};
......@@ -359,6 +359,7 @@ QEMUMachine ref405ep_machine = {
.desc = "ref405ep",
.init = ref405ep_init,
.ram_require = (128 * 1024 * 1024 + 4096 + 512 * 1024 + BIOS_SIZE) | RAMSIZE_FIXED,
.max_cpus = 1,
};
/*****************************************************************************/
......
......@@ -335,4 +335,5 @@ QEMUMachine core99_machine = {
.desc = "Mac99 based PowerMAC",
.init = ppc_core99_init,
.ram_require = BIOS_SIZE + VGA_RAM_SIZE,
.max_cpus = 1,
};
......@@ -370,4 +370,5 @@ QEMUMachine heathrow_machine = {
.desc = "Heathrow based PowerMAC",
.init = ppc_heathrow_init,
.ram_require = BIOS_SIZE + VGA_RAM_SIZE,
.max_cpus = 1,
};
......@@ -762,4 +762,5 @@ QEMUMachine prep_machine = {
.desc = "PowerPC PREP platform",
.init = ppc_prep_init,
.ram_require = BIOS_SIZE + VGA_RAM_SIZE,
.max_cpus = 1,
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment