Opened 12 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 by Jiri Svoboda, 12 years ago

Description: modified (diff)

comment:2 by Jiri Svoboda, 12 years ago

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

comment:3 by Martin Decky, 12 years ago

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 by Jiri Svoboda, 12 years ago

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 by Jiri Svoboda, 12 years ago

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 by Martin Decky, 12 years ago

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

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 by Jiri Svoboda, 12 years ago

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

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

comment:10 by Jakub Jermář, 12 years ago

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

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

Owner: set to Jakub Jermář
Status: newassigned

comment:13 by Jakub Jermář, 12 years ago

Status: assignedaccepted

comment:14 by Jakub Jermář, 12 years ago

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

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

Milestone: 0.5.00.5.1

comment:17 by Martin Decky, 9 years ago

Milestone: 0.6.00.7.1

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

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