11 Replies Latest reply on Sep 30, 2017 1:30 PM by kendew

    Failed to boot from sdcard in arch linux

    kkkwsk

      Failed to boot from sdcard with error

       

      #dmesg | grep smbus

      [6.456351] i801_smbus 0000:00:1f.1: can't derive routing for PCI INT A
      [6.456354] i801_smbus 0000:00:1f.1: PCI INT A: not connected
      [6.456379] i801_smbus 0000:00:1f.1: SPD Write Disable is set
      [6.456401] i801_smbus 0000:00:1f.1: Failed to allocate irq -2147483648: -107
      [6.456457] i801_smbus 0000:00:1f.1: SMBus using polling

       

      #lspci

      00:00.0 Host bridge: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Host Bridge (rev 0b)

      00:02.0 VGA compatible controller: Intel Corporation Device 5a85 (rev 0b)

      00:0e.0 Audio device: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster (rev 0b)

      00:0f.0 Communication controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Trusted Execution Engine (rev 0b)

      00:12.0 SATA controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SATA AHCI Controller (rev 0b)

      00:13.0 PCI bridge: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port A #1 (rev fb)

      00:13.1 PCI bridge: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port A #2 (rev fb)

      00:13.2 PCI bridge: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port A #3 (rev fb)

      00:15.0 USB controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series USB xHCI (rev 0b)

      00:16.0 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #1 (rev 0b)

      00:18.0 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #1 (rev 0b)

      00:19.0 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #1 (rev 0b)

      00:19.1 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #2 (rev 0b)

      00:19.2 Signal processing controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #3 (rev 0b)

      00:1a.0 Serial bus controller [0c80]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series PWM Pin Controller (rev 0b)

      00:1f.0 ISA bridge: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Low Pin Count Interface (rev 0b)

      00:1f.1 SMBus: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SMBus Controller (rev 0b)

      01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)

      02:00.0 Network controller: Intel Corporation Device 24fb (rev 10)

      03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

       

      #uname -a

      Linux nuc 4.11.2-1-ARCH #1 SMP PREEMPT Mon May 22 06:53:49 CEST 2017 x86_64 GNU/Linux

       

      How I avoid this error?

        • 1. Re: Failed to boot from sdcard in arch linux
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello kkkwsk,
           
          Thank you for contacting the Intel community.
           
          Would you please provide us with your NUC model?
           
          I’m sorry for the issue you have with this system; however, independent of your NUC model Intel hasn't validated these operating systems with any NUC. We recommend you use the latest kernel. If you need assistance with Linux* on Intel NUC, check your distro's website and forums for peer assistance.
          https://www.archlinux.org/
           
           
          Regards,
           
           
          Ivan U.

           

          • 2. Re: Failed to boot from sdcard in arch linux
            N.Scott.Pearson

            It looks to me like your Linux distro doesn't have a driver for the Realtek RTS5229 Card Reader...

            ...S

            • 3. Re: Failed to boot from sdcard in arch linux
              kendew

              kkkwsk

              I see it's been awhile since you posted this. However, I got the pretty much the exact same error you mentioned:

               

              [    1.936721] i801_smbus 0000:00:1f.1: can't derive routing for PCI INT A

              [    1.936723] i801_smbus 0000:00:1f.1: PCI INT A: not connected

              [    1.936749] i801_smbus 0000:00:1f.1: SPD Write Disable is set

              [    1.936772] i801_smbus 0000:00:1f.1: Failed to allocate irq -2147483648: -107

              [    1.936848] i801_smbus 0000:00:1f.1: SMBus using polling

               

              on a NUC6CAYH and I wonder if you have since found any solution or clues as to this??? 

              In my case I'm using 4.12:

               

              uname -a

              Linux Ao 4.12.0-1-amd64 #1 SMP Debian 4.12.6-1 (2017-08-12) x86_64 GNU/Linux

               

              With Debian Stretch.

              Relevant lspci -v output:

               

              00:1f.1 SMBus: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SMBus Controller (rev 0b)

              Subsystem: Intel Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series SMBus Controller

              Flags: medium devsel, IRQ -2147483648

              Memory at 91416000 (64-bit, non-prefetchable) [size=256]

              I/O ports at f040 [size=32]

              Kernel driver in use: i801_smbus

              Kernel modules: i2c_i801

               

              I've also posted at http://forums.debian.net/viewtopic.php?f=7&t=134700 but so far no replies there.  Since our output of dmesg | grep smbus was so identical, but kernel and distro are different, I'm guessing it's a NUC related issue, though you didn't mention which NUC you were using.  If you know anything, please clue me in!

              Kendew

              • 4. Re: Failed to boot from sdcard in arch linux
                hslee

                I have exactly the same issue except this line

                 

                [    1.936749] i801_smbus 0000:00:1f.1: SPD Write Disable is set

                 

                My kernel version is 4.8.17-yocto-standard with 'leafhill' patches applied.

                I know this error not happen with kernel 4.10.0-19-generic because my co-worker tested the hardware set (N3350 Q7 module with customized carrier board) with standard Ubuntu build (dont know what Ubuntu version it is).

                I guess that's something related to kernel. I am looking for solution too.

                • 5. Re: Failed to boot from sdcard in arch linux
                  hslee

                  I found more information after I dumped my board's ASL.

                   

                  It seems BIOS does not specified interrupt (IRQ) routing table entry for device "001F". That's why during boot up kernel can't allocate IRQ routing info for registering IRQ for device 001f, which is SMBus.

                   

                  I read Intel's document regarding to IRQ routing table. It doesn't mention SMBus in PCI IRQ routing section, but talks about SMBus host controller interrupt ownership. I am not quite sure how to modified i801 driver for it. I am looking for help from experts.

                  • 6. Re: Failed to boot from sdcard in arch linux
                    N.Scott.Pearson

                    Guys, interesting discussion, but nothing to do with the root cause of the original problem. SMBus is not used/required to support the SD Card Reader device. The real problem, as I indicated earlier, is that there simply is no device driver for this device. Go bug the Realtek folks to provide one (If one hasn't been made available in the meantime).

                     

                    BTW, the SMBus interface was removed from the mapping table because, in the Windows environment (where Intel does not provide a driver for general use), there were all sorts of 3rd-party drivers that are screwed up by the interrupt routing. It was easier to remove it from the mapping than to rein in all of these drivers (which mostly seemed to want to use it in polled mode anyway). As you saw in the log, the i801_i2c driver just switched to polled mode and kept on trucking...

                     

                    Hope this helps,

                    ...S

                     

                    P.S. Don't shoot the messenger; I was a dissenter for both of these decisions.

                    • 7. Re: Failed to boot from sdcard in arch linux
                      hslee

                      @N.Scott Pearson

                       

                      Thank you for the information.

                      It sounds like if I want to have interrupt available with the i801 SMBus driver provided by Linux kernel I need to have modification for both BIOS and i801 driver. Maybe I should stay polling mode in this case.

                      • 8. Re: Failed to boot from sdcard in arch linux
                        kendew

                        @N.Scott Pearson

                        Your more detailed input is much appreciated.  Maybe I caused you some confusion.

                        I am not sure about hslee, but in my case my issue was not failing to boot from sdcard but trying to determine what this issue connected with this error message was.  I am not sure if kkkwsk, the original poster, is still around reading this discussion but I posted here because the irq error was exactly the same as kkkwsk's.  I have no SD card to test that issue.  Perhaps I should have opened a new thread and am sorry if this created confusion.

                        What seems likely here from N.Scott Pearson's reply is that this error may be NUC specific, caused by NUC developers wishing to avoid Windows driver issues.  At any rate, I didn't find anything relevant to this error in Linux or Debian forums so I posted here.

                        In my particular case I find NUC6CAYH a really nice machine for running Debian Stretch.  Installing a newer kernel than what comes with Stretch solved initial issues and all that's left is this irq error on startup. 

                        So basically my questions were

                        1.  What does the Failed to allocate irq -2147483648: -107 error mean

                        2.  How might it impact performance and

                        3.  What to do about it?

                         

                        I am guessing from what I've learned here that the SMBus interface being removed from the mapping table may have to do with generating this error.  But questions 2 and 3 remain:  is this impacting performance and should I do something about it or, if it's not impacting performance, just let it be.

                         

                        @hslee, you seem to feel it's worth modifying both BIOS and driver.  May I ask why?  What do you feel having interrupt available will achieve?

                        Thanks

                        Kendew

                        • 9. Re: Failed to boot from sdcard in arch linux
                          N.Scott.Pearson

                          It's quite simple. The BIOS is not including routing for the interrupt for the SMBus interface. This means that polling must be used with it. Using polling should not affect system performance overall, but it can slow throughput for applications that is actually using the SMBus. Let's suppose we are talking about an application that is regularly reading a register from a SMBus-based device. This could be, for example, an application that is regularly (once per second, for example) reading a temperature sensor. If the SMBus interface could be used with an interrupt, the application would start the read operation and, when it was completed, the reading would immediately be returned to them. If the SMBus interface cannot be used with an interrupt, the application would do the same, but, under the covers, the driver would regularly poll the SMBus interface's status register to see when the operation completed and. only then, return the reading to the application. The difference is in this "regularly poll" operation. For efficiency, a delay must be used. Reading the status register over and over and over without a delay in between would definitely affect system performance. The delay will allow other tasks to do their stuff while this task waits. The problem is that the delay is a fixed size and, if the operation actually completes in the middle of a delay, the entire delay must occur before the task can realize that it is done. While this can be optimized, making the delay too short would mean more looping (consuming more CPU cycles), so you have to be careful. In this case, since the performance of the SMBus is very low, the delay is chosen to minimize CPU cycle consumption at the cost of SMBus throughput. In our example case, this isn't a problem because we are only reading a single register once a second. If there were, say, 500 or 1000 registers to be read every second, perhaps by multiple applications, this would not be so good, but this is rarely (if ever) the case.

                           

                          Does that explain it or have I confused you more?

                          ...S

                          • 10. Re: Failed to boot from sdcard in arch linux
                            kendew

                            Thanks N.Scott Pearson.  Creating an alternative BIOS isn't an area of expertise for me, so it sounds like I'm going to have to live with the problem. 

                            But thanks to you I understand what the problem is and what I might have to expect from it.  That's something I haven't been able to find out anywhere else.

                            I wonder why routing for the interrupt for the SMBus interface wasn't included as an option in the BIOS, with "false" being the default.  Seems that could have been helpful. 

                            In any event, I like to know what's going on even if I can't do much about it and do thank you for taking the time to instruct.

                            Kendew

                            • 11. Re: Failed to boot from sdcard in arch linux
                              kendew

                              @hslee, or anyone,

                              Did you consider Libreboot, the open source BIOS as a possibility.  I wonder how it would work with NUCs.  Of course it wouldn't be possible for dual booting with Windows, but just for those just wanting to boot Linux.  Anyone had experience with this?  After this problem, I'm considering it.