root@router:~ # pkg updateUpdating OPNsense repository catalogue...OPNsense repository is up to date.All repositories are up to date.root@router:~ # pkg search cpu-microcodecpu-microcode-1.0_1 Meta-package for CPU microcode updatescpu-microcode-amd-20240116 AMD CPU microcode updatescpu-microcode-intel-20240531 Intel CPU microcode updatescpu-microcode-rc-1.0_2 RC script for CPU microcode updatesroot@router:~ # pkg query %v cpu-microcode-amdroot@router:~ #
root@router:~ # opnsense-revert -z cpu-microcode-amdPackage 'cpu-microcode-amd' is not installedroot@router:~ # pkg query %v cpu-microcode-amdroot@router:~ # pkg install cpu-microcode-amdUpdating OPNsense repository catalogue...OPNsense repository is up to date.All repositories are up to date.The following 2 package(s) will be affected (of 0 checked):New packages to be INSTALLED: cpu-microcode-amd: 20240116 cpu-microcode-rc: 1.0_2Number of packages to be installed: 260 KiB to be downloaded.Proceed with this action? [y/N]: root@router:~ # pkg install cpu-microcode-amdUpdating OPNsense repository catalogue...OPNsense repository is up to date.All repositories are up to date.The following 2 package(s) will be affected (of 0 checked):New packages to be INSTALLED: cpu-microcode-amd: 20240116 cpu-microcode-rc: 1.0_2Number of packages to be installed: 260 KiB to be downloaded.Proceed with this action? [y/N]: y[1/2] Fetching cpu-microcode-rc-1.0_2.pkg: 100% 3 KiB 2.6kB/s 00:01 [2/2] Fetching cpu-microcode-amd-20240116.pkg: 100% 58 KiB 59.4kB/s 00:01 Checking integrity... done (0 conflicting)[1/2] Installing cpu-microcode-rc-1.0_2...[1/2] Extracting cpu-microcode-rc-1.0_2: 100%[2/2] Installing cpu-microcode-amd-20240116...[2/2] Extracting cpu-microcode-amd-20240116: 100%=====Message from cpu-microcode-rc-1.0_2:--This port includes an RC script, which is one of two methods to updatethe CPU microcode on a FreeBSD system.1. Early loading. This method does not use the RC script included here. This is the preferred method, because it ensures that any CPU features added or removed by a microcode update are visible to the kernel by applying the update before the kernel performs CPU feature detection. To enable updates using early loading, add the following lines to /boot/loader.conf: cpu_microcode_load="YES" and the appropriate one of these lines: cpu_microcode_name="/boot/firmware/intel-ucode.bin" cpu_microcode_name="/boot/firmware/amd-ucode.bin" The microcode update will be loaded when the system is rebooted. AMD systems running FreeBSD prior to 2024-02-22 snapshot 34467bd76 only support late loading.2. Late loading. This method, which does use the RC script included here, is enabled by adding the following line to /etc/rc.conf: microcode_update_enable="YES" The microcode update is then applied upon reboot or when the microcode update service is run via: # service microcode_update start If the CPU requires a microcode update, a console message such as the following will appear: Updating CPU Microcode... /usr/local/share/cpucontrol/m32306c3_00000022.fw: updating cpu /dev/cpuctl0 from rev 0x17 to rev 0x22... done. /usr/local/share/cpucontrol/m32306c3_00000022.fw: updating cpu /dev/cpuctl2 from rev 0x17 to rev 0x22... done. /usr/local/share/cpucontrol/m32306c3_00000022.fw: updating cpu /dev/cpuctl4 from rev 0x17 to rev 0x22... done. /usr/local/share/cpucontrol/m32306c3_00000022.fw: updating cpu /dev/cpuctl6 from rev 0x17 to rev 0x22... done. Done.It is safe to enable both methods.=====Message from cpu-microcode-amd-20240116:--Refer to the cpu-microcode-rc installation notes to enable AMD microcodeupdates.root@router:~ # opnsense-revert -z cpu-microcode-amdFetching cpu-microcode-amd.pkg: ... doneVerifying signature with trusted certificate pkg.opnsense.org.20240611... donecpu-microcode-amd-20240116: already unlockedInstalling cpu-microcode-amd-20240810...package cpu-microcode-amd is already installed, forced installExtracting cpu-microcode-amd-20240810: 100%=====Message from cpu-microcode-amd-20240810:--Refer to the cpu-microcode-rc installation notes to enable AMD microcodeupdates.root@router:~ # pkg query %v cpu-microcode-amd20240810Dmesg: CPU microcode: no matching update foundroot@router:~ # kldload -q cpuctl; x86info -a | fgrep -i microcodeMicrocode patch level: 0x810100b