Commit Graph

75 Commits

Author SHA1 Message Date
Alexander Boettcher
6d25c735d2 usb: use pci_drv on x86 to allocate dma memory 2013-02-22 20:28:27 +01:00
Alexander Boettcher
5a067a101a dde_linux: use pci_drv with class code/mask 2013-02-22 20:28:27 +01:00
Christian Prochaska
dc0ac78b34 usb_drv: prevent recursive signal dispatch
Fixes #649.
2013-02-20 14:54:13 +01:00
Norman Feske
fae63f4fa9 Merge base libraries into a single library
This patch simplifies the way of how Genode's base libraries are
organized. Originally, the base API was implemented in the form of many
small libraries such as 'thread', 'env', 'server', etc. Most of them
used to consist of only a small number of files. Because those libraries
are incorporated in any build, the checking of their inter-dependencies
made the build process more verbose than desired. Also, the number of
libraries and their roles (core only, non-core only, shared by both core
and non-core) were not easy to capture.

Hereby, the base libraries have been reduced to the following few
libraries:

- startup.mk contains the startup code for normal Genode processes.
  On some platform, core is able to use the library as well.
- base-common.mk contains the parts of the base library that are
  identical by core and non-core processes.
- base.mk contains the complete base API implementation for non-core
  processes

Consequently, the 'LIBS' declaration in 'target.mk' files becomes
simpler as well. In the most simple case, only the 'base' library must
be mentioned.

Fixes #18
2013-02-19 14:45:55 +01:00
Norman Feske
af66043b79 New Input::Event::FOCUS, rename keycode to code
This patch introduces keyboard-focus events to the 'Input::Event' class
and changes the name 'Input::Event::keycode' to 'code'. The 'code'
represents the key code for PRESS/RELEASE events, and the focus state
for FOCUS events (0 - unfocused, 1 - focused).

Furthermore, nitpicker has been adapted to deliver FOCUS events to its
clients.

Fixes #609
2013-01-15 10:18:11 +01:00
Christian Helmuth
9dae5ee490 USB: Use real HID driver in dde_linux
Before, usb_drv included both the real HID driver and also Linux's early
boot USB driver (BP). The BP drivers have been removed now.

Fixes #440.
2013-01-11 15:38:16 +01:00
Norman Feske
73ab30c22c Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
Norman Feske
13d4108fea Unify 'Signal_dispatcher' interfaces
Several users of the signal API used custom convenience classes to
invoke signal-handling functions on the reception of incoming signals.
The 'Signal_dispatcher' pattern turned out to be particularly useful. To
avoid the duplication of this code across the code base, this patch
adds the interface to 'base/signal.h'.

Furthermore, the patch changes the 'Signal::num()' return type from int
to unsigned because negative numbers are meaningless here.

Fixes #511
2013-01-10 21:09:14 +01:00
Norman Feske
0dbb5e1696 Propagate 'Range_allocator::alloc_aligned' errors
This patch reflects eventual allocation errors in a more specific way to
the caller of 'alloc_aligned', in particular out-of-metadata and
out-of-memory are considered as different conditions.

Related to issue #526.
2012-11-28 22:51:09 +01:00
Martin Stein
cfa0a40d5e base_hw & omap4: USB HID and framebuffer driver.
Implement 'Signal_receiver::pending()'.

Provide display-subsystem MMIO.

Avoid method ambiguousness in 'Irq_context' in
'dde_linux/src/drivers/usb/signal/irq.cc'
(it derives from two list element classes when using 'base_hw').

Enables demo scenario with 'hw_panda_a2'.
2012-11-14 16:36:50 +01:00
Stefan Kalkowski
d3902e8538 Make nic_bridge's MAC address range configurable
By adding a "mac=XX:XX:XX:XX:XX:XX" attribute/value pair to the nic_bridge's
configuration one can define the first MAC address from which the nic_brigde
will allocate MACs for it's clients. Note: that the least relevant byte will
be ignored, and ranges from 0-255. Fixes #424.
2012-10-24 16:39:02 +02:00
Norman Feske
5d68b7d84f Fix typo in 'dde_linux'
Thanks Alexander Tarasikov for reporting!
2012-10-12 13:10:48 +02:00
Norman Feske
3e406a1077 Increase quota of USB driver
The memory allocation heuristics in the usb driver provided by dde_linux
changed with the recent commit 71b2b42936.
Apparently, the new variant requires a larger memory pool. Increasing
the quota is a temporary fix until the memory allocator gets revisited.
2012-09-18 10:53:17 +02:00
Sebastian Sumpf
c98a80251c USB: Sync interrupts
On systems that use multiple UHCI/EHCI controllers, synchronize access to low
level interrupt handler. Let 'device_may_wakeup' return 1, so suspended
controllers will send interrupts upon device connection. Make sure URBs are
shutdown upon disconnect.

