Commit Graph

7 Commits

Author SHA1 Message Date
Gordon Bergling
ee6d379be7 cpucontrol(8): Fix a typo in an error message
- s/incorret/incorrect/

MFC after:	1 week
2022-01-26 10:36:42 +01:00
Conrad Meyer
dee401e833 cpucontrol(8): De-duplicate common update logic
Every µcode-updater must open the cpucontrol devfs node RDWR, open a
firmware file, validate the FW file has a positive length, mmap it, etc.
De-duplicate that identical logic between every individual platform.

Also, constify references to the readonly-mapped firmware files while here.

Sponsored by:	Dell EMC Isilon
2018-11-14 00:21:49 +00:00
Ed Maste
26dfa867d2 cpucontrol: correct typo
There should be no 't' in processort_rev_id.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
2018-09-11 17:09:16 +00:00
Mark Johnston
a18e40aad4 Use the existing MSR_BIOS_SIGN on AMD.
Reported by:	kib
Sponsored by:	The FreeBSD Foundation
2018-07-13 20:56:20 +00:00
Mark Johnston
a869c2bf22 Use the name added in r336257.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2018-07-13 19:45:12 +00:00
Sean Bruno
6e9d170d8a cpucontrol:
- fix debugging for family on AMD cpus and add useful debugging for
  which file is being selected for update.

Reviewed by:	cem
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D15574
2018-06-12 18:58:56 +00:00
Andriy Gapon
0112b52b61 Add support for microcode update on newer AMD CPUs (10h+)
This includes new code for parsing microcode files as well as
the kernel-side change to apply the update on all processors
at the same time.

Developed with help from Borislav Petkov, formerly bp@amd64.org.

Tested using Athlon II X2 processor on a system where BIOS does
not have the latest microcode version:
/boot/firmware/microcode_amd.bin: updating cpu /dev/cpuctl0 to revision 0x10000c7... done.

The microcode file is taken from here:
https://web.archive.org/web/20160528230514/http://www.amd64.org/microcode.html
(note that the original site seems to be down at the moment)
It can also be found here:
https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/amd-ucode

Reviewed by:	kib, stas
MFC after:	2 weeks
Relnotes:	maybe
Differential Revision: https://reviews.freebsd.org/D8384
2016-11-02 16:15:49 +00:00