-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 82862 b: refs/heads/master c: f0be6c6 h: refs/heads/master v: v3
- Loading branch information
H. Peter Anvin
authored and
Ingo Molnar
committed
Feb 4, 2008
1 parent
bb286a5
commit d2c892d
Showing
4 changed files
with
83 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: fa1408e4df53ec1e61f59c030b3488a1ef0c635d | ||
refs/heads/master: f0be6c6a697c2fe8e2efbe98cd157bdbcff969ae |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* ----------------------------------------------------------------------- * | ||
* | ||
* Copyright 2008 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 or (at your | ||
* option) any later version; incorporated herein by reference. | ||
* | ||
* ----------------------------------------------------------------------- */ | ||
|
||
/* | ||
* This is a host program to preprocess the CPU strings into a | ||
* compact format suitable for the setup code. | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
||
#include "../kernel/cpu/feature_names.c" | ||
|
||
#if NCAPFLAGS > 8 | ||
# error "Need to adjust the boot code handling of CPUID strings" | ||
#endif | ||
|
||
int main(void) | ||
{ | ||
int i; | ||
const char *str; | ||
|
||
printf("static const char x86_cap_strs[] = \n"); | ||
|
||
for (i = 0; i < NCAPINTS*32; i++) { | ||
str = x86_cap_flags[i]; | ||
|
||
if (i == NCAPINTS*32-1) { | ||
/* The last entry must be unconditional; this | ||
also consumes the compiler-added null character */ | ||
if (!str) | ||
str = ""; | ||
printf("\t\"\\x%02x\"\"%s\"\n", i, str); | ||
} else if (str) { | ||
printf("#if REQUIRED_MASK%d & (1 << %d)\n" | ||
"\t\"\\x%02x\"\"%s\\0\"\n" | ||
"#endif\n", | ||
i >> 5, i & 31, i, str); | ||
} | ||
} | ||
printf("\t;\n"); | ||
return 0; | ||
} |