Fixes #332
2012-08-30 11:12:49 +02:00
Sebastian Sumpf
71b2b42936 USB: Dimension back-end allocators dynamically
Use avaible ram session quota to determine the size of the memory allocators.

Fixes #331
2012-08-30 11:12:32 +02:00
Sebastian Sumpf
3207b4eed0 USB: Performance improvements
Added SKB bitmap allocator, use Nic::Packet_allocator in packet stream, use slab
allocators on top of back-end AVL allocator, split allocators in cached/uncached
for general purpose/DMA allocation, added patch to original code to distinguish
cached or uncached memory requests, take advantage of and implement TX bursts
(or SKB batching), call interrupt handlers until they return unhandled.
2012-08-07 22:22:45 +02:00
Norman Feske
daf4300dcb Defer 'wait_for_irq' until device irq is cleared 2012-07-26 19:15:35 +02:00
Sebastian Sumpf
b50970fb74 USB: Test and fix errors on x86 boxes
Added support for more than one UHCI controller. Make sure the 'PIRQ' bit in the
legacy support register (PCI config space) of the UHCI controller is enabled and
also that the 'Trap on IRQ' bit is disabled. Fix offset bug in PCI-config space
emulation for Linux.

Fixes #282
2012-07-19 21:05:51 +02:00
Sebastian Sumpf
70b8fc2832 USB: Support usbnet and smsc95xx for omap4 2012-07-09 17:53:43 +02:00
Norman Feske
e1435a3f57 Replace old test/block with test/ahci
The block test at test/ahci is indeed not AHCI-specific. It is a generic
block read/write test for the block-session interface. But in contrast
to the original test/block, it restores the block device content (at
least when the test succeeds). Hence, we remove the original (dangerous)
block test and always use code of test/ahci.
2012-07-09 15:51:55 +02:00
Sebastian Sumpf
791307385f USB: target.mk
Add 'clean' and 'cleanall' targets
Move include symlinks in separate directory
2012-06-22 15:19:33 +02:00
Norman Feske
c32dbfec53 USB: Explicitly allocate DMA buffers 2012-06-22 11:50:13 +02:00
Sebastian Sumpf
e23c334b90 OMAP4 USB driver 2012-06-22 11:38:36 +02:00
Christian Helmuth
36ae42b8ff Check for required tools on 'make prepare'
Fixes #221.
2012-05-29 13:55:00 +02:00
Sebastian Sumpf
9f73476b37 New DDE-Linux-based USB driver
The new 'dde_linux' repository will host device drivers ported from the
Linux kernel. In contrast to the original 'linux_drivers' repository,
'dde_linux' does not contain any 3rd-party source code. To download the
Linux kernel source code and extract the drivers, execute the 'make
prepare' rule of the top-level Makefile. The initial version of the
'dde_linux' repository comes with an USB driver. The porting methodology
follows the path of the Intel GEM port. Instead of attempting to provide
a generic Linux environment that works across drivers, each driver comes
with a specially tailored DDE.

The DDE consists of Genode-specific implementations of Linux API
functions as declared in 'lx_emul.h'. Most of these functions are
dummies that must merely be provided to resolve dependencies at the
linking stage. They are called by unused code-paths.

As of now, the USB driver support UHCI, EHCI on the x86_32 platform. I
exposes USB HID devices and USB storage devices via Genode's input-session
and block-session respectively.

The USB driver is accompanied with two run scripts 'run/usb_hid.run' and
'run/usb_storage.run'.
2012-05-29 13:54:58 +02:00