aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/bios-pq/0003_smp-startup-poll.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pc-bios/bios-pq/0003_smp-startup-poll.patch')
-rw-r--r--pc-bios/bios-pq/0003_smp-startup-poll.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/pc-bios/bios-pq/0003_smp-startup-poll.patch b/pc-bios/bios-pq/0003_smp-startup-poll.patch
new file mode 100644
index 000000000..cd1a3ff03
--- /dev/null
+++ b/pc-bios/bios-pq/0003_smp-startup-poll.patch
@@ -0,0 +1,21 @@
+From: Avi Kivity <avi@qumranet.com>
+
+instead of timing out, wait until all cpus are up
+
+diff --git a/bios/rombios32.c b/bios/rombios32.c
+index ef98a41..05ba40d 100644
+--- a/bios/rombios32.c
++++ b/bios/rombios32.c
+@@ -512,7 +512,12 @@ void smp_probe(void)
+ sipi_vector = AP_BOOT_ADDR >> 12;
+ writel(APIC_BASE + APIC_ICR_LOW, 0x000C4600 | sipi_vector);
+
++#ifndef BX_QEMU
+ delay_ms(10);
++#else
++ while (cmos_readb(0x5f) + 1 != readw(&smp_cpus))
++ ;
++#endif
+ }
+ BX_INFO("Found %d cpu(s)\n", readw(&smp_cpus));
+ }