Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 11 years ago

Last modified 6 years ago

#461 accepted defect

No interrupts for uspace on real hardware when SMP enabled

Reported by: Jiri Svoboda Owned by: Jakub Jermář
Priority: major Milestone:
Component: helenos/srv/irc Version: mainline
Keywords: smp Cc:
Blocker for: Depends on:
See also:

Description (last modified by Jiri 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 (18)

comment:1 Changed 11 years ago by Jiri Svoboda

Description: modified (diff)

comment:2 Changed 11 years ago by Jiri Svoboda

Summary: No USB devivces are detected on bare metalNo USB devices are detected on bare metal

comment:3 Changed 11 years ago by Martin 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 11 years ago by Jiri 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 11 years ago by Jiri 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 11 years ago by Martin 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 11 years ago by Jakub Jermář

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 11 years ago by Jiri 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 11 years ago by Jakub Jermář

Keywords: smp added
Summary: No USB devices are detected on bare metalNo USB devices are detected on bare metal when SMP enabled

comment:10 Changed 11 years ago by Jakub Jermář

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 11 years ago by Jakub Jermář

Component: helenos/unspecifiedhelenos/srv/irc
Summary: No USB devices are detected on bare metal when SMP enabledNo interrupts for uspace on real hardware when SMP enabled

comment:12 Changed 11 years ago by Jakub Jermář

Owner: set to Jakub Jermář
Status: newassigned

comment:13 Changed 11 years ago by Jakub Jermář

Status: assignedaccepted

comment:14 Changed 11 years ago by Jakub Jermář

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 11 years ago by Jakub Jermář

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 11 years ago by Jakub Jermář

Milestone: 0.5.00.5.1

comment:17 Changed 9 years ago by Martin Decky

Milestone: 0.6.00.7.1

comment:18 Changed 6 years ago by Jakub Jermář

Milestone: 0.7.1
Note: See TracTickets for help on using tickets.