Index: hw/sun4m.c =================================================================== RCS file: /sources/qemu/qemu/hw/sun4m.c,v retrieving revision 1.66 diff -p -u -r1.66 sun4m.c --- hw/sun4m.c 2 Dec 2007 04:51:10 -0000 1.66 +++ hw/sun4m.c 2 Dec 2007 23:03:18 -0000 @@ -82,6 +82,7 @@ struct hwdef { uint32_t intbit_to_level[32]; uint64_t max_mem; const char * const default_cpu_model; + unsigned int max_cpus; }; /* TSC handling */ @@ -345,10 +346,16 @@ static void sun4m_hw_init(const struct h if (!cpu_model) cpu_model = hwdef->default_cpu_model; + if (smp_cpus > hwdef->max_cpus) { + fprintf(stderr, "qemu: Too many CPUs for this machine: %d, maximum %d\n", + smp_cpus, hwdef->max_cpus); + exit(1); + } + for(i = 0; i < smp_cpus; i++) { env = cpu_init(cpu_model); if (!env) { - fprintf(stderr, "Unable to find Sparc CPU definition\n"); + fprintf(stderr, "qemu: Unable to find Sparc CPU definition\n"); exit(1); } cpu_sparc_set_id(env, i); @@ -514,8 +521,9 @@ static const struct hwdef hwdefs[] = { 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12, 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0, }, - .max_mem = 0x10000000, + .max_mem = 0x10000000, // 256M (8 32M SIMMs) .default_cpu_model = "Fujitsu MB86904", + .max_cpus = 1, }, /* SS-10 */ { @@ -550,8 +558,9 @@ static const struct hwdef hwdefs[] = { 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12, 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0, }, - .max_mem = 0xffffffff, // XXX actually first 62GB ok + .max_mem = 0x20000000, // 512M (8 64M SIMMs) .default_cpu_model = "TI SuperSparc II", + .max_cpus = 4, }, /* SS-600MP */ { @@ -586,8 +595,9 @@ static const struct hwdef hwdefs[] = { 2, 3, 5, 7, 9, 11, 0, 14, 3, 5, 7, 9, 11, 13, 12, 12, 6, 0, 4, 10, 8, 0, 11, 0, 0, 0, 0, 0, 15, 0, 15, 0, }, - .max_mem = 0xffffffff, // XXX actually first 62GB ok + .max_mem = 0x40000000, // 1G (64 16M SIMMs) .default_cpu_model = "TI SuperSparc II", + .max_cpus = 4, }, };
This patch sets the maximum number of CPUs and memory to what is
supported by the actual hardware.
- [Qemu-devel] [PATCH] sparc32 machine specific maximums Robert Reif
- Re: [Qemu-devel] [PATCH] sparc32 machine specific max... Blue Swirl
- Re: [Qemu-devel] [PATCH] sparc32 machine specific... Robert Reif
- Re: [Qemu-devel] [PATCH] sparc32 machine spec... Blue Swirl
- Re: [Qemu-devel] [PATCH] sparc32 machine ... Robert Reif
- Re: [Qemu-devel] [PATCH] sparc32 mac... Blue Swirl
- Re: [Qemu-devel] [PATCH] sparc32 machine spec... Paul Brook
- Re: [Qemu-devel] [PATCH] sparc32 machine ... Blue Swirl
- Re: [Qemu-devel] [PATCH] sparc32 machine specific... Thiemo Seufer
- Re: [Qemu-devel] [PATCH] sparc32 machine spec... Blue Swirl
- Re: [Qemu-devel] [PATCH] sparc32 machine spec... Andreas Färber