Skip to content

Instantly share code, notes, and snippets.

@micolous
Created July 31, 2012 13:12
Show Gist options
  • Save micolous/3216946 to your computer and use it in GitHub Desktop.
Save micolous/3216946 to your computer and use it in GitHub Desktop.
--- a/arch/x86/boot/cpu.c 2012-07-31 21:34:00.000000000 +0930
+++ b/arch/x86/boot/cpu.c 2012-07-31 22:36:03.000000000 +0930
@@ -17,6 +17,7 @@
#include "boot.h"
#include "cpustr.h"
+#define SKIP_VALIDATE_CPU
static char *cpu_name(int level)
{
@@ -37,6 +38,11 @@
u32 *err_flags;
int cpu_level, req_level;
const unsigned char *msg_strs;
+
+#ifdef SKIP_VALIDATE_CPU
+ puts("Skipping validating CPUID, this could be dangerous!\n");
+ return 0;
+#else
check_cpu(&cpu_level, &req_level, &err_flags);
@@ -82,4 +88,5 @@
} else {
return 0;
}
+#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment