diff options
author | Simon Glass | 2016-03-11 22:06:52 -0700 |
---|---|---|
committer | Bin Meng | 2016-03-17 10:27:24 +0800 |
commit | 342727ace6fd3dd5c96bb9342eabe96614ed208a (patch) | |
tree | 6d82aab5f0ea75271d458080075881d31efd6e70 /arch/x86/include/asm/cpu.h | |
parent | e4d6ab0c2cb8456f80d0ee4e123a34029d5a5c41 (diff) |
x86: cpu: Add functions to return the family and stepping
These two identifiers can be useful for drivers which need to adjust their
behaviour depending on the CPU family or stepping (revision).
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/include/asm/cpu.h')
-rw-r--r-- | arch/x86/include/asm/cpu.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h index 18b03459863..987dc6512a3 100644 --- a/arch/x86/include/asm/cpu.h +++ b/arch/x86/include/asm/cpu.h @@ -260,4 +260,18 @@ void cpu_call32(ulong code_seg32, ulong target, ulong table); */ int cpu_jump_to_64bit(ulong setup_base, ulong target); +/** + * cpu_get_family_model() - Get the family and model for the CPU + * + * @return the CPU ID masked with 0x0fff0ff0 + */ +u32 cpu_get_family_model(void); + +/** + * cpu_get_stepping() - Get the stepping value for the CPU + * + * @return the CPU ID masked with 0xf + */ +u32 cpu_get_stepping(void); + #endif |