aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-03-28 22:28:08 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-03-28 22:28:08 +0000
commit298e01b6beb519c2adbd57cf4d60fe1e3d78d87f (patch)
tree7ad7fe095189afa06dd99b79fa23723de812b613 /hw
parenta07c67dfccb1e234cd92cfb459caee802bc0e0dd (diff)
Tell BIOS about the number of CPUs
Previously, the BIOS would probe the CPUs for SMP guests. This tends to be very unreliably because of startup timing issues. By passing the number of CPUs in the CMOS, the BIOS can detect the number of CPUs much more reliably. (Anthony Liguori) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4114 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw')
-rw-r--r--hw/pc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 2a569c7bcb..4fec2d4048 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -213,6 +213,9 @@ static void cmos_init(int ram_size, const char *boot_device, BlockDriverState **
rtc_set_memory(s, 0x34, val);
rtc_set_memory(s, 0x35, val >> 8);
+ /* set the number of CPU */
+ rtc_set_memory(s, 0x5f, smp_cpus - 1);
+
/* set boot devices, and disable floppy signature check if requested */
#define PC_MAX_BOOT_DEVICES 3
nbds = strlen(boot_device);