diff options
| author | Dave Hansen <dave.hansen@linux.intel.com> | 2026-03-04 10:10:18 -0800 |
|---|---|---|
| committer | Dave Hansen <dave.hansen@linux.intel.com> | 2026-03-05 12:25:18 -0800 |
| commit | 238be4ba87605da69de2131e8736be7a0d299e00 (patch) | |
| tree | ca682a8f05bc8fa7f4214d5a681d92ae60d4fcc1 /rust/kernel/ptr | |
| parent | 11439c4635edd669ae435eec308f4ab8a0804808 (diff) | |
x86/microcode: Refactor platform ID enumeration into a helper
Today, the only code that cares about the platform ID is the microcode
update code itself. To facilitate storing the platform ID in a more
generic place and using it outside of the microcode update itself, put
the enumeration into a helper function. Mirror
intel_get_microcode_revision()'s naming and location.
But, moving away from intel_collect_cpu_info() means that the model
and family information in CPUID is not readily available. Just call
CPUID again.
Note that the microcode header is a mask of supported platform IDs.
Only stick the ID part in the helper. Leave the 1<<id part in the
microcode handling.
Also note that the PII is weird. It does not really have a platform
ID because it doesn't even have the MSR. Just consider it to be
platform ID 0. Instead of saying >=PII, say <=PII. The PII is the
real oddball here being the only CPU with Linux microcode updates
but no platform ID. It's worth calling it out by name.
This does subtly change the sig->pf for the PII though from 0x0
to 0x1. Make up for that by ignoring sig->pf when the microcode
update platform mask is 0x0.
[ dhansen: reflow comment for bpetkov ]
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Reviewed-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Link: https://patch.msgid.link/20260304181018.EB6404F8@davehans-spike.ostc.intel.com
Diffstat (limited to 'rust/kernel/ptr')
0 files changed, 0 insertions, 0 deletions
