If there is a CPU count from QEMU FW CFG then use that over the value
from the CMOS.

Signed-off-by: Rob Bradford <robert.bradf...@intel.com>
---
 src/fw/paravirt.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c
index 26e0132..a9e5f2c 100644
--- a/src/fw/paravirt.c
+++ b/src/fw/paravirt.c
@@ -419,12 +419,12 @@ qemu_get_present_cpus_count(void)
     u16 smp_count = 0;
     if (qemu_cfg_enabled()) {
         qemu_cfg_read_entry(&smp_count, QEMU_CFG_NB_CPUS, sizeof(smp_count));
+        if (smp_count > 0) {
+            return smp_count;
+        }
     }
-    u16 cmos_cpu_count = rtc_read(CMOS_BIOS_SMP_COUNT) + 1;
-    if (smp_count < cmos_cpu_count) {
-        smp_count = cmos_cpu_count;
-    }
-    return smp_count;
+
+    return rtc_read(CMOS_BIOS_SMP_COUNT) + 1;
 }
 
 struct e820_reservation {
-- 
2.19.2


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios

Reply via email to