LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-30-2022, 09:25 PM   #1
BernieK
LQ Newbie
 
Registered: Mar 2021
Posts: 21

Rep: Reputation: Disabled
How To: Early-loading of Intel Microcode


After slogging thru Linux forums and Wiki-pages, and Intel's website, I pieced together a process for obtaining and installing (for early-loading) appropriate Intel microcode for the processor on my Slackare Linux box.

So I do not have to worry about forgetting the process I "wrote" it down. The process - which can be mostly-completed by copying-n-pasting example shell commands in the document - is available at:

https://www.bernieland.com/share/how...y_loading.html

Last edited by BernieK; 05-30-2022 at 10:21 PM.
 
Old 06-01-2022, 11:02 AM   #2
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,785

Rep: Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435Reputation: 4435
Thank you BernieK. I hadn't updated in a long time and the reminder was appreciated. I never use initrd so I had to dig a bit deeper to first recall lilo.conf entry (for older installs) and then adapt to rEFInd (for newer). This was just to confirm it loaded the newest but apparently once the /boot/intel-ucode.cpio directory and the /lib/firmware/ has an entry, it apparently just loads, maybe not as early as other methods, but sufficient for my requirements.
 
Old 06-01-2022, 01:39 PM   #3
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,832
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Post

Quote:
Originally Posted by BernieK View Post
After slogging thru Linux forums and Wiki-pages, and Intel's website, I pieced together a process for obtaining and installing (for early-loading) appropriate Intel microcode for the processor on my Slackare Linux box.

So I do not have to worry about forgetting the process I "wrote" it down. The process - which can be mostly-completed by copying-n-pasting example shell commands in the document - is available at:

https://www.bernieland.com/share/how...y_loading.html
Howdy, that's great. I was actually doing something similar (but without initrd).. And I was documenting the process. I have't yet gotten around to do the initrd version, hah.

Ehm.. Is there any chance you could add the information to docs.slackware?

I made this article there:
https://docs.slackware.com/howtos:se...rocode_loading

And there is still a rather empty initrd section. I didn't yet get around to it, but at some point I will for sure. Or perhaps you could help me get it done?
 
1 members found this post helpful.
Old 06-01-2022, 06:52 PM   #4
BernieK
LQ Newbie
 
Registered: Mar 2021
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zeebra View Post
Is there any chance you could add the information to docs.slackware?
Any Slackware Documentation project contributor is welcome to include on the project's pages the microcode-loading document I wrote - in whole or in part, or by reference (as you kindly did).


Thank you for writing the microcode-loading page for the Slackware Documentation Project at docs.slackware.com

Good news regarding the reference on that page to manually creating the /lib/firmware/amd-ucode/ directory; As of Slackware 15.0 that directory is created and populated during Slackware installation and subsequent kernel-firmware package updates.

Code:
$ cat /etc/slackware-version
Slackware 15.0

$  grep -e "lib/firmware/amd-ucode/$" -e "lib/firmware/intel-ucode/$" /var/adm/packages/kernel-firmware-20220124_eb8ea1b-noarch-1
lib/firmware/amd-ucode/

Last edited by BernieK; 06-01-2022 at 06:56 PM.
 
Old 06-02-2022, 03:53 AM   #5
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,832
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by BernieK View Post
Any Slackware Documentation project contributor is welcome to include on the project's pages the microcode-loading document I wrote - in whole or in part, or by reference (as you kindly did).
Thank you. I'll include it as soon as I can and credit you for it. Meanwhile I will leave the reference there

Quote:
Originally Posted by BernieK View Post
Good news regarding the reference on that page to manually creating the /lib/firmware/amd-ucode/ directory; As of Slackware 15.0 that directory is created and populated during Slackware installation and subsequent kernel-firmware package updates.
hmm. you sure?

I added that section because I didn't have those folders in the standard Slackware 15 installation
 
Old 06-02-2022, 11:11 AM   #6
BernieK
LQ Newbie
 
Registered: Mar 2021
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zeebra View Post
hmm. you sure? I added that section because I didn't have those folders in the standard Slackware 15 installation
Thank you for double-checking.
I am sure with respect to the full Slackware 15.0 installations on one each of my AMD and Intel boxes. The kernel.org GIT repository suggests so as well since it includes a populated amd-ucode directory (but no intel-ucode directory):

Code:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/
I cannot say when the amd-ucode directory was added to the source tree, but it is present on my Slackware 14.2 box (also a full installation).

Last edited by BernieK; 06-02-2022 at 12:20 PM.
 
1 members found this post helpful.
Old 06-02-2022, 02:29 PM   #7
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
All --

Just to add a me too ... there is an amd-ucode/ directory in the official Slackware64 15.0 a/kernel-firmware-20220124_eb8ea1b-noarch-1.txz Package ...

HTH

-- kjh

Code:
# pwd
/dld/15.0/slackware/slackware-15.0-64/slackware64/a    # my local Slackware 65 15.0 repo

# tar -tvf kernel-firmware-20220124_eb8ea1b-noarch-1.txz |grep /amd-ucode/

