Commit Graph

55 Commits

Author SHA1 Message Date
Martin Stein fa047f4dda signal test: let sender yield CPU when idle
ref #574
2013-08-23 11:23:47 +02:00
Norman Feske 149356f7ab core: TRACE service interface and implementation 2013-08-15 09:22:47 +02:00
Alexander Boettcher 071ca39407 run: make bomb test ready for auto tests 2013-08-13 17:08:24 +02:00
Martin Stein 4fe093b01b ahci & exynos5: opt-in app and part in ahci_bench 2013-06-28 17:23:25 +02:00
Stefan Kalkowski a73dc1b581 Fix coding style in regulator interface (fix #777) 2013-06-25 11:10:59 +02:00
Stefan Kalkowski 1d34589f84 Implement cpu frequency scaling for Arndale
* Implements platform driver for Arndale providing Regulator for CPU clock
* Implements a cpu frequency scaling test using the affinity test
* Fixes #770
2013-06-24 11:48:36 +02:00
Stefan Kalkowski c61d832ae3 Fix nic_loopback, after recent NIC session changes
Commit c464ee2e6673fe328a8717342dca30f3b0204cb8 removed the RX_BUF_SIZE from
the NIC session interface. Mistakenly, the nic_loopback server was missed
when doing this change.
2013-06-12 11:35:13 +02:00
Stefan Kalkowski 8fae7131c8 Unify buffer sizes of RX and TX in nic_session
In fact, the sizes were the same the whole time, but by using
the same enum in both cases to instantiate the Packet_stream_tx
and Packet_stream_rx members of the e.g. RPC object, it allows
for more flexible generalization between e.g. source or, sink
objects, when programming event-driven, and implementing generic
handlers for their signals.
2013-06-12 11:35:13 +02:00
Norman Feske 78204b8f49 Utility for synchronizing interface calls 2013-05-17 12:04:45 +02:00
Stefan Kalkowski ca92984bcc Simplify GPIO session interface (fix #707)
Changes GPIO session interface to a one-GPIO-pin-per-session style. Moreover,
this commit introduces a generic driver interface for GPIO drivers. Thereby
generalizes root- and session component for GPIO.
2013-05-10 11:16:12 +02:00
Alexander Boettcher 0920e322c2 net: nic session client using net_stat lib
A simple nic session client using the performance measurement library.
2013-05-10 11:16:10 +02:00
Norman Feske 1589820d05 Add missing route to chroot_loader test
Additionally, we do the cleanup of the remains of a previously failed
run prior creating the run directory. Otherwise, the directly creation
may fail because of a pending bindmount.
2013-05-07 21:56:07 +02:00
Christian Prochaska ea3adfef9a Create the context area RM session at startup
With this patch, the thread context area RM session gets created at
program startup to have the thread context area's virtual address range
reserved right from the beginning.

Fixes #734.

This patch implies that all Genode processes try to create an RM
session. So a route to the RM service must be present even for processes
that have only a single thread. Hence, the patch contains an update of
affected components.
2013-05-07 21:56:07 +02:00
Martin Stein dc814ff0f1 timer: bugfix and test trigger_periodic (run/timer)
Fix #699
2013-04-05 12:51:30 +02:00
Christian Prochaska 452624e1a6 Fiasco(.OC) KDB UART driver
The KDB UART driver uses the Fiasco(.OC) kernel debugger console as backend
for input and output. This is useful in the case that only one UART is
available.

Fixes #665.
2013-03-18 15:28:16 +01:00
Alexander Boettcher be0fa1f63a dde_kit: enable pci lookup by device_class
Instead of trying all PCI devices by a specific PCI driver, now the device or
the device class can be limited to the one actually supported by the specific
driver.
2013-02-26 18:24:03 +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 cb225a1216 Adaptation to Timer::Session change 2013-02-14 13:23:33 +01:00
Norman Feske 3049c1004c Turn 'Timer::Session' into asynchronous interface
The 'Timer::Session::msleep' function is one of the last occurrences of
long-blocking RPC calls. Synchronous blocking RPC interfaces turned out
to be constant source of trouble and code complexity. I.e., a timer
client that also wants to respond to non-timer events was forced to be a
multi-threaded process. This patch replaces the blocking 'msleep' call
by a mechanism for programming timeouts and receiving wakeup signals in
an asynchronous fashion. Thereby signals originating from the timer can
be handled along with signals from other signal sources by a single
thread.

The changed interface has been tested on Linux, L4/Fiasco, OKL4, NOVA,
L4ka::Pistachio, Codezero, Fiasco.OC, and hw_pbxa9. Furthermore, this
patch adds the timer test to autopilot.

Fixes #1
2013-02-14 10:36:06 +01:00
Christian Prochaska a6acab6d0d Synchronize signal context destruction
With this patch, the 'Signal_receiver::dissolve()' function does not return
as long as the signal context to be dissolved is still referenced by one
or more 'Signal' objects. This is supposed to delay the destruction of the
signal context while it is still in use.

Fixes #594.
2013-01-15 15:03:21 +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
Sebastian Sumpf 5aea55e417 Audio: Replace old with new audio interface
Issue #602
2013-01-10 23:05:43 +01:00
Sebastian Sumpf 47bb48bdd6 Audio: Adjust components to new audio interface
OSS driver, ALSA driver, audio-out test, avplay, and mixer

Issue #602
2013-01-10 23:05:37 +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 ecdbdef8ee Loader: reflect faults to client
With this patch, the loader installs an optional client-provided fault
handler as default CPU exception handler and RM fault handler for all
CPU and RM sessions of the loaded subsystem. This way, loader clients
become able to respond to failures occuring within the subsystem.

The new feature is provided via the added 'Loader::fault_handler' RPC
function.

The 'run/failsafe' test covers two cases related to the loader, which
are faults produced by the immediate child of the loader and faults
produced by indirect children.
2013-01-07 16:31:27 +01:00
Norman Feske b0c18d0362 Test case for failure detection detection 2013-01-04 15:26:16 +01:00
Martin Stein 5459291f9d test-fb_block_adapter & base_hw: missing include
Fix #562
2012-12-21 14:54:22 +01:00
Christian Helmuth 97e4470da6 Build pci_drv for framebuffer test / fix warning 2012-12-21 14:54:21 +01:00
Ivan Loskutov 5e66b6d5ed Add OMAP4 GPIO driver
Add Gpio session interface. Add test for Pandaboard.

Fixes #427
2012-11-23 12:20:27 +01:00
Norman Feske 8e831d2224 base-linux: Support customization of UIDs and GIDs
With this patch, custom UIDs and GIDs can be assigned to individual
Genode processes or whole Genode subsystems.

The new 'base-linux/run/lx_uid.run' script contains an example of how to
use the feature.

Fixes #510
2012-11-22 09:21:48 +01:00
Norman Feske 959df5d46b Generalize handling of PD-session arguments
On Linux, we want to attach additional attributes to processes, i.e.,
the chroot location, the designated UID, and GID. Instead of polluting
the generic code with such Linux-specific platform details, I introduced
the new 'Native_pd_args' type, which can be customized for each
platform. The platform-dependent policy of init is factored out in the
new 'pd_args' library.

The new 'base-linux/run/lx_pd_args.run' script can be used to validate
the propagation of those attributes into core.

Note that this patch does not add the interpretation of the new UID and
PID attributes by core. This will be subject of a follow-up patch.

Related to #510.
2012-11-21 20:04:07 +01:00
Norman Feske bcabbe2c92 Add 'Thread_base::join()'
Using the new 'join()' function, the caller can explicitly block for the
completion of the thread's 'entry()' function. The test case for this
feature can be found at 'os/src/test/thread_join'. For hybrid
Linux/Genode programs, the 'Thread_base::join()' does not map directly
to 'pthread_join'. The latter function gets already called by the
destructor of 'Thread_base'. According to the documentation, subsequent
calls of 'pthread_join' for one thread may result in undefined behaviour.
So we use a 'Genode::Lock' on this platform, which is in line with the
other platforms.

Related to #194, #501
2012-11-19 12:43:34 +01:00
Christian Helmuth 2cdac0eb32 bomb test: stack size on 64-bit / dense logging 2012-11-15 12:58:47 +01:00
Norman Feske 5b4edeb031 Introduce 'Uart::Session' interface
The new 'Uart::Session' interface is an extension of the
'Terminal::Session' interface that allows for configuring UART-specific
parameters, i.e., the baud rate.
2012-11-07 13:43:09 +01:00
Norman Feske b45242c50f Add chroot support to core
Since the recent move of the process creation into core, the original chroot trampoline
mechanism implemented in 'os/src/app/chroot' does not work anymore. A
process could simply escape the chroot environment by spawning a new
process via core's PD service. Therefore, this patch moves the chroot
support into core. So the chroot policy becomes mandatory part of the
process creation.  For each process created by core, core checks for
'root' argument of the PD session. If a path is present, core takes the
precautions needed to execute the new process in the specified chroot
environment.

This conceptual change implies minor changes with respect to the Genode
API and the configuration of the init process. The API changes are the
enhancement of the 'Genode::Child' and 'Genode::Process' constructors to
take the root path as argument. Init supports the specification of a
chroot per process by specifying the new 'root' attribute to the
'<start>' node of the process. In line with these changes, the
'Loader::Session::start' function has been enhanced with the additional
(optional) root argument.
2012-11-05 17:31:05 +01:00
Norman Feske 19a996bcb9 Follow gcc's suggestions about using braces 2012-11-01 17:04:06 +01:00
Norman Feske 3772a526f6 Remove superfluous include 2012-11-01 17:04:06 +01:00
Norman Feske 4a1b545770 Move 'Child' API implementation to library 2012-10-09 13:45:33 +02:00
Norman Feske b62492837d Move 'Static_root' to public place
The 'Static_root' class template has proven to be useful for more than
one program. So we expose it as part of the API in the os repository.
2012-10-08 15:08:26 +02:00
Christian Helmuth b2478aec76 Increase RAM demanded by bomb children on 64bit systems 2012-07-11 12:12:41 +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
Martin Stein 4c3df9caf1 Simple test for framebuffer driver 2012-06-22 11:38:36 +02:00
Alexander Boettcher 200deec403 Bunch of compiler warning fixes, issue #234 2012-06-20 19:44:07 +02:00
Christian Prochaska ba0b20054e Cross-link terminal
This patch implements a service which allows two clients to communicate
with each other using the 'Terminal' interface.

Fixes #242.
2012-06-20 10:19:19 +02:00
Norman Feske ed867817b6 Test for combining loader with chroot 2012-06-06 17:31:52 +02:00
Christian Helmuth 7bffdacc9a Increase RAM quotas for 64-bit architectures 2012-05-29 16:08:50 +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 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
Christian Prochaska de92956220 Read 'main()' function arguments from config file
This patch reads program arguments from the config file and makes them
available to the application via the 'argc' and 'argv' arguments of the
'main()' function. The configuration syntax looks like this:

<config>
	<arg value="...">
	<arg value="...">
        ...
</config>

The 'value' attribute of the first <arg> node becomes 'argv[0]' and so on.

Fixes #184.
2012-04-20 08:31:40 +02:00