diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2019-03-30 17:35:56 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-04-09 17:21:50 +0000 |
commit | 835ca8ee640c670f5e21ba30e4441c6526bdce12 (patch) | |
tree | cc54aa237a7490698184fc3208592ac7b3f900af /src/arch/x86/include | |
parent | 5ce1698138f59670ab99841ddc3b9e84ba01b571 (diff) | |
download | coreboot-835ca8ee640c670f5e21ba30e4441c6526bdce12.tar.xz |
arch/x86/cpu: Add functions to determine CPU vendor
Add two functions to determine if CPU is made by a specific vendor.
Use Kconfig symbols to allow link time optimizations.
Change-Id: I1bd6c3b59cfd992f7ba507bc9f9269669920b24f
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32130
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Julien Viard de Galbert <coreboot-review-ju@vdg.name>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/arch/x86/include')
-rw-r--r-- | src/arch/x86/include/arch/cpu.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h index b40dd1bc9e..3e464e4486 100644 --- a/src/arch/x86/include/arch/cpu.h +++ b/src/arch/x86/include/arch/cpu.h @@ -166,6 +166,16 @@ void smm_init_completion(void); void smm_lock(void); void smm_setup_structures(void *gnvs, void *tcg, void *smi1); +static inline bool cpu_is_amd(void) +{ + return CONFIG(CPU_AMD_AGESA) || CONFIG(CPU_AMD_PI); +} + +static inline bool cpu_is_intel(void) +{ + return CONFIG(CPU_INTEL_COMMON) || CONFIG(SOC_INTEL_COMMON); +} + #ifndef __SIMPLE_DEVICE__ struct device; |