LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-01-2013, 08:22 PM   #1
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64, LFS, Crux
Posts: 194

Rep: Reputation: 26
AMD_IOMMU module is missing from slackware kernels


Slackware kernels do not include the amd iommu module. This causes io-remapping to fail and many devices may be unusable. For me, usb devices (kbd/mouse/storage) and my ethernet cards were unusable (perhaps other devices that I didn't notice as well). Recompiling the kernel with CONFIG_AMD_IOMMU=y fixed this. I started with the config for the slackware generic kernel, then made my change in 'make menuconfig'.
This is meant to help others who run into a similar situtation as my own. Symptoms to watch for are usb devices being unresponsive when get started with installation. To complete the install and then get through the kernel build, I used an old ps2 keyboard I have laying around.
Hope this helps.

Cheers,
John

<edit> Also, if you follow my use of the generic kernel's config, don't forget to create an initrd, also. (`man mkinitrd` and `less /boot/README.initrd`) </edit>

Last edited by j_v; 09-01-2013 at 08:26 PM.
 
Old 09-04-2013, 01:54 PM   #2
Raveriux
Member
 
Registered: Jul 2013
Location: Lithuania
Distribution: Slackware64 14, Slackware64 -current, Maemo
Posts: 79

Rep: Reputation: Disabled
Do you have in a log somewhere "EHCI_HCD should be loaded before UHCI_HCD and OHCI_HCD" ?
 
Old 09-04-2013, 07:10 PM   #3
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64, LFS, Crux
Posts: 194

Original Poster
Rep: Reputation: 26
I did before. I initially went at the problem from that angle. I reconfigured a kernel in such a way that no uhci and ohci stuff are built directly into the kernel; all modular. After installing that kernel, I created an initrd that included the xhci, ehci, and usbhid. Still, I was getting all usb devices below a root hub failing to enumerate. Then I remembered an issue I had back when I first built this box: the iommu (which I enabled in bios setup, to get benifits for virtualization) turned out to be the culprit to woes I had then with usb and net devices. The issue then was that one of the acpi tables (the ivrs table) had the sections on the iommu imcomplete, causing the amd_iommu module to fail loading. This was a known bug that occures in some bios firmware. There is a workaround in 3.10.x kernels (if interested, see ivrs_iommo[#]= in kernel-parameters.txt in 3.10.x kernel docs). When I built this box, I had installed Debian testing, reconfigured for and upgraded to unstable. After enabling the amd_iommu module, my usb and net devices start to work properly.

Now, looking back on all this, I realize that I had made the amd_iommu config change on top of my fully modular usb changes to the 3.10.9 generic kernel config. After posting this I will go back again and build two kernels: one with amd_iommu change only and one with fully modular usb only. I will report my findings after booting with both.

Thanks for asking. Sorry for the long wind.

Cheers,
John
 
Old 09-05-2013, 10:31 PM   #4
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64, LFS, Crux
Posts: 194

Original Poster
Rep: Reputation: 26
OK. Built two kernels, both starting with the 3.10.9-generic config. The first one I only changed the AMD_IOMMU config option to y. The second one I changed many things pertaining to usb and other buses; mainly removed any option that causes the ssb and amba buses to be built and a few platform drivers that I'm fairly sure only make sense on an embedded system -- this allowed the usb drive core to be built modular. Also created a seperate initrd for each. Both initrd's built with the following modules called for on cmd-line: ext4,xhci-hcd,ehci-hcd,ohci-hcd,usbhid. The amd_iommu one boot normally with full use of my usb keyboard, mouse, external drive encloser, thumb drives... et al, working properly. The second kernel boots the same as the packaged 3.10.9-generic: no usb devices working and network borked. My previous kernel build is a combination of the two configs, with a few additional tweaks for personal preference and works great.

The core issue I see is that if the system board has an amd iommu and it is enabled, then the amd iommu driver is necessary. Simply enabling that single driver allowed my system to boot properly.
Another issue I see is that there are options turned on in the default kernel configs that only seem to make sense on an embedded platform:

ssb bus and amba bus -- I've seen this on devices like routers, but not on a x86/x86_64 based main board.
broadcom b43 wireless drivers -- these are also often on routers and maybe other embedded devices and pull in ssb bus driver.
broadcom 440x/47xx ethernet support -- again, embedded, pulls in ssb.

I may be on the wrong track about the drivers for embedded devices, but the iommu driver is important some modern main boards (the intel iommu driver is included, why not also add the amd one).

OK, well, no big deal. Building a kernel and initrd is basic stuff, so no major loss. Except the time I spent tracking down the problem. Oh, well.

Cheers,
John

Last edited by j_v; 09-05-2013 at 10:35 PM. Reason: fix typos
 
Old 09-05-2013, 10:41 PM   #5
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0
Posts: 3,403
Blog Entries: 15

Rep: Reputation: 950Reputation: 950Reputation: 950Reputation: 950Reputation: 950Reputation: 950Reputation: 950Reputation: 950
So, is this only with the Generic kernel, or does this happen with the Huge kernel also?
 
Old 09-06-2013, 04:42 AM   #6
chicken76
Member
 
Registered: Mar 2009
Distribution: Slackware
Posts: 79

Rep: Reputation: 1
I have encoutered similar problems on a Gigabyte board with the 970 chipset and EFI bios.
I tried the huge kernel on slack64-14.0 install dvd and also 3.2.45 in /patches.
In the end I managed to get everything to work by enabling the iommu controller in bios and supplying the option "iommu=soft" to the kernel at boot.
I'm not sure what implications this has to performance, especially to virtualization. It would be nice if somebody knowledgeable about these things could post here what each "iommu=" option does.

P.S. I have not tried this on modern kernels, only on those stated above.

Last edited by chicken76; 09-06-2013 at 04:46 AM.
 
Old 09-06-2013, 05:29 PM   #7
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64, LFS, Crux
Posts: 194

Original Poster
Rep: Reputation: 26
@ReaperX7:
It happens on both. For me, the heart of the issue is the amd_iommu driver, so both kernels do not work for usb and networking devices, at the very least, on my machine.
Strange that the intel iommu driver is included and not the amd iommu driver; probably an oversite.
 
Old 09-06-2013, 06:28 PM   #8
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 874

Rep: Reputation: 1812Reputation: 1812Reputation: 1812Reputation: 1812Reputation: 1812Reputation: 1812Reputation: 1812Reputation: 1812Reputation: 1812Reputation: 1812Reputation: 1812
Quote:
Originally Posted by javogel View Post
Strange that the intel iommu driver is included and not the amd iommu driver; probably an oversite.
It appears that the Intel IOMMU driver is available on IA32, but the AMD IOMMU is not. That's probably the cause of the oversight. I'll add it on the x86_64 configs.
 
Old 09-07-2013, 09:34 AM   #9
chicken76
Member
 
Registered: Mar 2009
Distribution: Slackware
Posts: 79

Rep: Reputation: 1
@javogel
Have you tried "iommu=soft" on your not-working 3.10 kernel? I'm curious if it gets Usb and network working for you.
 
Old 09-07-2013, 04:18 PM   #10
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64, LFS, Crux
Posts: 194

Original Poster
Rep: Reputation: 26
@volkerdi:
Thanks! Slackware is still great. Thanks for keeping it that way. I strayed to Debian years back, but it's nice to come back to my first distro and find that it's still as rock solid as I remember it.

@chicken76:
OK, I can see where you are going with that and will let you know it that works. To me, if it does work, it would allow me to use my current iso for rescue without digging out a ps2 keyboard. Thanks for the suggestion.
 
Old 09-07-2013, 04:55 PM   #11
j_v
Member
 
Registered: Oct 2011
Distribution: Slackware64, LFS, Crux
Posts: 194

Original Poster
Rep: Reputation: 26
@chicken76
Very nice. Keyboard and both network cards worked fine on huge.s on my current iso. Not a fix for the long term, but means that the iso is a keeper. Something to keep in mind when someone has the same issues I did, that they might try your suggestion and add "iommu=soft" for the boot disk. Thanks.

Thanks to everyone who gave input. I appreciate your time and efforts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Assertion `kernels [x] == kernels [x]' failed with emulator in Slackware 14 Holering Slackware 1 05-10-2013 03:43 PM
TTY0 missing in newer kernels theNbomr Linux - Kernel 8 01-14-2009 09:34 AM
2.4.x Kernels and forcedeth Module Problem b1cq7 Linux - Networking 3 02-14-2006 01:19 AM
Why slack 2.6 kernels have raid as module? Barx Slackware 2 10-08-2005 08:35 AM
one module and two kernels yayameen Linux - Newbie 2 02-27-2003 12:50 PM


All times are GMT -5. The time now is 03:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration