Commit Graph

23 Commits

Author SHA1 Message Date
Christian Prochaska 06fdc7b897 Qt-based media player
This patch implements a simple Qt-based media player which is actually a
graphical user interface for the SDL-based 'avplay' media player from
'libav'. It starts 'avplay' as a child and shows its graphical output in a
'QNitpickerViewWidget'. The widgets for controlling the player state send
the according keyboard and mouse input events to 'avplay'.

The 'qt_avplay' player supports the following configuration options:

<mediafile name="..."/>
-> name of the media file to play

<framebuffer_filter name="..." ram_quota="..."/> (may appear multiple times)
-> name of a framebuffer filter service to filter the video output

Fixes #222.
2012-05-29 13:55:00 +02:00
Christian Prochaska c2f23de2e7 Introduce server-role member to 'Child' class
This patch is needed to use children as services in a dynamic
way (closing and reopening sessions).
2012-05-29 13:54:59 +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
Sebastian Sumpf 376983ae4c DDE kit: Timer add schedule function form timers
Added 'dde_kit_timer_schedule_absolute' to timer interface.
2012-05-23 19:17:23 +02:00
Norman Feske ae1d0c04ae File-system interface, ram_fs, libc-fs
This patch introduces the file-system-session interface, provides an
implementation of this interface in the form of an in-memory file
system, and enables the libc to use the new file-system facility.

The new interface resides in 'os/include/file_system_session/'. It
uses synchronous RPC calls for functions referring to directory
and meta-data handling. For transferring payload from/to files, the
packet-stream interface is used. I envision that the asynchronous design
of the packet-stream interface fits well will the block-session
interface. Compared to Unix-like file-system APIs, Genode's file-system
session interface is much simpler. In particular, it does not support
per-file permissions. On Genode, we facilitate binding policy (such as
write-permission) is sessions rather than individual file objects.

As a reference implementation of the new interface, there is the
new 'ram_fs' service at 'os/src/server/ram_fs'. It stores sparse
files in memory. At the startup, 'ram_fs' is able to populate the
file-system content with directories and ROM modules as specified
in its configuration.

To enable libc-using programs to access the new file-system interface,
there is the new libc plugin at 'libports/src/lib/libc-fs'. Using this
plugin, files stored on a native Genode file system can be accessed
using the traditional POSIX file API.

To see how the three parts described above fit together, the test
case at 'libports/run/libc_fs' can be taken as reference. It reuses
the original 'libc_ffat' test to exercise several file operations
on a RAM file-system using the libc API.

:Known limitations:

The current state should be regarded as work in progress. In particular
the error handling is not complete yet. Not all of the session functions
return the proper exceptions in the event of an error. I plan to
successively refine the interface while advancing the file-system
implementations. Also the support for truncating files and symlink
handling are not yet implemented.

Furthermore, there is much room for optimization, in particular for the
handling of directory entries. Currently, we communicate only one dir
entry at a time, which is bad when traversing large trees. However, I
decided to focus on functionality first and defer optimizations (such as
batching dir entries) to a later stage.

The current implementation does not handle file modification times at
all, which may be a severe limitation for tools that depend on this
information such as GNU make. Support for time will be added after we
have revisited Genode's timer-session interface (issue #1).

Fixes #54
Fixes #171
2012-05-17 20:33:53 +02:00
Norman Feske f0fcf084d7 Improve robustness of policy matching
The 'Session_policy' helper could not cope well with configurations that
contain nodes of a type other than '<policy>'. This patch improves the
policy matching by skipping non-policy nodes.
2012-05-17 20:12:51 +02:00
Norman Feske 293b3c80d2 Fix exception type name in comment 2012-05-17 12:47:20 +02:00
Norman Feske bcf6714eff Re-implementation of the loader service, ref #187
The original loader service was primarily motivated by the
browser-plugin scenario presented on our live CD. The new version
implements a more general session interface, which widens the
application scope of the service and, at the same time, reduces its
implementation complexity.

The complexity reduction is achieved by removing the original limitation
of supplying the new sub system as a single binary blob only. The server
used to implement heuristics and functionality for dealing with
different kinds of blobs such as ELF images or TAR archives. This has
been replaced by a session-local ROM service, which can be equipped with
an arbitrary number of ROM modules supplied by the loader client prior
starting the new sub system. Even though the TAR support has been
removed, a separate instance of the 'tar_rom' service can be used within
the subsystem to provide the formerly built-in functionality.
2012-05-02 16:54:18 +02:00
Norman Feske cb9b2724de Simplify use of custom data-flow signal handlers 2012-04-17 11:08:52 +02:00
Norman Feske 8b96f44003 Add const qualifiers, minor style fixes 2012-04-17 11:08:40 +02:00
Norman Feske 9a00ad7ae3 Support for dynamic ROM sessions, fix #170
This patch introduces support for ROM sessions that update their
provided data during the lifetime of the session. The 'Rom_session'
interface had been extended with the new 'release()' and 'sigh()'
functions, which are needed to support the new protocol. All ROM
services have been updated to the new interface.

