summaryrefslogtreecommitdiff
path: root/src/cpu/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86')
-rw-r--r--src/cpu/x86/sipi_vector.S17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cpu/x86/sipi_vector.S b/src/cpu/x86/sipi_vector.S
index 02ad0d367a..e1b90890ed 100644
--- a/src/cpu/x86/sipi_vector.S
+++ b/src/cpu/x86/sipi_vector.S
@@ -102,6 +102,13 @@ _start:
/* Save CPU number. */
mov %ecx, %esi
+ /*
+ * The following code only needs to run on Intel platforms and thus the caller
+ * doesn't provide a microcode_ptr if not on Intel.
+ * On Intel platforms which update microcode using FIT the version check will
+ * also skip the microcode update.
+ */
+
/* Determine if one should check microcode versions. */
mov microcode_ptr, %edi
test %edi, %edi
@@ -116,6 +123,16 @@ _start:
test %edx, %edx
jnz microcode_done
+ /*
+ * Intel SDM and various BWGs specify to use a semaphore to update microcode
+ * on one thread per core on Hyper-Threading enabled CPUs. Due to this complex
+ * code would be necessary to determine the core #ID, initializing and picking
+ * the right semaphore out of CONFIG_MAX_CPUS / 2.
+ * Instead of the per core approachm, as recommended, use one global spinlock.
+ * Assuming that only pre-FIT platforms with Hyper-Threading enabled and at
+ * most 8 threads will ever run into this condition, the boot delay is negligible.
+ */
+
/* Determine if parallel microcode loading is allowed. */
cmpl $0xffffffff, microcode_lock
je load_microcode