aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake/include
diff options
context:
space:
mode:
authorRobbie Zhang <robbie.zhang@intel.com>2017-02-14 15:12:17 -0800
committerMartin Roth <martinroth@google.com>2017-02-17 17:46:05 +0100
commit2b194d97411bd86303e0fec3a2edae2a718466bc (patch)
tree0e9081f2884b388550dcfbee27b3ef2495a59e38 /src/soc/intel/skylake/include
parentd2f16cac749065e373b0558c850a8d9d2254c700 (diff)
intel/skylake: add function is_secondary_thread()
There are MSRs that are programmable per-core not per-thread, so add a function to check whether current executing CPU is a primary core or a "hyperthreaded"/secondary core. For instance when trying to program Core PRMRR MSRs(per-core) with mp_init, cpu exception is thrown from the secondary thread. This function was used to avoid that. Potentially this function can be put to common code or arch/x86 or cpu/x86. BUG=chrome-os-partner:62438 BRANCH=NONE TEST=Tested on Eve, verified core PRMRR MSRs get programmed only on primary thread avoiding exeception. Change-Id: Ic9648351fadf912164a39206788859baf3e5c173 Signed-off-by: Robbie Zhang <robbie.zhang@intel.com> Reviewed-on: https://review.coreboot.org/18366 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/skylake/include')
-rw-r--r--src/soc/intel/skylake/include/soc/cpu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/soc/intel/skylake/include/soc/cpu.h b/src/soc/intel/skylake/include/soc/cpu.h
index 35a30819b2..33fb2f1b3a 100644
--- a/src/soc/intel/skylake/include/soc/cpu.h
+++ b/src/soc/intel/skylake/include/soc/cpu.h
@@ -67,5 +67,6 @@ int cpu_config_tdp_levels(void);
u32 cpu_family_model(void);
u32 cpu_stepping(void);
int cpu_is_ult(void);
+int is_secondary_thread(void);
#endif