summaryrefslogtreecommitdiffstats
path: root/arch/i386/boot/cpu.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-10-11 11:16:45 +0200
committerThomas Gleixner <tglx@linutronix.de>2007-10-11 11:16:45 +0200
commit96ae6ea0be1b902c28b3b463c27da42b41e2b63a (patch)
treefbc18761d4fa93d7b0f6dbf3496289fa32bd363a /arch/i386/boot/cpu.c
parent0530bf37cebcf22a73652937c2340bc1ebd92000 (diff)
i386: move boot
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/i386/boot/cpu.c')
-rw-r--r--arch/i386/boot/cpu.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/arch/i386/boot/cpu.c b/arch/i386/boot/cpu.c
deleted file mode 100644
index 2a5c32da585..00000000000
--- a/arch/i386/boot/cpu.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- linux-c -*- ------------------------------------------------------- *
- *
- * Copyright (C) 1991, 1992 Linus Torvalds
- * Copyright 2007 rPath, Inc. - All Rights Reserved
- *
- * This file is part of the Linux kernel, and is made available under
- * the terms of the GNU General Public License version 2.
- *
- * ----------------------------------------------------------------------- */
-
-/*
- * arch/i386/boot/cpu.c
- *
- * Check for obligatory CPU features and abort if the features are not
- * present.
- */
-
-#include "boot.h"
-#include "bitops.h"
-#include <asm/cpufeature.h>
-
-static char *cpu_name(int level)
-{
- static char buf[6];
-
- if (level == 64) {
- return "x86-64";
- } else {
- sprintf(buf, "i%d86", level);
- return buf;
- }
-}
-
-int validate_cpu(void)
-{
- u32 *err_flags;
- int cpu_level, req_level;
-
- check_cpu(&cpu_level, &req_level, &err_flags);
-
- if (cpu_level < req_level) {
- printf("This kernel requires an %s CPU, ",
- cpu_name(req_level));
- printf("but only detected an %s CPU.\n",
- cpu_name(cpu_level));
- return -1;
- }
-
- if (err_flags) {
- int i, j;
- puts("This kernel requires the following features "
- "not present on the CPU:\n");
-
- for (i = 0; i < NCAPINTS; i++) {
- u32 e = err_flags[i];
-
- for (j = 0; j < 32; j++) {
- if (e & 1)
- printf("%d:%d ", i, j);
-
- e >>= 1;
- }
- }
- putchar('\n');
- return -1;
- } else {
- return 0;
- }
-}