[PATCH 04/10] Remove device access from loop to make it faster when running in emulation.

Magnus Christensson mch at virtutech.com
Tue Nov 3 12:51:17 CET 2009


---
 src/smp.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/smp.c b/src/smp.c
index a912857..71b0da8 100644
--- a/src/smp.c
+++ b/src/smp.c
@@ -97,11 +97,13 @@ smp_probe(void)
     writel(APIC_ICR_LOW, 0x000C4600 | sipi_vector);
 
     // Wait for other CPUs to process the SIPI.
-    if (CONFIG_COREBOOT)
+    if (CONFIG_COREBOOT) {
         msleep(10);
-    else
-        while (inb_cmos(CMOS_BIOS_SMP_COUNT) + 1 != readl(&CountCPUs))
-            ;
+    } else {
+        u8 cmos_smp_count = inb_cmos(CMOS_BIOS_SMP_COUNT);
+        while (cmos_smp_count + 1 != readl(&CountCPUs))
+             ;
+    }
 
     // Restore memory.
     *(u64*)BUILD_AP_BOOT_ADDR = old;
-- 
1.6.2.5


--------------080100040501080908060605
Content-Type: text/x-patch;
 name="0005-Initialize-the-LINT-LVTs-on-the-local-APIC-of-the-BS.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0005-Initialize-the-LINT-LVTs-on-the-local-APIC-of-the-BS.pa";
 filename*1="tch"



More information about the coreboot mailing list