Commit 298e01b6beb519c2adbd57cf4d60fe1e3d78d87f

Authored by aurel32
1 parent a07c67df

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
Showing 1 changed file with 3 additions and 0 deletions
... ... @@ -213,6 +213,9 @@ static void cmos_init(int ram_size, const char *boot_device, BlockDriverState **
213 213 rtc_set_memory(s, 0x34, val);
214 214 rtc_set_memory(s, 0x35, val >> 8);
215 215  
  216 + /* set the number of CPU */
  217 + rtc_set_memory(s, 0x5f, smp_cpus - 1);
  218 +
216 219 /* set boot devices, and disable floppy signature check if requested */
217 220 #define PC_MAX_BOOT_DEVICES 3
218 221 nbds = strlen(boot_device);
... ...