Bugzilla – Bug 1061396
kernel 4.11 and higher fails boot on amd geode CPU
Last modified: 2017-10-19 11:28:49 UTC
New microcode update causes reset loop on AMD Geode CPU, even if disabled with CMDLINE option "dis_ucode_ldr". Reason: on file "/arch/x86/kernel/cpu/microcode/core.c" fuction "check_loader_disabled_bsp(void)" CMD line option checked after CPU type detection. New CPU type detection of 4.11 triggers CPU reset on GEODE. Order for chekking is microcode update possiblity needs to be changed, CMD line need to bechecked at first: File: "/arch/x86/kernel/cpu/microcode/core.c" static bool __init check_loader_disabled_bsp(void) { static const char *__dis_opt_str = "dis_ucode_ldr"; #ifdef CONFIG_X86_32 const char *cmdline = (const char *)__pa_nodebug(boot_command_line); const char *option = (const char *)__pa_nodebug(__dis_opt_str); bool *res = (bool *)__pa_nodebug(&dis_ucode_ldr); #else /* CONFIG_X86_64 */ const char *cmdline = boot_command_line; const char *option = __dis_opt_str; bool *res = &dis_ucode_ldr; #endif + if (cmdline_find_option_bool(cmdline, option) > 0) + return *res; if (!have_cpuid_p()) return *res; /* * CPUID(1).ECX[31]: reserved for hypervisor use. This is still not * completely accurate as xen pv guests don't see that CPUID bit set but * that's good enough as they don't land on the BSP path anyway. */ if (native_cpuid_ecx(1) & BIT(31)) return *res; if (x86_cpuid_vendor() == X86_VENDOR_AMD) { if (amd_check_current_patch_level()) return *res; } - if (cmdline_find_option_bool(cmdline, option) <= 0) - *res = false; + *res = false; return *res; }
Can you upload - kernel .config - dmesg from a working kernel - /proc/cpuinfo pls? Thx.
Created attachment 743455 [details] config taken from /proc/config.gz
Created attachment 743456 [details] dmesg from last running TW kernel
Created attachment 743457 [details] cpuinfo
Disabling ucode with .config & "make rpm" results working kernel. changing ucode code and "make rpm" results working kernel too. Both makes DVB-Driver broken so system is unusable for me. It seems "make rpm" kernels differs from Kernel-Buil of Opensuse. Relating Kernel logs new AMD CPUs require new CPU type detection on ucode loader. For generic kernels easiest solution would be to make behaviour identical of .config "# CONFIG_MICROCODE is not set" and cmdline "dis_ucode_ldr" For me it's useless to detect CPU type even when ucode disabled with cmdline. Same can be happen with next-next intel CPU so this looks like an generic kernel bug of implemetation "cmdline dis_ucode_ldr" feature. rgs
Created attachment 743458 [details] test patch
Created attachment 743459 [details] test2.patch
Does this test2.patch fix it?
(In reply to Borislav Petkov from comment #8) > Does this test2.patch fix it? It works! AMD Geode LX System boots. Even with microcode loadig enabled on .config and cmdline. used git kernel-source stable v4.10.13 (DVB-T2 works, mn88473 v4.11-v4.13 driver always writes PLP-filter value which wasn't konfigured on tvheadend) Many thanks.
(In reply to Borislav Petkov from comment #8) > Does this test2.patch fix it? It works! AMD Geode LX System boots. Even with microcode loadig enabled on .config and cmdline. used git kernel-source stable v4.13.4-1 (DVB-T2 works, mn88473 v4.11-v4.13 driver always writes PLP-filter value which wasn't konfigured on tvheadend) Many thanks.
Can you try the kernel here please: http://beta.suse.com/private/bpetkov/tw/ with the official fix? Thx.
(In reply to Borislav Petkov from comment #11) > Can you try the kernel here please: > > http://beta.suse.com/private/bpetkov/tw/ > > with the official fix? > > Thx. It's a 32 Bit system ... on Your site are only 64 Bit kernels.
(In reply to Sven Glodowski from comment #12) > It's a 32 Bit system ... on Your site are only 64 Bit kernels. Whoops, just added i586 and i686 flavors.
(In reply to Borislav Petkov from comment #13) > (In reply to Sven Glodowski from comment #12) > > It's a 32 Bit system ... on Your site are only 64 Bit kernels. > > Whoops, just added i586 and i686 flavors. i586 kernel Works fine! # uname -a Linux alix 4.13.5-1.g330779d-default #1 SMP Mon Oct 9 20:53:29 UTC 2017 (330779d) i586 i586 i386 GNU/Linux # cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-4.13.5-1.g330779d-default root=UUID=7a5f776f-0c9a-4172-a00e-45b799ae582f console=ttyS0,38400n8 resume=/dev/disk/by-uuid/6db5e3fd-6b00-49ed-a2c6-78ca430a4a1a acpi=off libata.force=short40c splash=silent quiet showopts Many Thanks.
(In reply to Sven Glodowski from comment #14) > i586 kernel Works fine! Good, thanks for testing. I'll add your Tested-by to the fix. (Clean up stale NEEDINFO, while at it.)
Ok, fix is in 4.13.8 and in: http://kernel.suse.com/packages/stable Closing.