cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
arcooke
Punch Card
Posts: 18
Registered: ‎08-31-2018
Location: US
Views: 18,204
Message 1 of 241

ThinkPad E485/E585 - Firmware bug ACPI IVRS table

Hey all.  I know Linux is not officially supported on these laptops but it would be nice if this information could be relayed to the UEFI folks.  It could also have an impact in Windows, I'm not sure.

 

This is a bit beyond my level of knowlege, so someone smarter than me will need to make sense of it. 

 

Essentially, Linux will not boot on these devices unless you add "ivrs_ioapic[32]=00:14.0" to the kernel parameters.  I found out this information from a blog post where someone else did some extensive testing.  I don't know if anyone else has actually reported this to Lenovo yet.

 

Blog post here: https://evilazrael.de/node/401

 

Relevant text:

 

Ok, this is really a firmware bug, the ACPI IVRS table lacks at least one entry. Adding ivrs_ioapic[32]=00:14.0 instead of intremap=off is sufficient to make the system boot until Lenovo releases an UEFI update with a working IVRS table. At least UEFI 1.27 (2018-07-24) needs this override. And spec_store_bypass_disable=prctl is still needed for Ubuntu & co. 

The clue is the line "[Firmware Bug]: AMD-Vi: IOAPIC[32] not in IVRS table". I decompiled the ACPI tables, started to read the AMD documentation, but in the end I just guessed the 32 from the error message and 00:14.0 from the lspci output and the Stack Overflow/Ubuntu forum entries.  Interesting stuff, but too much to read in my little time. 

What was helpful is the Linux boot parameter amd_iommu_dump=1 which will dump information from the IVRS table:
[    0.851042] AMD-Vi: Using IVHD type 0x11
[    0.851401] AMD-Vi: device: 00:00.2 cap: 0040 seg: 0 flags: b0 info 0000
[    0.851401] AMD-Vi:        mmio-addr: 00000000feb80000
[    0.851430] AMD-Vi:   DEV_SELECT_RANGE_START  devid: 00:01.0 flags: 00
[    0.851431] AMD-Vi:   DEV_RANGE_END           devid: ff:1f.6
[    0.851870] AMD-Vi:   DEV_ALIAS_RANGE                 devid: ff:00.0 flags: 00 devid_to: 00:14.4
[    0.851871] AMD-Vi:   DEV_RANGE_END           devid: ff:1f.7
[    0.851875] AMD-Vi:   DEV_SPECIAL(HPET[0])           devid: 00:14.0
[    0.851876] AMD-Vi:   DEV_SPECIAL(IOAPIC[33])                devid: 00:14.0
[    0.851877] AMD-Vi:   DEV_SPECIAL(IOAPIC[34])                devid: 00:00.1
[    1.171028] AMD-Vi: IOMMU performance counters supported
 

Resolving devid 00:14.0 was easy via lspci:

 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
but for 00:00.1 I have not found the device. If anybody knows how to list all device ids and their associate devices/drivers/etc, please mail me. 

 

It's also necessary to add spec_store_bypass_disable=prctl for Ubuntu as mentioned above, though I'm enitrely sure of the function of that.

 

Other than that, Linux is working very well on my E585 with kernel 4.18.5+ and nightly mesa/amdgpu drivers.

 

 

Thanks

Wingqlip
SCSI Port
Posts: 76
Registered: ‎08-24-2018
Location: CN
Views: 17,984
Message 2 of 241

Re: ThinkPad E485/E585 - Firmware bug ACPI IVRS table

As a workstation I expect this to not be an issue - linux is commonly used in the IT environment that the E series is marketed to. So to all the engineers at lenovo not doing their job, fix this. 

Anonymous_User
Not applicable
Posts: 0
Views: 17,969
Message 3 of 241

Re: ThinkPad E485/E585 - Firmware bug ACPI IVRS table

The spec_store_bypass_disable is for spectre mitigations: https://wiki.ubuntu.com/SecurityTeam/KnowledgeBase/SpectreAndMeltdown/MitigationControls

Some device drivers, noticably USB failed if all mitigations are active. My assumption is that this a kernel bug and not a firmware or hardware bug. But I am not sure on this.

 

After reading the explanation on this page my recommendation is to use seccomp instead of prctl. The security impact is less and on my e485 all devices initialized (with the usual radeon stack trace). May be different with country-related hardware differences. 

 

Small Update, seems that Ubuntu 18.04 with kernel 4.15.0-33 no longer needs spec_store_bypass_disable 

 

arcooke
Punch Card
Posts: 18
Registered: ‎08-31-2018
Location: US
Views: 17,852
Message 4 of 241

Re: ThinkPad E485/E585 - Firmware bug ACPI IVRS table

Thanks for the info. And for your troubleshooting work on the blog post. I noticed shortly after I submitted this that you are a member on these forums.. but since you hadn't posted about this here I figured I'd keep the thread up.   If you want me to add/change info to the main post let me know.

pilatomic
What's DOS?
Posts: 2
Registered: ‎09-06-2018
Location: FR
Views: 17,738
Message 5 of 241

Re: ThinkPad E485/E585 - Firmware bug ACPI IVRS table

Really hoping for a fix from Lenovo.

It's a good workstation once this issue is worked out !

 

 

Moderator comment: Post edited to conform with the Community Rules. Keep it clean.

marvinda
Paper Tape
Posts: 6
Registered: ‎09-11-2018
Location: DE
Views: 17,493
Message 6 of 241

Re: ThinkPad E485/E585 - Firmware bug ACPI IVRS table

Unfortunately, the firmware update to 1.32 did not resolve this issue. Proper IOMMU support will be crucial to run GPGPU computations (OpenCL, e.g., using ROCm).

 

surtic86
Fanfold Paper
Posts: 8
Registered: ‎09-12-2018
Location: CH
Views: 17,436
Message 7 of 241

Re: ThinkPad E485/E585 - Firmware bug ACPI IVRS table

On the A485 it looks like we have the same Problem with "ivrs_ioapic[32]=00:14.0". I also need it to get Linux booting.

 

Any new Updates to this Problem?

tuxlinuxien
Paper Tape
Posts: 2
Registered: ‎09-26-2018
Location: FR
Views: 16,899
Message 8 of 241

Re: ThinkPad E485/E585 - Firmware bug ACPI IVRS table

Thanks for the first link that helped me to start Opensuse (tumbleweed). But can Lenovo patch the firmware asap?

 

For me, iommu=soft added to the kernel parameters worked well but it is just using cpu for nothing.I Ialsoget some ramdor kernel panics which I never had with my thinkpad x1 carbon (edition 2015, 2017, 2017 and 2018).

max187
What's DOS?
Posts: 1
Registered: ‎10-04-2018
Location: DE
Views: 16,588
Message 9 of 241

Re: ThinkPad E485/E585 - Firmware bug ACPI IVRS table

Please fix this asap, somehow I think with the work-around "iommu=soft" the laptop is slower...

Highlighted
Anonymous_User
Not applicable
Posts: 0
Views: 16,515
Message 10 of 241

Re: ThinkPad E485/E585 - Firmware bug ACPI IVRS table

Have you tried overriding both IVRS table entries instead of using iommu=soft? 

Check out current deals!


Shop current deals

Top Kudoed Authors