summaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/skylake/cpu.c')
-rw-r--r--src/soc/intel/skylake/cpu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c
index f92635da77..e9bb29f7a6 100644
--- a/src/soc/intel/skylake/cpu.c
+++ b/src/soc/intel/skylake/cpu.c
@@ -435,6 +435,17 @@ static int adjust_apic_id(int index, int apic_id)
return index;
}
+/* Check whether the current CPU is the sibling hyperthread. */
+int is_secondary_thread(void)
+{
+ int apic_id;
+ apic_id = lapicid();
+
+ if (!ht_disabled && (apic_id & 1))
+ return 1;
+ return 0;
+}
+
static void per_cpu_smm_trigger(void)
{
/* Relocate the SMM handler. */