Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is kernel cpu µcode module useful here?[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1130

PostPosted: Tue Jul 29, 2014 2:25 am    Post subject: Is kernel cpu µcode module useful here?[SOLVED] Reply with quote

Hi dear all,
I have
Quote:
dmesg | grep microcode
[ 7.838128] microcode: CPU0 sig=0x1067a, pf=0x80, revision=0xa07
[ 7.844869] microcode: CPU1 sig=0x1067a, pf=0x80, revision=0xa07
[ 7.844961] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
Is my Core 2 Duo patched?
If it is, do i need 2 keep µcode module in memory, or can I unload it with CPU remaining patched?

my 2 cents answers would be N & Y.but i'd like your advice before I remove µcode from my kernel.

Thks 4 ur attention


Last edited by CaptainBlood on Wed Jul 30, 2014 3:25 am; edited 1 time in total
Back to top
View user's profile Send private message
netixen
n00b
n00b


Joined: 26 Sep 2013
Posts: 31

PostPosted: Tue Jul 29, 2014 1:06 pm    Post subject: Reply with quote

Ahoy, Matey!

The module loads the updated microcode after every reboot.
It doesn't use any resources after that so you don't need to unload it. In fact
If you have a custom kernel just compile it in since if you boot with the module disabled,
your microcode will be factory default and that is not what you want.

Savvy? ;)
Back to top
View user's profile Send private message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1130

PostPosted: Tue Jul 29, 2014 4:17 pm    Post subject: Reply with quote

So if I understand you correctly my dmesg trace tells µcode has been patched.

Furthermore, i thought microcode module was a module witch function is to load µcode into the CPU.
If I get it right the module is the microcode itself.

If that reaveals to be the case, no doubt it should be beneficial to include it directly into the kernel instead.
It that it?

Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43770
Location: 56N 3W

PostPosted: Tue Jul 29, 2014 6:35 pm    Post subject: Reply with quote

CaptainBlood

The microcode is present in the CPU in ROM.
This ROM is too slow to run at the CPU core clock speed, so its copied to RAM (inside the CPU).
At each boot the kernel module can update the RAM based microcode copy.
You need to provide the microcode separately - it is not part of the module.

Its not clear from your dmesg if its reporting the original microcode version or the new version.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1130

PostPosted: Tue Jul 29, 2014 7:08 pm    Post subject: Reply with quote

Hi again,

Thks Ned 4 ur explanations.:D

Took me a while 2 find it, as I was missing the right keywords;:cry:
finally got more procedural @ http://wiki.gentoo.org/wiki/Intel_microcode:lol:

I'm wondering, still, if the kernel module & the microcode_ctl can/should be unloaded / stopped once the job has been done.:wink:

EDIT:If I got it right, module is required, microcode_ctl can be stopped.:oops:, now investigating @ https://blog.flameeyes.eu/2011/01/microupdates-for-microcodesEOE

Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
netixen
n00b
n00b


Joined: 26 Sep 2013
Posts: 31

PostPosted: Tue Jul 29, 2014 11:41 pm    Post subject: Reply with quote

CaptainBlood wrote:
Hi again,
I'm wondering, still, if the kernel module & the microcode_ctl can/should be unloaded / stopped once the job has been done.:wink:

Hey CaptainBlood.
You add microcode_ctl to your boot runlevel and that's it. Look at the openrc runscript below:
Code:

start() {
        local ret

        # Make sure the kernel supports the microcode device ...
        # if it doesnt, try to modprobe the kernel module
        grep -qs ' microcode$' /proc/misc || modprobe -q microcode

        ebegin "Updating microcode"
        microcode_ctl -qu -f /lib/firmware/microcode.dat -d ${MICROCODE_DEV}
        ret=$?
        eend ${ret} "Failed to update microcode via '${MICROCODE_DEV}'"

        [ "${MICROCODE_UNLOAD}" = "yes" ] && rmmod microcode >/dev/null 2>&1

        return ${ret}
}

As you can see the runscript just makes sure the module is loaded, the right microcode loaded and even removes the module after the microcode is updated.

You should see something similar in dmesg as a result:
Code:

[    0.123319] microcode: CPU0 sig=0x1067a, pf=0x80, revision=0xa07
[    0.123372] microcode: CPU1 sig=0x1067a, pf=0x80, revision=0xa07
[    0.123459] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[   55.767720] microcode: CPU0 sig=0x1067a, pf=0x80, revision=0xa07
[   55.768003] microcode: CPU0 updated to revision 0xa0b, date = 2010-09-28
[   55.773810] microcode: CPU1 sig=0x1067a, pf=0x80, revision=0xa07
[   55.774803] microcode: CPU1 updated to revision 0xa0b, date = 2010-09-28
Back to top
View user's profile Send private message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1130

PostPosted: Wed Jul 30, 2014 3:23 am    Post subject: Reply with quote

Hi,

Thks netixen 4 ur explanations.

As you mentioned, microcode module is indeed removed after µcode update performed by microcode_ctl.

4 the record,
Quote:
emerge microcode-data
is also required, as it is not mentioned in the gentoo wiki referred above.:roll:

Thks ur attention, interest & support.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum