diff options
author | Richard Braun <rbraun@sceen.net> | 2018-07-07 14:40:00 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-07-07 14:44:08 +0200 |
commit | 3a1f3702ec2d4eb8e5d8528dfbcb3bed21b623cf (patch) | |
tree | 95a3787d54fd1aec1339217d993525c76964da93 /arch/x86/machine/cpu.h | |
parent | bac9dd7e6a5a8e657cc578101bff1978a638ec9e (diff) |
x86/cpu: add accessors
The accessors provide access to the width of physical addresses and
CPUID/vendor information.
Diffstat (limited to 'arch/x86/machine/cpu.h')
-rw-r--r-- | arch/x86/machine/cpu.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/x86/machine/cpu.h b/arch/x86/machine/cpu.h index 28308042..0c4e6e1d 100644 --- a/arch/x86/machine/cpu.h +++ b/arch/x86/machine/cpu.h @@ -638,6 +638,30 @@ cpu_tlb_flush_va(unsigned long va) asm volatile("invlpg (%0)" : : "r" (va) : "memory"); } +static inline unsigned int +cpu_cpuid_max_basic(const struct cpu *cpu) +{ + return cpu->cpuid_max_basic; +} + +static inline unsigned int +cpu_vendor_id(const struct cpu *cpu) +{ + return cpu->vendor_id; +} + +static inline unsigned int +cpu_family(const struct cpu *cpu) +{ + return cpu->family; +} + +static inline unsigned int +cpu_phys_addr_width(const struct cpu *cpu) +{ + return cpu->phys_addr_width; +} + /* * Get CPU frequency in Hz. */ |