1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* ----------------------------------------------------------------------- *
4 * Copyright 2008 rPath, Inc. - All Rights Reserved
6 * ----------------------------------------------------------------------- */
9 * This is a host program to preprocess the CPU strings into a
10 * compact format suitable for the setup code.
15 #include "../include/asm/required-features.h"
16 #include "../include/asm/disabled-features.h"
17 #include "../include/asm/cpufeatures.h"
18 #include "../include/asm/vmxfeatures.h"
19 #include "../kernel/cpu/capflags.c"
26 printf("static const char x86_cap_strs[] =\n");
28 for (i
= 0; i
< NCAPINTS
; i
++) {
29 for (j
= 0; j
< 32; j
++) {
30 str
= x86_cap_flags
[i
*32+j
];
32 if (i
== NCAPINTS
-1 && j
== 31) {
33 /* The last entry must be unconditional; this
34 also consumes the compiler-added null
38 printf("\t\"\\x%02x\\x%02x\"\"%s\"\n",
41 printf("#if REQUIRED_MASK%d & (1 << %d)\n"
42 "\t\"\\x%02x\\x%02x\"\"%s\\0\"\n"