1be672c8eSAndy Fiddaman.\" The contents of this file are subject to the terms of the Common 2be672c8eSAndy Fiddaman.\" Development and Distribution License (the "License"). You may not use 3be672c8eSAndy Fiddaman.\" this file except in compliance with the License. 4be672c8eSAndy Fiddaman.\" 5be672c8eSAndy Fiddaman.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or 6be672c8eSAndy Fiddaman.\" http://www.opensolaris.org/os/licensing. See the License for the 7be672c8eSAndy Fiddaman.\" specific language governing permissions and limitations under the 8be672c8eSAndy Fiddaman.\" License. 9be672c8eSAndy Fiddaman.\" 10be672c8eSAndy Fiddaman.\" When distributing Covered Code, include this CDDL HEADER in each file 11be672c8eSAndy Fiddaman.\" and include the License file at usr/src/OPENSOLARIS.LICENSE. If 12be672c8eSAndy Fiddaman.\" applicable, add the following below this CDDL HEADER, with the fields 13be672c8eSAndy Fiddaman.\" enclosed by brackets "[]" replaced with your own identifying 14be672c8eSAndy Fiddaman.\" information: Portions Copyright [yyyy] [name of copyright owner] 15be672c8eSAndy Fiddaman.\" 16c10c16deSRichard Lowe.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved 17be672c8eSAndy Fiddaman.\" Copyright 2022 OmniOS Community Edition (OmniOSce) Association. 18*d32f26eeSAndy Fiddaman.\" Copyright 2023 Oxide Computer Company 19be672c8eSAndy Fiddaman.\" 20*d32f26eeSAndy Fiddaman.Dd August 14, 2023 21be672c8eSAndy Fiddaman.Dt UCODEADM 8 22be672c8eSAndy Fiddaman.Os 23be672c8eSAndy Fiddaman.Sh NAME 24be672c8eSAndy Fiddaman.Nm ucodeadm 25be672c8eSAndy Fiddaman.Nd processor microcode utility 26be672c8eSAndy Fiddaman.Sh SYNOPSIS 27be672c8eSAndy Fiddaman.Nm 28be672c8eSAndy Fiddaman.Fl i 29*d32f26eeSAndy Fiddaman.Op Fl t Ar type 30be672c8eSAndy Fiddaman.Op Fl R Ar path 31be672c8eSAndy Fiddaman.Ar microcode-file 32be672c8eSAndy Fiddaman.Nm 33be672c8eSAndy Fiddaman.Fl l 34*d32f26eeSAndy Fiddaman.Op Fl t Ar type 35be672c8eSAndy Fiddaman.Ar microcode-file 36be672c8eSAndy Fiddaman.Nm 37be672c8eSAndy Fiddaman.Fl u 38*d32f26eeSAndy Fiddaman.Op Fl t Ar type 39be672c8eSAndy Fiddaman.Ar microcode-file 40be672c8eSAndy Fiddaman.Nm 41be672c8eSAndy Fiddaman.Fl v 42be672c8eSAndy Fiddaman.Sh DESCRIPTION 43be672c8eSAndy FiddamanThe 44be672c8eSAndy Fiddaman.Nm 45be672c8eSAndy Fiddamanutility can be used to report the running microcode revision on the processors, 46be672c8eSAndy Fiddamanupdate microcode, extract microcode to the target system to be used during the 47be672c8eSAndy Fiddamanboot process, or to view details of the microcode patches contained within 48be672c8eSAndy Fiddaman.Ar microcode-file , 49be672c8eSAndy Fiddamanwhere 50be672c8eSAndy Fiddaman.Ar microcode-file 51be672c8eSAndy Fiddamanis an update obtained from a processor vendor. 52be672c8eSAndy Fiddaman.Pp 53be672c8eSAndy FiddamanIn general, processor microcode updates are provided as part of the operating 54be672c8eSAndy Fiddamansystem and automatically applied during system boot, and there is no need for a 55be672c8eSAndy Fiddamansystem administrator to use 56be672c8eSAndy Fiddaman.Nm 57be672c8eSAndy Fiddamandirectly. 58be672c8eSAndy FiddamanThe operating system bundled files are not suitable for use with 59be672c8eSAndy Fiddaman.Nm . 60be672c8eSAndy Fiddaman.Sh OPTIONS 61be672c8eSAndy Fiddaman.Bl -tag -width Ds 62be672c8eSAndy Fiddaman.It Fl i Ar microcode-file 63be672c8eSAndy FiddamanInstall microcode files on target system to be used during the next boot cycle. 64*d32f26eeSAndy FiddamanThe type of the file must either be specified with the 65*d32f26eeSAndy Fiddaman.Fl t 66*d32f26eeSAndy Fiddamanoption, or 67*d32f26eeSAndy Fiddaman.Ar microcode-file 68*d32f26eeSAndy Fiddamanname must start with the vendor name prefix, either 69be672c8eSAndy Fiddaman.Dq intel 70be672c8eSAndy Fiddamanor 71*d32f26eeSAndy Fiddaman.Dq amd , 72*d32f26eeSAndy Fiddamanso that the type can be inferred from it. 73be672c8eSAndy Fiddaman.Pp 74c10c16deSRichard LoweBy default the microcode files will be installed at: 75be672c8eSAndy Fiddaman.Pp 76*d32f26eeSAndy Fiddaman.D1 Pa /platform/$ARCH/ucode/$VENDORSTR/ 77be672c8eSAndy Fiddaman.Pp 78be672c8eSAndy Fiddamanwhere 79be672c8eSAndy Fiddaman.Dv VENDORSTR 80be672c8eSAndy Fiddamanis either 81be672c8eSAndy Fiddaman.Dq GenuineIntel 82be672c8eSAndy Fiddamanor 83*d32f26eeSAndy Fiddaman.Dq AuthenticAMD 84*d32f26eeSAndy Fiddamanand 85*d32f26eeSAndy Fiddaman.Dv ARCH 86*d32f26eeSAndy Fiddamanis the architecture of the running machine \(em the same value that is shown by 87*d32f26eeSAndy Fiddamanthe 88*d32f26eeSAndy Fiddaman.Fl m 89*d32f26eeSAndy Fiddamanoption of 90*d32f26eeSAndy Fiddaman.Xr uname 1 . 91be672c8eSAndy Fiddaman.It Fl l Ar microcode-file 92be672c8eSAndy FiddamanDisplay details of the microcode patches contained within 93be672c8eSAndy Fiddaman.Ar microcode-file . 94*d32f26eeSAndy Fiddaman.It Fl t Ar type 95*d32f26eeSAndy FiddamanSpecify the type of 96*d32f26eeSAndy Fiddaman.Ar microcode-file . 97*d32f26eeSAndy FiddamanEither 98*d32f26eeSAndy Fiddaman.Dq intel 99*d32f26eeSAndy Fiddamanor 100*d32f26eeSAndy Fiddaman.Dq amd . 101be672c8eSAndy Fiddaman.It Fl u Ar microcode-file 102be672c8eSAndy FiddamanUpdate microcode on all cross-call interrupt ready processors. 103be672c8eSAndy Fiddaman.It Fl v 104be672c8eSAndy FiddamanReport the microcode revision for each CPU on the current system. 105be672c8eSAndy Fiddaman.It Fl R Ar alternate-path 106be672c8eSAndy FiddamanInstall 107be672c8eSAndy Fiddaman.Ar microcode 108be672c8eSAndy Fiddamanfiles into the provided 109be672c8eSAndy Fiddaman.Ar alternate-path . 110be672c8eSAndy Fiddaman.El 111be672c8eSAndy Fiddaman.Sh EXIT STATUS 112be672c8eSAndy FiddamanThe following exit values are returned: 113be672c8eSAndy Fiddaman.Bl -tag -width Ds 114be672c8eSAndy Fiddaman.It 0 115be672c8eSAndy FiddamanSuccessful completion. 116be672c8eSAndy Fiddaman.It >0 117be672c8eSAndy FiddamanAn error occurred. 118be672c8eSAndy Fiddaman.El 119be672c8eSAndy Fiddaman.Sh EXAMPLES 120be672c8eSAndy Fiddaman.Sy Example 1 No Reporting the Microcode Revision 121be672c8eSAndy Fiddaman.Pp 122be672c8eSAndy FiddamanThe following example displays the microcode revision that is currently running: 123be672c8eSAndy Fiddaman.Bd -literal -offset 4n 124c10c16deSRichard Lowe# ucodeadm -v 125be672c8eSAndy FiddamanCPU Microcode Version 126be672c8eSAndy Fiddaman0 0x2f 127be672c8eSAndy Fiddaman1 0x2f 128be672c8eSAndy Fiddaman.Ed 129be672c8eSAndy Fiddaman.Pp 130be672c8eSAndy Fiddaman.Sy Example 2 No Updating the Processor Microcode 131be672c8eSAndy Fiddaman.Pp 132be672c8eSAndy FiddamanThe following example updates the processor microcode using 133be672c8eSAndy Fiddaman.Pa intel-ucode.txt : 134be672c8eSAndy Fiddaman.Bd -literal -offset 4n 135c10c16deSRichard Lowe# ucodeadm -u intel-ucode.txt 136be672c8eSAndy Fiddaman.Ed 137be672c8eSAndy Fiddaman.Pp 138be672c8eSAndy Fiddaman.Sy Example 3 No Installing the Microcode on the Target System 139be672c8eSAndy Fiddaman.Pp 140be672c8eSAndy FiddamanThe following example installs the microcode into 141be672c8eSAndy Fiddaman.Pa /export/ucode-path 142be672c8eSAndy Fiddamanon the target system: 143be672c8eSAndy Fiddaman.Bd -literal -offset 4n 144c10c16deSRichard Lowe# ucodeadm -i -R /export/ucode-path intel-ucode.txt 145be672c8eSAndy Fiddaman# ls /export/ucode-path 146be672c8eSAndy Fiddaman00001632-00 147be672c8eSAndy Fiddaman.Ed 148be672c8eSAndy Fiddaman.Pp 149c10c16deSRichard LoweIf an alternate path is used when installing the microcode on the target 150c10c16deSRichard Lowesystem, the installed microcode file is not used on the next boot cycle. 151be672c8eSAndy Fiddaman.Pp 152be672c8eSAndy Fiddaman.Sy Example 4 No Listing the contents of a microcode file 153be672c8eSAndy Fiddaman.Bd -literal -offset 4n 154be672c8eSAndy Fiddaman# ucodeadm -l amd_fam17h.bin 155be672c8eSAndy FiddamanEquivalence table: 156be672c8eSAndy Fiddaman 00800F82 Family=17 Model=08 Stepping=02 -> 8082 157be672c8eSAndy Fiddaman 00800F12 Family=17 Model=01 Stepping=02 -> 8012 158be672c8eSAndy Fiddaman 00830F10 Family=17 Model=31 Stepping=00 -> 8310 159be672c8eSAndy FiddamanMicrocode patches: 160be672c8eSAndy Fiddaman 8082 -> Patch=0800820D Date=04162019 Bytes=3200 161be672c8eSAndy Fiddaman 8012 -> Patch=0800126E Date=11112021 Bytes=3200 162be672c8eSAndy Fiddaman 8310 -> Patch=08301055 Date=02152022 Bytes=3200 163be672c8eSAndy Fiddaman 164be672c8eSAndy Fiddaman# ucodeadm -l intel-ucode.txt 165be672c8eSAndy FiddamanMicrocode patches: 166be672c8eSAndy Fiddaman 00090672-03 -> Family=06 Model=97 Stepping=02 167be672c8eSAndy Fiddaman Date=03032022 Bytes=212876 168be672c8eSAndy FiddamanExtended Signature Table: 169be672c8eSAndy Fiddaman 00090672-03 -> Family=06 Model=97 Stepping=02 170be672c8eSAndy Fiddaman 00090675-03 -> Family=06 Model=97 Stepping=05 171be672c8eSAndy Fiddaman 000B06F2-03 -> Family=06 Model=bf Stepping=02 172be672c8eSAndy Fiddaman 000B06F5-03 -> Family=06 Model=bf Stepping=05 173be672c8eSAndy Fiddaman.Ed 174be672c8eSAndy Fiddaman.Sh INTERFACE STABILITY 175be672c8eSAndy FiddamanThe command line interface of 176be672c8eSAndy Fiddaman.Nm 177be672c8eSAndy Fiddamanis 178be672c8eSAndy Fiddaman.Sy Committed . 179be672c8eSAndy FiddamanThe output of 180be672c8eSAndy Fiddaman.Nm 181be672c8eSAndy Fiddamanis 182be672c8eSAndy Fiddaman.Sy Not-An-Interface 183be672c8eSAndy Fiddamanand may change at any time. 184be672c8eSAndy Fiddaman.Sh SEE ALSO 185*d32f26eeSAndy Fiddaman.Xr uname 1 , 186be672c8eSAndy Fiddaman.Xr attributes 7 , 187be672c8eSAndy Fiddaman.Xr psradm 8 , 188be672c8eSAndy Fiddaman.Xr psrinfo 8 189