aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-07 20:39:39 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-07 20:39:39 +0000
commitb2097003ecad43a34851e57969eadf74181d0080 (patch)
treec229dde888def014a1f161ac7fb2737a1cd54347 /hw
parent4b32e1688000d306a676b0a5b89629b9d8da1ed7 (diff)
downloadqemu-b2097003ecad43a34851e57969eadf74181d0080.zip
qemu-b2097003ecad43a34851e57969eadf74181d0080.tar.gz
qemu-b2097003ecad43a34851e57969eadf74181d0080.tar.bz2
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: Jes Sorensen <jes@sgi.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5443 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/an5206.c1
-rw-r--r--hw/boards.h1
-rw-r--r--hw/dummy_m68k.c1
-rw-r--r--hw/etraxfs.c1
-rw-r--r--hw/gumstix.c2
-rw-r--r--hw/integratorcp.c1
-rw-r--r--hw/mainstone.c1
-rw-r--r--hw/mcf5208.c1
-rw-r--r--hw/mips_jazz.c2
-rw-r--r--hw/mips_malta.c1
-rw-r--r--hw/mips_mipssim.c1
-rw-r--r--hw/mips_r4k.c1
-rw-r--r--hw/musicpal.c1
-rw-r--r--hw/nseries.c2
-rw-r--r--hw/palm.c1
-rw-r--r--hw/pc.c2
-rw-r--r--hw/ppc405_boards.c1
-rw-r--r--hw/ppc_chrp.c1
-rw-r--r--hw/ppc_oldworld.c1
-rw-r--r--hw/ppc_prep.c1
-rw-r--r--hw/r2d.c1
-rw-r--r--hw/realview.c1
-rw-r--r--hw/shix.c1
-rw-r--r--hw/spitz.c4
-rw-r--r--hw/stellaris.c2
-rw-r--r--hw/sun4m.c12
-rw-r--r--hw/sun4u.c3
-rw-r--r--hw/tosa.c1
-rw-r--r--hw/versatilepb.c2
29 files changed, 51 insertions, 0 deletions
diff --git a/hw/an5206.c b/hw/an5206.c
index 2981263..862d0cf 100644
--- a/hw/an5206.c
+++ b/hw/an5206.c
@@ -92,4 +92,5 @@ QEMUMachine an5206_machine = {
.desc = "Arnewsh 5206",
.init = an5206_init,
.ram_require = 512,
+ .max_cpus = 1,
};
diff --git a/hw/boards.h b/hw/boards.h
index 119c2f6..d30c0fc 100644
--- a/hw/boards.h
+++ b/hw/boards.h
@@ -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;
diff --git a/hw/dummy_m68k.c b/hw/dummy_m68k.c
index fc06e9c..f7a80af 100644
--- a/hw/dummy_m68k.c
+++ b/hw/dummy_m68k.c
@@ -66,4 +66,5 @@ QEMUMachine dummy_m68k_machine = {
.name = "dummy",
.desc = "Dummy board",
.init = dummy_m68k_init,
+ .max_cpus = 1,
};
diff --git a/hw/etraxfs.c b/hw/etraxfs.c
index 4d3f694..2987c8f 100644
--- a/hw/etraxfs.c
+++ b/hw/etraxfs.c
@@ -145,4 +145,5 @@ QEMUMachine bareetraxfs_machine = {
.desc = "Bare ETRAX FS board",
.init = bareetraxfs_init,
.ram_require = 0x8000000,
+ .max_cpus = 1,
};
diff --git a/hw/gumstix.c b/hw/gumstix.c
index 29cd69d..f184648 100644
--- a/hw/gumstix.c
+++ b/hw/gumstix.c
@@ -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,
};
diff --git a/hw/integratorcp.c b/hw/integratorcp.c
index 779d46b..1ae5d2a 100644
--- a/hw/integratorcp.c
+++ b/hw/integratorcp.c
@@ -544,4 +544,5 @@ QEMUMachine integratorcp_machine = {
.desc = "ARM Integrator/CP (ARM926EJ-S)",
.init = integratorcp_init,
.ram_require = 0x100000,
+ .max_cpus = 1,
};
diff --git a/hw/mainstone.c b/hw/mainstone.c
index 52485ce..f4feb4f 100644
--- a/hw/mainstone.c
+++ b/hw/mainstone.c
@@ -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,
};
diff --git a/hw/mcf5208.c b/hw/mcf5208.c
index 3e0a811..fe3566e 100644
--- a/hw/mcf5208.c
+++ b/hw/mcf5208.c
@@ -309,4 +309,5 @@ QEMUMachine mcf5208evb_machine = {
.desc = "MCF5206EVB",
.init = mcf5208evb_init,
.ram_require = 16384,
+ .max_cpus = 1,
};
diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c
index b332a45..68e63ff 100644
--- a/hw/mips_jazz.c
+++ b/hw/mips_jazz.c
@@ -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,
};
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index 629e914..e1999d5 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -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,
};
diff --git a/hw/mips_mipssim.c b/hw/mips_mipssim.c
index dc62f69..bd5266a 100644
--- a/hw/mips_mipssim.c
+++ b/hw/mips_mipssim.c
@@ -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,
};
diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c
index 6551b02..399f452 100644
--- a/hw/mips_r4k.c
+++ b/hw/mips_r4k.c
@@ -287,4 +287,5 @@ QEMUMachine mips_machine = {
.init = mips_r4k_init,
.ram_require = VGA_RAM_SIZE + BIOS_SIZE,
.nodisk_ok = 1,
+ .max_cpus = 1,
};
diff --git a/hw/musicpal.c b/hw/musicpal.c
index ccea19f..cee3468 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -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,
};
diff --git a/hw/nseries.c b/hw/nseries.c
index ec56fad..3fd8099 100644
--- a/hw/nseries.c
+++ b/hw/nseries.c
@@ -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,
};
diff --git a/hw/palm.c b/hw/palm.c
index 79ea3a7..b45cdd6 100644
--- a/hw/palm.c
+++ b/hw/palm.c
@@ -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,
};
diff --git a/hw/pc.c b/hw/pc.c
index e7cba9a..34683e7 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -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,
};
diff --git a/hw/ppc405_boards.c b/hw/ppc405_boards.c
index c7a6959..a83f28e 100644
--- a/hw/ppc405_boards.c
+++ b/hw/ppc405_boards.c
@@ -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,
};
/*****************************************************************************/
diff --git a/hw/ppc_chrp.c b/hw/ppc_chrp.c
index 140541f..ede2924 100644
--- a/hw/ppc_chrp.c
+++ b/hw/ppc_chrp.c
@@ -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,
};
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
index 15e8022..75faeb3 100644
--- a/hw/ppc_oldworld.c
+++ b/hw/ppc_oldworld.c
@@ -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,
};
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index a955909..944935d 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -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,
};
diff --git a/hw/r2d.c b/hw/r2d.c
index 855aa41..58c93e8 100644
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -168,4 +168,5 @@ QEMUMachine r2d_machine = {
.desc = "r2d-plus board",
.init = r2d_init,
.ram_require = SDRAM_SIZE | RAMSIZE_FIXED,
+ .max_cpus = 1,
};
diff --git a/hw/realview.c b/hw/realview.c
index a9d20ed..14c001e 100644
--- a/hw/realview.c
+++ b/hw/realview.c
@@ -202,4 +202,5 @@ QEMUMachine realview_machine = {
.init = realview_init,
.ram_require = 0x1000,
.use_scsi = 1,
+ .max_cpus = 1,
};
diff --git a/hw/shix.c b/hw/shix.c
index 140efe9..3cc41fb 100644
--- a/hw/shix.c
+++ b/hw/shix.c
@@ -112,4 +112,5 @@ QEMUMachine shix_machine = {
.desc = "shix card",
.init = shix_init,
.ram_require = (0x00004000 + 0x01000000 + 0x01000000) | RAMSIZE_FIXED,
+ .max_cpus = 1,
};
diff --git a/hw/spitz.c b/hw/spitz.c
index fc77174..36b490d 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -1014,6 +1014,7 @@ QEMUMachine akitapda_machine = {
.desc = "Akita PDA (PXA270)",
.init = akita_init,
.ram_require = SPITZ_RAM + SPITZ_ROM + PXA2XX_INTERNAL_SIZE + RAMSIZE_FIXED,
+ .max_cpus = 1,
};
QEMUMachine spitzpda_machine = {
@@ -1021,6 +1022,7 @@ QEMUMachine spitzpda_machine = {
.desc = "Spitz PDA (PXA270)",
.init = spitz_init,
.ram_require = SPITZ_RAM + SPITZ_ROM + PXA2XX_INTERNAL_SIZE + RAMSIZE_FIXED,
+ .max_cpus = 1,
};
QEMUMachine borzoipda_machine = {
@@ -1028,6 +1030,7 @@ QEMUMachine borzoipda_machine = {
.desc = "Borzoi PDA (PXA270)",
.init = borzoi_init,
.ram_require = SPITZ_RAM + SPITZ_ROM + PXA2XX_INTERNAL_SIZE + RAMSIZE_FIXED,
+ .max_cpus = 1,
};
QEMUMachine terrierpda_machine = {
@@ -1035,4 +1038,5 @@ QEMUMachine terrierpda_machine = {
.desc = "Terrier PDA (PXA270)",
.init = terrier_init,
.ram_require = SPITZ_RAM + SPITZ_ROM + PXA2XX_INTERNAL_SIZE + RAMSIZE_FIXED,
+ .max_cpus = 1,
};
diff --git a/hw/stellaris.c b/hw/stellaris.c
index 5948079..4645bd6 100644
--- a/hw/stellaris.c
+++ b/hw/stellaris.c
@@ -1417,6 +1417,7 @@ QEMUMachine lm3s811evb_machine = {
.desc = "Stellaris LM3S811EVB",
.init = lm3s811evb_init,
.ram_require = (64 * 1024 + 8 * 1024) | RAMSIZE_FIXED,
+ .max_cpus = 1,
};
QEMUMachine lm3s6965evb_machine = {
@@ -1424,4 +1425,5 @@ QEMUMachine lm3s6965evb_machine = {
.desc = "Stellaris LM3S6965EVB",
.init = lm3s6965evb_init,
.ram_require = (256 * 1024 + 64 * 1024) | RAMSIZE_FIXED,
+ .max_cpus = 1,
};
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 079439a..dd0433a 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -1291,6 +1291,7 @@ QEMUMachine ss5_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
QEMUMachine ss10_machine = {
@@ -1300,6 +1301,7 @@ QEMUMachine ss10_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
QEMUMachine ss600mp_machine = {
@@ -1309,6 +1311,7 @@ QEMUMachine ss600mp_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
QEMUMachine ss20_machine = {
@@ -1318,6 +1321,7 @@ QEMUMachine ss20_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
QEMUMachine ss2_machine = {
@@ -1327,6 +1331,7 @@ QEMUMachine ss2_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
QEMUMachine voyager_machine = {
@@ -1336,6 +1341,7 @@ QEMUMachine voyager_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
QEMUMachine ss_lx_machine = {
@@ -1345,6 +1351,7 @@ QEMUMachine ss_lx_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
QEMUMachine ss4_machine = {
@@ -1354,6 +1361,7 @@ QEMUMachine ss4_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
QEMUMachine scls_machine = {
@@ -1363,6 +1371,7 @@ QEMUMachine scls_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
QEMUMachine sbook_machine = {
@@ -1372,6 +1381,7 @@ QEMUMachine sbook_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
static const struct sun4d_hwdef sun4d_hwdefs[] = {
@@ -1620,6 +1630,7 @@ QEMUMachine ss1000_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
QEMUMachine ss2000_machine = {
@@ -1629,4 +1640,5 @@ QEMUMachine ss2000_machine = {
.ram_require = PROM_SIZE_MAX + TCX_SIZE,
.nodisk_ok = 1,
.use_scsi = 1,
+ .max_cpus = 16,
};
diff --git a/hw/sun4u.c b/hw/sun4u.c
index 87669ea..a70ad20 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -589,6 +589,7 @@ QEMUMachine sun4u_machine = {
.init = sun4u_init,
.ram_require = PROM_SIZE_MAX + VGA_RAM_SIZE,
.nodisk_ok = 1,
+ .max_cpus = 16,
};
QEMUMachine sun4v_machine = {
@@ -597,6 +598,7 @@ QEMUMachine sun4v_machine = {
.init = sun4v_init,
.ram_require = PROM_SIZE_MAX + VGA_RAM_SIZE,
.nodisk_ok = 1,
+ .max_cpus = 16,
};
QEMUMachine niagara_machine = {
@@ -605,4 +607,5 @@ QEMUMachine niagara_machine = {
.init = niagara_init,
.ram_require = PROM_SIZE_MAX + VGA_RAM_SIZE,
.nodisk_ok = 1,
+ .max_cpus = 16,
};
diff --git a/hw/tosa.c b/hw/tosa.c
index 75df52e..e7b2be3 100644
--- a/hw/tosa.c
+++ b/hw/tosa.c
@@ -123,4 +123,5 @@ QEMUMachine tosapda_machine = {
.desc = "Tosa PDA (PXA255)",
.init = tosa_init,
.ram_require = TOSA_RAM + TOSA_ROM + PXA2XX_INTERNAL_SIZE + RAMSIZE_FIXED,
+ .max_cpus = 1,
};
diff --git a/hw/versatilepb.c b/hw/versatilepb.c
index f9e9988..c4c867d 100644
--- a/hw/versatilepb.c
+++ b/hw/versatilepb.c
@@ -320,6 +320,7 @@ QEMUMachine versatilepb_machine = {
.desc = "ARM Versatile/PB (ARM926EJ-S)",
.init = vpb_init,
.use_scsi = 1,
+ .max_cpus = 1,
};
QEMUMachine versatileab_machine = {
@@ -327,4 +328,5 @@ QEMUMachine versatileab_machine = {
.desc = "ARM Versatile/AB (ARM926EJ-S)",
.init = vab_init,
.use_scsi = 1,
+ .max_cpus = 1,
};