Update the Intel microcode once the root filesystem has been mounted.
authorpatrick <patrick@openbsd.org>
Thu, 11 Jan 2018 22:31:09 +0000 (22:31 +0000)
committerpatrick <patrick@openbsd.org>
Thu, 11 Jan 2018 22:31:09 +0000 (22:31 +0000)
commit448c348715714ee8319c8eeb2af24d38ba34ecdf
tree1b2edd6533ade423cd13fa5e4a25edef766ce7d3
parent8dd1cf054e311db8d427f677d3353339f328d353
Update the Intel microcode once the root filesystem has been mounted.
This depends on the intel-firmware package that contains newer Intel
microcode which will be installed automatically by fw_update(1).

The update should happen much earlier since updating the microcode can
add or remove not only feature flags but also whole features.  For now
only update feature flags that are relevant to Spectre.

Initial diff from sf@
Tested by bluhm@
ok deraadt@
sys/arch/amd64/amd64/acpi_machdep.c
sys/arch/amd64/amd64/cpu.c
sys/arch/amd64/amd64/ucode.c [new file with mode: 0644]
sys/arch/amd64/conf/files.amd64
sys/arch/amd64/include/cpufunc.h
sys/arch/amd64/include/specialreg.h