diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2015-05-29 16:52:50 +0200 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2015-06-10 05:34:01 +0200 |
commit | 0f9aa1c9cd49d6c3f8545ce50bbeb79feb7f615b (patch) | |
tree | 0904c509a5f0708ef4a0e3a70d5639c35ade0d6a /src/cpu/intel/model_2065x/model_2065x_init.c | |
parent | bbd2647b388320b10ae836f65b3d35754113dc02 (diff) |
model_2065x: Use common i945-ivy TSEG SMM init.
Change-Id: I0302cbaeb45a55a4cfee94692eb7372f2b6b206d
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/10468
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/cpu/intel/model_2065x/model_2065x_init.c')
-rw-r--r-- | src/cpu/intel/model_2065x/model_2065x_init.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/cpu/intel/model_2065x/model_2065x_init.c b/src/cpu/intel/model_2065x/model_2065x_init.c index 8e6970ee23..991bab89e0 100644 --- a/src/cpu/intel/model_2065x/model_2065x_init.c +++ b/src/cpu/intel/model_2065x/model_2065x_init.c @@ -35,6 +35,7 @@ #include <pc80/mc146818rtc.h> #include "model_2065x.h" #include "chip.h" +#include <cpu/intel/smm/gen1/smi.h> /* * List of supported C-states in this processor @@ -113,6 +114,28 @@ static acpi_cstate_t cstate_map[] = { { 0 } }; +int cpu_get_apic_id_map(int *apic_id_map) +{ + int i; + struct cpuid_result result; + unsigned threads_per_package, threads_per_core; + + /* Logical processors (threads) per core */ + result = cpuid_ext(0xb, 0); + threads_per_core = result.ebx & 0xffff; + + /* Logical processors (threads) per package */ + result = cpuid_ext(0xb, 1); + threads_per_package = result.ebx & 0xffff; + + for (i = 0; i < threads_per_package && i < CONFIG_MAX_CPUS; ++i) { + apic_id_map[i] = (i % threads_per_core) + + ((i / threads_per_core) << 2); + } + + return threads_per_package; +} + static void enable_vmx(void) { struct cpuid_result regs; |