]> xenbits.xensource.com Git - seabios.git/commitdiff
coreboot: add qemu detection
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 3 Jun 2013 06:06:27 +0000 (08:06 +0200)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 13 Jun 2013 01:42:15 +0000 (21:42 -0400)
src/coreboot.c

index 120bc2ebe6e2ee0daa13f1d9e180e18823ace62c..2c8bd2d4f58584c41a32f96fd684da793bdcc17d 100644 (file)
@@ -14,6 +14,7 @@
 #include "config.h" // CONFIG_*
 #include "acpi.h" // find_acpi_features
 #include "pci.h" // pci_probe_devices
+#include "paravirt.h" // PlatformRunningOn
 
 
 /****************************************************************
@@ -165,6 +166,10 @@ coreboot_preinit(void)
     if (cbmb) {
         CBvendor = &cbmb->strings[cbmb->vendor_idx];
         CBpart = &cbmb->strings[cbmb->part_idx];
+        if (strcmp(CBvendor, "Emulation") == 0 &&
+            strcmp(CBpart, "QEMU x86") == 0) {
+            PlatformRunningOn |= PF_QEMU;
+        }
         dprintf(1, "Found mainboard %s %s\n", CBvendor, CBpart);
     }