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>
This commit is contained in:
parent
5ce1698138
commit
835ca8ee64
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue