|Summary:||Booting kernel 4.11 triggers a reset of UEFI firmware settings on the next boot|
|Product:||Drivers||Reporter:||Abdó Roig-Maranges (abdo.roig)|
|Severity:||normal||CC:||abdo.roig, chenhan.hsiao.tw, josh_bell7, julius.bullinger+kernelorg, keigh.rim, matt, mika.westerberg|
early boot log with kernel 4.11.2
dmesg log at 8afda8b2 (good)
dmesg log at ff00d7a3 (bad)
Prevent touching BCR register from lpc_ich.c
Description Abdó Roig-Maranges 2017-06-01 06:33:34 UTC
Created attachment 256825 [details] early boot log with kernel 4.11.2 My machine boots fine with kernel 4.11.3. However, on the next boot, the firmware says: "Configuration Changed - Requires restart", and the firmware settings are reset to defaults. There was no such issue with the 4.10 kernels. My machine is a Lenovo Thinkpad Yoga (first generation) with the latest firmware revision. I attach a piece of logs I gathered booting kernel 4.11.2 with efi=debug. Is there any other piece of data I can provide?
Comment 1 Julius Bullinger 2017-06-04 10:13:53 UTC
I can confirm this bug on the same hardware for all current kernel versions from 4.11 on. I tested on Fedora: * kernel-4.11.2-200.vanilla.knurd.1.fc25.x86_64 * kernel-4.11.3-200.fc25.x86_64 * kernel-4.12.0-0.rc2.git0.1.vanilla.knurd.1.fc25.x86_64 All of them suffer from the issue, while 4.10 does not.
Comment 2 Julius Bullinger 2017-06-04 10:15:41 UTC
*** Bug 195975 has been marked as a duplicate of this bug. ***
Comment 3 Matt Fleming 2017-06-15 21:27:16 UTC
Could you try doing a git bisect to track down which commit introduced the issue? I looked at the EFI changes between v4.10 and v4.11 but nothing obvious stood out.
Comment 4 Abdó Roig-Maranges 2017-07-09 00:00:44 UTC
I bisected the issue to commit ff00d7a32a1b88b772981a13fc198e0d29300666: "mfd: lpc_ich: Add support for SPI serial flash host controller".
Comment 5 Matt Fleming 2017-07-14 09:20:37 UTC
Thanks for bisecting. Re-assigning since this doesn't look like an EFI issue per se.
Comment 6 Matt Fleming 2017-07-14 09:21:15 UTC
Mika, can you take a look?
Comment 7 Mika Westerberg 2017-07-24 09:08:51 UTC
Can you attach full dmesg to the bug and then revert ff00d7a32a1b88b772981a13fc198e0d29300666 and attach dmesg of that boot as well?
Comment 8 Abdó Roig-Maranges 2017-07-26 14:01:57 UTC
Created attachment 257711 [details] dmesg log at 8afda8b2 (good)
Comment 9 Abdó Roig-Maranges 2017-07-26 14:03:09 UTC
Created attachment 257713 [details] dmesg log at ff00d7a3 (bad)
Comment 10 Abdó Roig-Maranges 2017-07-26 14:05:39 UTC
I attached the logs you requested. The git hashes in the logs do not match the hash in the kernel version because in order to work-around a gcc7 build problem I cherry-picked 474c9015 on top.
Comment 11 Mika Westerberg 2017-07-26 14:10:47 UTC
Both logs say kernel v4.10 is that expected?
Comment 12 Abdó Roig-Maranges 2017-07-26 14:13:43 UTC
Yes, this is what git-describe reports. The bug was introduced in the 4.11 merge windows, so git describe reports 4.10-blah-blah.
Comment 13 Mika Westerberg 2017-07-26 14:32:30 UTC
Created attachment 257715 [details] Prevent touching BCR register from lpc_ich.c Can you try the attached patch and see if it makes a difference?
Comment 14 Abdó Roig-Maranges 2017-07-26 14:59:00 UTC
Yes, it does. With your patch on top of the bad commit, the problem disappears.
Comment 15 Mika Westerberg 2017-07-27 15:34:28 UTC
OK, thanks for testing. I'll prepare proper patch and send it upstream tomorrow.
Comment 16 Keigh Rim 2017-10-20 12:18:29 UTC
I upgraded Ubuntu on my thinkpad yoga machine (1st gen) from 17.04 (kernel 4.10) to 17.10 (kernel 4.13) and this issue is introduced. I also tried Fedora 26 (kernel 4.11) live cd, and noticed the same problem.
Comment 17 Joshua 2017-11-11 03:59:39 UTC
Hi Mika, this bug also affects me. Has your patch been committed?
Comment 18 Mika Westerberg 2017-11-11 08:25:32 UTC
Yes, it should be included in v4.14-rc1+