drwxr-xr-x root/root         0 2022-01-24 23:03 lib/firmware/amd-ucode/
-rw-r--r-- root/root     12684 2022-01-24 23:03 lib/firmware/amd-ucode/microcode_amd.bin
-rw-r--r-- root/root       490 2022-01-24 23:03 lib/firmware/amd-ucode/microcode_amd.bin.asc
-rw-r--r-- root/root      7876 2022-01-24 23:03 lib/firmware/amd-ucode/microcode_amd_fam15h.bin
-rw-r--r-- root/root       473 2022-01-24 23:03 lib/firmware/amd-ucode/microcode_amd_fam15h.bin.asc
-rw-r--r-- root/root      3510 2022-01-24 23:03 lib/firmware/amd-ucode/microcode_amd_fam16h.bin
-rw-r--r-- root/root       473 2022-01-24 23:03 lib/firmware/amd-ucode/microcode_amd_fam16h.bin.asc
-rw-r--r-- root/root      6476 2022-01-24 23:03 lib/firmware/amd-ucode/microcode_amd_fam17h.bin
-rw-r--r-- root/root       488 2022-01-24 23:03 lib/firmware/amd-ucode/microcode_amd_fam17h.bin.asc
-rw-r--r-- root/root     16804 2022-01-24 23:03 lib/firmware/amd-ucode/microcode_amd_fam19h.bin
-rw-r--r-- root/root       488 2022-01-24 23:03 lib/firmware/amd-ucode/microcode_amd_fam19h.bin.asc

Last edited by kjhambrick; 06-02-2022 at 02:31 PM. Reason: add `pwd`
 
Old 06-03-2022, 08:31 AM   #8
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
There is another method, mentioned in a previous thread (I haven't searched for it, but I made notes at the time):
Install iucode_tool & intel-microcode from SBo.
Then (as root,of course) check your present microcode:
Code:
dmesg -t | grep 'microcode'
Then run:
Code:
iucode_tool -S -l /tmp/SBo/intel-microcode-20220510/intel-ucode/*
To see if it's been updated.
Then (this is assuming you already have a /boot/initrd.gz):
Code:
cp /boot/initrd.gz /tmp/
Then:
Code:
cat /boot/intel-ucode.cpio /tmp/initrd.gz > /boot/initrd.gz
Run lilo (or whatever), reboot and check dmesg again.
Thanks to whoever I got this information from.
 
Old 06-03-2022, 09:06 AM   #9
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,832
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Iucode tool is not available in Slackware by default. But ok, interesting enough.
 
Old 06-03-2022, 09:35 AM   #10
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
Quote:
Originally Posted by brianL View Post
Install iucode_tool & intel-microcode from SBo.
https://slackbuilds.org/repository/1...m/iucode_tool/

https://slackbuilds.org/repository/1...tel-microcode/

Last edited by brianL; 06-03-2022 at 09:38 AM.
 
Old 06-03-2022, 09:50 AM   #11
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,832
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
That's fine as a side note. But best practices when recommending someone do something, is to get things done with the default tools in Slackware, if possible. If not, then..
 
Old 06-03-2022, 10:27 AM   #12
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
TIMTOWTDI as somebody said.
 
Old 06-03-2022, 10:40 AM   #13
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,832
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by brianL View Post
TIMTOWTDI as somebody said.
KISS
 
Old 06-07-2022, 09:06 AM   #14
slackmensch
Member
 
Registered: Apr 2021
Location: hickville
Distribution: Arch, Normal, Poisson, Slackware, Manjaro
Posts: 50
Blog Entries: 7

Rep: Reputation: Disabled
For those using alternative bootloaders or just too lazy to muck about with initrds, there isn't much to do. You can load intel microcode "late":

echo 1 > /sys/devices/system/cpu/microcode/reload

as described in section 22.2 here:

https://www.kernel.org/doc/html/late...microcode.html

Of course intel-microcode from slackbuilds has to be installed. Why isn't intel microcode included in the binary blob monster package called kernel-firmware? It's got blobs for 20-year-old USB tv tuners in there but not Intel's latest CPU updates?!

Edit: Sorry, I didn't see that it said "Early" in the subject line. Maybe my head needs a micorcode update.

Last edited by slackmensch; 06-07-2022 at 09:15 AM.
 
Old 06-07-2022, 03:59 PM   #15
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,832
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by slackmensch View Post
For those using alternative bootloaders or just too lazy to muck about with initrds, there isn't much to do. You can load intel microcode "late":
It is certainly possible, but it doesn't always/often "help" mitigate anything. From my reading, this method is mostly useful for servers that want to test the load without rebooting. But I could be wrong, it could also not just load, but also mitigate issues in some setups/situations.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Early loading microcode - How do I do that? (@aus9) MDKDIO Slackware 62 12-09-2021 03:04 PM
LXer: Intel Reworks Microcode Security Fix License after Backlash, Intel's FSP Binaries Also Re-licensed, Valve Releases Beta of Steam Play LXer Syndicated Linux News 0 08-25-2018 03:40 PM
slackbuilds' intel-microcode will no longer load early grobber Slackware 2 08-25-2018 10:46 AM
Apply new Intel microcode- no microcode.dat file Naks110 Linux - Kernel 2 06-12-2018 05:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration