diff options
author | Simon Glass <sjg@chromium.org> | 2020-09-22 12:45:14 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-09-25 11:27:18 +0800 |
commit | 9b3e6d4c1f86b27f320ef9c5857a9ef223b2b356 (patch) | |
tree | bc5d7f6eee15b38fe84723811d775609cbb9f6f9 /arch/x86/cpu/intel_common/cpu.c | |
parent | 350c7f52b93c5612dd3d53966bd54cb68b94d80b (diff) |
x86: acpi: Add common Intel ACPI tables
Add various tables that are common to Intel CPUs. These functions can be
used by arch-specific CPU code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/cpu/intel_common/cpu.c')
-rw-r--r-- | arch/x86/cpu/intel_common/cpu.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/cpu/intel_common/cpu.c b/arch/x86/cpu/intel_common/cpu.c index cb4ef84013..d8a3d60ae7 100644 --- a/arch/x86/cpu/intel_common/cpu.c +++ b/arch/x86/cpu/intel_common/cpu.c @@ -291,3 +291,17 @@ int cpu_get_max_turbo_ratio(void) return msr.lo & 0xff; } + +int cpu_get_cores_per_package(void) +{ + struct cpuid_result result; + int cores = 1; + + if (gd->arch.x86_vendor != X86_VENDOR_INTEL) + return 1; + + result = cpuid_ext(0xb, 1); + cores = result.ebx & 0xff; + + return cores; +} |