Detect CPUID instruction before using it.
[seabios.git] / src / paravirt.h
index 7bf34b1465b344c19fd3f9ca8c18fc263f503621..96740893b8ba790d07e76fa05f94a2d97a867a4f 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __PV_H
 #define __PV_H
 
+#include "config.h" // CONFIG_COREBOOT
 #include "util.h"
 
 /* This CPUID returns the signature 'KVMKVMKVM' in ebx, ecx, and edx.  It
@@ -10,6 +11,8 @@
 
 static inline int kvm_para_available(void)
 {
+    if (CONFIG_COREBOOT)
+        return 0;
     unsigned int eax, ebx, ecx, edx;
     char signature[13];
 
@@ -101,6 +104,7 @@ static inline const char* romfile_name(u32 fileid) {
     return qemu_cfg_name_file(fileid);
 }
 void *romfile_loadfile(const char *name, int *psize);
+u64 romfile_loadint(const char *name, u64 defval);
 
 u32 qemu_cfg_e820_entries(void);
 void* qemu_cfg_e820_load_next(void *addr);