From b8eaa6a5848d8d055a9b124b1b49e9dd774e7611 Mon Sep 17 00:00:00 2001 From: Andrey Petrov Date: Wed, 23 Oct 2019 15:15:08 -0700 Subject: arch/x86: Move max cpuid leaf function into arch/x86 This cpuid function (0) is same across Intel and AMD so having it in arch/x86 seems like a good idea. Change-Id: I38f1c40bceac38ed6428f74b08bf60b971644f5a Signed-off-by: Andrey Petrov Reviewed-on: https://review.coreboot.org/c/coreboot/+/36282 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks --- src/arch/x86/include/arch/cpu.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/arch/x86/include') diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h index b82473621d..9133f53065 100644 --- a/src/arch/x86/include/arch/cpu.h +++ b/src/arch/x86/include/arch/cpu.h @@ -141,6 +141,11 @@ static inline unsigned int cpuid_edx(unsigned int op) return edx; } +static inline unsigned int cpuid_get_max_func(void) +{ + return cpuid_eax(0); +} + #define X86_VENDOR_INVALID 0 #define X86_VENDOR_INTEL 1 #define X86_VENDOR_CYRIX 2 -- cgit v1.2.3