Follow us on Google+ Follow us on Facebook Follow us on Twitter

Opened 5 years ago

Last modified 3 years ago

#461 accepted defect

No interrupts for uspace on real hardware when SMP enabled

Reported by: svoboda Owned by: jermar
Priority: major Milestone: 0.7.1
Component: helenos/srv/irc Version: mainline
Keywords: smp Cc:
Blocker for: Depends on:
See also:

Description (last modified by svoboda)

As of mainline,1487, no USB devices work for me at all on bare metal (either Sony Vaio with UHCI or AMD workstation with OHCI). If I plug in a device, nothing seems to happen. The device does not power on and it does not appear in the device tree, I also don't see anything in the USB logs. Tried this with several different devices (keyboard, mouse, mass storage).

Change History (17)

comment:1 Changed 5 years ago by svoboda

  • Description modified (diff)

comment:2 Changed 5 years ago by svoboda

  • Summary changed from No USB devivces are detected on bare metal to No USB devices are detected on bare metal

comment:3 Changed 5 years ago by decky

Is it actually related to mainline,1487? I don't see any USB-related changes in that changeset. Can you bisect the history where the breakage happens?

comment:4 Changed 5 years ago by svoboda

This is the revision I tested, I did not claim it was broken by this changeset. I will search for the commit that broke it when get the chance.

comment:5 Changed 5 years ago by svoboda

After some tedious bisecting with no result I finally remembered about the problem with interrupts on SMP. When I disable SMP support, USB works just fine as of latest mainline (mainline,1490). I thought interrupts on ia32/SMP were supposed to be working now, no? If not, it's quite a serious issue.

comment:6 Changed 5 years ago by decky

AFAIK the uspace APIC driver is still a bit simplified. It can handle basic setups (such as in QEMU), but it is likely to fail on more complex setups on real hardware.

There is a ticket for that (#387). It would be also great to finally integrate the interrupt controller drivers into the DDF, the current solution is still just a hack.

comment:7 Changed 5 years ago by jermar

It may be a good idea to look into /proc/iomem on Linux and see if the IO APIC and the local APICS are at the expected IO base addresses or not (0xfec00000 for IO APIC). If they are not, implementing #387 may actually help.

Since no one complained and SMP started to work for MartinS after fixing physmem_map(), #387 lost some of its priority.

comment:8 Changed 5 years ago by svoboda

Snippet from my /proc/iomem:

fec00000-ffffffff : reserved

fec00000-fec003ff : IOAPIC 0
fed00000-fed003ff : HPET 0
fee00000-fee00fff : Local APIC

fee00400-fee00fff : pnp 00:02

fff80000-fffeffff : pnp 00:0d
ffff0000-ffffffff : pnp 00:0d

100000000-12fffffff : System RAM

comment:9 Changed 5 years ago by jermar

  • Keywords smp added
  • Summary changed from No USB devices are detected on bare metal to No USB devices are detected on bare metal when SMP enabled

comment:10 Changed 5 years ago by jermar

orome_:

as to what causes usb to not work, I think it's because apic reports interrupts enabled when they are not, otherwise both HC drviers should fall back to polling.

comment:11 Changed 5 years ago by jermar

  • Component changed from helenos/unspecified to helenos/srv/irc
  • Summary changed from No USB devices are detected on bare metal when SMP enabled to No interrupts for uspace on real hardware when SMP enabled

comment:12 Changed 5 years ago by jermar

  • Owner set to jermar
  • Status changed from new to assigned

comment:13 Changed 5 years ago by jermar

  • Status changed from assigned to accepted

comment:14 Changed 5 years ago by jermar

Jiri, could you please verify that interrupts are working properly for kernel in SMP on your machine by completely deactivating uspace so that you'll be left with only kconsole? That would be really helpful.

comment:15 Changed 5 years ago by jermar

I am inclined towards moving this to the next release as this is probably not a regression. Even if it is a regression, it is a known regression.

comment:16 Changed 5 years ago by jermar

  • Milestone changed from 0.5.0 to 0.5.1

comment:17 Changed 3 years ago by decky

  • Milestone changed from 0.6.0 to 0.7.1
Note: See TracTickets for help on using tickets.