Fix 64 bit issue in slirp
[qemu] / pc-bios / bios-pq / 0003_smp-startup-poll.patch
1 From: Avi Kivity <avi@qumranet.com>
2
3 instead of timing out, wait until all cpus are up
4
5 diff --git a/bios/rombios32.c b/bios/rombios32.c
6 index ef98a41..05ba40d 100644
7 --- a/bios/rombios32.c
8 +++ b/bios/rombios32.c
9 @@ -512,7 +512,12 @@ void smp_probe(void)
10          sipi_vector = AP_BOOT_ADDR >> 12;
11          writel(APIC_BASE + APIC_ICR_LOW, 0x000C4600 | sipi_vector);
12  
13 +#ifndef BX_QEMU
14          delay_ms(10);
15 +#else
16 +        while (cmos_readb(0x5f) + 1 != readw(&smp_cpus))
17 +            ;
18 +#endif
19      }
20      BX_INFO("Found %d cpu(s)\n", readw(&smp_cpus));
21  }