Furthermore, the patch changes the child policy of init
with regard to the handling of configuration files. The 'Init::Child'
used to always provide the ROM dataspace with the child's config file
via a locally implemented ROM service. However, for dynamic ROM
sessions, we need to establish a session to the real supplier of the ROM
data. This is achieved by using a new 'Child_policy_redirect_rom_file'
policy to handle the 'configfile' rather than handling the 'configfile'
case entirely within 'Child_config'.

To see the new facility in action, the new 'os/run/dynamic_config.run'
script provides a simple scenario. The config file of the test program
is provided by a service, which generates and updates the config data
at regular intervals.

In addition, new support has been added to let slaves use dynamic
reconfiguration. By using the new 'Child_policy_dynamic_rom_file', the
configuration of a slave can be changed dynamically at runtime via the
new 'configure()' function.

The config is provided as plain null-terminated string (instead of a
dataspace capability) because we need to buffer the config data anyway.
So there is no benefit of using a dataspace. For buffering configuration
data, a 'Ram_session' must be supplied. If no 'Ram_session' is specified
at construction time of a 'Slave_policy', no config is supplied to the
slave (which is still a common case).

An example for dynamically reconfiguring a slave is provided by
'os/run/dynamic_config_slave.run'.
2012-04-05 11:25:26 +02:00
Norman Feske ba248fe554 Add swap and realloc to 'Attached_ram_dataspace'
The new 'swap' and 'realloc' functions are needed in scenarios where
'Attached_ram_dataspace' is used to implement double buffering. The
particular use case is the implementation of dynamic ROM sessions.
2012-04-05 10:40:46 +02:00
Norman Feske e4cb3ed929 Follow-up for spin-lock unification, ref #123 2012-03-01 10:57:05 +01:00
Stefan Kalkowski 319813a59b Merge spin-lock implementations
Separate spin-lock implementation from lock-implementation and put it into a
non-public header, so it can be re-used by the DDE kit's and Fiasco.OC's
capability-allocator spin lock. Fixes issue #123.
2012-02-29 15:41:17 +01:00
Norman Feske 8495a5fc96 Convenience helper for attached ROM dataspaces
In the line of the 'Attached_ram_dataspace' and
'Attached_io_mem_dataspace' classes, this new helper simplifies the
access to ROM dataspaces.
2012-02-14 16:44:42 +01:00
Norman Feske d880386091 Qualifying RPC functions as const
This patch makes use of the recently added support for const RPC
functions by turning 'Framebuffer::Session::mode()' and
'Input::Session::is_pending()' into const functions.
2012-01-27 16:54:05 +01:00
Norman Feske 48ac5143a2 Add spin lock to DDE Kit
Linux DDE used to implement Linux spin locks based on 'dde_kit_lock'.
This works fine if a spin lock is initialized only once and used
infinitely. But if spin locks are initialized on-the-fly at a high rate,
each initialization causes the allocation of a new 'dde_kit_lock'.
Because in contrast to normal locks, spinlocks cannot be explicitly
destroyed, the spin-lock emulating locks are never freed. To solve the
leakage of locks, there seems to be no other way than to support the
semantics as expected by the Linux drivers. Hence, this patch introduces
a DDE Kit API for spin locks.
2012-01-27 02:01:07 +01:00
Norman Feske 0058b15763 Helper for running a service as a child (slave)
The new 'Slave_policy' and 'Slave' classes are built upon the existing
child framework. They support the implementation of scenarios where a
service is started as a child of the client. This is usefull for
employing an existing service implementation as a local utility or
plugin.
2012-01-25 20:04:42 +01:00
Norman Feske c35207d9c4 Add mode_sigh and release to framebuffer::Session
The 'mode_sigh' function allows the client to receive notifications
about server-side display-mode changes. To respond to such a signal, the
client can use the new 'release' function, which acknowledges the mode
change at the server and frees the original framebuffer dataspace. Via a
subsequent call of 'dataspace', a framebuffer dataspace corresponding to
the new mode can be obtained. Related to issue #11.
2012-01-25 16:08:24 +01:00
Norman Feske 9e3ecade16 Replace Framebuffer::info by Framebuffer::mode
As a preliminary step for working on issue #11, this patch revisits the
'Framebuffer::info' RPC call. Instead of using C-style out paramters,
the new 'mode()' RPC call returns the mode information as an object of
type 'Mode'. Consequently, mode-specific functions such as
'bytes_per_pixel' have been moved to the new 'Framebuffer::Mode' class.
2012-01-25 13:27:47 +01:00
Norman Feske 50b5a0d36d Const qualifiers for Input::Event accessors 2012-01-17 23:06:02 +01:00
Norman Feske 08ce32215d Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
Genode Labs da4e1feaa5 Imported Genode release 11.11 2011-12-22 16:19:25 +01:00