coreboot/src/cpu
Patrick Rudolph ce51b34186 cpu/x86/mpinit: Serialize microcode updates for HT threads
This change affects Intel CPUs only. As most platforms are doing
uCode update using FIT, they aren't affected by this code either.

Update microcode in MP-init using a single spinlock when running on
a Hyper-Threading enabled CPU on pre FIT platforms.
This will slow down the MP-init boot flow.

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 use the existing global spinlock already present in MPinit code.
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.

This change is a counterproposal to the previous published patch series
being much more unsophisticated.

Change-Id: I27bf5177859c12e92d6ce7a2966c965d7262b472
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49303
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-01-15 11:20:41 +00:00
..
amd ACPI: Remove ACPI_NO_SMI_GNVS 2021-01-07 22:23:13 +00:00
armltd Kconfig: comply to Linux 5.3's Kconfig language rules 2019-11-23 20:09:56 +00:00
intel cpu/x86/mpinit: Serialize microcode updates for HT threads 2021-01-15 11:20:41 +00:00
qemu-power8 src: Remove leading blank lines from SPDX header 2020-05-18 07:00:27 +00:00
qemu-x86 mb/emulation/qemu: Copy page tables to DRAM in assembly 2021-01-11 07:34:19 +00:00
x86 cpu/x86/mpinit: Serialize microcode updates for HT threads 2021-01-15 11:20:41 +00:00
Kconfig arch/x86: Implement RESET_VECTOR_IN_RAM 2020-04-29 05:38:00 +00:00
Makefile.inc cpu/Makefile.inc: Clean up non-existing directory inclusion 2020-08-17 06:24:23 +00:00