Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x86 microcode loading and misc fixes #144

Merged
merged 7 commits into from
Nov 30, 2024
Merged

x86 microcode loading and misc fixes #144

merged 7 commits into from
Nov 30, 2024

Conversation

heatd
Copy link
Owner

@heatd heatd commented Nov 30, 2024

No description provided.

Add Intel microcode loading as per the Intel SDM, plus a wbinvd tip from
Linux. We expect to get a intel-ucode.img in the Linux format (ASCII
cpio archive). Building an iso with intel-ucode is supported by passing
INTEL_UCODE=<path-to-intel-ucode.img> when doing make for your desired
iso target.

Tested on a KBL, Ivy Bridge.

Signed-off-by: Pedro Falcato <[email protected]>
Remove all INFO() usages, and improve the coding style just a little
bit.

Signed-off-by: Pedro Falcato <[email protected]>
Right now, we're doing very early init - then parsing boot modules -
and only then doing the microcode load for the BSP. This results in
having possibly stale cpuid info that doesn't correspond to the current
microcode. Fix that by reloading if cpu 0. This also handles re-running
jump labels and alternatives.

Signed-off-by: Pedro Falcato <[email protected]>
This msr stops us from seeing the whole cpuid for the CPU, in case we're
Windows NT 4. We're not Windows NT 4.

Signed-off-by: Pedro Falcato <[email protected]>
lock add on x86 has the exact full-serializing semantics we want for
smp_mb, while being ~4x as fast as mfence.

Signed-off-by: Pedro Falcato <[email protected]>
@heatd heatd merged commit 2be7203 into master Nov 30, 2024
20 checks passed
@heatd heatd deleted the x86 branch November 30, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant