aboutsummaryrefslogtreecommitdiffstats
path: root/tools/arch/x86/kcpuid/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-04-26 09:09:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-04-26 09:09:18 -0700
commit98ee795b21733a370bfdb3ba4359d2e31e6db514 (patch)
tree61c5008625eebde02dfde1ca8acd25bd64faad76 /tools/arch/x86/kcpuid/Makefile
parentMerge tag 'x86_alternatives_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff)
parenttools/x86/kcpuid: Add AMD leaf 0x8000001E (diff)
downloadlinux-dev-98ee795b21733a370bfdb3ba4359d2e31e6db514.tar.xz
linux-dev-98ee795b21733a370bfdb3ba4359d2e31e6db514.zip
Merge tag 'x86_misc_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 tool update from Borislav Petkov: "A new kcpuid tool to dump the raw CPUID leafs of a CPU. It has the CPUID bit definitions in a separate csv file which allows for adding support for new CPUID leafs and bits without having to update the tool. The main use case for the tool is hw enablement on preproduction x86 hardware" * tag 'x86_misc_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools/x86/kcpuid: Add AMD leaf 0x8000001E tools/x86/kcpuid: Check last token too selftests/x86: Add a missing .note.GNU-stack section to thunks_32.S tools/x86/kcpuid: Add AMD Secure Encryption leaf tools/x86: Add a kcpuid tool to show raw CPU features
Diffstat (limited to 'tools/arch/x86/kcpuid/Makefile')
-rw-r--r--tools/arch/x86/kcpuid/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/arch/x86/kcpuid/Makefile b/tools/arch/x86/kcpuid/Makefile
new file mode 100644
index 000000000000..87b554fab14b
--- /dev/null
+++ b/tools/arch/x86/kcpuid/Makefile
@@ -0,0 +1,24 @@
+# SPDX-License-Identifier: GPL-2.0
+# Makefile for x86/kcpuid tool
+
+kcpuid : kcpuid.c
+
+CFLAGS = -Wextra
+
+BINDIR ?= /usr/sbin
+
+HWDATADIR ?= /usr/share/misc/
+
+override CFLAGS += -O2 -Wall -I../../../include
+
+%: %.c
+ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
+
+.PHONY : clean
+clean :
+ @rm -f kcpuid
+
+install : kcpuid
+ install -d $(DESTDIR)$(BINDIR)
+ install -m 755 -p kcpuid $(DESTDIR)$(BINDIR)/kcpuid
+ install -m 444 -p cpuid.csv $(HWDATADIR)/cpuid.csv