[LEDE-DEV] [PATCH 1/2] x86: add amd microcode entries to grub config

Tomasz Maciej Nowak tomek_n at o2.pl
Fri Apr 27 08:18:02 PDT 2018


W dniu 26.04.2018 o 20:04, Stijn Segers pisze:
> Op di, 24 apr 2018 om 10:18 , schreef Tomasz Maciej Nowak <tomek_n at o2.pl>:
>> W dniu 24.04.2018 o 22:00, Stijn Segers pisze:
>> [snip]
>>>>>
>>>>>   I'm not sure what's going wrong here, I'm on a clean master tree but your first patch does not apply:
>>>>>
>>>>>   $ git am 1.patch
>>>>>   Applying: x86: add amd microcode entries to grub config
>>>>>   error: patch failed: target/linux/x86/base-files/lib/preinit/02_load_x86_ucode:1
>>>>>   error: target/linux/x86/base-files/lib/preinit/02_load_x86_ucode: patch does not apply
>>>>>   error: patch failed: target/linux/x86/image/grub-iso.cfg:10
>>>>>   error: target/linux/x86/image/grub-iso.cfg: patch does not apply
>>>>>   error: patch failed: target/linux/x86/image/grub.cfg:10
>>>>>   error: target/linux/x86/image/grub.cfg: patch does not apply
>>>>>   Patch failed at 0001 x86: add amd microcode entries to grub config
>>>>>   $ ./scripts/getver.sh
>>>>>   r6755-d089a5d773
>>>>>
>>>>
>>>>  Hi.
>>>>
>>>>  I did wrongly spell myself out instead of "This series needs to be applied on top of 'intel-microcode: load as early as possible' series." it should be: "This series needs to be applied after 'intel-microcode: load as early as possible' series.". Sorry about it.
>>>
>>>  Nope - turns out I was too quick, my apologies :-(. I merely looked at your first mail that actually had a patch for AMD and not at the one preceding it (which stated I needed to apply the Intel series first). Applied cleanly. How do I check whether it's functional? I grepped dmesg for AMD or ucode, but nothing shows. Logread doesn't work at all (but I reckon that's unrelated).
>>
>> You should grep -i for "microcode", it should say something like: "microcode updated early ..." probably on first line in kernel log.
>>
>> Strange thing is that logread doesn't work, but I don't know what's causing this.
> 
> Hi Thomas,
> 
> I just booted OpenWrt off my USB stick, grepping for microcode returned this:
> 
> [    2.038790] microcode: CPU0: patch_level=0x08001129
> [    2.043782] microcode: CPU1: patch_level=0x08001129
> [    2.114395] microcode: CPU2: patch_level=0x08001129
> [    2.119391] microcode: CPU3: patch_level=0x08001129
> [    2.124390] microcode: CPU4: patch_level=0x08001129
> [    2.129382] microcode: CPU5: patch_level=0x08001129
> [    2.134512] microcode: CPU6: patch_level=0x08001129
> [    2.139498] microcode: CPU7: patch_level=0x08001129
> [    2.144491] microcode: Microcode Update Driver: v2.2.
> 
> Does that help you any? Tested on a Ryzen 1800X.

Maybe Your BIOS already provides updated microcode. See this:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/cpu/microcode/amd.c#n801
for how the message should look like.

Can You show kernel messages when the microcode is not loaded (remove the lines in grub config) and kernel messages for the current OpenWrt snapshot with arm64-microcode package installed?

> 
> I reckon logread not working might have to do with my using the combined-ext4 image, /tmp is kinda broken as well.
> 
> Cheers
> 
> Stijn
>>
>>
>>>
>>>  Dmesg does say full retpoline support has been enabled, but unless I'm mistaken that was a compiler feature, not something that could be solved with microcode alone>
>>>  Cheers
>>>
>>>  Stijn
>>>
>>>
>>>
>>>>
>>>>>   Second does apply cleanly.
>>>>>
>>>>>   Cheers
>>>>>
>>>>>   Stijn
>>>>>
>> [snip]
>>
>> -- 
>> TMN
>>
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev
> 




More information about the Lede-dev mailing list