Commit Graph

476 Commits

Author SHA1 Message Date
Alexander Tarasikov
3cb6de2e69 Implement LCD output and config parsing for omap4
Fixes #743
2013-05-22 18:58:51 +02:00
Stefan Kalkowski
89a8c2c211 Update run scripts using usb_drv (fix #744)
Updates all run scripts, which use the usb_drv to enable the appropriated
USB host controllers.
2013-05-22 18:52:54 +02:00
Martin Stein
e164671cd1 ahci_drv: basic support for exynos 5
This is a first version of the AHCI driver. It supports SATA HDDs
with UDMA-133 only, up to 6 Gbps and native command queueing.
The more blocks one transfers with one command, the higher is the
chance that the driver produces a fatal handshake error. Nevertheless
the driver is stable with one block per ATA command. Although NCQ is
used the driver doesn't queue multiple commands simultanously.

The driver was tested with a western digital HDD "WDC WD2500BEVS-08VAT1
13.01A13" (250 GB) with hw_arndale (run/ahci) and foc_arndale
(run/ahci, run/l4linux: dd). SSDs were not tested.

Fix #706
2013-05-22 18:36:55 +02:00
Martin Stein
1a7efc0df1 os: helper Attached_mmio
Genode::Attached_mmio is the fusion of Genode::Attached_io_mem_dataspace
and Genode::Mmio.

Ref #706
2013-05-22 18:32:05 +02:00
Martin Stein
37c2f101b1 ahci_drv: separate PCI specifics from the rest
Ref #706
2013-05-22 18:32:05 +02:00
Martin Stein
a0d182e25a hw_arndale: userland timer driver
Ref #706
2013-05-22 18:32:05 +02:00
Stefan Kalkowski
1dc9ab9a95 Adapt i.MX53 fb driver to GPIO session changes 2013-05-21 10:10:43 +02:00
Norman Feske
78204b8f49 Utility for synchronizing interface calls 2013-05-17 12:04:45 +02:00
Norman Feske
8ac6d8c96c base-hw: Support for Raspberry Pi 2013-05-15 20:48:07 +02:00
Stefan Kalkowski
ef4a4ea654 Implement input driver for i.MX53 tablet (fix #724)
The input driver implements support for the Egalaxy touchscreen and
for Freescale's MPR121 capacitative touch buttons.
2013-05-10 11:16:13 +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
d1f40b86d9 fix use-after-free bug in loader 2013-05-10 11:16:12 +02:00
Alexander Boettcher
94629ad493 run: adjust lwip pingpong test for x86 2013-05-10 11:16:11 +02:00
Alexander Boettcher
b5d3be9c85 run: add nic driver performance test
A run script which sends raw ethernet packets from the host machine to the
target machine. Three tests are implemented:
- The network_stat instrumented driver of usb_drv and net_drv
  are used to get the raw receive performance of the network driver.
- A simple nic_session client is receiving from the un-instrumented network
  driver raw ethernet packets.
- A bridge is added between driver and simple nic_session client.
2013-05-10 11:16:10 +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
Alexander Boettcher
a36813cf6f net: add library for performance measurements 2013-05-10 11:16:09 +02:00
Norman Feske
0b660eb033 Blacklist failsafe.run test on L4/Fiasco 2013-05-08 09:38:32 +02:00
Norman Feske
2aa22a25ee Adapt chroot.run to changed timer 2013-05-07 21:56:07 +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
Norman Feske
cc5fddb0a2 Loader: Free entries of parent-service registry
The parent-service registry is populated on demand by the
'Loader::Child' whenever a prior unknown service is requested. Since the
number of parent services is limited, we expect the registry to settle
after a while. However, each loader session has a private instance of
a parent-service registry. So when creating and destroying loader
sessions, parent registries will be populated again and again. We
have to make sure to discard the entries along with the destruction
of a loader session to avoid the leakage of memory.

Issue #717
2013-05-07 21:56:06 +02:00
Stefan Kalkowski
511cab6192 Remove superfluous pl11x target.mk file (fix #722) 2013-05-07 21:56:06 +02:00
Stefan Kalkowski
cddd69a122 Double buffering for i.MX53 fb driver (fix #721)
Enable optinal support for double buffering in the i.MX53 framebuffer
driver. This prevents flickering in certain scenarios, where applications
directly render in the framebuffer dataspace given by the driver.
2013-05-07 21:56:06 +02:00
Stefan Kalkowski
0950b2f340 Rework i.MX53 framebuffer driver
* Simplify IPU register definitions using templates
* Distinguish between i.MX53 QSB and SMD board in driver
* Support IPU specific overlay mechanism by framebuffer session extension
2013-05-07 21:56:06 +02:00
Stefan Kalkowski
4fe158a320 Implement platform driver for i.MX53 platform
Move clock and reset controller functionality out of framebuffer driver
into platform driver.
2013-05-07 13:04:30 +02:00
Nikolay Golikov
d2f5deaf33 Implement i.MX53 framebuffer driver 2013-05-07 13:04:30 +02:00
Stefan Kalkowski
a5d236475a Unify GPIO driver binary names to 'gpio_drv'
Introduce 'gpio' SPEC variable to easily support a corresponding driver within
run scripts.
2013-05-07 13:04:30 +02:00
Nikolay Golikov
1d1081c910 Implement i.MX53 gpio driver 2013-05-07 13:04:30 +02:00
Stefan Kalkowski
8e9e866161 Unify framebuffer driver binary names (fix #720)
Introduce 'framebuffer' SPEC variable to distinguish hardware framebuffer
drivers furthermore from the SDL framebuffer driver used by Genode/Linux.
2013-05-07 13:04:30 +02:00
Stefan Kalkowski
8aad441ef0 Remove obsolete Fiasco UX framebuffer driver 2013-05-06 18:50:35 +02:00
Christian Prochaska
411d736d04 ldso: increase 'MEM_SIZE' in 'mmap()'
Fixes #728.
2013-05-06 11:11:03 +02:00
Alexander Boettcher
30927f68a7 check wakeup situation in rx() after dequeuing
Issue #593
2013-04-26 16:48:54 +02:00
Alexander Boettcher
b85447c602 run scripts: add "Test succeeded" message
Issue #679
2013-04-12 10:56:27 +02:00
Stefan Kalkowski
ba9e7185a8 Omap4 sd_card driver: fix recursive usleep loop
This commit removes an endless loop, that occurred when the sd_card driver
called usleep, or msleep on its Timer_delayer object. Fixes #705

Also fixes the same problem for the Omap4 GPIO driver.
2013-04-12 10:51:45 +02:00
Christian Prochaska
1500d59d0d nic_bridge: drop 'gratuitous ARP' messages
'Gratuitous ARP' broadcast messages are used to announce newly created
IP<->MAC address mappings to other hosts. nic_bridge-internal hosts
would expect a nic_bridge-internal MAC address in this message, whereas
external hosts would expect the NIC's MAC address in this message.
The simplest solution to this problem is to just drop those messages,
since they are not really necessary.

Fixes #709.
2013-04-08 18:48:40 +02:00
Martin Stein
dc814ff0f1 timer: bugfix and test trigger_periodic (run/timer)
Fix #699
2013-04-05 12:51:30 +02:00
Sebastian Sumpf
bdc15a4f28 sd_card: Support multiple DMA descriptors 2013-03-26 12:21:45 +01:00
Christian Prochaska
ff3b73825d terminal: Add escape handling for CUB
This VT102 command is triggered by busybox when pressing the 'pos1' key.
2013-03-26 12:21:44 +01:00
Christian Prochaska
cae79d30b8 cli_monitor: Support dynamically linked binaries 2013-03-26 12:21:44 +01:00
Norman Feske
b06cc3250a Coding style fixes 2013-03-23 13:37:57 +01:00
Norman Feske
c56525f264 cli_monitor: Add reboot command for Fiasco.OC
In addition to the new reboot command, this patch tries to reduce the
artifacts caused by the interplay of the kernel debugger and
terminal_mux.
2013-03-22 21:41:50 +01:00
Sebastian Sumpf
c27364f2df sd_card: Enable 8-bit/52Mhz mode for eMMC 2013-03-22 16:35:31 +01:00
Norman Feske
3b71a9c986 Add missing licensing headers 2013-03-22 15:31:16 +01:00
Sebastian Sumpf
a3afb3dae4 sd_card: Exynos5/MMC support
Added MMC specific parts to Sd-card implemntation. Read/Write takes advantage of
DMA. Currently we leave card in one bit mode.
2013-03-22 15:28:52 +01:00
Sebastian Sumpf
95a16adb6f sd_card: Make OMAP4 'sd_card.h' default 2013-03-22 15:26:13 +01:00
Norman Feske
e1d0839e19 terminal: Check bounds of cursor position
Thanks @cproc for the fix.
2013-03-22 15:24:29 +01:00
Norman Feske
c36909e5dc acpi: Adjust device_pd quota for 64bit machines 2013-03-22 12:45:31 +01:00
Norman Feske
dfe4fd177d cli_monitor: Add foc-specific kdebug command 2013-03-21 15:50:32 +01:00
Norman Feske
022e762a40 timer: Remove debug message 2013-03-21 15:49:27 +01:00
Norman Feske
05027c7935 Simple CLI for managing Genode subsystems 2013-03-21 11:44:34 +01:00
Norman Feske
22f65d1afe Move gems/include/terminal to os/include/terminal
The terminal utilities provided under 'include/terminal' depend on the
base API and the 'os' repository only. So we can incorporate them into
'os'.
2013-03-21 11:44:34 +01: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
Stefan Kalkowski
ce58a63fb6 Remove 'epit' from generic i.MX platform spec
Remove the 'epit' variable from the generic imx31 and imx53 specification,
and only add it to base-hw specific i.MX specs. Thereby the EPIT timer
library gets build for base-hw only.
Moreover, fix some const-ness issues in the platform_timer implementation
for the EPIT timer.
Fixes #688.
2013-03-14 11:27:51 +01:00
Norman Feske
352f58b94b core: New utilities for object lifetime management 2013-03-12 21:53:08 +01:00
Ivan Loskutov
33b59a6276 atapi_drv: Add LBA48 support
Fixes #678
2013-03-08 12:14:38 +01:00
Alexander Boettcher
415b50032e dde_kit: support to allocate DMA buffer per device 2013-02-26 18:24:12 +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
Martin Stein
571f8fb2f3 omap_fb_drv: use usleep in 'Timer_delayer'
fix #670
2013-02-25 22:14:22 +01:00
Alexander Boettcher
430d4064b8 acpi: free mapping of rsdp before using rsdt/xsdt
Fix #635
2013-02-25 22:14:22 +01:00
Alexander Boettcher
439315d918 timer: Don't set default cap as custom cap
Without the patch the signal cap was ever transferred to the timer session
when a usleep/msleep was called, even when unneeded. On base-nova this
causes the allocation of new capability indexes which are not freed up.
So the timer service run quickly out of indexes and get out of order...

Related to issue #1
2013-02-25 16:45:49 +01:00
Torsten Hilbrich
257cf4800d Fixed some unused parameters warnings
They cause problems when using -Werror in your compilation.
2013-02-25 16:45:49 +01:00
Alexander Boettcher
5f90b93f80 ahci: adjust run script to run with new pci_drv 2013-02-22 20:28:27 +01:00
Alexander Boettcher
7e7fa81c8f acpi: reserve 2MB for ACPI and rest is for PCI_DRV 2013-02-22 20:28:27 +01:00
Alexander Boettcher
d447910520 ahci: use pci_drv with class code/mask 2013-02-22 20:28:26 +01:00
Alexander Boettcher
3a85d16597 pci: support to lookup dev via class code/mask 2013-02-22 20:28:26 +01:00
Alexander Boettcher
e05adecfab pci: add device_pd functionality 2013-02-22 20:28:26 +01:00
Alexander Boettcher
2123f3f7e8 ahci: allocate dma-able memory via pci_drv 2013-02-22 20:28:26 +01:00
Alexander Boettcher
d58439ca56 pci: provide dma-able memory via pci_drv 2013-02-22 20:28:26 +01:00
Alexander Boettcher
c374f294c8 pci: add support to provide PCI ECMA config 2013-02-21 11:52:02 +01:00
Alexander Boettcher
822b4f2d96 acpi: provide pci express style configs to pci_drv
Parse the mcfg table and  provide the extended PCI config space data via
the config file to the pci_drv.
2013-02-21 11:52:02 +01:00
Alexander Boettcher
ba566a1530 acpi: add MCFG table parsing 2013-02-21 11:52:02 +01:00
Norman Feske
002ea7cfc4 uart_drv: Mechanism for detecting terminal size 2013-02-20 22:10:32 +01:00
Martin Stein
2a9a653b2b timer & hw & omap4: compile bug in Platform_timer
fix #652
2013-02-20 19:29:24 +01:00
Norman Feske
34ec65f2a8 timer & foc: use KIP->clock as curr_time 2013-02-20 15:20:38 +01:00
Norman Feske
b618c9343e Remove os/config
This patch moves the os/config examples to their respective run scripts,
removes some of them, and moves the priority example to the src/init
directory (where other examples are located).

Additionally, this patch adapts the OKL4-specific priority.run test to
the recent changes of the timer interface.
2013-02-20 14:49:16 +01:00
Norman Feske
ce67b73dca Update example configurations
With the change of the Timer::Session interface, all scenarios that use
the timer use core's SIGNAL service. So we need to route sessions
accordingly.

In addition to the adaptation to the changed timer, this patch removes
some stale examples that predate the run tool and are no longer used.
2013-02-19 14:45:55 +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
165bb96cd3 Increase timeout of signal.run test 2013-02-14 13:26:43 +01:00
Norman Feske
14b9589780 xvfb: Adaptation to timer and framebuffer changes 2013-02-14 13:23:37 +01:00
Norman Feske
cb225a1216 Adaptation to Timer::Session change 2013-02-14 13:23:33 +01:00
Norman Feske
20a5c86a22 timer: Build platform-specific parts as lib
By using the build system's library-selection mechanism instead of many
timer targets with different 'REQUIRES' declarations, this patch reduces
the noise of the build system. For all platforms, the target at
'os/src/drivers/timer' is built. The target, in turn, depends on a
'timer' library, which is platform-specific. The various library
description files are located under 'os/lib/mk/<platform>'. The common
bits are contained in 'os/lib/mk/timer.inc'.
2013-02-14 10:36:06 +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
Markus Partheymueller
5b1156a3e2 rtc_drv: new service interface 2013-02-13 15:09:23 +01:00
Markus Partheymueller
2d2373a03b vancouver: Timer support
This required usleep to be added to the timer interface.
2013-02-13 15:09:22 +01:00
Alexander Boettcher
5fff9eb860 acpi: use xsdt on 64bit if available
Fix #155
2013-02-12 14:12:30 +01:00
Alexander Boettcher
44e7aa7d61 acpi: fix uninitialized members of element object
The default constructor didn't initialize all members, some of them holding
pointers. In the de-constructor the _name pointer was tried to free up, even
when it was not initialized.

Avoid any hassle for uninitialized members and just initialize it. Fixes
sporadic page fault on x86_64 base-nova.

Issue #155
2013-02-12 14:12:12 +01:00
Norman Feske
5d65308e63 File system: Let session quota depend on word size
By basing the session quota on sizeof(long), we satisfy server-side
quota demands on 64 bit.

Fixes #619
2013-01-27 18:31:35 +01:00
Ivan Loskutov
bc18e2991b nic_bridge: Add static IP address configuration 2013-01-24 11:35:56 +01:00
Norman Feske
e5b30847db tar_rom: let unkown file throw Root::Invalid_args 2013-01-24 11:12:10 +01:00
Ivan Loskutov
8eba4440eb Fix OMAP4 uart driver compilation
Fixes #630
2013-01-24 11:04:12 +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
2dba94eba9 Nitpicker: avoid potential dangling pointer 2013-01-15 10:18:12 +01:00
Norman Feske
7b11075264 Nitpicker: move 'asci_to<Color>' to public header
This function is worth reusing outside of nitpicker.
2013-01-15 10:18:12 +01:00
Norman Feske
4d8cd2b5c5 Nitpicker: add const qualifiers 2013-01-15 10:18:12 +01:00
Norman Feske
fcca4f3466 Init: handle reconfiguration
With this change, init becomes able to respond to config changes by
restarting the scenario with the new config. To make this feature useful
in practice, init must not fail under any circumstances. Even on
conditions that were considered as fatal previously and led to the abort
of init (such as ambiguous names of the children or misconfiguration in
general), init must stay alive and responsive to config changes.
2013-01-15 10:18:12 +01:00
Norman Feske
fe734272bc Make 'config()' convenience utility more robust
This patch improves the config handling by falling back to a static
string (empty "<config />") if no valid config ROM module could be
found. This can happen initially, but also at runtime when the ROM
module dissapears, e.g., a ROM module accessed via fs_rom where the
corresponding file gets unlinked.
2013-01-15 10:18:11 +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
Norman Feske
267817c2c5 Add new 'fs_rom' service
The 'fs_rom' service provides files stored on a file system as ROM
modules via the ROM-session interface.

Fixes #606
2013-01-15 10:18:11 +01:00
Norman Feske
7217ea14d8 nit_fb: Respond to config changes at runtime
This patch enables 'nit_fb' to respond to dynamic changes of its
configuration, in particular the view position and refresh rate.
2013-01-15 10:18:11 +01:00
Norman Feske
fca8994584 Introduce notifications to file-system interface
This patch extends the file-system interface with the ability to monitor
changes of files or directories. The new 'File_system::sigh' function
can be used to install a signal handler for an open node.

The 'ram_fs' server has been enhanced to support the new interface. So
any file or directory changes can now be observed by 'ram_fs' clients.

Fixes #607
2013-01-15 10:18:07 +01:00
Norman Feske
7318c5d7d4 Add const version of 'Path::base' accessor 2013-01-12 21:32:07 +01:00
Norman Feske
16e6f4b784 Remove debug message 2013-01-11 21:21:35 +01:00
Norman Feske
4fd932f7c1 Reduce debug messages of UART driver 2013-01-11 21:07:22 +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
Sebastian Sumpf
238d6a29c5 Audio: New session interface
Issue #602
2013-01-10 21:57:38 +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
277af91376 Omit child-name prefix in <if-args> check
When matching the 'label' session argument using '<if-args>' in a
routing table, we can omit the child name prefix because it is always
the same for all sessions originating from the child anyway. Therefore,
this patch adds a special case for matching session labels. It makes the
expression of label-specific routing more intuitive.
2013-01-10 21:09:07 +01:00
Alexander Boettcher
c2d3543e62 base: replace obj_by_* by lookup_and_lock
Add functionality to lookup an object and lock it. Additional the case is
handled that a object may be already in-destruction and the lookup will deny
returning the object.

The object_pool generalize the lookup and lock functionality of the rpc_server
and serve as base for following up patches to fix dangling pointer issues.
2013-01-10 11:13:13 +01:00
Stefan Kalkowski
5bbcbc74bb os & base-hw: freescale EPIT timer driver
Fix #576
2013-01-08 11:36:52 +01:00
Martin Stein
f1d599ae8a base: rename generic Board drivers Board_base
To enable a repo to name its specific board driver 'Board'.

Fix #569
2013-01-08 11:36:51 +01:00
Norman Feske
0a084ebe52 Add failsafe test to autopilot 2013-01-07 16:31:31 +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
Norman Feske
dfaecfb5ab Make quota-upgrading message more clear
Fixes #592
2012-12-22 13:04:04 +01:00
Martin Stein
5459291f9d test-fb_block_adapter & base_hw: missing include
Fix #562
2012-12-21 14:54:22 +01:00
Martin Stein
28abd7993c framebuffer: add missing timer
Fix #563
2012-12-21 14:54:21 +01:00
Christian Helmuth
97e4470da6 Build pci_drv for framebuffer test / fix warning 2012-12-21 14:54:21 +01:00
Ivan Loskutov
f9b82a7b8e Add setting baudrate to i8250 and OMAP4 UART drivers
Fixes #445
2012-12-21 14:54:15 +01:00
Ivan Loskutov
5b8a0e5423 Add OMAP4 UART driver
Fixes #444
2012-12-20 14:40:18 +01:00
Martin Stein
8c3d044928 rom_loopdev: missing 'semaphore.h' include
Fix #545
2012-11-30 16:23:16 +01:00
Norman Feske
d6ee72d241 Fix file name 2012-11-29 09:55:09 +01:00
Martin Stein
1258126986 base_hw: Enable ldso test
Fix #527, fix #350
2012-11-28 22:51:13 +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
Alexander Boettcher
7ee4b75156 Fix vesa_drv on native hardware
When vesa_drv tries to access values lying across region boundaries, the
second region may be not mapped.

Fixes #524
2012-11-27 20:08:54 +01:00
Sebastian Sumpf
7d8f446475 OSS: Open Sound System server
Currently supports Intel HDA, AC97, and ES1370 audio cards. See README
for further details.
2012-11-27 15:32:39 +01:00
Sebastian Sumpf
8ac3209aa8 DDE_KIT: Startup synchronization for IRQ thread
Wait until 'entry' function of IRQ threads is called.
2012-11-27 12:00:03 +01:00
Norman Feske
ae4fdf6418 Run script for fork bomb test 2012-11-27 10:40:13 +01:00
Christian Prochaska
3b4115bc0c ldso: increase 'MEM_SIZE' in 'mmap()'
Fixes #521.
2012-11-26 20:58:10 +01:00
Norman Feske
0bcf55800f Eagerly map DMA buffers
This patch is a work-around for issue #452.
2012-11-26 09:45:20 +01:00
Stefan Kalkowski
5f81705488 Atapi: limit block count in DMA request (fix #514)
The block count in DMA requests is limited to 8 bit. Therefore,
if a client requests more than 255 blocks in a single packet request,
split the request in a loop.
2012-11-23 12:20:28 +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
deb465e442 Improve robustness of chroot-related tests 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
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
Martin Stein
612735732a base_hw & omap4: Timer driver.
Fix bug regarding idle thread in thread scheduling in
'base-hw/src/core/kernel.cc'.

Fix regarding signal submit in signal framework in
'base-hw/src/core/kernel.cc'.
2012-11-14 16:36:50 +01:00
Martin Stein
31d57a6257 Nested init on i.MX31 via base_hw. Rework base_hw.
Implies support for the ARMv6 architecture through 'base-hw'.

Get rid of 'base/include/drivers' expect of 'base/include/drivers/uart'.

Merge with the support for trustzone on VEA9X4 that came from
Stefan Kalkowski.

Leave board drivers in 'base/include/platform'.

Rework structure of the other drivers that were moved to
'base_hw/src/core' and those that came with the trustzone support.

Beautify further stuff in 'base_hw'.

Test 'nested_init' with 'hw_imx31' (hardware) and 'hw_panda_a2' (hardware),
'demo' and 'signal' with 'hw_pbxa9' (qemu) and 'hw_vea9x4'
(hardware, no trustzone), and 'vmm' with 'hw_vea9x4'
(hardware, with trustzone).
2012-11-14 16:36:41 +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
21c22b8b5b Black-list 'tar_rom.run' on Linux 2012-11-06 17:16:06 +01:00
Norman Feske
bb8d090922 Resolve possible ambiguity of 'strcmp' 2012-11-06 09:35:47 +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
97162332c9 Whitespace fix 2012-11-05 17:31:04 +01:00
Norman Feske
371b8fd12d Remove mirroring of 'lx_rpath' in 'app/chroot'
Thanks to the exclusive use of SCM rights for delegating access rights
to memory objects and RPC entrypoints, Genode processes outside of core
won't need to access any files.
2012-11-05 17:31:04 +01:00
Christian Helmuth
7c77d0ee5f Prevent compiler warnings
Fixes #464.
2012-11-05 10:57:29 +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
d1de48e4a4 Fix narrowing issue reported by gcc-4.7 2012-11-01 17:04:03 +01:00
Torsten Hilbrich
06ce0a8ef1 loader: Fix warnings about uninitialized variable
g++ 4.4.5 outputs the following warnings in our code using the loader
session:

.../base/include/base/capability.h: In member function 'typename Genode::Trait::Call_return<typename IF::Ret_type>::Type Genode::Capability<RPC_INTERFACE>::call() const [with IF = Loader::Session::Rpc_view_geometry, RPC_INTERFACE = Loader::Session]':
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability<Loader::Session>::Return<Loader::Session::Rpc_view_geometry>::_value.Loader::Session::View_geometry::width' may be used uninitialized in this function
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability<Loader::Session>::Return<Loader::Session::Rpc_view_geometry>::_value.Loader::Session::View_geometry::height' may be used uninitialized in this function
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability<Loader::Session>::Return<Loader::Session::Rpc_view_geometry>::_value.Loader::Session::View_geometry::buf_x' may be used uninitialized in this function
.../base/include/base/capability.h:207: warning: 'ret.Genode::Capability<Loader::Session>::Return<Loader::Session::Rpc_view_geometry>::_value.Loader::Session::View_geometry::buf_y' may be used uninitialized in this function

This is easily fixed with providing a default constructor.

Because of the C++ rules regarding initialer lists code that used
them for View_geometry had to be modified to use a normal construction
call.  In my tests only Nitpicker had to be changed.
2012-11-01 14:48:18 +01:00
Norman Feske
fb452ce6ba Add const qualifiers 2012-10-30 12:25:19 +01:00
Christian Prochaska
5a88e106df Define '__dso_handle' in shared libraries.
The '__dso_handle' symbol is needed when building with GCC 4.7.

Fixes #437.
2012-10-30 12:17:00 +01:00
Norman Feske
746f3d4603 Add missing variable initialization 2012-10-30 12:06:55 +01:00
Stefan Kalkowski
4a92eb5660 Implement VMM for Linux in VEA9x4 normal-world 2012-10-29 10:08:30 +01:00
Stefan Kalkowski
94ea3a0acb Move away drivers from generic base-repository
Driver definitions which are used by kernel/core in base-hw, and also by other
drivers (e.g. from the os repository) have to reside in the generic
base-repository, for instance some uart drivers. All drivers which are
interesting for one of the sites only (sp804 for timer driver, or
cortex_a9 cpu driver for base-hw) should reside in the respective repos.

Factorize cpu context out of Cortex A9 specific definitions. Moreover, there
is already a Cpu_state object containing all common ARM registers. We use
this as a base for the cpu context switching done by the base-hw kernel.
The Cpu_state class get extended by a cpu-exception field, that stores the kind
of exception raised when the corresponding context got interrupted. This
information is used not only by the base-hw kernel, but also by the TrustZone
VMM that is build currently.
2012-10-29 10:08:29 +01:00
Stefan Kalkowski
96d45c1159 Define board declarations in a more generic fashion
By naming all board declaration (previously in base/include/drivers/board) the
same way, and putting them in platform-specific include-pathes, we save additional
declaration redirection in the base-hw kernel, and in driver definitions.
2012-10-24 16:41:13 +02: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
Christian Helmuth
502976dec1 PCI: log PCI device as bus:device.function tuple
Refers to comment in #417.
2012-10-18 21:51:54 +02:00
Martin Stein
9dba710989 Enable 'signal' test on 'base_hw'. 2012-10-12 13:10:45 +02:00
Sebastian Sumpf
ff0c7825e4 ACPI/IRQ: Add interrupt mode to IRQ connection
Read flags (polarity/trigger) from MADT and add information to 'Irq_connection'
arguments.

Issue #390
2012-10-09 13:47:47 +02: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
Norman Feske
64245dde3a Avoid superfluous compiler warnings
GCC warns about uninitialized local variables in cases where no
initialization is needed, in particular in the overloads of the
'Capability::call()' function. Prior this patch, we dealt with those
warnings by using an (unreliable) GCC pragma or by disabling the
particular warning altogether (which is a bad idea). This patch removes
the superfluous warnings by telling the compiler that the variable in
question is volatile.
2012-10-08 15:08:21 +02:00
Alexander Boettcher
ec66788f11 NOVA: cleanup - remove _first_sel special handling
Replace dislocation of extern variables with simplistic convention
2012-10-08 15:08:12 +02:00
Christian Prochaska
56243820ee ram_fs: always set '_length' in 'File::truncate()'
Fixes #381.
2012-10-08 15:07:58 +02:00
Christian Prochaska
e9ac4b653b Add support for symbolic links
This patch adds support for symbolic links in libc, libc plugins, file
system servers and Noux.

Fixes #322.
2012-10-08 15:05:02 +02:00
Alexander Boettcher
6862ab481a NOVA: drop special utcb handling of main thread
Unify handling of UTCBs. The utcb of the main thread is with commit
ea38aad30e at a fixed location - per convention.
So we can remove all the ugly code to transfer the utcb address during process
creation.

To do so also the UTCB of the main thread of Core must be inside Genode's
thread context area to handle it the same way. Unfortunately the UTCB of the
main thread of Core can't be chosen, it is defined by the kernel.

Possible solutions:
- make virtual address of first thread UTCB configurable in hypervisor
- map the utcb of the first thread inside Core to the desired location

This commit implements the second option.

Kernel patch: make utcb map-able
With the patch the Utcb of the main thread of Core is map-able.

Fixes #374

Noux actually uses the sp variable during thread creation and expects to be
set accordingly. This wasn't the case for the main thread, it was ever set
to the address of the main thread UTCB.
2012-10-04 14:35:38 +02:00
Christian Prochaska
9dc213b296 'Genode::Path': Remove superfluous slashes first
Fixes #367.
2012-09-25 13:18:36 +02:00
Stefan Kalkowski
5c36639031 Fix UDP checksum calculation (fixes #360)
Missing parantheses around the calculation of last byte address in a UDP
Packet led to dereferencing the wrong value, thereby the UDP checksum
calculation failed, whenever an odd byte-count UPD packet was calculated.
Many thanks to Markus Partheymueller who discovered this issue and its
resolution.
2012-09-24 09:17:59 +02:00
Stefan Kalkowski
62d81ae487 Timer: make ram_quota and stack platform-dependent 2012-09-19 14:28:36 +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
Norman Feske
9651974448 Add stdcxx-4.6.1 to libports, fix #339
This patch adds libstdc++ to libports. With the previous version of the
stdcxx library, the build system used the C++ standard library that
comes with the compiler. This mechanism was prone to inconsistencies of
types defined in the header files used at compile time of the tool chain
and the types provided by our libc. By building the C++ standard library
as part of the Genode build process, such inconsistencies cannot happen
anymore.

Note that the patch changes the meaning of the 'stdcxx' library for
users that happened to rely on 'stdcxx' for hybrid Linux/Genode
applications. For such uses, the original mechanism is still available,
in the renamed form of 'toolchain_stdcxx'.
2012-09-04 12:37:56 +02:00
Christian Prochaska
3084c6f500 TAR file system service
This patch implements a service which provides the contents of a tar
archive via the 'File_system::Session' interface.

Configuration:

<config>
	<archive name="tar_archive.tar" />
	<policy label="label_of_client" root="/rootdir/for/client" />
</config>

Fixes #333.
2012-08-22 09:51:31 +02:00
Norman Feske
4fae082b34 Increase quota of OMAP4 USB driver in demo.run 2012-08-22 09:51:29 +02:00
Sebastian Sumpf
de5d5c2a1e ACPI: Fix offsets when mapping I/O mem
Fixes #309
2012-08-22 09:51:26 +02:00
Sebastian Sumpf
9486022164 ACPI: Allow PCI slave to use CPU sessions 2012-08-22 09:51:26 +02:00
Norman Feske
d7300e882b tar_rom: Ignore leading './' in tar archives 2012-08-17 11:52:02 +02:00
Norman Feske
fab7b514e3 Move path utility from noux to 'os/include/os'
It turns out that the path-handling utility is valuable not only for
Noux. By moving it to a public header, we can use it for the libc.
2012-08-16 10:03:06 +02:00
Alexander Boettcher
775b5a174b Reserve up to 8x4 bytes for the parent capability 2012-08-14 19:14:25 +02:00
Alexander Boettcher
d38257b8d5 tar_rom: increase memory for 64bit Nova 2012-08-14 10:20:09 +02:00
Alexander Boettcher
47ef3bb1cb NOVA: Fix ldso test for 64bit
The generic parent_cap.cc overwrote the beginning of the data segment with
to much. Reserved are solely 16 byte, for 64bit we use however 32byte.

Actually, the parent_cap copying is not required at all. The parent cap
selector is at a fixed define place, so that no exported symbols are required
for determination of the parent_cap.

Remove it.
2012-08-14 10:19:54 +02:00
Alexander Boettcher
5cee75e2a3 Increase rom quota about 36k
Required to run successful @ Genode/NOVA 64bit
2012-08-10 16:52:28 +02:00
Christian Prochaska
dcfcbce856 libc: add support for 'ftruncate()'
Fixes #307.
2012-08-09 11:09:43 +02:00
Alexander Boettcher
2f84fd0434 NOVA: allocate stack size depending on word size 2012-08-09 11:09:41 +02:00
Sebastian Sumpf
3736b8b2f2 Nic_bridge: Use Nic::Packet_allocator
Calculate TX and RX dataspace sizes correctly.
2012-08-07 22:23:00 +02:00
Sebastian Sumpf
18d005264e Nic: Added 'Nic::Packet_allocator'
This is a bitmap-range allocator that can be used in packet streams.
2012-08-07 22:22:06 +02:00
Sebastian Sumpf
ae88dc233c ACPI: Increase quota of PCI service
Some tests trigger memory exhaustions of the PCI-slave service used by the
ACPI-driver.
2012-08-07 22:21:37 +02:00
Martin Stein
8220ea272c Timer session and timer test for 'base-hw'. 2012-08-03 12:06:36 +02:00
Christian Prochaska
d6d45f870e ram_fs: fix recursive 'lookup_and_lock()' calls
With this patch the 'Directory::lookup_and_lock()' function passes its
'return_parent' argument to recursive calls of itself.

Fixes #306.
2012-08-01 12:45:10 +02:00
Norman Feske
f279a1df00 Add write operation to OMAP4 SD-card benchmark 2012-07-26 19:11:40 +02:00
Norman Feske
7e0a1cc0eb Allocate DMA buffer for block packet stream
By allocating the packet-stream dataspace for block sessions as
uncached, we can use DMA to directly read and write into the client
buffer. Currently, the OMAP4 SD-card driver is using this feature.
2012-07-25 19:14:06 +02:00
Norman Feske
0f6110ea97 Let OMAP4 SD-card driver use DMA and interrupts
With this patch, the driver code gets complemented with DMA support.
The support for master DMA, in turn, cleared the way for using
interrupts to wait for the completion of transfers, which largely
relieves the CPU compared to the polling PIO mode. Consequently, the new
version has a much lower CPU footprint.

In the current version, both modes of operation PIO and DMA are
functional. However, PIO mode is retained for benchmarking purposes only
and will possibly be removed to keep the driver simple. It is disabled
in the driver's 'main.cc'.
2012-07-25 19:14:06 +02:00
Norman Feske
e9497a183f Improve measurement accuracy
This patch replaces the jiffies thread in 'sd_card/omap4/bench' calls to
'Timer::Session::elapsed_ms()'. This way, we use wall-clock time for the
measurements. Depending on the load of the rest of the system, the
previous version used to accumulate the inaccuracy for each 'msleep'
call.
2012-07-25 19:14:06 +02:00
Norman Feske
0ca47e8963 Support uncached 'Attached_ram_dataspace'
The enable the use of 'Attached_ram_dataspace' objects as DMA buffers,
we need to pass the 'cached' flag to the constructor. By default, the
dataspace is cached, which corresponds to the original behaviour.
2012-07-25 19:14:06 +02:00
Norman Feske
847c8cccd9 Add 'Timer::Session::elapsed_ms' function
This function allows a timer-session client to request a wall-clock
time value from the timer.
2012-07-25 19:14:06 +02:00
Norman Feske
eac9055c92 Operate SD card in 4-bit data mode 2012-07-25 19:14:06 +02:00
Norman Feske
f3ac72f909 Simple SD card driver benchmarking program 2012-07-25 19:14:05 +02:00
Norman Feske
7c8ca5be64 Move 'Block::Omap4_driver' into header file
By placing this code into a distinct header, we can easily reuse it for
benchmarking purposes.
2012-07-25 19:14:05 +02:00
Christian Prochaska
e5bf7828d9 Add missing unwind code to cxx lib
This patch adds support for the '_Unwind_Complete()' and
'_Unwind_DeleteException()' functions in the cxx lib.

Fixes #275.
2012-07-16 14:54:19 +02:00
Sebastian Sumpf
5f33704155 part_blk: Improve multiple client support
Increase size of block session backing store so it can handle maximum supported
packet size. Synchronize client threads during packet allocation.

Fixes #276
2012-07-16 14:49:55 +02:00
Christian Helmuth
b2478aec76 Increase RAM demanded by bomb children on 64bit systems 2012-07-11 12:12:41 +02:00
Ivan Loskutov
3cfbc53754 Extend nic_bridge to support internal traffic
Fixes #156
2012-07-10 16:30:29 +02:00
Christian Prochaska
30dc1d83da FAT file system service
This patch implements a service which provides access to files and
directories of a FAT file system via the 'File_system' interface.

Fixes #251.
2012-07-10 16:30:26 +02:00
Norman Feske
7ce16922ac Let part_blk export writeable partitions 2012-07-10 15:00:16 +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
Norman Feske
5cd099ed90 OMAP4 SD card driver
The new SD card driver at 'os/src/drivers/sd_card/omap4' allows the use
of an SD card with the Pandaboard as block service. Currently, the
driver is using PIO, no DMA, and no IRQs. The driver can be tested using
the 'os/run/sd_card.run' script.
2012-07-09 15:51:51 +02:00
Norman Feske
cfda8ac4ae Add bitfield polling support to MMIO framework 2012-07-09 15:07:32 +02:00
Norman Feske
12f2572155 Resolve ambiguity of size_t
This patch replaces the first attempt to resolve the ambiguity of using
the size_t type that occurred when 'loader_session.h' was included
alongside libc headers. Instead of explicitly qualifying each occurrence
of the type, the new solution defines 'size_t' within the 'Loader' namespace.

Fixes #253
2012-07-02 14:25:04 +02:00
Christian Prochaska
d6e418b5ed README file for 'terminal_crosslink'
Fixes #257.
2012-07-02 14:14:00 +02:00
Norman Feske
cab40513d4 Tidy up run script for terminal crosslink 2012-06-30 15:45:03 +02:00
Norman Feske
53f55cdfa9 Turn OMAP4 framebufer driver into Genode service 2012-06-22 11:50:12 +02:00
Norman Feske
329cb67e6c Add pandaboard support to default demo scenario 2012-06-22 11:50:09 +02:00
Norman Feske
a60dac3b3d OMAP4 HDMI driver 2012-06-22 11:38:36 +02:00
Martin Stein
4c3df9caf1 Simple test for framebuffer driver 2012-06-22 11:38:36 +02:00
Torsten Hilbrich
2da030d22e loader: Qualify size_t usages
The compiler complained about ambigous references when compiling a
lx_hybrid program using the loader session.  Here are some error
messages:

genode/os/include/loader_session/loader_session.h:72: error: reference to 'size_t' is ambiguous
/usr/lib/gcc/i486-linux-gnu/4.4.5/include/stddef.h:211: error: candidates are: typedef unsigned int size_t
genode/base/include/base/stdint.h:25: error:                 typedef unsigned int Genode::size_t
genode/os/include/loader_session/loader_session.h:72: error: reference to 'size_t' is ambiguous
/usr/lib/gcc/i486-linux-gnu/4.4.5/include/stddef.h:211: error: candidates are: typedef unsigned int size_t
genode/base/include/base/stdint.h:25: error:                 typedef unsigned int Genode::size_t
...

This commit qualifies size_t using the Genode namespace which fixes
the compilation.
2012-06-22 11:38:14 +02:00
Torsten Hilbrich
df6a2f1365 chroot_loader: Fix run script for 64bit environment
The /lib64 path is required here to allow execution of 64bit binaries.

Here is an example-ldd call:

$ ldd /bin/ls
	linux-vdso.so.1 =>  (0x00007fffdedff000)
	libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f4ae207d000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4ae1e75000)
	libacl.so.1 => /lib/x86_64-linux-gnu/libacl.so.1 (0x00007f4ae1c6c000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4ae18af000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4ae16ab000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f4ae22bd000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4ae148d000)
	libattr.so.1 => /lib/x86_64-linux-gnu/libattr.so.1 (0x00007f4ae1288000)

Fixes #249
2012-06-20 19:44:08 +02:00
Alexander Boettcher
200deec403 Bunch of compiler warning fixes, issue #234 2012-06-20 19:44:07 +02:00
Christian Prochaska
7d86edc355 Remove Qemu bug workaround in pl11x driver
Remove a workaround for Qemu <= 0.14.x which results in a wrong
pixel format on Qemu >= 1.0.

Fixes #243.
2012-06-20 10:19:53 +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
Christian Prochaska
8a7fbe3973 Fix ring buffer interface description
The maximum number of elements in the ring buffer is QUEUE_SIZE - 1.

Fixes #240.
2012-06-20 10:17:50 +02:00
Norman Feske
288fd4e56e Add support for allocating DMA memory
This patch extends the RAM session interface with the ability to
allocate DMA buffers. The client specifies the type of RAM dataspace to
allocate via the new 'cached' argument of the 'Ram_session::alloc()'
function. By default, 'cached' is true, which correponds to the common
case and the original behavior. When setting 'cached' to 'false', core
takes the precautions needed to register the memory as uncached in the
page table of each process that has the dataspace attached.

Currently, the support for allocating DMA buffers is implemented for
Fiasco.OC only. On x86 platforms, it is generally not needed. But on
platforms with more relaxed cache coherence (such as ARM), user-level
device drivers should always use uncacheable memory for DMA transactions.
2012-06-20 09:17:48 +02:00
Norman Feske
ed867817b6 Test for combining loader with chroot 2012-06-06 17:31:52 +02:00
Norman Feske
17b60f8d41 Propagate loader-session errors as exceptions 2012-06-06 17:30:06 +02:00
Norman Feske
7a965bd877 Print error message if 'execve' failed 2012-06-06 17:27:54 +02:00
Norman Feske
491a1f9c52 Let chroot test succeed on lx_hybrid platform 2012-06-06 17:27:21 +02:00
Martin Stein
2eca297232 Run script for timer test 2012-06-06 16:15:25 +02:00
Christian Helmuth
7bffdacc9a Increase RAM quotas for 64-bit architectures 2012-05-29 16:08:50 +02:00
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
Stefan Kalkowski
bd3c53be31 Implement LOG to Terminal adapter (issue #169)
This commit adds a terminal_log component, and a run-script which demonstrates
its usage. The terminal_log component provides the LOG service, and prints
every log-output prefixed by the session-label via a terminal-session.
2012-05-23 20:05:05 +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
cdbd1630bb Allow defining ram_fs file content from config 2012-05-18 17:07:30 +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
Christian Prochaska
b45571e9d0 Set argv[argc] to 0 in 'config_args' libc plugin
Fixes #201.
2012-05-10 19:09:40 +02:00
Stefan Kalkowski
19bad919a6 Add std::terminate to ldso whitelist.
Due to recent changes on the Fiasco.OC platform, when building ldso
applications for this platform the std::terminate function is needed
by the ~Ipc_server destructor. So we've to add it to ldso's whitelist.
2012-05-10 19:06:43 +02:00
Christian Prochaska
13bd859e31 Increase stack size of entry points
This patch increases the stack size of entrypoint threads in the PCI and
PS/2 drivers, in the Terminal server and in the Signal service for 64-bit
Genode/Fiasco.OC built with -O0.

Fixes #198.
2012-05-09 20:55:48 +02:00
Christian Prochaska
cf9610a958 Implement RAM accounting 2012-05-02 16:54:18 +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
88aab61e09 Mechanism for using chroot on Linux
The new 'chroot' tool at 'os/src/app/chroot' allows for executing
subsystems within chroot jails on Linux. For using the tool, please
refer to the test case 'os/run/chroot.run'. Fixes #37
2012-04-20 11:21:24 +02:00
Christian Prochaska
7a369bc74d Add an 'executable' flag to 'Rm_session::attach()'
With this patch clients of the RM service can state if they want a mapping
to be executable or not. This allows dataspaces to be mapped as
non-executable on Linux by default and as executable only if needed.

Partially fixes #176.
2012-04-20 11:21:19 +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
Martin Stein
afe996df74 Handle the case that init has no children
Fixes #183
2012-04-19 19:04:33 +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