Compare commits

...

617 Commits
13.05 ... 13.11

Author SHA1 Message Date
Norman Feske
8c61832389 News item for Genode 13.11 2013-11-28 11:49:03 +01:00
Norman Feske
7797be4dcf Release notes for version 13.11 2013-11-28 11:48:55 +01:00
Norman Feske
0cf1c961e6 Update components.txt 2013-11-28 11:48:49 +01:00
Stefan Kalkowski
c70bc350e8 tz_vmm: make scenario reproducible by everyone 2013-11-28 08:22:25 +01:00
Stefan Kalkowski
23ce6dad50 hw_vea9x4: re-enable TrustZone support 2013-11-28 08:22:25 +01:00
Stefan Kalkowski
7bf73fb0c1 hw_imx53: use same link address with or without TZ 2013-11-28 08:22:25 +01:00
Stefan Kalkowski
39efbafb54 TrustZone vmm: rename to tz_vmm due to ambiguity 2013-11-28 08:22:24 +01:00
Martin Stein
2124b4b9c2 hw_panda: provide EHCI interrupt for USB driver
fix #981
2013-11-28 08:22:24 +01:00
Martin Stein
062aa2851c usb & panda: move EHCI-interrupt to board spec
ref #981
2013-11-28 08:22:24 +01:00
Norman Feske
d4900ad54d Add exfat and fuse-ext2 includes to .gitignore 2013-11-28 08:22:24 +01:00
Martin Stein
9bca6bfb0d hw: provide Signal_context::submit
fix #980
2013-11-28 08:22:24 +01:00
Martin Stein
06f8848b36 base: spelling fix in signal/signal.h
ref #980
2013-11-28 08:22:24 +01:00
Christian Helmuth
31605fd85f autopilot: create only missing builddirs on --keep
This improvement prevents multiple execution of create_builddir on
existing directories.
2013-11-28 08:22:24 +01:00
Christian Helmuth
1ef8545469 autopilot: improve detection of genode dir
If the script is executed with an obscure path (e.g.,
'../tool/autopilot'), just taking the argv0 string fails. Therefore, the
file path is now normalized prior to the directory detection.
2013-11-28 08:22:24 +01:00
Christian Prochaska
6a395d9a29 Qt5: enable QML support
This patch enables experimental QML support in Qt5.

Only the QtQuick plugin is available yet.

Currently runs best on Linux and has some problems on NOVA and Fiasco.OC.

Fixes #979.
2013-11-28 08:22:24 +01:00
Josef Söntgen
c6ed7f13bf os: initial preparation for 64Bit AHCI support
The AHCI driver seems to work on x86_64, though it should be treated
carefully because for now all adresses involved are <= 32Bit.
2013-11-26 16:50:52 +01:00
Christian Prochaska
1884e16ecf base-nova: increase page fault handler stack size
When building Genode/NOVA with -O0, the page fault handler thread could
run out of stack.

Fixes #977.
2013-11-26 16:50:52 +01:00
Christian Prochaska
fb468c1c87 scout: fix size calculation
Fixes #978.
2013-11-26 16:50:52 +01:00
Josef Söntgen
d0ddc11c09 libc: use File_descriptor::lock in pread/pwrite
Replace the static lock with the file descriptor lock because recursive
calls of p{read,write} would result in a deadlock when using multiple
libc-plugins at the same time.

Fixes #948.
2013-11-26 16:50:52 +01:00
Josef Söntgen
36f91c2007 libc: add Genode::Lock to File_descriptor class
This lock is needed to prevent multiple threads and/or multiple
libc-plugins from using the same file descriptor in p{read,write}.

Fixes #948.
2013-11-26 16:50:52 +01:00
Josef Söntgen
607036718c libports: add fuse-ext2
Fixes #942.
2013-11-26 16:50:52 +01:00
Josef Söntgen
aba67e365f libports: add fuse-exfat
Fixes #942.
2013-11-26 16:50:52 +01:00
Josef Söntgen
3a0922001b libports: add FUSE implementation
This FUSE implementation consists of libfuse, which provides a
subset of the FUSE 2.6 API and libc_fuse, which provides support
for accessing FUSE based file system via the libc.

Fixes #942.
2013-11-26 16:50:52 +01:00
Josef Söntgen
2891653f8a libports: reuse libc_ffat as skeleton for fs tests
In addition, file-system tests will use the AHCI driver instead of the
ATAPI driver. This change side-steps certain issues with Qemu's IDE
emulation.

Fixes #942.
2013-11-26 16:49:26 +01:00
Norman Feske
45a4d59e07 Whitespace fix 2013-11-26 14:32:08 +01:00
Christian Prochaska
934c009eaa Qt5: enable OpenGL support
Known limitations:

- only one Qt window can use OpenGL at this time
- window resizing using the resize handle does not work

Fixes #975.
2013-11-26 14:32:08 +01:00
Christian Prochaska
bef7086f20 libc: fix size calculation in 'Mem_alloc_impl::alloc'
When allocating new backing store in 'Mem_alloc_impl::alloc()', the
requested alignment needs to be considered in the size calculation.

Fixes #973.
2013-11-26 14:32:08 +01:00
Christian Prochaska
ca9ae43e50 base-linux: round up RM session size to page size
Since RM sessions can be used as dataspaces and dataspace sizes are
supposed to have page granularity, RM session sizes should have page
granularity, too.

Fixes #972.
2013-11-26 14:32:08 +01:00
Christian Prochaska
a2e405f9e9 Mesa: improvements for use with Qt5
Among other changes, this patch makes it possible to let Mesa render into
a user-provided buffer instead of the screen. This can be achieved with
the 'eglCreateWindowSurface()' function, which takes a buffer
description as third argument.

Fixes #974.
2013-11-26 14:32:07 +01:00
Christian Prochaska
8e30a07b90 pthreads: add support for recursive mutexes
Fixes #971.
2013-11-26 14:32:07 +01:00
Christian Prochaska
4e9303ff6e ldso: increase MEM_SIZE in 'mmap()'
MEM_SIZE needs to get increased for the 64-bit 'linux_x86' platform when
building with -O0 on the current master branch.

Fixes #970.
2013-11-26 14:32:07 +01:00
Christian Prochaska
ab65a489ce Qt5: use 'git apply' to apply patches
One of the Qt5 patches is supposed to create symbolic links, which is not
supported by GNU patch before version 2.7. Using 'git apply' to apply the
patches solves this problem.

Fixes #969.
2013-11-26 14:32:07 +01:00
Martin Stein
4697e0e07d hw: make bootstrap save against multiple calls
In programs with dynamic linker, _main and thus also platform_main_bootstrap
are called twice. By now, platform_main_bootstrap tried to always access the
startup message in the UTCB of the main thread that gets overridden till the
second call.

fix #967
2013-11-26 14:32:07 +01:00
Martin Stein
5b90113d86 hw: no default values for kernel-call args
ref #967
2013-11-26 14:32:07 +01:00
Norman Feske
0d3f5be95b Dissolve sig contexts in rm_fault and signal tests 2013-11-26 14:32:07 +01:00
Alexander Boettcher
7ab863b495 base: Warn on undissolved signal contexts 2013-11-26 14:32:07 +01:00
Stefan Kalkowski
0c6c70a612 cpu_session: follow-up fix for scale_priority
This is a fixup for commit 5a42f40f04.

ref #961
2013-11-26 14:32:07 +01:00
Sebastian Sumpf
54667241f7 usb_drv: Use GPIO driver on PandaBoard
Also updated run scripts.

Issue #708
2013-11-26 14:32:06 +01:00
Sebastian Sumpf
014b7d665c gpio_drv: Fix linking on PandaBoard
Issue #708
2013-11-26 14:32:06 +01:00
Christian Helmuth
eda44d6154 base-linux: hybrid file-system server
The current implementation is missing support for symbolic links.

Fixes #944.
2013-11-26 14:32:06 +01:00
Christian Helmuth
1bbd54c9b7 ram_fs: use server skeleton library
Related to #944.
2013-11-26 14:32:06 +01:00
Christian Helmuth
76cd788479 Fix some typos 2013-11-26 14:32:06 +01:00
Josef Söntgen
2a7fc69679 libports: add sys/disk.h symlink
Fixes #965.
2013-11-26 14:32:06 +01:00
Josef Söntgen
88851ab699 libports: libc_block plugin
This plugin provides support for using a Block_session connection by
opening "/dev/blkdev".

Fixes #965.
2013-11-26 14:32:06 +01:00
Sebastian Sumpf
634f4c0d8c netperf: Add separate run scripts for lwip/lxip
Also removed target 'app/netperf' and added 'app/netperf/lwip' and
'app/netperf/lxip'.
2013-11-26 14:32:06 +01:00
Alexander Boettcher
80838831d8 make dde_linux repository an optional one
Since dde_linux now contains the port of the Linux IP stack available for all
Genode base-* platforms move the repository out of drivers_arm and drivers_x86
build.conf to the optional build.conf (available to all platforms).
2013-11-26 14:32:05 +01:00
Sebastian Sumpf
5e17fef898 lxip: Port of the Linux TCP/IP stack 2013-11-26 14:32:05 +01:00
Sebastian Sumpf
864a047206 base: Local signal submit 2013-11-25 12:12:31 +01:00
Stefan Kalkowski
50d73e7890 block_session: extend interface with sync() call
To support components, which implement the block session's server side
rpc object, and which doesn't write data to their device backend immediately,
an additional synchronization call is needed. Thereby, clients like for
instance a file system can tell these components, when a synchronization is
required.

Ref #113
2013-11-25 12:12:31 +01:00
Alexander Boettcher
44c7d64fb3 netperf: remove packet/s from statistics
Mixing MB/s and packet/s in one graph is a bit confusing - so remove it from
the graph, but is still in the log output.
2013-11-25 12:12:31 +01:00
Alexander Boettcher
f00195e26d seoul: support to run VM outside VMM's PD
Issue #949

Related to issue #808 - one way to nearly double the maximum VM size for
VMs on 32bit Genode/Nova host if decreased performance is acceptable.
2013-11-25 12:12:31 +01:00
Alexander Boettcher
67c1ad4cdd nova: support creation of vCPU in own PD
With the patch a VMM is not forced anymore to co-located the VMM and VM in same
PD.

Fixes #949
2013-11-25 12:12:31 +01:00
Norman Feske
1df48b8331 ports: common utilities for building VMMs on NOVA
To ease the creation of custom virtual machine monitors on top of
NOVA, this patch moves generic utilities from vancouver resp. seoul to the
public include location 'ports/include/vmm'. As a nice side effect,
this change simplifies 'vancouver/main.cc'.

Issue #949
2013-11-25 12:12:31 +01:00
Martin Stein
07aa56fffb hw: re-add priority down-scaling
This is a follow-up commit for "hw: beautify scheduling-priority code".

ref #960
2013-11-25 09:50:27 +01:00
Martin Stein
883aa83e62 okl4 & priority.run: new order of core services
ref #961
2013-11-25 09:46:28 +01:00
Norman Feske
a984c2342e demo.run: Support for Raspberry Pi 2013-11-25 09:46:28 +01:00
Norman Feske
4388c2a97c Do not try to start Qemu for platform_rpi 2013-11-25 09:46:28 +01:00
Norman Feske
b7b8d22bc3 dde_linux/rpi: Enable USB power on startup
Needed when booting Genode directly from SD card w/o u-boot.
2013-11-25 09:46:09 +01:00
Norman Feske
148206d757 rpi: Framebuffer and platform drivers
The platform driver is used to access the features provided by the
Videocore mboxes, i.e., power configuration and framebuffer setup. The
framebuffer driver uses the platform interface to setup a screen mode of
1024x768.
2013-11-25 09:46:09 +01:00
Norman Feske
1d5c11c7af rpi: Allow the access to videocore memory as MMIO 2013-11-25 09:46:09 +01:00
Norman Feske
62019be6d3 rpi: Change link address to support larger images 2013-11-25 09:46:09 +01:00
Norman Feske
93c7e852e9 dde_linux: USB networking for rpi
Even though the network adaptor gets initialized, networking is not
functional yet.
2013-11-25 09:46:09 +01:00
Norman Feske
c52b7d3076 rpi: Videocore cache definitions 2013-11-25 09:46:09 +01:00
Norman Feske
435bdd5755 dde_linux: Support for Raspberry Pi
At the current stage, the USB HID and storage drivers are prinicpally
working but not stable. If interrupts are not processed fast enough,
devices will get sporadically disconnected.

The USB host-controller driver is not part of the normal Linux kernel.
For this reason, we need to download it separately. There exists a
'prepare_rpi' rule in the 'dde_linux/Makefile' to automate this process.
2013-11-25 09:46:09 +01:00
Norman Feske
0db203fb75 dde_linux: Limit number of merged IRQs
This change makes Irq_context::_handle_one robust against misbehaving
IRQ handlers that always return IRQ_HANDLED, specifically dwc_otg.
2013-11-25 09:46:09 +01:00
Norman Feske
88f635b021 dde_linux: Follow symlinks while grepping includes
This patch principally allows to install symlinks to out-of-Linux tree
drivers into the contrib directory. Those files are then considered for
the 'lx_emul.h' symlink procedure. Is useful as a temporary mechanism
while developing the rpi USB driver.
2013-11-25 09:46:09 +01:00
Norman Feske
5b5ea76039 hw_rpi: Hand out IRQ for USB host controller 2013-11-25 09:46:08 +01:00
Stefan Kalkowski
ae5e5cefc1 hw: initialize sctrl register appropriately
Fixes #916
2013-11-25 09:46:08 +01:00
Stefan Kalkowski
debec59e30 imx53: add missing break to input driver (fix #957) 2013-11-25 09:46:08 +01:00
Stefan Kalkowski
a7d7337b16 vmm: add i.MX53 platform as target (ref #954) 2013-11-25 09:46:08 +01:00
Stefan Kalkowski
6f136bef7a hw: add TrustZone support for i.MX53 (ref #954) 2013-11-25 09:46:08 +01:00
Stefan Kalkowski
238430a362 hw: save MMU registers for TrustZone VMM (ref #954)
When saving/resuming translation table base registers, and data fault register
a VMM is able to translate the VM's virtual addresses, and to analyse aborts
it has generated.
2013-11-25 09:46:08 +01:00
Martin Stein
b694045bd9 hw: get rid of Kernel::current_thread_id
Every thread receives a startup message from its creator through the initial
state of its userland thread-context. The thread-startup code remembers the
kernel name of the new thread by reading this message before the userland
thread-context gets polluted. This way, Kernel::current_thread_id becomes
unnecessary.

fix #953
2013-11-25 09:46:08 +01:00
Martin Stein
b5e92653bf hw: adjust expected serial start-message in run
ref #953
2013-11-25 09:46:08 +01:00
Martin Stein
fde150b052 hw: rename delete_thread in kill_thread
ref #953
2013-11-25 09:45:31 +01:00
Martin Stein
f054b70e33 hw: spelling fix in kernel/thread.cc
ref #953
2013-11-25 09:45:31 +01:00
Martin Stein
84e05e0653 hw: don't provide thread base via platform thread
ref #953
2013-11-25 09:45:31 +01:00
Martin Stein
99c649c42f hw: simplify Kernel::new_thread
Don't set priority and label in platform thread and then communicate this
core object via Kernel::new_thread but communicate priority and label directly.
This way kernel doesn't need to know anymore what a platform thread is.

ref #953
2013-11-25 09:45:31 +01:00
Martin Stein
210216e5e1 hw: simplify Kernel::start_thread
Instead of writing initial thread context to the platform-thread members
and then communicating this core object to kernel, core calls
Kernel::access_thread_regs first to initialize thread context and then
Kernel::start_thread without a platform-thread pointer. This way
the frontend as well as the backend of Kernel::start_thread loose
complexity and it is a first step to remove platform thread from the
vocabulary of the kernel.

ref #953
2013-11-25 09:45:31 +01:00
Martin Stein
77f55232fd hw: remove Kernel::get_thread
ref #953
2013-11-25 09:45:31 +01:00
Martin Stein
3b2590b65a hw: identify core threads through stack pointer
ref #953
2013-11-25 09:45:30 +01:00
Martin Stein
87da21d967 hw: use platform-thread pointer as pager badge
ref #953
2013-11-25 09:45:30 +01:00
Martin Stein
e0419b2401 hw: clearer naming scheme in kernel API
Rename kernel syscall in kernel call and the kernel-API
files in kernel/interface* .

ref #953
2013-11-25 09:45:30 +01:00
Norman Feske
b3ccac63c3 launchpad: Support configuration of launch entries
This patch enables the recursive startup of launchpad instances, which
was not possible since the recent removal of launchpad's built-in
default configuration.
2013-11-25 09:45:30 +01:00
Norman Feske
2f483500b0 Add 'Xml_node::has_sub_node' accessor 2013-11-25 09:45:30 +01:00
Norman Feske
373c5bdbf7 nitlog: Fixed adaptation to changed nitpicker API
Fixes #955
2013-11-25 09:45:30 +01:00
Alexander Boettcher
0d8abab3ee nova: remove cap_sel - use cap_map
Fixes #905
2013-11-18 11:01:46 +01:00
Alexander Boettcher
c139253439 nova: use cap_map for IPC
Issue #905
2013-11-18 11:01:46 +01:00
Alexander Boettcher
75ecdab9e8 nova: add inc/dec to native_types.h
Issue #905
2013-11-18 11:01:45 +01:00
Alexander Boettcher
63d902543b nova: initialize cap_map
Issue #905
2013-11-18 11:01:45 +01:00
Alexander Boettcher
f330b55227 nova: introduce cap_map
to be used for ref counting of Native_capabilities

* similar as used for base-foc
* will replace nova specific cap_sel_allocator interface

Issue #905
2013-11-18 11:01:45 +01:00
Alexander Boettcher
1dd2a199a5 nova: support cap receive window of various sizes
Open a capability receive window according to the number of the capabilities
expected as out parameter per RPC function.

Typically the number of capabilities expected during the reply of a RPC/IPC
call is 0 to 1. Before this patch ever a capability receive window of 4 has
been opened.

On Nova the capability selectors of receive windows must be naturally aligned
to the size/order of the expected capabilities. This leads until now to the
issue that the left over 3 capabilities couldn't be reused for new IPCs since
they are not naturally aligned to 4.

Issue #905
2013-11-18 11:01:45 +01:00
Alexander Boettcher
a6af6c80ab base: count caps replied by a rpc function
Issue #905
2013-11-18 11:01:45 +01:00
Alexander Boettcher
772616bf38 base: call deconstructor of context area
Issue #905
2013-11-18 11:01:45 +01:00
Alexander Boettcher
ff02dc8f10 x86emu: avoid compiler warning 2013-11-18 11:01:45 +01:00
Martin Stein
e450602196 hw: missing initialization in signal handler
fix #951
2013-11-18 11:01:45 +01:00
Martin Stein
653e14b74f hw: adjust SIGNAL SLAB sizes to new conditions
fix #950
2013-11-18 11:01:45 +01:00
Christian Helmuth
347ff635b3 fiasco: fix SYSTEM_TARGET prefix in l4env config
The config file is interpreted in a bash script. So, SYSTEM_TARGET is a
bash variable, i.e., ${SYSTEM_TARGET}.

Fixes #946. Related to #490.
2013-11-15 16:11:19 +01:00
Martin Stein
909ab8dcd0 hw: communicate page faults via signals
Enable routing of thread events to signal contexts via
Kernel::route_thread_event.

Replace Kernel::set_pager by Kernel::route_thread_event.

In base-hw a pager object is a signal context and a pager activation
is a signal receiver. If a thread wants to start communicating its page
faults via a pager object, the thread calls Kernel::route_thread_event with
its thread ID, event ID "FAULT", and the signal context ID of the pager object.
If a pager activation wants to start handling page faults of a pager object,
the pager activation assigns the corresponding signal context to its signal
receiver. If a pager activation wants to stop handling page faults of a pager
object, the pager activation dissolves the corresponding signal context from
its signal receiver. If a thread wants to start communicating its page faults
via a pager object, the thread calls Kernel::route_thread_event with its
thread ID, event ID "FAULT", and the invalid signal context ID.

Remove Kernel::resume_faulter.

Move all page fault related code from generic kernel sources to CPU
specific cpu_support.h and cpu_support.cc.

fix #935
2013-11-14 19:57:31 +01:00
Martin Stein
ba52529bd6 hw: beautify scheduling-priority code
ref #935
2013-11-14 19:57:31 +01:00
Martin Stein
da49f86f5b hw: provide placement via dedicated header
ref #935
2013-11-14 19:57:30 +01:00
Martin Stein
15a56bd682 hw: provide and use syscall access_thread_regs
ref #935
2013-11-14 19:57:30 +01:00
Martin Stein
1c6c90fed5 core: provide signals before other services
Provide core-local signal service before other services to enable the use
of signal connections while initialzing the other services. This has been
introduced due to the use of the signal framework by the pager lib in
base-hw (RM service).

ref #935
2013-11-14 19:57:30 +01:00
Martin Stein
20e91d0b60 base: individual implementations of pager-object
ref #935
2013-11-14 19:57:30 +01:00
Martin Stein
d24ed9783b hw: get rid of kernel_support.cc
ref #935
2013-11-14 19:57:30 +01:00
Martin Stein
f4b46fe55c hw: move kernel.cc to core/kernel/
ref #935
2013-11-14 19:57:30 +01:00
Martin Stein
9c1ae1f149 hw: no overloading of Signal_context constructor
ref #935
2013-11-14 19:57:30 +01:00
Martin Stein
47744e0019 hw: handle interrupts via signals
fix #874
2013-11-14 19:57:30 +01:00
Martin Stein
b88d7e3370 vea9x4: centralize spec of interrupt names
ref #874
2013-11-14 19:56:39 +01:00
Martin Stein
7c70a9bf7d rpi: centralize spec of interrupt names
ref #874
2013-11-14 19:56:39 +01:00
Martin Stein
493ea55a72 omap4 & gpio_drv: add config lib
ref #874
2013-11-14 19:56:39 +01:00
Martin Stein
cc17d82d92 panda: centralize spec of interrupt names
ref #874
2013-11-14 19:56:39 +01:00
Martin Stein
7e294a39f4 imx53: remove unused IPU-interrupt specs
ref #874
2013-11-14 19:56:39 +01:00
Martin Stein
e849cce39e pbxa9: centralize spec of interrupt names
ref #874
2013-11-14 19:56:39 +01:00
Martin Stein
ba1a82b485 arndale: centralize spec of interrupt names
ref #874
2013-11-14 19:56:39 +01:00
Martin Stein
002a5b8978 hw: distinct pagefault and IPC message type
ref #874
2013-11-14 19:56:39 +01:00
Martin Stein
6f935af278 hw: communicate message type through UTCB
ref #874
2013-11-14 19:56:38 +01:00
Martin Stein
1e7eb4512e hw: manage UTCB through use-case specific structs
ref #874
2013-11-14 19:56:38 +01:00
Martin Stein
96bbca6191 hw: send reply size & receive request size by UTCB
ref #874
2013-11-14 19:56:38 +01:00
Martin Stein
45d37e275d hw: send request size through UTCB
ref #874
2013-11-14 19:56:38 +01:00
Martin Stein
6b9376bb01 hw: clean up interface of Kernel::Thread
ref #874
2013-11-14 19:56:38 +01:00
Martin Stein
ffb26eb501 hw: make syscall backend private to Kernel::Thread
ref #874
2013-11-14 19:56:38 +01:00
Martin Stein
5cd2f6ee0b hw: make Kernel::mtc() global
ref #874
2013-11-14 19:56:38 +01:00
Martin Stein
0bb6ffa98d hw: header and source file for Kernel::Vm
ref #874
2013-11-14 19:56:38 +01:00
Martin Stein
22d61c241e hw: remove useless function handle_invalid_excpt
ref #874
2013-11-14 19:56:38 +01:00
Martin Stein
059aba0916 hw: remove unused function handle_invalid_syscall
ref #874
2013-11-14 19:56:38 +01:00
Josef Söntgen
9bc42ecd87 ports: native version of DosBox
DosBox is DOS-Emulator which is mainly used for playing old
DOS games on POSIX systems and newer Windows versions.

This port of DosBox runs natively on Genode by using its
SDL backend. It is currently only works on x86_*.

Fixes #937.
2013-11-14 19:54:14 +01:00
Norman Feske
1ed4b9fef9 Use log_terminal in noux.run script
This patch changes the noux.run script to use the new log_terminal
component instead of an UART driver. Besides being a nice way to test
the log_terminal service, the new version is much simpler and it just
became compatible to Linux as it no longer relies on an UART driver.

Issue #947
2013-11-12 17:59:29 +01:00
Norman Feske
f51c4be5d2 Server for writing terminal output to LOG session
Fixes #947
2013-11-12 17:59:29 +01:00
Stefan Kalkowski
5a42f40f04 cpu_session: fix semantic of scale_priority
Remove "inverse" argument from function, because its documented behaviour
wasn't implemented correctly, nor was it used by any code.
2013-11-12 15:02:17 +01:00
Stefan Kalkowski
265ec48c20 hw: implement priority-based scheduling (fix #945) 2013-11-12 15:01:54 +01:00
Norman Feske
1953acae77 qt4: Workarounds for missing C++11 compatibility
Since we switched to using C++11 by default, the webkit-related
parts of qt4 failed to compile because of C++11 compatibility
issues. This patch disables the use of C++11 for the offenders.
2013-11-07 14:58:34 +01:00
Christian Helmuth
d65220bcf2 base-nova: Use CROSS_DEV_PREFIX in run environment
Related to #490.
2013-11-06 14:33:33 +01:00
Josef Söntgen
8b8e3ef7a5 noux: calculate inode value from path
There are programms that use struct stat's st_ino field to check certain
conditions. Since we are using multiple filesystems in a noux session we
cannot use the inode number which the actual filesystem provides.
Therefore we calculate a random inode number by hashing the stated path.

Fixes #299.
2013-11-05 12:54:04 +01:00
Alexander Boettcher
bde7e24820 nova: fix size of virtual address space for 64bit
Fixes #933
2013-11-05 12:18:51 +01:00
Josef Söntgen
7ac23a2419 libports: use Timer_session as SDL's timer backend
A timer session is now used instead of a jiffy counter. This way, libSDL
can use a time source that is not bound to the granularity our libc's
nanosleep implementation. Currently, the granularity of nanosleep is in
the order of 10 milliseconds, which is far to coarse for the use of
SDL-using applications such as DosBox.

Fixes #934.
2013-11-05 12:14:37 +01:00
Josef Söntgen
4efd664619 libports: use SDL's SDL_cdrom dummy implementation
Fixes #934.
2013-11-05 12:14:23 +01:00
Christian Prochaska
c029557c8b pthreads: return error numbers
pthread functions are supposed to return error values instead of setting
'errno' and returning -1.

Fixes #856.
2013-11-05 12:13:45 +01:00
Josef Söntgen
1306915879 libports: add SDL_net
Fixes #936.
2013-11-05 12:13:19 +01:00
Christian Prochaska
1a22664fee Call exit handlers before notfying the parent
Fixes #941.
2013-11-05 12:01:13 +01:00
Alexander Boettcher
59cb7d9263 nova: show error message for un-handled exception
Fixes #938
2013-11-05 12:00:18 +01:00
Norman Feske
ac05a5efdd Spelling fix 2013-10-30 12:27:44 +01:00
Norman Feske
f75243f5dd Change codezero download location to github
Because the l4dev.org server seems to be unreliable, we obtain the
source code from github.
2013-10-30 12:27:43 +01:00
Stefan Kalkowski
2c1b8f4807 l4lx: extend l4linux_dynamic run script
Add a graphical scenario to the cli_monitor setup, which includes
a more complex GDB debugging scenario.
2013-10-30 12:27:43 +01:00
Stefan Kalkowski
fde93c3284 init: don't call Rom_session::dataspace() twice
In general, requesting a dataspace from a server twice is no good
idea. The server might react in a unrecoverable fashion. E.g. the rom_fs
service always throws away the corresponding dataspace from the first call
of dataspace(), and constructs a new one.
2013-10-29 18:08:30 +01:00
Christian Prochaska
a1458307da GDB monitor: test the 'set var' and 'call' commands
Fixes #930.
2013-10-29 18:08:29 +01:00
Christian Prochaska
27aeecf5d1 cli_monitor: add a 'gdb' command
This patch adds a 'gdb' command to 'cli_monitor', which makes it possible
to debug an application with GDB.

The command works similarly to the 'start' command, but instead of
starting the subsystem binary directly, an 'init' subsystem gets
started, which then starts 'terminal_crosslink', 'noux', GDB and
'gdb_monitor' (which starts the application binary as its target).

So, for the 'gdb' command to work, these additional components need to
be available, too. 'terminal_crosslink', 'noux', 'gdb_monitor' and the
file 'gdb_command_config' are expected to be ROM modules. The Noux GDB
client needs to get mounted at '/bin' in Noux and the target binaries need
to be available as ROM modules (loaded by 'gdb_monitor') and also mounted
at '/gdb' in Noux (loaded by the GDB client).
Additionally, the source code of the target application can be provided
at '/gdb/src/ in Noux. How the Noux mountings get established can
be configured in the 'gdb_command_config' file. The default configuration
in 'os/src/server/cli_monitor/gdb_command_config' mounts GDB from a tar
archive named 'gdb.tar', the GDB target binaries from a tar archive named
'gdb_target.tar' and the target source code from a tar archive named
'gdb_target-src.tar'.

The patch includes an 'expect' include file (ports/run/noux_gdb.inc)
which provides functions that help to create those tar files:

- 'create_gdb_tar' creates a tar archive for the 'gdb' client
- 'create_binary_tar' creates a tar archive for the target application
- 'create_source_tar' creates a tar archive for the source code of
  the target application
- 'create_binary_and_source_tars' is a convenience wrapper for the previous
  two functions

The patch also includes an example run script
(ports/run/noux_gdb_dynamic.run).

The 'gdb' command supports the following command line options:

- --ram: the initial RAM quota provided to the whole subsystem
         (including the GDB-related components)
- --ram-limit: limit for expanding RAM quota
- --gdb-ram-preserve: the RAM quota that 'gdb_monitor' ahould preserve
                      for itself

Fixes #928.
2013-10-29 18:08:29 +01:00
Christian Prochaska
cc04ffcf42 GDB monitor: find out page faulting thread
Fixes #898.
2013-10-25 23:49:00 +02:00
Sebastian Sumpf
5774a864b1 usb_drv: Fix PHY initialization for DWC3 XHCI
Make high speed (HS) and super speed (SS) hub use the same reference clock.
Also upgrade some quotas in USB run scripts.

Fixes #929.
2013-10-24 15:21:36 +02:00
Stefan Kalkowski
fc1005c7ee foc: re-dimension UTCB area in core (fixes #927)
Take the whole UTCB area out of core's region map to circumvent mapping errors.
With this fix, the HDMI quirks are getting unnecessary.
2013-10-22 08:00:17 +02:00
Stefan Kalkowski
2329184ddb cli_monitor: make preservation limit a hard limit
When a child requests more ram resources, it gets blocked immediately when
the preservation limit is reached. Otherwise, it might happen that the
cli_monitor runs out of memory.
2013-10-22 08:00:17 +02:00
Stefan Kalkowski
e0be6b9ed6 cli_monitor: ensure blocked children are waked up
When a command was executed, it is necessary to check not only whether the
preservation limit of the ram quota is reached, but also whether new ram quota
is available (e.g.: consequence of the kill command), and children are waiting
for additional resources.
2013-10-22 08:00:17 +02:00
Stefan Kalkowski
15741f73c0 cli_monitor: don't withdraw all ram quota from child
When a yield request is responded by a child, don't withdraw all ram
quota currently available from the child, but let it keep hold a bit to live.
2013-10-22 08:00:17 +02:00
Stefan Kalkowski
e559fb7df9 cli_monitor: limit request yields to children
Don't request resource yieldings from children that are in a resource request
themselfs to lower needless system load.
2013-10-22 08:00:17 +02:00
Stefan Kalkowski
d4922f9071 cli_monitor: consider instance count in quota check
In the start command when checking, whether the quota is enough to create
the new instance, consider the count of instances that should be started.
2013-10-22 08:00:17 +02:00
Stefan Kalkowski
59d6157441 l4lx: ballooning by using new parent interface
Implement a ballooning mechanism in L4Linux similar to solutions like XEN's
balloon driver. Therefore the new parent interface extensions for requesting
and yielding resources are used. L4Linux registers a yield signal context at
its parent. Whenever the parent triggers a yield, the balloon driver blows up,
which means it requests all pages available, and then frees the corresponding
backend memory.
2013-10-22 08:00:17 +02:00
Stefan Kalkowski
705c73d3f3 l4lx: allocate memory on demand 2013-10-22 08:00:16 +02:00
Christian Helmuth
78344dd672 libports: fix make clean for sdl port 2013-10-22 08:00:16 +02:00
Alexander Boettcher
69263f6593 seoul: increase memory for network with bridge
Fixes #918
2013-10-22 08:00:16 +02:00
Norman Feske
f82e1a7092 nitpicker: Late allocation of virtual framebuffer
This patch changes the interface of Nitpicker to support dynamically
dimensioned virtual frame buffers. This solves two problems:

First, it enables a client to create a connection to nitpicker without
donating much session quota in advance. The old interface required each
screen-size-dependent client to donate as much memory as needed to
allocate a screen-sized virtual framebuffer. For clients that are
interested int the screen size but cover just a small portion of the
screen (e.g., a banner, a menu, an applet that sits in the screen
corner), this overprovisioning is painful. The new interface allows such
clients to upgrade the session quota for an existing session as needed.

Second, because each nitpicker session used to have a virtual frame
buffer with a fixed size over the lifetime of the session, a client that
wanted to implement a variable-sized window had to either vastly
overprovide resources (by opening a session as large as the screen just
in order to be prepared for the worst case of a maximized window), or it
had to replace the session by a new one (thereby discarding the stacking
order of the old views) each time the window changes its dimensions. The
new interface accommodates such clients much better.
2013-10-22 08:00:16 +02:00
Norman Feske
2322ab202c Remove OKLinux
Fixes #29
Fixes #30
Fixes #889
2013-10-22 08:00:16 +02:00
Norman Feske
9f9e2daedf terminal_log.run: Add missing build of launchpad 2013-10-22 08:00:16 +02:00
Norman Feske
1c4e73d425 base: 'Allocator_guard::quota' accessor 2013-10-22 08:00:16 +02:00
Christian Prochaska
047d851fb6 Noux: add basic 'Ctrl-C' support
This patch implements the POSIX signal functionality needed to interrupt a
running Noux GDB by pressing 'Ctrl-C'.

It allows to register a signal handler for the 'SIGINT' signal, which
gets executed after 'Ctrl-C' is received from the terminal. With the
current state of the implementation, the signal handler only gets executed
when the Noux application calls a 'read()', 'write()', 'ftruncate()' or
'select()' syscall.

Fixes #923.
2013-10-22 08:00:16 +02:00
Christian Prochaska
cf040e2833 Ring_buffer: make synchronization optional
With this patch, the 'Ring_buffer' class can be made unsynchronized by
setting the 'Ring_buffer_unsynchronized' policy as third template
argument.

Fixes #922.
2013-10-22 08:00:16 +02:00
Christian Prochaska
dc8fc1a33c Ring_buffer: add 'avail_capacity()' function
The 'avail_capacity()' function returns how many more elements would
currently fit into the ring buffer.

Fixes #921.
2013-10-22 08:00:15 +02:00
Norman Feske
7296735816 cli_monitor: Init Ram::_resource_avail_sigh
Thanks to Stefan Kalkowski for the report.
2013-10-22 08:00:15 +02:00
Martin Stein
5fa98361c2 demo: support exynos5
fix #796
2013-10-22 08:00:15 +02:00
Martin Stein
4196b9bc5c fb & exynos5: avoid USB HID problems with FOC
USB HID gets stuck due to strange kernel error
as HDMI starts simulatnously. This workaround
delays HDMI init by a second (only in case we
build for Exynos5 & FOC with USB) to let
scenarious like demo get their USB HID started
without much CPU load.

ref #796
2013-10-22 08:00:15 +02:00
Martin Stein
1113f36e2f arndale: specs to enable demo scenario
ref #796
2013-10-22 08:00:15 +02:00
Martin Stein
abbb03555d fb test: view multiple pictures
ref #796
2013-10-22 08:00:15 +02:00
Martin Stein
7057a12304 fb test: support exynos5
ref #796
2013-10-22 08:00:15 +02:00
Martin Stein
515f4cff1e framebuffer: support HDMI@1920x1080p on exynos5
ref #796
2013-10-22 08:00:15 +02:00
Martin Stein
92b3171765 platform_drv & exynos5: provide HDMI switches
ref #796
2013-10-22 08:00:15 +02:00
Alexander Boettcher
f14213b5f4 base/os: catch Ipc_error messages in Service class
Fixes #910
2013-10-22 08:00:15 +02:00
Stefan Kalkowski
c95f11418a i.MX53: fit into u-boot's memory layout on tablet
Fixes #917
2013-10-22 08:00:14 +02:00
Stefan Kalkowski
3fc962b539 i.MX53: add config lib to GPIO driver (fix #915) 2013-10-22 08:00:14 +02:00
Stefan Kalkowski
81e69dc8da i.MX53 tablet: complete IOMUX routes for display
For the framebuffer driver of the i.MX53 platform to work even when u-boot
didn't prepared the display previously, there were some IOMUX routes missing.

Fixes #914
2013-10-22 08:00:14 +02:00
Stefan Kalkowski
ebbd721278 i.MX53 tablet: handle >1 button events concurrently
By now, only one button press/release event per IRQ was handled correctly.
Pressing and/or releasing several buttons concurrently could bring the input
driver into an inconsistent state.

Fixes #913
2013-10-22 08:00:14 +02:00
Stefan Kalkowski
4f541538bd noux: use lwip dhcp plugin, avoid code duplication
Ref #892
2013-10-22 08:00:14 +02:00
Stefan Kalkowski
8f0c789ed4 Make NIC RX/TX buffer sizes configureable in libc
* Remove far too low default values from Nic::Connection constructor
* Extend lwip initialization function with desired TX/RX buffer sizes
* Add configuration possibility to libc_lwip_dhcp plugin to define
  buffer sizes, like the following:

  '<libc tx_buf_size="1M" tx_buf_size="1M"/>'

Fixes #892
2013-10-22 08:00:14 +02:00
Martin Stein
c56927b76e hw: differ ID allocators even with same size
Previously, if two ID allocators for different kernel objects had the
same size, the kernel-object framework managed both objects types
through the same allocator instance. This is caused by the use of
unsynchronized singletons in the accessor functions and can be avoided
by creating new types through inheritance instead of using typedefs.
Anyways, this fix is a little bit ugly and should replaced by avoiding
the use of unsynchronized singletons in the future.

fix #906
2013-10-22 08:00:14 +02:00
Josef Söntgen
a9651d1728 gems: provide file to terminal service
Fixes #911.
2013-10-22 08:00:14 +02:00
Martin Stein
ee5d213c1f base: do not allow unnamed threads
fix #901
2013-10-22 08:00:07 +02:00
Josef Söntgen
afdabe9df8 hw: enable performance counter on ARMv6 and ARMv7
To actually enable the performance counter 'perf_counter' has to be
added to the SPECS make variable.

Fixes #893.
2013-10-17 11:05:53 +02:00
Josef Söntgen
341290a266 trace: implement timestamp also for ARMv6
Fixes #894.
2013-10-17 11:05:41 +02:00
Josef Söntgen
4d2b349380 os: don't close the Rm_connection in ldso
At this point we cannot close the connection anymore because all
mappings are gone and the needed stack is invalid. This is not a
problem since process will be discarded anyway.

Fixes #909.
2013-10-17 11:05:29 +02:00
Josef Söntgen
eab8217bdb base: call proper __cxa_finalize
Fixes #909.
2013-10-17 11:05:20 +02:00
Josef Söntgen
e1ed832ac1 USB-storage: free Packet_descriptor after ACK
Fixes #903.
2013-10-17 11:04:25 +02:00
Christian Prochaska
65f8f9c75a GDB monitor: add support for register writing
With this patch, register contents of a paused thread (which is not
currently executing a syscall) can get modified on Fiasco.OC by GDB.

Fixes #897.
2013-10-17 11:04:08 +02:00
Christian Prochaska
9090311a06 base-foc: enable CPU state modification
With this patch, the register contents of a paused thread (which is not
currently executing a syscall) can get modified by the
'Cpu_session::state()' function.

Fixes #896.
2013-10-17 11:03:40 +02:00
Stefan Kalkowski
f17727b70b multi_linux.run: fix initrd locations (fix #885) 2013-10-17 11:03:09 +02:00
Christian Prochaska
8a2e543b69 run: use 'wait_for_output' for Linux, too
With this patch, the Linux-specific 'run_genode_until' function uses
'wait_for_output' as it gets already used for other run targets.

Fixes #863.
2013-10-17 11:02:23 +02:00
Josef Söntgen
da2c6b62f2 core: fix iterating over trace policies
Fixes #920.
2013-10-17 11:00:23 +02:00
Martin Stein
618b83499c base: bug in copy constructor of Signal
The copy constructor of Signal did not copy the Signal::Data contents of
the copy source. This bug could survive undetected because the compiler
can optimize code in a way, that copy constructor and destructor are not
necessary when returning by value from simple functions. I assume that
it creates the object in CPU registers instead of RAM and reuses it
instead of copying it to save time. This way the bug triggered first
after wait_for_signal was changed in a way that avoided optimization.

ref #912
2013-10-16 09:26:11 +02:00
Christian Helmuth
f845be8c23 base-linux: support hybrid mode in lx_rmap test
In hybrid mode, all programs are dynamic executables and ld.lib.so is
not supported. Therefore, only the "static" variant of the test can be
build and executed.
2013-10-16 09:26:11 +02:00
Christian Helmuth
74425bd918 doc: clarify to edit build.conf after create_build_dir 2013-10-16 09:26:11 +02:00
Martin Stein
c117516296 hw: relax signal limits for resource_request test
ref #912
2013-10-16 09:26:11 +02:00
Martin Stein
f88fd35f22 hw: avoid upgrade need of 8192 in signal session
ref #912
2013-10-16 09:26:11 +02:00
Martin Stein
b5c6f2c260 hw: avoid generic exceptions in signal framework
ref #912
2013-10-16 09:26:11 +02:00
Martin Stein
bb9fa16a5e hw: throw expressive exceptions in signal session
ref #912
2013-10-16 09:26:11 +02:00
Norman Feske
04cbee4c76 terminal_mux.run: Let CLI monitor preserve RAM
This change allows for the testing of cli_monitor's automatic resource
balancing by executing the following command:

  start ram_eater --ram-limit 1G --count 5

The command starts 5 instances of a RAM-eating process, which is,
however, able to yield resources when instructed. The RAM quota for the
processes gets automatically extended because of the overly large limit
of 1 GiB, which is far more than CLI monitor's RAM resources (100 MiB).
When the RAM usage hits the preservation limit, CLI monitor broadcasts
yield requests to each ram_eater instance, which allow the scenario to
remain alive.
2013-10-16 09:26:11 +02:00
Norman Feske
11e628714d Build trace policies with -std=gnu++11 enabled 2013-10-16 09:26:11 +02:00
Martin Stein
563760eb08 base: fix bug in Object_pool::first_locked
fix #899
2013-10-16 09:26:11 +02:00
Martin Stein
0ad655f4be hw: return error code on IPC replies
ref #899
2013-10-16 09:26:10 +02:00
Martin Stein
ae76e441b1 hw: fix bug in Kernel::Thread::resume
ref #899
2013-10-16 09:26:10 +02:00
Martin Stein
b85126a638 hw: enable verbose thread starts
ref #899
2013-10-16 09:26:10 +02:00
Martin Stein
d961b9ae1e hw: enable multiple compilation units in kernel
ref #899
2013-10-16 09:26:10 +02:00
Martin Stein
0771a8e9cf launchpad: remove '\n' from PERR message
ref #899
2013-10-16 09:26:10 +02:00
Martin Stein
d6d4938916 hw: fix bug in Kernel::yield_thread
ref #899
2013-10-16 09:26:10 +02:00
Martin Stein
6912e638fb hw: kill signal receivers
ref #899
2013-10-16 09:26:10 +02:00
Martin Stein
26db598fc0 hw: cancel waiting for IPC requests
ref #899
2013-10-16 09:26:10 +02:00
Martin Stein
039bae9710 base: make FIFO elements zero-pointer save
fix #904
2013-10-16 09:26:10 +02:00
Alexander Boettcher
d1c0258301 usb: fix storage with IOMMU enabled
Fixes #747
2013-10-16 09:26:09 +02:00
Alexander Boettcher
73cff5c996 nova: don't wait for workers in cpu_session::pause
If a local thread is attempted to be 'pause'd via cpu_session, don't wait
until it gets into the recalled state. If the caller is lucky it is, if not
return only the stack pointer.

Avoids deadlocking of the gdb when attached to a process running a server.

Issue #478
2013-10-16 09:26:09 +02:00
Alexander Boettcher
d8cf17687e run: use gdb_monitor by autopilot
Issue #478
2013-10-16 09:26:09 +02:00
Alexander Boettcher
fe19103546 nova: create sm for signalling via pager
The 'pause' call on base-nova assumes that a thread can solely block in its
associated semaphore. Main reason is that so core can unblock a thread in order
that the recall exception gets delivered and the register state can be
obtained.

Unfortunately the signal session implementation creates a semaphore, which is
unknown by the pager code. Instead create the semaphore via the pager of the
thread, so that the pager can unblock the signal thread when a pause is issued.

Issue #478
2013-10-16 09:26:09 +02:00
Alexander Boettcher
816b4e0479 nova: fix thread in page fault and getting paused
If a thread caused a page fault and later on get be paused, then it left
the recall handler immediately due to the pause call instead of staying
in this handler.

Add some (complicated) state machine to detect and handle the case. Still not
waterproof, especially server threads may never get recalled if they never get
a IPC from the outside.

Fixes #478
2013-10-16 09:26:09 +02:00
Alexander Boettcher
2c983f3c89 nova: remove native_cap method from cpu_session
Remove native_cap method which caused the cpu_session implementation of the
gdb server to fail.

Issue #478
2013-10-16 09:26:09 +02:00
Alexander Boettcher
dd2e006309 nova: request native ec cap via pager
Prerequisite to get rid of the base-nova special native_cap method in
cpu_session.

Vancouver/Seoul bootstrap code gets also much simpler.

Issue #478
2013-10-16 09:26:09 +02:00
Alexander Boettcher
d3bcafc4c6 nova: support requesting multiple event portals
Enables us to request the exception handler portals at once instead each
separately.

Issue #478
2013-10-16 09:26:09 +02:00
Alexander Boettcher
c426bac8bb nova: create sm of each thread in pager
Mainly simplification of the code and getting rid of reserved (Genode) special
cap selectors in the syscall-generic.h file.

Issue #478
2013-10-16 09:26:09 +02:00
Norman Feske
a903049a1a cli_monitor: Resource-balancing support
This patch introduces new commands for dynamically balancing RAM between
subsystems. The 'status' command prints a table with the RAM status of
each subsystem. The 'ram' command changes the quota or a quota limit of
a given subsystem. The quota limit can be defined to allow the on-demand
expansion of the quota. Finally, the 'yield' command can be used to
instruct a subsystem to yield a specified amount of resources.

For trying out the new commands, a so-called 'ram_eater' example has
been added to the 'terminal_mux.run' scenario. This program simulates a
subsystem with a growing demand for resources, yet with the capability
to yield resources when instructed by the parent (i.e., cli_monitor).

Besides implementing the new features, the patch splits the
implementation of 'cli_monitor' into multiple files.
2013-10-16 09:26:09 +02:00
Norman Feske
cbdad73dd7 terminal_mux.run: LOG output of terminal_log
This patch tweaks the route of 'terminal_log' such that a LOG session
request of this program is directed to the parent rather to itself.
2013-10-16 09:26:08 +02:00
Norman Feske
baf6eab2dc terminal_mux: Add 'j' and 'k' keybindings 2013-10-16 09:26:08 +02:00
Norman Feske
d78ba43f64 Test for yielding resources 2013-10-16 09:26:08 +02:00
Norman Feske
9cf677cb0a os: Add resource balancing-support to 'Slave'
In order to be able to dynamically balance resources of slaves, we need
to provide an accessor to the slave's RAM session and a way to issue
yield requests.
2013-10-15 16:13:45 +02:00
Norman Feske
f80c0500af Test for 'Parent::resource_request' interface 2013-10-15 16:13:45 +02:00
Norman Feske
094c5211fd core: Fix off-by-one in quota check
The check was one byte too rigid. ;-)
2013-10-14 09:45:14 +02:00
Norman Feske
90aa4ef6b5 core: Don't account RAM metadata to RAM quota
The meta data for allocations should be accounted to the session quota
instead of the RAM accont managed by the session.
2013-10-14 09:45:14 +02:00
Norman Feske
61b94296b2 base: Use distinct error for ref_account mismatch 2013-10-14 09:45:14 +02:00
Norman Feske
5caed68fe4 init: Transfer slack memory to children on demand 2013-10-14 09:45:14 +02:00
Norman Feske
65c4246f95 base/env: Implementation of 'Expanding_parent' 2013-10-14 09:45:14 +02:00
Norman Feske
ae40cb545c base: Unify 'Platform_env' across platforms 2013-10-05 12:44:36 +02:00
Norman Feske
93bd4d55f8 Implement resource-balancing in parent interface 2013-10-05 12:44:35 +02:00
Norman Feske
f65606f179 Add resource-balancing support to parent interface
This is just the interface. The implementation is still missing.

Issue #887
2013-10-05 12:44:35 +02:00
Norman Feske
5befab7f3d Add 'String<SIZE>' buffer type to 'util/string.h'
The new 'String' buffer type is meant to replace the manually created
character buffers that are scattered throughout Genode. It plainly holds
a null-terminated string to be stored as a member variable (e.g., a
session label) or passed as RPC argument. It is not intended to become a
string API.
2013-10-05 12:44:35 +02:00
Stefan Kalkowski
339193a887 Linux: compile lx_hybrid_ctors test for correct ARCH
Fixes #900
2013-10-04 10:13:07 +02:00
Norman Feske
91de81a10a hello_tutorial: add missing <config> snippets
Thanks to Rudolf Weber for reporting.
2013-09-29 12:23:22 +02:00
Stefan Kalkowski
24007564bf l4lx: check for "bc" tool on prepare 2013-09-27 10:53:59 +02:00
Martin Stein
327cdfdf36 hw: always remove RM client on thread destruction
ref #589
2013-09-26 16:09:56 +02:00
Martin Stein
36111587be hw: don't use assertions in Kernel::get_thread
ref #589
2013-09-26 16:09:56 +02:00
Martin Stein
e5ea660e2e hw: enable to destruct thread after its RM client
ref #589
2013-09-26 16:09:55 +02:00
Martin Stein
d86bf3db64 hw: destruct protection domains
ref #589
2013-09-26 16:09:55 +02:00
Martin Stein
a4f52bec19 hw: enable direct unmap
ref #589
2013-09-26 16:09:55 +02:00
Martin Stein
4f4738427d hw: release pagers from faulting threads
ref #589
2013-09-26 16:09:55 +02:00
Martin Stein
c3be0b417a hw: fix bug in Kernel::Thread::crash
ref #589
2013-09-26 16:09:55 +02:00
Martin Stein
00f16be122 base: fix bug in Allocator_guard::free
ref #589
2013-09-26 15:58:05 +02:00
Martin Stein
a596fa56a6 hw: destruct scheduling contexts
ref #589
2013-09-26 15:58:05 +02:00
Martin Stein
52ec56c060 hw: destruct abstract interfaces of signal backend
ref #589
2013-09-26 15:58:05 +02:00
Martin Stein
611cd95eb3 hw: destruct IPC end-nodes
ref #589
2013-09-26 15:58:05 +02:00
Martin Stein
de87fa1b5c hw: avoid address overflow in Tlb::remove_region()
ref #589
2013-09-26 15:58:05 +02:00
Martin Stein
909c2dbc95 hw: remove note feature from IPC framework
ref #589
2013-09-26 15:58:04 +02:00
Martin Stein
349262a655 hw: handle pagefaults via IPC request/reply
ref #589
2013-09-26 15:58:04 +02:00
Martin Stein
6d03292a1e hw: destruct signal sessions
ref #589
2013-09-26 15:58:04 +02:00
Martin Stein
1571e09823 base: implement Object_pool::first_locked()
ref #589
2013-09-26 15:58:04 +02:00
Martin Stein
84c31a7ea1 hw: destruct signal receivers
ref #589
2013-09-26 15:58:04 +02:00
Martin Stein
e07781dc1c base: destruct signal receiver platform specific
This is made for future signal framework in base-hw
wich needs a platform specific hook in the signal-
receiver destruction.

ref #589
2013-09-26 15:58:04 +02:00
Martin Stein
e33ea2a8b7 hw: completely release signal-context resources
ref #589
2013-09-26 15:58:04 +02:00
Martin Stein
2223e72c7f hw: no assert checks by default, enable opt-in
fix #528
2013-09-26 15:58:04 +02:00
Martin Stein
3070af9194 hw: thread in extra header with asserts reviewed
ref #528
2013-09-26 15:58:04 +02:00
Martin Stein
1843f10c62 hw: PD in extra header with asserts reviewed
ref #528
2013-09-26 15:58:04 +02:00
Martin Stein
5f64411ad7 hw: add missing include in singleton header
ref #528
2013-09-26 15:58:04 +02:00
Martin Stein
48f831af3c hw: signal receiver in extra header without assert
ref #528
2013-09-26 15:58:04 +02:00
Martin Stein
bf37159eb9 base: provide class Genode::Fifo_element
ref #528
2013-09-26 15:58:04 +02:00
Martin Stein
9826294e6c hw: IPC node in extra header
ref #528
2013-09-26 15:58:03 +02:00
Martin Stein
01e8ee2752 hw: IRQ receiver in extra header & reviewed
ref #528
2013-09-26 15:58:03 +02:00
Martin Stein
2c357a4f04 hw: scheduler in extra header & asserts reviewed
ref #528
2013-09-26 15:58:03 +02:00
Martin Stein
4a1c218fd0 hw: object in extra header & asserts reviewed
ref #528
2013-09-26 15:58:03 +02:00
Martin Stein
e67016ca08 hw: kernel configuration in dedicated header
ref #528
2013-09-26 15:58:03 +02:00
Martin Stein
a4ab2a4f30 hw: avoid syscall fptr. array + threads can crash
ref #528
2013-09-26 15:58:03 +02:00
Martin Stein
f7fd7b0b11 hw: no assertions in pagers
ref #528
2013-09-26 15:58:03 +02:00
Martin Stein
2afa25be1d hw: no asserts in platform PD
ref #528
2013-09-26 15:58:03 +02:00
Martin Stein
36c453aa17 hw: no mandatory asserts in platform thread
ref #528
2013-09-26 15:58:03 +02:00
Martin Stein
e27c43acc0 hw: no implicit uint-to-int cast in signal submit
ref #528
2013-09-26 15:58:03 +02:00
Martin Stein
545a397fa6 hw: avoid mandatory function calls in assertions
ref #528
2013-09-26 15:58:03 +02:00
Christian Helmuth
385b7cdd31 base-linux: revised region management
Revised region management detects region conflicts by using _soft_
mappings per default. Overmapping is activated for population of managed
dataspaces only. For more information see header documentation of
base-linux/src/base/env/rm_session_mmap.cc.

Fixes #883.
2013-09-26 15:07:08 +02:00
Christian Helmuth
f763e5ec2a Move main bootstrap to platform-specific object
To prevent multiple execution of main-bootstrap, I moved the code to a
statically initialized object. The reason for this change is that
_main() is exeuted twice when starting dynamic binaries. Now, the object
is part of the base-common library which is linked with ld.lib.so.
2013-09-26 15:00:16 +02:00
Christian Helmuth
4556a9e353 Preserve thread-context area as early as possible 2013-09-26 14:42:52 +02:00
Christian Helmuth
b0559dabfc base-fiasco: check byacc installation on prepare 2013-09-26 14:28:46 +02:00
Christian Helmuth
ba8e01fda4 base-codezero: check scons and python2.6 on prepare 2013-09-26 14:28:46 +02:00
Norman Feske
b459f4384d demo.run: Don't delete 'launchpad.config'
Deleting the generated 'launchpad.config' file is a bad idea because in
contrast to most base platforms, on Linux, we merely create symlinks
from the 'var/run/demo/' directory to the 'bin/' directory instead of
copying the files.
2013-09-26 14:28:25 +02:00
Christian Helmuth
db125bad51 Increase quota of lwip_lx.run
See 33909779 for documentation.
2013-09-26 14:28:25 +02:00
Christian Helmuth
a7c5417369 base-linux: ld.lib.so loads dynamic binaries
For ARM support on N900, commit 4a9b1c6 changed the process library to
start dynamic binaries directly depending on the Linux kernel to comply
to the interp section info ("ld.lib.so"). This seems not required on
more recent platforms or kernel versions and also introduced challenging
corner cases in region handling on Linux. Therefore, this commit
restores the original behavior.
2013-09-24 09:44:32 +02:00
Norman Feske
45d0157d87 thread_join.run: Put success message on new line
This patch makes sure that a line break is printed before the test
finishes. This way, the "Test succeeded" message is printed on a new
line, which was not always the case (i.e., on Pistachio) otherwise.
2013-09-23 15:50:47 +02:00
Norman Feske
ad210e3981 Blacklist qt5_script library for now
Issue #890
2013-09-23 14:26:02 +02:00
Christian Helmuth
3620d889ac nic bridge: Increase entry-point stack size
4K stack on 32 bit does not suffice for G++ exception handling.
2013-09-23 14:26:02 +02:00
Norman Feske
c45cd8ad6e base-fiasco: Fix bug revealed by C++11 in contrib sources
The macro 'enter_kdebug' appended the 'text' argument immediately after
the '"' literal. Apparently, the old C++ standard accepted this code but
the new standard is more strict.
2013-09-23 14:26:02 +02:00
Norman Feske
9a7ed1de21 Remove Fiasco-UX input driver
The switch to C++11 breaks it. Because the driver remains unused for
years, it is not worth fixing it.
2013-09-23 14:26:02 +02:00
Norman Feske
fe0d9c0775 stdcxx: Add 'initializer_list' header of supc++
This header is needed to build icu when C++11 is enabled.
2013-09-23 14:26:02 +02:00
Christian Helmuth
5299dc4ab8 ldso: fix compiler errors with C++11
The warning

  error: expected unqualified-id before ‘STRING_USERDEF’ token

was caused by a missing whitespace in 'extern "C"int'.
2013-09-23 14:26:02 +02:00
Christian Helmuth
0d5d74fec6 netperf: enable netperf_bridge test on linux
Statically configured NIC bridge clients must be configured via
<policy...> nodes in the config. Otherwise, the bridge can't answer ARP
requests or route traffic.
2013-09-23 14:26:01 +02:00
Christian Helmuth
3056c718c8 nic bridge: connect to backend NIC on startup
After announcing the NIC service, the bridge connects to the driver to
ensure to see any incoming traffic in case the client itself only reacts
on connects from LAN (e.g., the netperf server).

Also, some styling issues were fixed.
2013-09-23 14:26:01 +02:00
Norman Feske
f1dcaa746d Enable C++11 by default 2013-09-23 14:26:01 +02:00
Alexander Boettcher
ff29f85cc9 nova: speed up cap selector allocation
Issue #485
2013-09-23 14:26:01 +02:00
Norman Feske
fb2998e534 Move generic platform_session parts to os/include
Both 'platform_session/capability.h' and 'platform_session/connection.h'
do not contain platform-specific information. By moving them from
'include/platform/imx53/platform_session/' to 'include/platform_session/',
this patch enables other platforms to reuse them.
2013-09-23 14:26:01 +02:00
Norman Feske
7f86eb3805 dde_linux: Fix MAC validity check 2013-09-23 14:26:01 +02:00
Norman Feske
c9194a2af4 attached_mmio: Support sub-page MMIO resources 2013-09-23 14:26:01 +02:00
Josef Söntgen
35118f0a32 trace: use new trace frontend in test-trace 2013-09-23 14:26:01 +02:00
Josef Söntgen
8b69d91c05 trace: method for getting buffer-wrap count 2013-09-23 14:26:01 +02:00
Norman Feske
20883c52b5 trace: Frontend for reading trace-buffer entries 2013-09-23 14:26:00 +02:00
Norman Feske
31d2730c9a dde_kit: Allow re-scheduling from timer handler
Prior this change, the attempt to re-schedule a timer from its timer
handler resulted in a clear '_pending' flag. This caused the timer event
to disappear from the scheduling queue without the handler being called
ever again. By resetting the '_pending' value before calling the hander,
we prevent a re-scheduled '_pending' flag to be cleared immediately
after calling the handler.
2013-09-23 14:26:00 +02:00
Norman Feske
0f663991c1 base-hw: Pic::mask for rpi 2013-09-23 14:26:00 +02:00
Norman Feske
33305dd08d Fix usb_storage.run for non-PC platforms
On non-PC platforms, the variable 'build' remains undefined, which lets
the 'build $build' step fail. Use the traditional 'build_components'
variable instead. As a further plus, this avoids multiple passes of the
build system.
2013-09-23 14:26:00 +02:00
Christian Helmuth
9f3c4c227e Put entry point at start of text segment / binary
Fixes #881.
2013-09-23 14:26:00 +02:00
Ivan Loskutov
0553490c9c libport: Fix download location of Mesa
Fixes #839
2013-09-23 14:26:00 +02:00
Christian Prochaska
eeacc5a297 Noux: register inherited file descriptors
With this patch, a Noux process registers all inherited open file
descriptors in its local libc file descriptor registry at program start.

Fixes #882.
2013-09-23 14:26:00 +02:00
Christian Prochaska
9370ba160b Noux: increase entrypoint stack size
Needed to run Noux built with -O0

Fixes #880.
2013-09-23 14:26:00 +02:00
Christian Prochaska
b0bfe6bfa7 base-linux: fix ELF dataspace execution
With this patch, if an ELF dataspace to be executed does not have a path
in the host file system, the dataspace content gets copied into a
temporary file whose path can be given to 'execve()'.

Fixes #879.
2013-09-23 14:26:00 +02:00
Norman Feske
29eeedf064 launchpad: Update config syntax, remove defaults
This patch updates the launchpad config to use XML attributes and
removes the built-in default configuration (which is only meaningful
for demo.run anyway).
2013-09-23 14:25:59 +02:00
Norman Feske
6cd5407ed9 nitpicker: Dynamic config of session policies 2013-09-23 14:25:59 +02:00
Norman Feske
6575856624 os: Split Session_label from Session_policy
By splitting Session_policy into two classes, we make it more flexible.
Originally, the constructor accepted solely an args string, which made it
unusable for situations where we already have extracted the session
label (e.g., stored in the session meta data of a server). Now, the
extraction of the label from the args string is performed by the new
Session_label class instead, which, in turn, can be passed to the
constructor of Session_policy.

This change causes a minor API change. The following code

  Session_policy policy(session_args);

Must be turned into

  Session_label  label(session_args);
  Session_policy policy(label);
2013-09-23 14:25:59 +02:00
Norman Feske
f371aef346 nitpicker: Use server skeleton library 2013-09-23 14:25:59 +02:00
Norman Feske
518a71ccf5 nitpicker: Simplify internal file structure 2013-09-23 14:25:59 +02:00
Norman Feske
602e36394d nitpicker: New signal handling, bg color config
This patch overhauls the signal handling of nitpicker to clear the way
towards dynamic reconfiguration. Furthermore, it moves the
implementation of the global-keys handling and input utilities to
separate files.
2013-09-23 14:25:59 +02:00
Norman Feske
430582c060 nitpicker: Remove local list.h 2013-09-23 14:25:59 +02:00
Norman Feske
74242c0906 nitpicker: Remove local string.h 2013-09-23 14:25:59 +02:00
Norman Feske
a6c019e0c6 nitpicker: Remove unmaintained TODO file 2013-09-23 14:25:59 +02:00
Norman Feske
ab3bc1bb58 nitpicker: Use signals for main loop 2013-09-23 14:25:58 +02:00
Norman Feske
fa34b79b2c nitpicker: Add const qualifiers 2013-09-23 14:25:58 +02:00
Norman Feske
7e35388336 os: Skeleton for server implementations 2013-09-23 14:25:58 +02:00
Norman Feske
94bcd3f1bf os: New Signal_rpc_dispatcher utility
The so-called Signal_rpc_dispatcher delegates the handling of signals to
the context of an RPC entrypoint.
2013-09-23 14:25:58 +02:00
Norman Feske
8243329ad4 os: Move Genode::Config into 'config' library
Originally, the convenience utility for accessing a process
configuration came in the form of a header file. But this causes
aliasing problems if multiple compilation units access the config while
the configuration gets dynamically updated. Moving the implementation of
the accessor to the singleton object into a library solves those
problems.
2013-09-23 14:25:58 +02:00
Norman Feske
a1effc5ad8 make Attached_ram_dataspace::local_addr const 2013-09-18 14:58:55 +02:00
Norman Feske
4b4ba30498 base: Make Signal_receiver noncopyable
This change prevents accidental copying of signal receivers via a
compile error.
2013-09-18 14:58:55 +02:00
Norman Feske
21462cdbd2 base: Add const qualifiers to 'util/list.h'
This patch adds support for iterating through a const list. This allows
users of lists to be more rigid with regard to constness. Furthermore,
the patch adds the function 'List::insert_at' for inserting an element
at a specified position. By adding this function, we can remove code
duplication in nitpicker.
2013-09-18 14:58:55 +02:00
Norman Feske
664aff2a56 os: Add const qualifiers to blit library 2013-09-18 14:58:55 +02:00
Norman Feske
690fc51fad Minor comment fix 2013-09-18 14:58:54 +02:00
Norman Feske
20daeb6d16 nitpicker: Support for global keys 2013-09-18 14:58:54 +02:00
Norman Feske
afbd7ea50e Reflection support for input/keycodes.h
To enable the specification of key names in configuration files parsed
at runtime, we need the association between key-code values and their
respective names.
2013-09-18 14:58:54 +02:00
Alexander Boettcher
380aa387d4 Adjust tcp_terminal quota
Nic_bridge requires more memory.
2013-09-18 14:58:54 +02:00
Alexander Boettcher
8ca068be43 noux: implement some libc dummy function
and quieten some noisy messages in non-verbose mode

Issue #485
2013-09-18 14:58:54 +02:00
Alexander Boettcher
94bce1425e noux: avoid 'no attachment at 0' messages
binary_ds cap is attempted to free up twice by
_root_dir->release(_name, _binary_ds) in ~Child de-constructor and by
Static_dataspace_info _binary_ds_info de-constructor.

This commit keeps all binary related information inside a struct which gets
freed up after all noux session book keep cleaning is done.

Issue #485
2013-09-18 14:58:54 +02:00
Alexander Boettcher
73bfdb8bb8 noux: fix deadlock during destruction
Issue #485
2013-09-18 14:58:54 +02:00
Alexander Boettcher
71aacd7ed8 noux: first remove from list, then dissolve
Avoids deadlock - which is out of the list can't be found twice to be deleted.

Issue #485
2013-09-18 14:58:54 +02:00
Alexander Boettcher
7c591a8151 noux: lock region list
Issue #485
2013-09-18 14:58:54 +02:00
Alexander Boettcher
bbb9c6daec noux: avoid dangling pointer
Issue #485
2013-09-18 14:58:54 +02:00
Norman Feske
78c8145d9b base-hw: Define CACHE_LINE_SIZE_LOG2 for rpi 2013-09-18 14:58:54 +02:00
Christian Helmuth
46ee8241b4 thread: convenience trace methods
Implementation of declared trace methods for (null-temrinated) C string
and character buffer with given length.
2013-09-06 16:24:48 +02:00
Christian Helmuth
4febaff66e netperf: netperf w/ static ip address on linux
The netperf test configures the target Genode system for with
10.0.2.55/24. Also, nic_drv on base-linux uses the virtual ethernet
device 'tap0', which must be configured for the test user and network
address 10.0.2.1/24 on the test host like follows.

  tunctl -t tap0 -u <user running test>
  ip address add 10.0.2.1/24 dev tap
  ip link set tap0 up
2013-09-06 15:05:38 +02:00
Norman Feske
d4c8b41bcc File permissions for os/run/framebuffer.run 2013-09-06 12:16:38 +02:00
Christian Prochaska
82111227d6 libc: set 'errno' for invalid file descriptors
Fixes #877.
2013-09-06 11:28:11 +02:00
Norman Feske
3d5f77599f Adjust nic_bridge quota for netperf tests 2013-09-06 11:24:38 +02:00
Norman Feske
7cbec0e915 Adjust nic_bridge quota in noux_net_netcat.run 2013-09-06 11:23:07 +02:00
Norman Feske
7b3dd51771 Blacklist noux_tool_chain run scripts on Linux 2013-09-06 11:13:19 +02:00
Norman Feske
47bb7da22f seoul: Improve boot-module error messages 2013-09-05 12:28:54 +02:00
Norman Feske
24e2310c36 seoul: Adjust nic_bridge quota 2013-09-05 12:28:48 +02:00
Christian Prochaska
33e176312e run: make 'is_qemu_available' return false for Linux
Fixes #862.
2013-09-04 22:44:37 +02:00
Christian Prochaska
5b8965cde9 GDB monitor: move GDB commands into separate file
This patch moves the GDB commands to set a breakpoint in the 'main()'
function into a separate file that can be included from other run scripts.

Fixes #876.
2013-09-04 22:43:47 +02:00
Christian Prochaska
3ca14f53fe Noux GDB: resolve '..' in run script
If the path of a Genode source file (as extracted from the binary test
application) contains a part like '/a/b/../' where '/a' exists, but '/a/b'
does not exist anymore, 'tar' complains. With this patch, the run script
normalizes the path before calling 'tar'.

Fixes #875.
2013-09-04 22:43:29 +02:00
Norman Feske
58b8e766d1 tool/run: Whitespace 2013-09-04 22:37:06 +02:00
Norman Feske
511a655efb init: Do not abort on invalid (re-)configurations 2013-09-04 22:37:06 +02:00
Norman Feske
cc975f26c4 ldso.run: Do not match escape sequences
Color escape sequences do not need to be considered when using
grep_output in run scripts.
2013-09-04 22:37:06 +02:00
Norman Feske
339097792c lwip.run: Increase quote of test-lwip_httpsrv
Adaptation to the recent increase of the NIC session quota.
2013-09-04 22:37:06 +02:00
Christian Helmuth
8707771d35 pingpong: fix compiler warnings 2013-09-04 12:14:22 +02:00
Christian Helmuth
989e880c69 lwip: remove redundant function declaration 2013-09-04 12:14:22 +02:00
Norman Feske
01c5226ef1 tool/run: Let grep_output strip colors from output 2013-09-04 12:06:35 +02:00
Christian Prochaska
5059f2e0b6 usb_drv: initialize '_tx_alloc' variable
Fixes #867.
2013-09-02 19:44:19 +02:00
Christian Prochaska
3cb6dba572 lwip: fix thread reset value in 'sys_arch_unprotect()'
Fixes #866.
2013-09-02 19:44:03 +02:00
Christian Prochaska
3e8e55ec16 CPU affinity configuration fixes
- if no affinity was set for a new thread before calling
  Cpu_session::start(), the CPU session's affinity gets set for this
  thread
- documentation fix: <affinity_space> -> <affinity-space>

Fixes #873.
2013-09-02 19:43:36 +02:00
Josef Söntgen
2501cb189e core: explicitly throw Out_of_metadata
In case there is not enough quota left to create the trace buffer
or trace policy dataspace throw Out_of_metadata explicitly instead
of rethrowing the Ram_session::Quota_exceeded exception. Now one
can catch Trace::Out_of_metadata exception in a client application.

In addition fix Allocator_guard::withdraw() checks because this
method does not throw any exceptions and a failed withdrawal goes
unoticed.

Fixes #871.
2013-09-02 19:43:00 +02:00
Stefan Kalkowski
ca0f677da9 Increase default NIC session's queue size (fix #870) 2013-09-02 19:42:26 +02:00
Stefan Kalkowski
6484edb657 nic_bridge: cache card's MAC address (Fixes #869) 2013-09-02 19:42:06 +02:00
Christian Prochaska
26ba81175b lwip: add checksum options to 'lwipopts.h'
This patch adds some of lwip's checksum calculation options to the
Genode-specific 'lwiptops.h' configuration file. The checksum calculations
are enabled by default.

Fixes #868.
2013-09-02 19:41:48 +02:00
Martin Stein
2e087bf4a9 tool/run: cancel 'run_genode_until forever'
Enables the user to cancel run scripts in
'run_genode_until forever' via 'ctrl+c'.

fix #826
2013-08-30 13:38:49 +02:00
Stefan Kalkowski
4254cb04e1 Reduce IPC with timer service in timed semaphore
Instead of using msleep to sleep periodically, and then increase jiffies
counter in the alarm scheduler implementation of the timed semaphore
use the 'trigger_periodic' call introduced by the change of the timer session
interface into an asynchronous one. Thereby, we can reduce the necessary IPC
communication with the timer service effectively.

Ref #35
2013-08-30 13:38:21 +02:00
Alexander Boettcher
7dfab657b2 vesa: avoid concurrent access by acpi driver
Issue #843
2013-08-30 13:37:26 +02:00
Josef Söntgen
d2f7c7bec4 os: reenable -fPIC and fix policy linkerscript
As it turns out using -fPIC was not the issue but discarding certain
sections. The policy_module_table is now located in .data.rel which
needs to be at the beginning of the binary.

Fixes #849.
2013-08-30 13:36:25 +02:00
Stefan Kalkowski
5afb5fcc12 Explicitly specify compile rule for tracing policy
Otherwise we might get conflicts e.g. like -fPIC flag on Fiasco.OC platform.

Fixes #849
2013-08-30 13:36:01 +02:00
Alexander Boettcher
35a96e1101 acpi: parse RMRR structures and print DMA regions
The regions reported by the RMRR structure are used by legacy devices for DMA
requests. Theses would need to be added to the device_pd to avoid DMAR faults
when used in legacy mode.

For now parse and print them, so that one has a clue about why we get DMAR
faults.

Issue #683
2013-08-30 13:34:14 +02:00
Alexander Boettcher
b142939d14 usb: fix usb stack when used with IOMMU
Fixes #683
2013-08-30 13:34:01 +02:00
Alexander Boettcher
39f32b5bd6 device_pd: survive failing attachment request
Be more robust. If the attachment fails continue to operate and just print a
error message. Before the commit the device_pd stopped to operate if an
attachment did not succeed.

Issue #683
2013-08-30 13:33:44 +02:00
Josef Söntgen
82eb5e4323 base: only commit useful trace events
If the length of a trace event entry is zero it should be ommitted.

Fixes #851.
2013-08-30 13:32:06 +02:00
Stefan Kalkowski
ae87f50ce3 Implement timestamp function for tracing for ARM
Use Armv7 performace counters for this.

Fixes #850
2013-08-30 13:31:47 +02:00
Martin Stein
eee671233c autopilot: add test of MMIO framework
ref #853
2013-08-30 13:29:44 +02:00
Martin Stein
d4e435d732 mmio: provide bitsets and test them
fix #853
2013-08-30 13:29:22 +02:00
Martin Stein
e272264cb2 regulator & arndale: prevent invalid array index
fix #831
2013-08-30 13:28:12 +02:00
Martin Stein
8188e85691 mmio: interpret read-verbosity switch
fix #825
2013-08-30 13:27:41 +02:00
Martin Stein
0bbfa3a501 ffat: require prepare_ffat if ffat not prepared
fix #534
2013-08-30 13:27:18 +02:00
Stefan Kalkowski
b3dd45942e usb_drv: change Driver_context to Signal_dispatcher
Fixes #861
2013-08-30 13:26:29 +02:00
Josef Söntgen
c437255d96 libports: remove right files when cleaning libc
Only the directories and files which were created in the first place
by the libc port should be removed. Thereby ignore the exit code of
the find command to prevent GNUmake from stopping its execution.

Fixes #841.
2013-08-30 13:26:14 +02:00
Alexander Boettcher
b1fe2b5ab9 acpi: skip parameters of DefName
Fixes #415
2013-08-30 13:23:28 +02:00
Christian Prochaska
a0a91475d1 dde_linux: remove superfluous 'msleep()' calls
Fixes #860.
2013-08-30 13:21:17 +02:00
Josef Söntgen
d967be473a base: fix pausing tracing subjects
Fixes #858.
2013-08-29 15:41:40 +02:00
Alexander Boettcher
77fe612adb base: fix thread_cap initialization
Fixes #842
2013-08-29 15:41:04 +02:00
Christian Helmuth
42739de9fd foc: print line numbers in decimal on assert 2013-08-27 16:06:53 +02:00
Martin Stein
0d803266ea hw: touch kernel scheduler and timer less often
fix #857
fix #855
2013-08-27 16:04:10 +02:00
Martin Stein
d0eaca9915 hw: don't unmask timer IRQ on any kernel pass
ref #855
2013-08-23 11:25:18 +02:00
Martin Stein
cbd1464ee3 hw: fix in signal-ack handling in kernel
ref #574
2013-08-23 11:23:47 +02:00
Martin Stein
fa047f4dda signal test: let sender yield CPU when idle
ref #574
2013-08-23 11:23:47 +02:00
Alexander Boettcher
bab1663ea2 ldso: be quiet by default 2013-08-22 15:13:12 +02:00
Alexander Boettcher
773b0ecc3d noux: add verbose config parameter
Explicitly enable verbose output if required.
2013-08-22 15:13:12 +02:00
Alexander Boettcher
c0c3b48357 terminal: refresh only if output changed 2013-08-22 15:13:12 +02:00
Alexander Boettcher
9cf315b37e noux: start time measuring with first noux output
Don't account the boottime to the actual compile time - since it varies quite
a lot if somebody else utilize the network with lwip tests for example ;-).
2013-08-22 15:13:12 +02:00
Alexander Boettcher
1df1611f45 run: support target serial for base-nova
Issue #683
2013-08-22 15:13:12 +02:00
Alexander Boettcher
6dd6525b48 seoul: support headless mode
+ run kernelbuild in headless mode, output dumped via serial output
2013-08-22 11:33:10 +02:00
Alexander Boettcher
6d5a66d8e7 seoul: refresh console only if required
Speeds up kernelbuild by over 35% !!!
2013-08-22 11:33:00 +02:00
Alexander Boettcher
90823eaf1d run: remove files of seoul-auto script 2013-08-22 09:03:29 +02:00
Christian Helmuth
a478213872 pci: no parsing errors if no config file 2013-08-19 10:59:50 +02:00
Christian Helmuth
338c49da23 vesa: fix error message (interval display) 2013-08-19 10:33:29 +02:00
Norman Feske
ef1cd4a276 News item for Genode 13.08 2013-08-15 12:05:39 +02:00
Norman Feske
d13605a9a3 Release notes for version 13.08 2013-08-15 12:05:39 +02:00
Norman Feske
3d42cb0693 doc/getting_started.txt: Mention VESA driver 2013-08-15 12:03:54 +02:00
Norman Feske
a652cb5110 Apply affinity subspacing to session requests 2013-08-15 09:22:50 +02:00
Josef Söntgen
a4066c358e Add trace points (RPC and signal) 2013-08-15 09:22:50 +02:00
Josef Söntgen
17eb342156 os: example trace policy-modules 2013-08-15 09:22:50 +02:00
Alexander Boettcher
baa55dabc4 seoul: add kernelbuild run script 2013-08-15 09:22:49 +02:00
Christian Prochaska
97374cf57e ldso: increase 'MEM_SIZE' in 'mmap()'
Fixes #838.
2013-08-15 09:22:49 +02:00
Christian Prochaska
d39dfef98f Qt: fix examples
With this patch, the 'textedit' example can run on base-linux again and
'qt_lauchpad' contains only runnable launch entries.

Fixes #837.
2013-08-15 09:22:49 +02:00
Christian Prochaska
d47468c005 Qt4: fix download location
Fixes #836.
2013-08-15 09:22:49 +02:00
Christian Prochaska
7f7c24fcc9 Pistachio: tell the compiler about 'edi' changes
Syscall binding functions which use '__L4_INDIRECT_CALL' need to tell the
compiler that the 'edi' register gets modified. Since 'edi' is an input
operand and input operands may not get added to the clobber list, this
patch defines 'edi' also as an output operand instead.

Fixes #834.
2013-08-15 09:22:49 +02:00
Stefan Kalkowski
3a6f639df8 Fix network_test run scripts for recent changes
Fix #833
2013-08-15 09:22:49 +02:00
Stefan Kalkowski
55e1c16c98 ports: enable re-preparation of contrib code
Avoid warnings of missing patches directory

Fixes #832
2013-08-15 09:22:49 +02:00
Norman Feske
0c22f3da75 doc: Update components.txt and top-level README 2013-08-15 09:22:48 +02:00
Norman Feske
7972e4587b qt5: hook for selectively inhibiting qt5 builds 2013-08-15 09:22:48 +02:00
Alexander Boettcher
ed3187aa74 seoul: add invalid guest state handling 2013-08-15 09:22:48 +02:00
Alexander Boettcher
e349c29736 seoul: add test for native runs
and add to autopilot list.
2013-08-15 09:22:48 +02:00
Alexander Boettcher
35f9ceb7ba seoul: fix run script issues 823 and 824
Fix #823
Fix #824
2013-08-15 09:22:48 +02:00
Alexander Boettcher
4474e9d6d6 seoul: add intel82576vf for 64bit 2013-08-15 09:22:48 +02:00
Alexander Boettcher
0654877392 seoul: update to recent seoul branch
Required to use intel82576vf in 64bit host mode
2013-08-15 09:22:48 +02:00
Alexander Boettcher
009adff441 seoul: fix region conflicts
At least 64bit Seoul dies with Region_conflict reliable and reproducible.

When during startup of Seoul some Genode code (caused by executing some
constructors) try to attach a region, the region manager code in the rm_session
will try to place the attachment at the smallest large enough aligned free
virtual region.

For now, I observed one attachment causing trouble (but not knowing who causes
this - it does also not really matter). The questionable region is 0x4000 of
size for 32bit and 0x8000 of size for 64bit.

To steer the region manager a bit, we try now following trick:

With this commit the load address of the binary for 32 and 64 bit is moved
close to the end of the virtual address space, but leaving enough free virtual
space for the above observed attachment (and a bit more).

The region manager code now will try to fill up the virtual region behind
the binary up to the end of the virtual address space, effectively letting the
lower virtual region untouched - hopefully.

Works for now, but it will break again - for sure.

Fixes #519
2013-08-15 09:22:48 +02:00
Josef Söntgen
32e3eee48c linux: add expanding Cpu_session_client 2013-08-15 09:22:48 +02:00
Norman Feske
149356f7ab core: TRACE service interface and implementation 2013-08-15 09:22:47 +02:00
Norman Feske
fe4a6d7d81 base: User-level tracing support 2013-08-14 18:43:19 +02:00
Norman Feske
a2b15349fd base: Add tracing support to CPU session interface 2013-08-13 17:27:40 +02:00
Christian Prochaska
f0b5c5eca5 Rename 'oss_drv' to 'audio_out_drv'
Fixes #829.
2013-08-13 17:27:40 +02:00
Sebastian Sumpf
a125f7179e foc: Fix interrupt-mode handling on x86
Set level/edge high/low values correctly.

Fixes issue #830
2013-08-13 17:27:40 +02:00
Sebastian Sumpf
258c74db59 base-foc: Checkout license file from TUDOS repo 2013-08-13 17:27:40 +02:00
Christian Prochaska
7b54eaaee1 libports: add Qt5
Fixes #345.
2013-08-13 17:27:40 +02:00
Christian Prochaska
572592b0f3 qt4: require 'qt4_deprecated' SPECS variable
To avoid build conflicts with Qt5, with this patch, 'qt4_deprecated' needs
to be added to the 'SPECS' variable (in specs.conf) when building for Qt4.

Issue #345.
2013-08-13 17:08:26 +02:00
Christian Prochaska
5b0a8e54f9 ldso: increase size of managed ELF dataspace
The size needs to be increased for Qt5 libraries.

Issue #345.
2013-08-13 17:08:26 +02:00
Christian Prochaska
fd11bd489e base: increase maximum file name length
This patch increases the maximum file name length to support
'qt5_qnitpickerviewwidget.lib.so'.

Issue #345.
2013-08-13 17:08:26 +02:00
Christian Prochaska
58e8481793 Implement more 'pthread' functions.
Issue #345.
2013-08-13 17:08:26 +02:00
Martin Stein
bb00aebc9e hw & signal: consider initial SLAB blocks
By now Signal_session_component has allocated initial SLAB
blocks in constructor, wich crashed with the root
components assumptions about the RAM quota needs of
session creation. Thus, if the background allocator was already
exhausted from component allocation the session was created
with broken initial SLAB blocks.

fix #574
2013-08-13 17:08:26 +02:00
Josef Söntgen
9b28395f0d noux: construct new child only if binary is valid
If a script is executed which uses a interpreter that does not exist the
construction of the child fails and potentially leaks memory because the
wrong delete operator is called.
Therefore the binary dataspace of the script and the binary dataspace of
the interpreter are now checked before a new child will be created.

Fixes #812.
2013-08-13 17:08:26 +02:00
Christian Prochaska
3ec16da03f libports: add ICU library
The ICU (International Components for Unicode) library is needed for Qt5.

Fixes #828.
2013-08-13 17:08:26 +02:00
Christian Prochaska
6741af07aa stdcxx: create 'typeinfo' symlink
The 'typeinfo' header file is needed by the ICU library.

Issue #828.
2013-08-13 17:08:26 +02:00
Norman Feske
c4627fab44 Update os/doc/init.txt with affinity information 2013-08-13 17:08:25 +02:00
Norman Feske
35723d813d core: evaluate CPU session affinity argument 2013-08-13 17:08:25 +02:00
Norman Feske
5ec07614e8 init: Read affinity assignments from config
The assignment of affinities consists of two parts, the definition
of the affinity space dimensions as used for the init process, and
the association sub systems with affinity locations (relative to the
affinity space). The affinity space is configured as a sub node of the
config node. For example, the following declaration describes an
affinity space of 4x2:

<config>
  ...
  <affinity_space width="4" height="2" />
  ...
</config>

Subsystems can be constrained to parts of the affinity space using
the '<affinity>' sub node of a '<start>' entry:

<config>
  ...
  <start name="loader">
    <affinity xpos="0" ypos="1" width="2" height="1" />
    ...
  </start>
  ...
</config>
2013-08-13 17:08:25 +02:00
Norman Feske
9111f060f5 Shortcut for 'Xml_node::Attribute::value()'
Also provide accessor function 'has_attribute'.
2013-08-13 17:08:25 +02:00
Norman Feske
fd95637289 Interface for setting CPU connection affinity 2013-08-13 17:08:25 +02:00
Alexander Boettcher
2e6504df62 run: disable libc_ffat test for some qemu versions
Disable qemu version known to be not working with the atapi driver.

Issue #827
2013-08-13 17:08:25 +02:00
Alexander Boettcher
6c994d19fe lwip: use alignment solely of 4
Temporarily 64bit fix for issue #817.
2013-08-13 17:08:25 +02:00
Norman Feske
6d837c9e26 Attach affinity information to session requests
This patch extends the 'Parent::session()' and 'Root::session()'
functions with an additional 'affinity' parameter, which is inteded to
express the preferred affinity of the new session. For CPU sessions
provided by core, the values will be used to select the set of CPUs
assigned to the CPU session. For other services, the session affinity
information can be utilized to optimize the locality of the server
thread with the client. For example, to enable the IRQ session to route
an IRQ to the CPU core on which the corresponding device driver (the IRQ
client) is running.
2013-08-13 17:08:25 +02:00
Alexander Boettcher
f1af8e371d nova: unify code for normal and server threads 2013-08-13 17:08:25 +02:00
Norman Feske
5fe29e8e4a Express affinities via Cartesian coordinates
This patch introduces new types for expressing CPU affinities. Instead
of dealing with physical CPU numbers, affinities are expressed as
rectangles in a grid of virtual CPU nodes. This clears the way to
conveniently assign sets of adjacent CPUs to subsystems, each of them
managing their respective viewport of the coordinate space.

By using 2D Cartesian coordinates, the locality of CPU nodes can be
modeled for different topologies such as SMP (simple Nx1 grid), grids of
NUMA nodes, or ring topologies.
2013-08-13 17:08:24 +02:00
Alexander Boettcher
fa7329a3e6 run: remove duplicated include in seoul-fancy
Fixes #820
2013-08-13 17:08:24 +02:00
Alexander Boettcher
70d0b00dde nova: update to kernel revision r3
r3 contains the recent Nova upstream kernel version plus the Genode specific
extensions and changes as known from r2.

Additionally, the r3 branch

* contains the assign_pci patch now directly,
* adds support for cross CPU IPC,
* fixes some issues with freeing up kernel memory part of r2 and
* update the documentation a bit.

Fixes #814
2013-08-13 17:08:24 +02:00
Alexander Boettcher
071ca39407 run: make bomb test ready for auto tests 2013-08-13 17:08:24 +02:00
Alexander Boettcher
2e58428b51 run: Rpc_entrypoint test running on multiple CPUs
Add run script to autopilot list

Issue #814
2013-08-13 17:08:24 +02:00
Alexander Boettcher
9e8255948d base: add affinity to rpc_entrypoint constructor
Issue #814
2013-08-13 17:08:24 +02:00
Alexander Boettcher
0e83b0b093 nova: create core threads on boot cpu
The boot CPU is not necessarily 0 as currently assumed for base-nova.
Replace all hard coded values by the actual boot cpu number.

Issue #814
2013-08-13 17:08:24 +02:00
Alexander Boettcher
0079179f05 base: store initial ax and di registers in crt0.s
The values are used by a follow up commit by nova to get the boot CPU number.

Issue #814
2013-08-13 17:08:24 +02:00
Alexander Boettcher
fdaeda47bb run: extend affinity test
* read out supported number of CPUs
* start per CPU a thread
* monitor by main thread liveness of remote CPU threads
* add a round variable
* terminate run script after a specific round or after 90s
* on qemu wait 5 rounds, on native runs 40

Add run script to autopilot list

Issue #814
2013-08-13 17:08:24 +02:00
Alexander Boettcher
683832f461 base: avoid deadlock if invalid object is called
This avoids a deadlock if during issuing a printf the low level IPC fails.
. Printf uses an address space local lock and if we are trying again
to make a printf we deadlock forever ...
2013-08-13 17:08:23 +02:00
Alexander Boettcher
4e47cd2568 nova: catch exception when leaving thread::entry()
Catch exceptions and try to make a printf. If this also fails, catch
it and die causing some noise output in core to detect the situation.
2013-08-13 17:08:23 +02:00
Alexander Boettcher
8655b58953 nova: show client name for unhandled page faults
This patch eases debugging.
2013-08-13 17:08:23 +02:00
Alexander Boettcher
4e2e79bf4f nova: create pager/server thread on specific cpus
issue #814
2013-08-13 17:08:23 +02:00
Alexander Boettcher
4ae1faf14d base: add affinity support to pager construction
Propagating the affinity information is needed to allow for assigning
a pager thread that is local to the CPU of the to-be-created thread.

issue #814
2013-08-13 17:08:23 +02:00
Alexander Boettcher
e171683b8c nova: support setting affinity via cpu session
issue #814
2013-08-13 17:08:23 +02:00
Alexander Boettcher
435b8dd252 foc: determine number of CPUs
Issue #814
Fixes #578
2013-08-13 17:08:23 +02:00
Alexander Boettcher
1a82b664ef nova: determine number of CPUs
Issue #813
2013-08-13 17:08:23 +02:00
Josef Söntgen
b5739fc520 ports: add grep and sed to noux_tool_chain
Fixes #821
2013-08-13 17:08:23 +02:00
Josef Söntgen
5cf4e323c5 Noux: add noux-pkg/grep 2013-08-13 17:08:22 +02:00
Josef Söntgen
2aafc9d4e6 Noux: add noux-pkg/sed 2013-08-13 17:08:22 +02:00
Sebastian Sumpf
8f3413f487 usb_drv: Fix USB storage for x86 on hardware
Also fix 'usb_storage.run' for x86

Fixes #822
2013-08-13 17:08:22 +02:00
Norman Feske
956cab5fdb noux: Keep track of how dataspaces are used
This patch eliminates the "no attachment at..." warnings, which
were caused by a use-after-free problem of dataspaces. When a
dataspace was destroyed, the users of the dataspace were not
informed and therefore could not revert possible attachments to
RM sessions. The fix introduces a callback mechanism that allows
dataspace users (i.e., RM regions) to register for the event that
a dataspace vanishes.

The following types of dataspaces are handled:
* RAM dataspaces
* ROM dataspaces
* The process binary
* The binary of the dynamic linker
* Args dataspace
* Sysio dataspace
* Env dataspace
* managed RM dataspaces

The handling of ROM dataspaces is still not complete. When forking,
the ROM dataspace of the parent process gets just reused without
creating proper meta data ('Dataspace_info') for the forked process.
Similar issues might arise from other special dataspaces (e.g.,
args, env, sysio).

This patch removes all "no attachment at..." warnings except for
one (an attachment at 0).

Issue #485
2013-08-06 17:40:10 +02:00
Sebastian Sumpf
959282403c l4linux: Update to L4Linux l4box 3.9.0-l4-svn37
This is the Genode side of the L4Linux update to r37. I also moved L4Linux
sources to GitHub.

Issue #819
2013-08-06 17:40:10 +02:00
Sebastian Sumpf
7a4f98f2ed foc: SVN revision r56
Genode side of the update.

Issue #819
2013-08-06 17:40:10 +02:00
Christian Prochaska
dc177e037d bash: don't call 'check_dev_tty()'
The 'check_dev_tty()' function calls 'ttyname()', which calls the pthread
stub function 'pthread_main_np()', which prints a 'not implemented'
message. Calling 'check_dev_tty()' doesn't seem to be necessary, so this
patch removes the call.

Issue #815.
2013-08-05 15:18:03 +02:00
Christian Prochaska
adf895acad Print pthread stub messages to Genode log console
With this patch, the 'not implemented' messages of the pthread function
stubs always get printed to the Genode log console instead of stdout.

Issue #815.
2013-08-05 15:17:42 +02:00
Alexander Boettcher
9b6d37649b run: restrict noux-auto to platforms known to work
* add to autopilot list

Issue #591
2013-08-05 15:16:11 +02:00
Alexander Boettcher
01d267e551 noux: calculate rm::attach parameters correctly
Previous commit denies the creation of regions larger then the dataspace.
Noux does it by setting the default size to the dataspace size without
subtracting the offset.

Fixes #591
2013-08-05 15:15:56 +02:00
Alexander Boettcher
717be91e16 base: deny region creation exceeding size of a ds
The rm_session implementation expects that offset + size must be
part of one dataspace. Unfortunately the parameters are not checked
properly during an rm::attach.

During an detach memory behind the actual region can be unmapped by such
bogus region entries.

Issues #591
2013-08-05 15:15:40 +02:00
Christian Prochaska
09049278a6 Round up RM session size to page granularity
Since RM sessions can be used as dataspaces and dataspace sizes are
supposed to have page granularity, RM session sizes should have page
granularity, too.

Fixes #799.
2013-07-18 11:56:44 +02:00
Alexander Boettcher
b1cb1ceaf9 seoul: fix disc boot
Additionally use the block session interface asynchronously to let the VM
continue execution.

Fixes #806
2013-07-18 11:55:18 +02:00
Alexander Boettcher
b9449a4279 seoul: fix console output in vga text mode
Issue #806
2013-07-18 11:55:18 +02:00
Alexander Boettcher
b4283c9121 seoul: use utcb guard
Forgetting to restore the old utcb content results in hard to debug bugs.
Save only the amount of word items which are actually on the UTCB.

Issue #806
2013-07-18 11:55:18 +02:00
Alexander Boettcher
b9e48e94ec seoul: catch exception during block session creation
Leads to invalid utcb state and later on to invalid vCPU state.

Issue #806
2013-07-18 11:55:18 +02:00
Alexander Boettcher
8afcbce01e seoul: implement heap_free
Avoids the message

cxx: operator delete (void *) called - not implemented. A working implementation is available in the 'stdcxx' library

during a " new ..." which causes exceptions. Happens for seoul in disk.cc

Issue #806
2013-07-18 11:55:17 +02:00
Alexander Boettcher
4e8d0618bb seoul: split vancouver run script into smaller ones
Issue #806
2013-07-18 11:55:17 +02:00
Alexander Boettcher
ff0eb93569 run: dump output of noux_net_netcat
Issue #742
2013-07-16 17:26:55 +02:00
Alexander Boettcher
61a3f8c2af pistachio: exclude io memory from ram allocator
Fixes #798
2013-07-16 16:23:49 +02:00
Alexander Boettcher
5094b79a31 pistachio: return kip structure from get_kip
to avoid lot of unnecessary casts afterwards

Issue #798
2013-07-16 16:23:49 +02:00
Josef Söntgen
505f4290ec base: activate Rpc_entrypoint explicitly in dtor
The Rpc_exit call is delivered via RPC which results in a deadlock
if the Rpc_entrypoint has not been started yet. To prevent this
situation we active the Rpc_entrypoint explicitly before we call
Rpc_exit.

Fixes #811.
2013-07-16 12:32:29 +02:00
Stefan Kalkowski
a341f744ce Cortex A15: temporarily remove -mcpu switch again
Make compiler stop complaining about every compilation unit.

Fixes #810.
2013-07-16 12:29:47 +02:00
Sebastian Sumpf
dae8ca2952 usb_drv: Remove wait events for Nic
'alloc_skb' might now fail, the Nic component will then send a 'packet
available' signal and return. Fix broken SKB list implementation as well as
completely bogus initialization of SKBs.

Related to #778.
2013-07-15 17:11:06 +02:00
Alexander Boettcher
99ae463e5c run: zero pad hello.py to succeed on OKL4
Fixes #804.
2013-07-15 17:06:27 +02:00
Stefan Kalkowski
5d75e6676d run-tool: be more failure tolerant in spawn_serial
Fixes #809
2013-07-15 13:06:08 +02:00
Stefan Kalkowski
09d81759ee run-tool: unify building of u-boot image (fix #807) 2013-07-15 11:13:28 +02:00
Martin Stein
6c7a25d08c base-hw: use generic signal_session/connection.h
base-hw extended the signal quota in a specific connection
implementation, which just conceals other issues if quota upgrade is
triggered.

Fixes #410.
2013-07-12 16:41:33 +02:00
Stefan Kalkowski
b3eecfcced base-foc: Improve documentation of capability enums
Fixes #568
2013-07-12 15:33:27 +02:00
Stefan Kalkowski
e717ad656f base-hw: preserve symbolic link bin/core
In this case "mv A B" works slightly different than "cp A B; rm A" as
symbolic links come into play. The statements should copy the contents
of A into the symboliv link at B (preserving it as is) and remove A. The
mv would replace the link B by the binary A.

Fixes #805.
2013-07-12 15:23:33 +02:00
Stefan Kalkowski
76d449ebe6 Start receiver thread in LwIP after initialization
Otherwise the receiver thread might access variables not initialized properly,
and thereby raising pagefaults.

Fixes #802
2013-07-11 17:35:24 +02:00
Stefan Kalkowski
03538a1c3b Disable run test for base-hw as long as it fails
Ref #801
2013-07-11 16:40:42 +02:00
Alexander Boettcher
4dd9172888 run: add success message to lx_hybrid_pthread_ipc 2013-07-11 12:44:24 +02:00
Stefan Kalkowski
ef4027a7a8 Disable noux run script for i.MX53 platform
This platform misses necessary UART driver support.
2013-07-11 12:44:24 +02:00
Alexander Boettcher
86d323d3cf run: disable network tests for imx53
We have no network driver on this platform by now.
2013-07-11 12:44:24 +02:00
Stefan Kalkowski
946bd297e6 Add -mcpu flag to ARM CPU spec files (Ref #797)
When using certain assembler instructions, e.g. 'smc' that are
only available on some CPUs of the same architecture like ARMv7a,
it's necessary to specify the target CPU for the assembler. Otherwise
it will complain about.
2013-07-11 12:44:24 +02:00
Sebastian Sumpf
2dce04618e atapi_drv: Implement LBA48 specific block count
Use NATIVE MAX ADDRESS EXT to retrieve last block for LBA48. Also check not only
for enabled LBA48 support but for the 'host protected area' bit before using the
LBA48 version. This is because the high order byte (HOB) data retrieval is
broken in Qemu.

Fixes #761.
2013-07-11 12:44:18 +02:00
Alexander Boettcher
861bbc81a3 run: check size of reported disc in part_blk
Triggers bug if LBA48 mode is used.

Issue #761
2013-07-11 12:40:19 +02:00
Stefan Kalkowski
ba273fb6fb base-hw: disable L2 cache on Pandaboard (fix #797)
* Fix bitfield typo in TTBR0 register for ARMv7
2013-07-11 12:40:19 +02:00
Alexander Boettcher
731493641b run: add netperf tests to autopilot list
* native Genode (using lwIP) netperf
as
* L4Linux netperf
2013-07-11 12:40:19 +02:00
Alexander Boettcher
1fa27bb16c run: prepare netperf l4lx output for post processing
Issue #794.
2013-07-11 12:40:10 +02:00
Alexander Boettcher
bdd145f62d run: split netperf l4linux script
Split the netperf run script into 3 ones so that it can be used more easily
in an automated run.

It is solely for foc_arndale by now.

l4linux_netperf.run        - use nic via usb2.0
l4linux_netperf-usb30.run  - use nic via usb3.0
l4linux_netperf-bridge.run - use nic via usb3.0 + bridge
2013-07-11 11:02:04 +02:00
Alexander Boettcher
a1a790664e run: check for netperf version in user environment
For L4linux version on foc_arndale.
2013-07-11 11:02:04 +02:00
Alexander Boettcher
05d807db75 run: split native Genode netperf script
Split the netperf run script into 3 ones so that it can be used more easily
in an automated run.

netperf.run        - use native nic driver (x86) or usb2.0 (arndale, panda)
netperf_usb30.run  - use native nic driver (x86) or usb3.0
netperf_bridge.run - use native nic driver (x86) or usb3.0 (arndale) and bridge

Issue #794
2013-07-11 11:01:37 +02:00
Alexander Boettcher
400037a5b0 run: check for netperf version in user environment
For native Genode netperf port.
2013-07-09 18:57:30 +02:00
Christian Helmuth
4807d469ca Revert "usb_drv: Wait for IRQ on SKB exhaustion"
The fix overly influences gigabit ethernet performance (~200 MBit), so,
we need to investigate further.

This reverts commit aacb91f22a.

Reopen #788.
2013-07-08 15:55:31 +02:00
Alexander Boettcher
241c0f38a4 run: remove tar file also after native runs
Fixes #679
2013-07-05 12:46:56 +02:00
Norman Feske
92cb97c05b Let Git ignore libports/include/x86emu
The headers are mere symlinks created via 'make prepare'.
2013-07-05 12:43:26 +02:00
Christian Prochaska
02c0fa85cf nic_bridge: increase entrypoint stack size
Issue #782
2013-07-05 12:37:43 +02:00
Christian Prochaska
c962240922 crt0 cleanup
- use the generic 'crt0.s' for Linux
- move the read-only '__dso_handle' definition into the '.text' section
- move the '__initial_sp' definition into the '.bss' section
- remove the '_main_utcb' definition

Part of #766.
2013-07-05 12:37:43 +02:00
Martin Stein
1b96e8a7e1 hw: use generic genode.ld
Ref #766
2013-07-05 12:37:43 +02:00
Martin Stein
ee4c98e093 base: provide BSS boundary marks in genode.ld
This enables us to use the generic linker script for
base-hw also.

Ref #766
2013-07-05 12:37:43 +02:00
Martin Stein
6b42fff30e hw: use generic crt0.s for progs other than core
Use '__initial_sp' instead of '_main_utcb' to receive a main threads
UTCB pointer outside core.

Ref #766
2013-07-05 12:37:42 +02:00
Martin Stein
e20b773bef hw & arm: use sp to hand out main UTCB pointer
Also don't hand out UTCB pointers to cores main thread and to threads
other than main threads.

Ref #766
2013-07-05 12:37:42 +02:00
Martin Stein
5a3e340699 hw: initialize Platform_thread::_main_thread right
Ref #766
2013-07-05 12:37:42 +02:00
Josef Söntgen
cb76c0c45f core: remove hardcoded 'init' from Log output
Until now the print procedure call in the Log_session_component
did contain a hardcoded 'init' string. Adding a method to filter
the session args to prefix the label and labelling the initial
Cpu_connection for the init-process enabled us to remove the
hardcoded string.

Fixes #789.
2013-07-05 12:37:42 +02:00
Josef Söntgen
136af3764d core: add session args filter to Core_child
Add the filter_session_args() method to Core_child to prefix the labels
of its children.

Fixes #789.
2013-07-05 12:37:42 +02:00
Josef Söntgen
4ba17f7ebd core: use label for init's Cpu_session
Fixes #789.
2013-07-05 12:37:42 +02:00
Josef Söntgen
dad3f32d0b linux: thread name wrongly truncated by one byte
The terminating NUL char was not considerd in the calculation of
the space needed for storing the string.

Fixes #790.
2013-07-05 12:37:42 +02:00
Josef Söntgen
29b8370f73 noux: add local cpu and ram service
Use a local CPU service to prevent a redirection to noux' parent (in
this case init which does not know noux' local capabilities).

Fixes #791.
2013-07-05 12:37:42 +02:00
Josef Söntgen
9ec791db9a base: add method to withdraw memory w/o allocating
The given number of bytes is consumed but not actually allocated. This
feature may be used for accounting and use memory within core which is
in fact provided by a session client.

Fixes #792.
2013-07-05 12:37:42 +02:00
Stefan Kalkowski
0ba40d01ca Don't use daemonized telnet in netcat run-script
Fix #782
2013-07-05 12:37:42 +02:00
Norman Feske
b7e553d4db nic_bridge: Documentation update 2013-07-05 12:37:41 +02:00
Norman Feske
129c77f02b doc: Update location of VESA driver 2013-07-05 12:37:41 +02:00
Stefan Kalkowski
1904a223e8 Check md5 sum of initramfs file in l4lx run-script
* Always download md5sum file and check downloaded binaries
* Extend sleep time in l4linux_netperf script, so that DHCP has enough time
* Fix regexp rule in l4linux_netperf run script to work with MAC addresses
  containing only numbers

Fix #787
2013-07-05 12:37:41 +02:00
Sebastian Sumpf
aacb91f22a usb_drv: Wait for IRQ on SKB exhaustion
Do not use 'wait_event' when SKB-backend allocation fails, explicitly wait for
an interrupt, which in turn frees SKBs, instead.

Fixes issue #788
2013-07-02 08:50:40 +02:00
Norman Feske
2045fffe2a ports-foc: assert use of 32-bit platforms
L4Linux does not support x86_64. Detect this case early in the run
script.
2013-06-30 13:48:10 +02:00
Norman Feske
9bff8c454a ports-foc: Mention prepare step of dde_ipxe
Thanks to Rudolf Weber for reporting.
2013-06-30 13:44:40 +02:00
Martin Stein
0613e52a49 ahci & exynos5: adjust ouput format in ahci_bench 2013-06-28 17:23:31 +02:00
Martin Stein
4fe093b01b ahci & exynos5: opt-in app and part in ahci_bench 2013-06-28 17:23:25 +02:00
Martin Stein
118ca20a2f ahci & exynos5: do test repetitions in ahci_bench 2013-06-28 17:23:17 +02:00
Alexander Boettcher
e3c3f9f44f run: restrict ports solely for qemu case
Sometimes the ports are not freed up quick enough by the host system after the
first test finished. The port restriction is mainly required for qemu, so don't
use it for bare metal hardware tests.
2013-06-28 16:21:08 +02:00
Stefan Kalkowski
089f8dcfc8 Extend l4linux_dynamic run-script with SATA driver
* Add platform_drv for usb_drv, sd_card_drv and ahci
* Add ahci driver and part_blk on top of it
* add linux instance using SATA partition
* add VIM using SATA partition
2013-06-28 16:18:15 +02:00
Stefan Kalkowski
9263079f70 USB 3.0 & exynos5: don't close regulator session
When leaving constructor of EHCI & XHCI driver don't close the regulator session,
otherwise it'll power down the device.
2013-06-28 14:27:27 +02:00
Stefan Kalkowski
acc24b5905 Switch off regulators when closing session 2013-06-28 14:24:34 +02:00
Stefan Kalkowski
717e4dd362 Let genode_org run script work on various platforms 2013-06-28 14:22:45 +02:00
Alexander Boettcher
fd7683f6ea lwip: use memcpy of Genode 2013-06-27 20:12:43 +02:00
Alexander Boettcher
4c9cee24de run: add nic_bridge to netperf native test 2013-06-27 20:12:36 +02:00
Alexander Boettcher
776a8d3f8c lwip: set to max snd window which is known to work
The window scale option (http://tools.ietf.org/html/rfc1323) patch of lwIP
definitely works solely for the receive window, not for the send window.
Setting the send window size to the maximum of an 16bit value, 65535,
or multiple of it (x * 65536 - 1) results in the same performance.

Everything else decrease performance.

We will have to check this window scale patch before using higher values.
2013-06-27 20:12:29 +02:00
Alexander Boettcher
4925f77dac run: skip libc_ffat test for non qemu test runs
Print a warning that the sd respectively hard disc must be prepared manually.

Fixes #783
2013-06-27 20:12:23 +02:00
Stefan Kalkowski
68ba7a0b57 L4Linux ARM: enable ext4 by default 2013-06-27 20:03:36 +02:00
Alexander Boettcher
d822b82f5b lwip: align the pbuf on 32 resp. 64 bit addresses
Minor speed improvements of ~6Mbit. Additionally a ethernet frame fits now
into one memory allocation per pbuf. Beforehand two were allocated - one being
1514 bytes and another one being 2 bytes (monitored by instrumenting copy loop
in libports/src/lib/lwip/platform/nic.cc).
2013-06-26 17:42:11 +02:00
Alexander Boettcher
8d9e7d0da2 lwip: set some reasonable default rcv buf size
lwip reports via getsockopt the size of the default size of the receive buffer
to the netperf server. lwip returns 2GB and netperf server uses this value to
allocate some buffers - which of course fails with out of memory.

Reduces the "default size" to some smaller value.

With the commit we are not forced anymore to (but still can) use specific
netperf client options regarding memory allocations of the receive buffer.
2013-06-26 17:42:02 +02:00
Alexander Boettcher
e35dbd3353 run: add TCP_MAERTS to netperf test
MAERTS is STREAM backwards and effectively lets the netserver sends the packets
to the netperf client. So, TCP_STREAM measure the receive performance of the
lwIP stack on Genode and TCP_MAERTS the send performance of the lwIP stack
on Genode.
2013-06-26 17:41:54 +02:00
Martin Stein
198f8b65a4 ahci & exynos5: compliant exceptions on creation
Use Root::Unavailable exceptions instead of driver specific ones
on session construction.
2013-06-26 16:02:30 +02:00
Stefan Kalkowski
cfa3d38417 Use Genode's memcpy in L4Linux block driver 2013-06-26 16:02:20 +02:00
Martin Stein
276dbdab60 l4lx: raise block TX buffer size to 5 MiB
Buffer sizes lower than 5 MiB slow down the Arndale AHCI benchmark
with fast 6 Gbps SSDs and 1MiB blocks.
2013-06-26 16:02:13 +02:00
Martin Stein
9d23cdc27f part_blk: raise max packet size to 1 MiB
This is because the old packet size of 128 KiB slowed
down l4linux AHCI benchmark on arndale with large block sizes.
2013-06-26 15:05:20 +02:00
Martin Stein
3fb7e74287 ahci & exynos5: avoid large DMA buf in AHCI bench
Normally this bench has read all data to one large buffer and
than written it back to the drive but for SATA 3 (6 Gbps) benchmarks
we would need a buffer of approximately 1.2 GB to do it this way
and reach 2 seconds bench time. Thus we use a buffer of SATA request size
and override it with every request.
2013-06-26 15:05:20 +02:00
Martin Stein
0ad284febe ahci & exynos5: AHCI (+ part_blk) bench in l4linux 2013-06-26 15:05:19 +02:00
Martin Stein
ad3427e857 ahci & exynos5: allow 6 Gbps port speed 2013-06-26 15:05:15 +02:00
Martin Stein
da930d146f ahci & exynos5: enable SSDs like OCZ Agility 3
Declare ATA device-register structure and check it with more detail.

Fasten error recovery about 9 ms.
2013-06-26 15:05:11 +02:00
Stefan Kalkowski
770157fea0 Enable re-use of singleton, but closed IRQ session
Fix #784
2013-06-26 14:27:19 +02:00
Stefan Kalkowski
664d0036c8 Use cpu regulator in cli_monitor only on Arndale
This commit splits the Fiasco.OC-specific extension for the cli_monitor
into one for the Arndale platform, and one for all others. On Arndale
we add the cpu_frequency command beside the ones defined on all platforms.
2013-06-26 11:29:26 +02:00
Alexander Boettcher
9f2097669a netperf: add support to timeout if host went away 2013-06-25 17:42:42 +02:00
Alexander Boettcher
5d79c6be1a lwip: increase send performance for arndale USB2.0
Getting up to 91 Mbit out of a 100 Mbit card.
2013-06-25 17:42:42 +02:00
Alexander Boettcher
8a623c6317 lwip: support send, recv timeouts 2013-06-25 17:42:42 +02:00
Alexander Boettcher
494bb8ff0d run: print packets/s at end of netperf script 2013-06-25 17:42:42 +02:00
Alexander Boettcher
4bffa249fd lwip: tweak foc_panda to netperf tcp >90MBit/s 2013-06-25 17:42:42 +02:00
Alexander Boettcher
f1c99b190f run: add platform_drv to netperf run script 2013-06-25 17:42:42 +02:00
Alexander Boettcher
ef6450d5d3 run: fix noux_net_netcat for most x86_32 platforms
native pistachio x86 is broken in general

arm fix still pending

Issue #782
2013-06-25 17:36:34 +02:00
Martin Stein
ada408d2f7 ahci & exynos5: enable HDDs like Seagate Barracuda
Initialize and limit port speed to 3 Gbps in general because the Seagate
Barracuda 1TB throws much errors with 6 Gbps by now.

Try all port speeds from the highest to the lowest as long as debouncing fails
and try them all again in this order when falling back to slower debouncing.

Try to recover from all types of interface error.

When a port was recovered from an error during a NCQ command
get the last LBA that was accessed successfully and continue command from
this point.

Use a platform driver through the 'Regulator' service to do CMU and PMU config.

Switch off verbosity by default.
2013-06-25 16:35:22 +02:00
Martin Stein
686c551b66 ahci & exynos5: driver internal benchmark
To raise expressiveness of the benchmark it dynamically adjusts the
transfer amount at any test to get a result that was measured
over a transfer time of 2000 ms at least and 2300 ms at a max.
2013-06-25 15:08:33 +02:00
Martin Stein
6ae5d3a04b ahci & exynos5: basic recovery from NCQ errors
Fix little bugs in scatter/gather-list setup, FIS creation, and
command-slot creation of Exynos5 AHCI driver.
2013-06-25 15:00:52 +02:00
Martin Stein
53b186fe01 ahci & exynos5: enable SSDs like Samsung 840 Pro
* Retry debouncing first with a higher trial time and if this also doesn't
  work with lower link speed additionaly.
* Ignore DevSlp feature because it isn't needed anyway as far as i can see.
* Relax some restrictions according the feedback of the drive as far as it
  seem to have no effect in Linux too

Fix #753
2013-06-25 15:00:42 +02:00
Martin Stein
c93e770316 ahci & exynos5: use platform driver in AHCI test 2013-06-25 15:00:35 +02:00
Martin Stein
0c7c285079 mmio: provide basic verbosity
The verbosity must be enabled at two levels: at compile time
via an enum that switches the availability of verbosity code
and via two members of 'Mmio' named '_read_verbose' and
'_write_verbose'. The latter are initialized to 0 (change this to
enable verbosity globally) and can be used to locally enable
(or disable) verbosity in deriving classes.

Ref #753
2013-06-25 14:52:53 +02:00
Stefan Kalkowski
e23f24505b Add platform_drv to relevant run-scripts (fix #778) 2013-06-25 14:37:03 +02:00
Stefan Kalkowski
ae49f6216d Add regulators for EHCI controller on Arndale
Fix #780
2013-06-25 14:36:57 +02:00
Alexander Boettcher
059bf1c576 nova: fix page fault during core bootup
Fixes #781
2013-06-25 11:16:22 +02:00
Stefan Kalkowski
a73dc1b581 Fix coding style in regulator interface (fix #777) 2013-06-25 11:10:59 +02:00
Stefan Kalkowski
5a3c2c33b7 Add 'cpu_frequency' command to cli_monitor (fix #776)
This commit extends the Fiasco.OC specific extensions of the cli_monitor
to enable the user to interactively change or show current CPU frequency
2013-06-25 11:10:58 +02:00
Christian Prochaska
cb01f75a9d foc-arndale: use same context area location
Currently, on the Arndale platform, core uses a different thread context
area base address than the other tasks (0x20000000 vs. 0x40000000). This
is problematic, because core calculates the location of the UTCB area of a
new thread relatively to core's own thread context area base. So, the UTCB
area of non-core threads ends up in a virtual address range which is
outside of the task's thread context area and not marked as used in the
task's RM session.

With this patch, the same thread context area base address gets used in
core and in the other tasks.

Fixes #779.
2013-06-25 11:10:58 +02:00
Stefan Kalkowski
a4eb4bfa07 Arndale: save power by default (Fix #774)
* Use regulator interface in eMMC driver to enable its clock
2013-06-24 11:50:53 +02:00
Sebastian Sumpf
cc0f4bc9d2 usb_drv: Fix performance of ASIX AX88772
Caused by #773
2013-06-24 11:48:37 +02:00
Sebastian Sumpf
98ee7612f1 base: ARM-FPU 'memcpy_cpu' implementation
Added spec file for ARM-VFPv3 floating-point unit. This shadows
'base/include/arm/' with 'base/include/arm/vfp' and enables a 'memcpy_cpu'
version that mainly uses the FPU. Enabled VFP support for 'foc_arndale'.

Ref #773
2013-06-24 11:48:37 +02:00
Sebastian Sumpf
71490e131b usb_drv: Dimension queues for usbnet
+ Some code cleanup

Ref #773
2013-06-24 11:48:37 +02:00
Sebastian Sumpf
c3537d175c usb_drv: Use platform drivers and regulator
Ref #773
2013-06-24 11:48:37 +02:00
Stefan Kalkowski
f7034369b2 Extend clock and power units in platform driver
* Add clock and power management for SATA and USB3.0 for Arndale

Fix #771
2013-06-24 11:48:37 +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
8fb8cf1c8b Implement abstract regulator session interface
Ref #770
2013-06-24 11:48:36 +02:00
Sebastian Sumpf
231d92f88a usb: Fix AX88179 receive CRC errors
Call 'set_multicast' and 'link_reset' during card startup. Increase TX skb
buffer allocator.

Ref #773
2013-06-24 11:48:36 +02:00
Sebastian Sumpf
8cf893e8c6 ports-foc: Add l4linux netperf run script
Ref #773
2013-06-24 11:48:36 +02:00
Alexander Boettcher
52cf25982a run: clean pulsar config file during a clean_run
tool/autopilot complains about this left over file
2013-06-17 12:14:10 +02:00
Alexander Boettcher
e5eeda2ec9 run: support TFTP servers using absolute paths
TFTP server requiring absolute directory names are supported (better) -
specify in RUN_OPT "--tftp-absolute" to create Pulsar config with absolute
path names for PXE boot.

Additional a symbolic link is created from the build directory to
"$PXE_TFTP_DIR_BASE$PXE_TFTP_DIR_OFFSET" automatically. This eases the use
together with autopilot for x86.
2013-06-14 14:27:14 +02:00
Alexander Boettcher
1b60fd6147 run: power off only the port which was switched on 2013-06-12 15:32:26 +02:00
Alexander Boettcher
27b6839ee0 fiasco: use bender, read out comport from BDA
Fix #768
2013-06-12 11:36:14 +02:00
Alexander Boettcher
bdd2935d4a pistachio: use bender, read out comport from BDA
Issue #768
2013-06-12 11:36:14 +02:00
Alexander Boettcher
1887222b53 okl4: use bender, read out comport from BDA
Issue #768
2013-06-12 11:36:14 +02:00
Alexander Boettcher
32fb7bbddd foc: add 'bender' to pulsar run script
Depends on - https://github.com/ssumpf/foc/pull/4 - which adds BDA read out
of I/O ports to FOC kernel.

Issue #768
2013-06-12 11:36:14 +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
e06a154294 Add __initial_sp variable to base-hw specific crt0
Fixes #756
2013-06-12 11:35:13 +02:00
Norman Feske
d0d5ec92b6 ports/libports: Use repository-local PWD
The PWD variable contains the current working directory of the original
location where 'make -C' is executed, not the directory specified as
argument of '-C'. The tools referenced by ports/libports, however,
expect PWD to point to the root of the respective repository.
2013-06-12 11:35:13 +02:00
Norman Feske
d2e883e235 libports: Fix qoost download 2013-06-12 11:35:13 +02:00
Norman Feske
9d778a658d ports/libports: Avoid multi-target rules
This patch splits the download of signatures from the download of the
archive to improve robustness. This way, signature files will be
downloaded even if the corresponding archive is already in place.

Issue #748
2013-06-12 11:35:13 +02:00
Stefan Kalkowski
853d541340 Let the nic_bridge work event driven (fix #749) 2013-06-12 11:35:13 +02:00
Stefan Kalkowski
153429268e Simplify use of custom data-flow signal handlers
This is analogue to the changes done in packet_stream_tx in commit:
cb9b2724de
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
Stefan Kalkowski
973efe945b Add sd_card drivers to some run scripts (fix #757)
Moreover, extend l4android script to run on OMAP4 and Exynos5.
2013-06-12 11:35:12 +02:00
Stefan Kalkowski
125d55ce71 Don't abort when reading config in OMAP4 fb driver
Just use configuration values when existent, otherwise when no configuration
is given use the default values. When an incomplete configuration is given,
take the supplied ones, and for the rest the default ones. Fix #762
2013-06-12 11:35:12 +02:00
Stefan Kalkowski
37856a0ad0 Add print-only dummy UART driver for Exynos5 SoC
Fix #759
2013-06-12 11:35:12 +02:00
Stefan Kalkowski
7584bdb22e Fix usb driver configuartion in l4linux run script
Don't use the xhci USB host controller for HID and NIC in the l4linux
run script. It doesn't work on the Pandaboard, and isn't needed for the
Arndale board. Moreover, provide a MAC address, and add a providing
rule in the KDB UART driver to supress ugly warnings. Fix #763
2013-06-12 11:35:12 +02:00
Christian Helmuth
b355897f53 update x86emu to 1.20
+ document x86emu move from os -> libports

Fixes #456
2013-06-12 11:35:12 +02:00
Christian Prochaska
be8a3c6f08 liquid_framebuffer: fix initial window size
Fixes #764.
2013-06-10 10:45:31 +02:00
Norman Feske
179f742924 ports/libports: Handle failed integrity checks
This patch makes the handling of failed integrity checks of 3rd-party
packages more robust. Previously, a once failed 'make prepare PKG=curl'
would not leave any trace of the verification state. Hence, a successive
attempt to perform the 'make prepare' step again succeeded even if the
signature check failed.

To solve this problem, the outcome of a successful signature check is
represented by a tag file called 'download/<archive-name>.verified'.
Because the rule for extracting the archive depends on the .verify tag
file, the extraction step is not performed until the signature check
succeeds.

Issue #748
2013-06-10 10:44:10 +02:00
Stephan Mueller
96e9fcd326 ports: Verify signatures of 3rd-party code
This patch adds integrity checks for the packages of the ports
repository.

Issue #748
2013-06-10 10:44:09 +02:00
Stephan Mueller
64a2447d03 ports: Global variables for integrity check
Add global variables to the signature and hash verification tool to
ports/Makefile for use in the individual make templates.

Issue #748
2013-06-10 10:44:09 +02:00
Stephan Mueller
056e0792e5 libports: Verify signatures of 3rd-party code
This patch adds integrity checks for the packages of the libports
repository.

Issue #748
2013-06-10 10:44:09 +02:00
Stephan Mueller
a140f134c7 libports: Global variables for integrity check
Add global variables to the signature and hash verification tool for use
in the individual make templates.

Issue #748
2013-06-10 10:44:09 +02:00
Stephan Mueller
4f52e793a0 GPG signature verification of tool chain
The downloaded archives for building the tool chain are checked for its
signature before using them. In case of a signature failure, the build
is interrupted.

Issue #748
2013-06-10 10:44:09 +02:00
Stephan Mueller
4c89f4f00f Hash verification tool
This tool verifies the integrity of a given file with a hash. It uses
md5sum, sha1sum and sha256sum as needed.

Issue #748
2013-06-10 10:44:09 +02:00
Stephan Mueller
9b22983e58 GPG signature verification tool
The signature verification tool uses gpg to verify the detached
signature of the given file.

It also tries to obtain the signing key if it is not part of the local
key ring.

Signature verification implies the verification of the integrity and
authenticity of a given file.

Issue #748
2013-06-10 10:44:09 +02:00
Norman Feske
f07973126d News item for Genode 13.05 2013-05-30 10:28:15 +02:00
1497 changed files with 79835 additions and 60312 deletions

22
.gitignore vendored
View File

@@ -25,11 +25,14 @@
/libports/include/GL
/libports/include/KHR
/libports/include/SDL
/libports/include/exfat
/libports/include/ffat
/libports/include/fribidi
/libports/include/freetype
/libports/include/ft2build.h
/libports/include/fuse-ext2
/libports/include/iconv/
/libports/include/icu/
/libports/include/jbig2dec
/libports/include/libc-amd64/
/libports/include/libc-arm/
@@ -104,6 +107,14 @@
/libports/include/stdcxx-genode/bits/nested_exception.h
/libports/include/stdcxx-genode/exception
/libports/include/stdcxx-genode/new
/libports/include/stdcxx-genode/typeinfo
/libports/include/stdcxx-genode/initializer_list
/libports/include/x86emu/stdint.h
/libports/include/x86emu/stdio.h
/libports/include/x86emu/stdlib.h
/libports/include/x86emu/string.h
/libports/include/x86emu/x86emu.h
/libports/include/x86emu/x86emu/
/libports/src/lib/gmp/mpn/asm-defs.m4
/libports/src/lib/gmp/mpn/arm/hamdist.c
/libports/src/lib/gmp/mpn/arm/popcount.c
@@ -120,8 +131,19 @@
/libports/src/lib/ncurses/make_keys
/libports/src/lib/ncurses/names.c
/libports/src/lib/ncurses/unctrl.c
/libports/src/lib/qt5/qtjsbackend
/libports/src/lib/qt5/qtwebkit/Source/JavaScriptCore
/libports/src/lib/qt5/qtwebkit/Source/WebCore/generated
/libports/tool/mesa/glsl
/libports/tool/mupdf
/libports/tool/qt5/bootstrap
/libports/tool/qt5/misc/var
/libports/tool/qt5/moc
/libports/tool/qt5/qmake/*.d
/libports/tool/qt5/qmake/*.o
/libports/tool/qt5/qmake/qmake
/libports/tool/qt5/rcc
/libports/tool/qt5/uic
/ports-foc/contrib
/ports-okl4/contrib
/ports-okl4/download

9
README
View File

@@ -127,7 +127,8 @@ The Genode source tree is composed of the following subdirectories:
to Genode, most importantly the C library. The repository contains no
upstream source code but means to download the code and adapt it to Genode.
For instructions about how to use this mechanism, please consult the README
file at the top level of the repository.
file at the top level of the repository. Among the 3rd-party libraries
are Qt5, libSDL, freetype, Python, ncurses, Mesa, and libav.
:'dde_linux':
@@ -155,7 +156,8 @@ The Genode source tree is composed of the following subdirectories:
This source-code repository contains the Genode version of Qt4 framework.
Please find more information about using Qt4 with Genode in the repository's
'README' file.
'README' file. Please note that the Qt4 support is deprecated. Use Qt5
as contained in 'libports' instead.
:'ports':
@@ -169,8 +171,7 @@ The Genode source tree is composed of the following subdirectories:
:'ports-<platform>':
These platform-specific source-code repositories contain software that
capitalizes special features of the respective kernel platform. I.e.,
for the OKL4 base platform, a port of OKLinux is provided in 'ports-okl4'.
capitalizes special features of the respective kernel platform.
For the Fiasco.OC platform, 'ports-foc' hosts a port of the L4Linux
kernel. For further information, please refer to the README file at the
top level of the respective repository.

View File

@@ -6,7 +6,7 @@
VERBOSE ?= @
ECHO = @echo
GIT_URL = http://git.l4dev.org/codezero.git
GIT_URL = https://github.com/nfeske/codezero.git
GIT_REV = 6fa4884a5a1cf6207372f69ae01e5faa6d5a39c8
CONTRIB_DIR = contrib
PATCHES = $(shell find patches -name *.patch)
@@ -18,6 +18,8 @@ check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.))
$(call check_tool,git)
$(call check_tool,patch)
$(call check_tool,python2.6)
$(call check_tool,scons)
#
# Print help information by default

View File

@@ -6,9 +6,9 @@
LIBS += cxx l4 startup
SRC_CC += cap_copy.cc
SRC_CC += cap_copy.cc main_bootstrap.cc
SRC_CC += ipc/ipc.cc ipc/pager.cc ipc/ipc_marshal_cap.cc
SRC_CC += pager/pager.cc
SRC_CC += pager/pager.cc pager/common.cc
SRC_CC += avl_tree/avl_tree.cc
SRC_CC += allocator/slab.cc
SRC_CC += allocator/allocator_avl.cc
@@ -20,13 +20,15 @@ SRC_CC += elf/elf_binary.cc
SRC_CC += lock/lock.cc
SRC_CC += signal/signal.cc signal/common.cc
SRC_CC += server/server.cc server/common.cc
SRC_CC += thread/thread.cc thread/thread_bootstrap.cc
SRC_CC += thread/thread.cc thread/thread_bootstrap.cc thread/trace.cc
SRC_CC += env/utcb.cc
SRC_CC += lock/cmpxchg.cc
INC_DIR += $(REP_DIR)/src/base/lock
INC_DIR += $(REP_DIR)/include/codezero/dummies
INC_DIR += $(REP_DIR)/src/base/lock
INC_DIR += $(BASE_DIR)/src/base/thread
INC_DIR += $(REP_DIR)/include/codezero/dummies
vpath cap_copy.cc $(BASE_DIR)/src/platform
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
vpath main_bootstrap.cc $(REP_DIR)/src/platform
vpath cap_copy.cc $(BASE_DIR)/src/platform
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base

View File

@@ -115,8 +115,8 @@ void Ipc_client::_call()
}
Ipc_client::Ipc_client(Native_capability const &srv,
Msgbuf_base *snd_msg, Msgbuf_base *rcv_msg)
Ipc_client::Ipc_client(Native_capability const &srv, Msgbuf_base *snd_msg,
Msgbuf_base *rcv_msg, unsigned short)
: Ipc_istream(rcv_msg), Ipc_ostream(srv, snd_msg), _result(0)
{ }

View File

@@ -134,7 +134,12 @@ namespace Genode {
/**
* Set the executing CPU for this thread
*/
void affinity(unsigned cpu);
void affinity(Affinity::Location) { }
/**
* Get the executing CPU for this thread
*/
Affinity::Location affinity() { return Affinity::Location(); }
/**
* Get thread name

View File

@@ -27,12 +27,6 @@ using namespace Genode;
using namespace Codezero;
void Platform_thread::affinity(unsigned int cpu_no)
{
PDBG("not yet implemented");
}
int Platform_thread::start(void *ip, void *sp, unsigned int cpu_no)
{
Native_thread_id pager = _pager ? _pager->cap().dst() : THREAD_INVALID;

View File

@@ -23,6 +23,7 @@ SRC_CC += \
irq_session_component.cc \
signal_session_component.cc \
signal_source_component.cc \
trace_session_component.cc \
core_rm_session.cc \
core_mem_alloc.cc \
dump_alloc.cc \
@@ -32,7 +33,8 @@ LIBS += core_printf base-common
INC_DIR += $(REP_DIR)/src/core/include \
$(GEN_CORE_DIR)/include \
$(REP_DIR)/include/codezero/dummies
$(REP_DIR)/include/codezero/dummies \
$(BASE_DIR)/src/base/thread
vpath main.cc $(GEN_CORE_DIR)
vpath ram_session_component.cc $(GEN_CORE_DIR)
@@ -45,6 +47,7 @@ vpath io_mem_session_support.cc $(GEN_CORE_DIR)
vpath platform_services.cc $(GEN_CORE_DIR)
vpath signal_session_component.cc $(GEN_CORE_DIR)
vpath signal_source_component.cc $(GEN_CORE_DIR)
vpath trace_session_component.cc $(GEN_CORE_DIR)
vpath dataspace_component.cc $(GEN_CORE_DIR)
vpath core_mem_alloc.cc $(GEN_CORE_DIR)
vpath dump_alloc.cc $(GEN_CORE_DIR)

View File

@@ -1,6 +1,7 @@
/*
* \brief Platform-specific helper functions for the _main() function
* \author Norman Feske
* \author Christian Helmuth
* \date 2009-10-02
*/
@@ -11,14 +12,11 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _PLATFORM___MAIN_HELPER_H_
#define _PLATFORM___MAIN_HELPER_H_
/* Genode includes */
#include <base/stdint.h>
#include <base/printf.h>
/* make Codezero includes happy */
extern "C" char *strncpy(char *dest, const char *src, Genode::size_t n);
extern "C" void *memcpy(void *dest, const void *src, Genode::size_t n);
#include <base/thread.h>
#include <util/string.h>
/* Codezero includes */
#include <codezero/syscalls.h>
@@ -59,19 +57,25 @@ extern "C" int printf(const char *format, ...)
** Startup-code helpers **
**************************/
namespace Genode { void platform_main_bootstrap(); }
Genode::Native_thread_id main_thread_tid;
Codezero::l4_mutex main_thread_running_lock;
static void main_thread_bootstrap()
void Genode::platform_main_bootstrap()
{
Codezero::__l4_init();
static struct Bootstrap
{
Bootstrap()
{
Codezero::__l4_init();
main_thread_tid = Codezero::thread_myself();
main_thread_tid = Codezero::thread_myself();
Codezero::l4_mutex_init(&main_thread_running_lock);
Codezero::l4_mutex_lock(&main_thread_running_lock); /* block on first mutex lock */
Codezero::l4_mutex_init(&main_thread_running_lock);
Codezero::l4_mutex_lock(&main_thread_running_lock); /* block on first mutex lock */
}
} bootstrap;
}
#endif /* _PLATFORM___MAIN_HELPER_H_ */

View File

@@ -10,6 +10,17 @@ DOWNLOAD_DIR = download
CONTRIB_DIR = contrib
FIASCO_ARCHIVE = 3rd_fiasco.tar.bz2
FIASCO_URI = http://downloads.sourceforge.net/project/genode/3rd/$(FIASCO_ARCHIVE)
PATCHES = $(shell find patches -name *.patch)
#
# Utility to check if a tool is installed
#
check_tool = $(if $(shell which $(1)),,$(error Need to have '$(1)' installed.))
$(call check_tool,wget)
$(call check_tool,patch)
$(call check_tool,tar)
$(call check_tool,byacc)
#
# Print help information by default
@@ -33,6 +44,8 @@ $(CONTRIB_DIR): $(DOWNLOAD_DIR)/$(FIASCO_ARCHIVE)
$(ECHO) "unpacking source code to '$(CONTRIB_DIR)/'"
$(VERBOSE)tar xjf $<
$(VERBOSE)mv 3rd $@
$(ECHO) "applying patches to '$@/'"
$(VERBOSE)for i in $(PATCHES); do patch -d $@ -p0 < $$i; done
$(VERBOSE)touch $@
prepare: $(CONTRIB_DIR)

View File

@@ -34,8 +34,8 @@ BID_COLORED_PHASES=y
BIDc_USE_SPECIAL_CC=y
HOST_CC="gcc"
HOST_CXX="g++"
CC="$(SYSTEM_TARGET)gcc -m32"
CXX="$(SYSTEM_TARGET)g++ -m32"
CC="${SYSTEM_TARGET}gcc -m32"
CXX="${SYSTEM_TARGET}g++ -m32"
#
# Tools

View File

@@ -44,6 +44,12 @@ command from within the 'base-fiasco' directory:
! make prepare
For the vesa driver on x86 the x86emu library is required and can be downloaded
and prepared by invoking the following command from within the 'libports'
directory:
! make prepare PKG=x86emu
This command will download a prepackaged version of the kernel tested
with Genode. The build process of the kernel is integrated with Genode's
build system. After creating a build directory using 'create_builddir'

View File

@@ -6,9 +6,9 @@
LIBS += cxx startup
SRC_CC += cap_copy.cc
SRC_CC += cap_copy.cc main_bootstrap.cc
SRC_CC += ipc/ipc.cc ipc/pager.cc ipc/ipc_marshal_cap.cc
SRC_CC += pager/pager.cc
SRC_CC += pager/pager.cc pager/common.cc
SRC_CC += avl_tree/avl_tree.cc
SRC_CC += allocator/slab.cc
SRC_CC += allocator/allocator_avl.cc
@@ -20,10 +20,12 @@ SRC_CC += elf/elf_binary.cc
SRC_CC += lock/lock.cc
SRC_CC += signal/signal.cc signal/common.cc
SRC_CC += server/server.cc server/common.cc
SRC_CC += thread/thread.cc thread/thread_bootstrap_empty.cc
SRC_CC += thread/thread.cc thread/thread_bootstrap_empty.cc thread/trace.cc
INC_DIR += $(REP_DIR)/src/base/lock
INC_DIR += $(REP_DIR)/src/base/lock
INC_DIR += $(BASE_DIR)/src/base/thread
vpath cap_copy.cc $(BASE_DIR)/src/platform
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
vpath main_bootstrap.cc $(REP_DIR)/src/platform
vpath cap_copy.cc $(BASE_DIR)/src/platform
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base

View File

@@ -0,0 +1,15 @@
--- fiasco/snapshot/kernel/fiasco/src/kern/kernel_uart.cpp 2008-07-30 13:19:01.000000000 +0200
+++ fiasco/snapshot/kernel/fiasco/src/kern/kernel_uart.cpp 2013-06-10 14:21:54.183996620 +0200
@@ -72,6 +72,12 @@
if ( (s = strstr(cmdline, " -comport "))
||(s = strstr(cmdline, " -comport=")))
p = strtoul(s + 10, 0, 0);
+ else
+ {
+ unsigned short bda_comports = (*((unsigned short *)0x410) >> 9) & 0x7;
+ if (bda_comports)
+ p = *((unsigned short *)0x400);
+ }
if ((s = strstr(cmdline, " -comirq=")))
i = strtoul(s + 9, 0, 0);

View File

@@ -0,0 +1,30 @@
diff -ur contrib.bak/fiasco/snapshot/l4/pkg/l4sys/include/ARCH-x86/kdebug.h contrib/fiasco/snapshot/l4/pkg/l4sys/include/ARCH-x86/kdebug.h
--- fiasco/snapshot/l4/pkg/l4sys/include/ARCH-x86/kdebug.h 2008-07-30 13:19:01.000000000 +0200
+++ fiasco/snapshot/l4/pkg/l4sys/include/ARCH-x86/kdebug.h 2013-09-23 09:02:29.875532260 +0200
@@ -21,7 +21,7 @@
asm(\
"int $3 \n\t"\
"jmp 1f \n\t"\
- ".ascii \""text "\"\n\t"\
+ ".ascii \"" text "\"\n\t"\
"1: \n\t"\
)
@@ -35,7 +35,7 @@
#define asm_enter_kdebug(text) \
"int $3 \n\t"\
"jmp 1f \n\t"\
- ".ascii \""text "\"\n\t"\
+ ".ascii \"" text "\"\n\t"\
"1: \n\t"
/**
@@ -50,7 +50,7 @@
"int $3 \n\t"\
"nop \n\t"\
"jmp 1f \n\t"\
- ".ascii \""text "\"\n\t"\
+ ".ascii \"" text "\"\n\t"\
"1: \n\t"\
)

View File

@@ -13,6 +13,7 @@
#
proc install_pxe_bootloader_to_run_dir { } {
exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
}
@@ -141,7 +142,8 @@ proc build_boot_image {binaries} {
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /fiasco/bootstrap -serial -modaddr=0x02000000"
puts $fh " exec /boot/bender"
puts $fh " load /fiasco/bootstrap -serial -modaddr=0x02000000"
puts $fh " load /fiasco/fiasco -serial -serial_esc -jdb_cmd=JH"
puts $fh " load /fiasco/sigma0"
puts $fh " load /genode/core"
@@ -155,17 +157,15 @@ proc build_boot_image {binaries} {
# Generate pulsar config file pointing to the config file above.
#
if {[info exists ::env(PXE_TFTP_DIR_BASE)] && [info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
set len [string length $::env(PXE_TFTP_DIR_BASE)]
set tmp [string range [pwd] 0 $len-1]
# if PXE_TFTP_DIR_BASE is part of pwd (autopilot) we don't need DIR_OFFSET
if ([string match $tmp $::env(PXE_TFTP_DIR_BASE)]) {
set tftp_local_offset [string range [pwd] $len [string length [pwd]]]
} else {
set tftp_local_offset $::env(PXE_TFTP_DIR_OFFSET)
exec ln -nfs "[pwd]" "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)"
set tftp_base ""
if {[get_cmd_switch --tftp-absolute]} {
set tftp_base $::env(PXE_TFTP_DIR_BASE)
}
set fh [open "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)/config-00-00-00-00-00-00" "WRONLY CREAT TRUNC"]
puts $fh " root $tftp_local_offset/[run_dir]"
puts $fh " root $tftp_base$::env(PXE_TFTP_DIR_OFFSET)/[run_dir]"
puts $fh " config config-52-54-00-12-34-56"
close $fh
}

View File

@@ -152,7 +152,7 @@ void Ipc_client::_call()
Ipc_client::Ipc_client(Native_capability const &srv, Msgbuf_base *snd_msg,
Msgbuf_base *rcv_msg):
Msgbuf_base *rcv_msg, unsigned short):
Ipc_istream(rcv_msg), Ipc_ostream(srv, snd_msg), _result(0)
{ }

View File

@@ -121,7 +121,12 @@ namespace Genode {
*
* SMP is not supported on L4/Fiasco.
*/
void affinity(unsigned) { }
void affinity(Affinity::Location) { }
/**
* Request the affinity of this thread
*/
Affinity::Location affinity() { return Affinity::Location(); }
/**
* Return the address space to which the thread is bound

View File

@@ -130,7 +130,7 @@ static void _core_pager_loop()
}
Platform::Sigma0::Sigma0() : Pager_object(0)
Platform::Sigma0::Sigma0() : Pager_object(0, Affinity::Location())
{
cap(reinterpret_cap_cast<Cpu_thread>(Native_capability(Fiasco::sigma0_threadid, 0)));
}
@@ -145,7 +145,7 @@ Platform::Sigma0 *Platform::sigma0()
Platform::Core_pager::Core_pager(Platform_pd *core_pd)
:
Platform_thread("core.pager"), Pager_object(0)
Platform_thread("core.pager"), Pager_object(0, Affinity::Location())
{
Platform_thread::pager(sigma0());

View File

@@ -24,13 +24,15 @@ SRC_CC += main.cc \
irq_session_component.cc \
signal_session_component.cc \
signal_source_component.cc \
trace_session_component.cc \
dump_alloc.cc \
context_area.cc \
core_printf.cc
INC_DIR += $(REP_DIR)/src/core/include \
$(GEN_CORE_DIR)/include \
$(REP_DIR)/src/base/console
$(REP_DIR)/src/base/console \
$(BASE_DIR)/src/base/thread
LIBS += base-common
@@ -45,6 +47,7 @@ vpath io_mem_session_component.cc $(GEN_CORE_DIR)
vpath io_mem_session_support.cc $(GEN_CORE_DIR)
vpath signal_session_component.cc $(GEN_CORE_DIR)
vpath signal_source_component.cc $(GEN_CORE_DIR)
vpath trace_session_component.cc $(GEN_CORE_DIR)
vpath dataspace_component.cc $(GEN_CORE_DIR)
vpath dump_alloc.cc $(GEN_CORE_DIR)
vpath context_area.cc $(GEN_CORE_DIR)

View File

@@ -11,9 +11,4 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _PLATFORM___MAIN_HELPER_H_
#define _PLATFORM___MAIN_HELPER_H_
static void main_thread_bootstrap() { }
#endif /* _PLATFORM___MAIN_HELPER_H_ */
namespace Genode { void platform_main_bootstrap() { /* dummy */ } }

View File

@@ -9,7 +9,7 @@ VERBOSE ?= @
ECHO = @echo
SVN_URI = http://svn.tudos.org/repos/oc/tudos/trunk
GIT_URI = http://github.com/ssumpf/foc.git
GIT_BRANCH = r47
GIT_BRANCH = r56
CONTRIB_DIR = contrib
GNU_FIND ?= find
@@ -63,6 +63,7 @@ checkout_base:
ifeq ($(SVN_REV),)
$(error Syntax 'make checkout SVN_REV=<revision>')
endif
$(VERBOSE)svn export -r $(SVN_REV) $(SVN_URI)/l4/COPYING-GPL-2 $(SVN_REV)
$(VERBOSE)svn co -r $(SVN_REV) --depth immediates $(SVN_URI) $(SVN_REV)
$(VERBOSE)svn co -r $(SVN_REV) --depth files $(SVN_URI)/l4 $(SVN_REV)/l4
$(VERBOSE)svn co -r $(SVN_REV) --depth files $(SVN_URI)/l4/pkg $(SVN_REV)/l4/pkg

View File

@@ -12,22 +12,35 @@ CONFIG_ARM=y
# CONFIG_PF_IMX is not set
# CONFIG_PF_REALVIEW is not set
# CONFIG_PF_S3C2410 is not set
# CONFIG_PF_TEGRA2 is not set
# CONFIG_PF_TEGRA is not set
# CONFIG_PF_OMAP is not set
# CONFIG_PF_SA1100 is not set
# CONFIG_PF_XSCALE is not set
CONFIG_PF_EXYNOS=y
# CONFIG_PF_KIRKWOOD is not set
# CONFIG_PF_INTEGRATOR is not set
# CONFIG_PF_BCM2835 is not set
CONFIG_BSP_NAME="exynos"
CONFIG_PF_EXYNOS5=y
CONFIG_BSP_NAME="exynos5"
CONFIG_PF_EXYNOS5_ARNDALE=y
CONFIG_PF_EXYNOS_PKG_IDS=""
# CONFIG_PF_EXYNOS4_4210 is not set
# CONFIG_PF_EXYNOS4_4412 is not set
CONFIG_PF_EXYNOS5_5250=y
CONFIG_PF_EXYNOS_UART_NR=2
CONFIG_PF_EXYNOS_TIMER_MCT=y
# CONFIG_PF_EXYNOS_TIMER_PWM is not set
CONFIG_ABI_VF=y
CONFIG_PF_ARM_MP_CAPABLE=y
CONFIG_CAN_ARM_CPU_CORTEX_A15=y
CONFIG_ARM_CORTEX_A15=y
# CONFIG_ARM_ALIGNMENT_CHECK is not set
CONFIG_ARM_EM_STD=y
# CONFIG_ARM_EM_NS is not set
# CONFIG_ARM_EM_TZ is not set
# CONFIG_ARM_ENABLE_SWP is not set
# CONFIG_ARM_LPAE is not set
CONFIG_FPU=y
# CONFIG_ARM_CPU_ERRATA is not set
CONFIG_ARM_CPU_ERRATA=y
#
# Kernel options
@@ -37,9 +50,7 @@ CONFIG_MP_MAX_CPUS=4
CONFIG_CONTEXT_4K=y
# CONFIG_FINE_GRAINED_CPUTIME is not set
CONFIG_SCHED_FIXED_PRIO=y
# CONFIG_SCHED_WFQ is not set
# CONFIG_SCHED_FP_WFQ is not set
# CONFIG_DISABLE_VIRT_OBJ_SPACE is not set
CONFIG_VIRT_OBJ_SPACE=y
#
# Debugging
@@ -51,9 +62,9 @@ CONFIG_INLINE=y
# CONFIG_LIST_ALLOC_SANITY is not set
CONFIG_SERIAL=y
CONFIG_JDB=y
CONFIG_JDB_LOGGING=y
# CONFIG_JDB_DISASM is not set
# CONFIG_JDB_GZIP is not set
# CONFIG_JDB_LOGGING is not set
CONFIG_JDB_DISASM=y
CONFIG_JDB_GZIP=y
# CONFIG_VMEM_ALLOC_TEST is not set
# CONFIG_DEBUG_KERNEL_PAGE_FAULTS is not set
# CONFIG_WARN_NONE is not set
@@ -69,7 +80,7 @@ CONFIG_HOST_CC="gcc"
CONFIG_HOST_CXX="g++"
# CONFIG_MAINTAINER_MODE is not set
CONFIG_LABEL=""
CONFIG_EXPERIMENTAL=y
# CONFIG_EXPERIMENTAL is not set
CONFIG_PERF_CNT=y
CONFIG_BIT32=y
CONFIG_ARM_V7=y

View File

@@ -23,24 +23,29 @@ CONFIG_CPU_ARM_ARMV7A=y
# CONFIG_CPU_ARM_ARMV7R is not set
CONFIG_CPU_ARMV6KPLUS=y
CONFIG_CPU_ARMV6PLUS=y
CONFIG_PLATFORM_TYPE_arndale=y
# CONFIG_PLATFORM_TYPE_imx53 is not set
# CONFIG_PLATFORM_TYPE_imx35 is not set
# CONFIG_PLATFORM_TYPE_rv_pbx is not set
CONFIG_PLATFORM_TYPE_exynos5=y
# CONFIG_PLATFORM_TYPE_rv is not set
# CONFIG_PLATFORM_TYPE_kirkwood is not set
# CONFIG_PLATFORM_TYPE_pandaboard is not set
# CONFIG_PLATFORM_TYPE_tegra3 is not set
# CONFIG_PLATFORM_TYPE_tegra2 is not set
# CONFIG_PLATFORM_TYPE_imx6 is not set
# CONFIG_PLATFORM_TYPE_exynos4 is not set
# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set
# CONFIG_PLATFORM_TYPE_rpi_b is not set
# CONFIG_PLATFORM_TYPE_rv_vexpress_a15 is not set
# CONFIG_PLATFORM_TYPE_imx51 is not set
# CONFIG_PLATFORM_TYPE_omap3evm is not set
# CONFIG_PLATFORM_TYPE_beagleboard is not set
# CONFIG_PLATFORM_TYPE_imx21 is not set
# CONFIG_PLATFORM_TYPE_imx35 is not set
# CONFIG_PLATFORM_TYPE_imx51 is not set
# CONFIG_PLATFORM_TYPE_imx53 is not set
# CONFIG_PLATFORM_TYPE_imx6 is not set
# CONFIG_PLATFORM_TYPE_integrator is not set
# CONFIG_PLATFORM_TYPE_kirkwood is not set
# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set
# CONFIG_PLATFORM_TYPE_omap3evm is not set
# CONFIG_PLATFORM_TYPE_pandaboard is not set
# CONFIG_PLATFORM_TYPE_rv is not set
# CONFIG_PLATFORM_TYPE_rv_pbx is not set
# CONFIG_PLATFORM_TYPE_rv_vexpress is not set
# CONFIG_PLATFORM_TYPE_tegra2 is not set
# CONFIG_PLATFORM_TYPE_rpi_a is not set
# CONFIG_PLATFORM_TYPE_integrator is not set
# CONFIG_PLATFORM_TYPE_custom is not set
CONFIG_PLATFORM_TYPE="arndale"
CONFIG_PLATFORM_TYPE="exynos5"
# CONFIG_USE_DROPS_STDDIR is not set
# CONFIG_USE_DICE is not set
CONFIG_DROPS_STDDIR="/path/to/l4re"

View File

@@ -12,13 +12,14 @@ CONFIG_ARM=y
CONFIG_PF_IMX=y
# CONFIG_PF_REALVIEW is not set
# CONFIG_PF_S3C2410 is not set
# CONFIG_PF_TEGRA2 is not set
# CONFIG_PF_TEGRA is not set
# CONFIG_PF_OMAP is not set
# CONFIG_PF_SA1100 is not set
# CONFIG_PF_XSCALE is not set
# CONFIG_PF_EXYNOS is not set
# CONFIG_PF_KIRKWOOD is not set
# CONFIG_PF_INTEGRATOR is not set
# CONFIG_PF_EXYNOS5 is not set
# CONFIG_PF_BCM2835 is not set
CONFIG_BSP_NAME="imx"
# CONFIG_PF_IMX_21 is not set
# CONFIG_PF_IMX_35 is not set
@@ -30,6 +31,9 @@ CONFIG_ABI_VF=y
CONFIG_CAN_ARM_CPU_CORTEX_A8=y
CONFIG_ARM_CORTEX_A8=y
# CONFIG_ARM_ALIGNMENT_CHECK is not set
CONFIG_ARM_EM_STD=y
# CONFIG_ARM_EM_NS is not set
# CONFIG_ARM_EM_TZ is not set
# CONFIG_FPU is not set
# CONFIG_ARM_CPU_ERRATA is not set
@@ -39,6 +43,7 @@ CONFIG_ARM_CORTEX_A8=y
CONFIG_CONTEXT_4K=y
# CONFIG_FINE_GRAINED_CPUTIME is not set
CONFIG_SCHED_FIXED_PRIO=y
CONFIG_VIRT_OBJ_SPACE=y
#
# Debugging

View File

@@ -23,22 +23,27 @@ CONFIG_CPU_ARM_ARMV7A=y
# CONFIG_CPU_ARM_ARMV7R is not set
CONFIG_CPU_ARMV6KPLUS=y
CONFIG_CPU_ARMV6PLUS=y
# CONFIG_PLATFORM_TYPE_arndale is not set
CONFIG_PLATFORM_TYPE_imx53=y
# CONFIG_PLATFORM_TYPE_imx35 is not set
# CONFIG_PLATFORM_TYPE_rv_pbx is not set
# CONFIG_PLATFORM_TYPE_exynos5 is not set
# CONFIG_PLATFORM_TYPE_rv is not set
# CONFIG_PLATFORM_TYPE_kirkwood is not set
# CONFIG_PLATFORM_TYPE_pandaboard is not set
# CONFIG_PLATFORM_TYPE_tegra3 is not set
# CONFIG_PLATFORM_TYPE_tegra2 is not set
# CONFIG_PLATFORM_TYPE_imx6 is not set
# CONFIG_PLATFORM_TYPE_exynos4 is not set
# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set
# CONFIG_PLATFORM_TYPE_rpi_b is not set
# CONFIG_PLATFORM_TYPE_rv_vexpress_a15 is not set
# CONFIG_PLATFORM_TYPE_imx51 is not set
# CONFIG_PLATFORM_TYPE_omap3evm is not set
# CONFIG_PLATFORM_TYPE_beagleboard is not set
# CONFIG_PLATFORM_TYPE_imx21 is not set
# CONFIG_PLATFORM_TYPE_imx35 is not set
# CONFIG_PLATFORM_TYPE_imx51 is not set
CONFIG_PLATFORM_TYPE_imx53=y
# CONFIG_PLATFORM_TYPE_imx6 is not set
# CONFIG_PLATFORM_TYPE_integrator is not set
# CONFIG_PLATFORM_TYPE_kirkwood is not set
# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set
# CONFIG_PLATFORM_TYPE_omap3evm is not set
# CONFIG_PLATFORM_TYPE_pandaboard is not set
# CONFIG_PLATFORM_TYPE_rv is not set
# CONFIG_PLATFORM_TYPE_rv_pbx is not set
# CONFIG_PLATFORM_TYPE_rv_vexpress is not set
# CONFIG_PLATFORM_TYPE_tegra2 is not set
# CONFIG_PLATFORM_TYPE_rpi_a is not set
# CONFIG_PLATFORM_TYPE_integrator is not set
# CONFIG_PLATFORM_TYPE_custom is not set
CONFIG_PLATFORM_TYPE="imx53"
# CONFIG_USE_DROPS_STDDIR is not set

View File

@@ -12,14 +12,15 @@ CONFIG_ARM=y
# CONFIG_PF_IMX is not set
# CONFIG_PF_REALVIEW is not set
# CONFIG_PF_S3C2410 is not set
# CONFIG_PF_TEGRA2 is not set
# CONFIG_PF_TEGRA is not set
CONFIG_PF_OMAP=y
# CONFIG_PF_SA1100 is not set
# CONFIG_PF_XSCALE is not set
# CONFIG_PF_EXYNOS is not set
# CONFIG_PF_KIRKWOOD is not set
# CONFIG_PF_INTEGRATOR is not set
# CONFIG_PF_EXYNOS5 is not set
CONFIG_BSP_NAME="omap3"
# CONFIG_PF_BCM2835 is not set
CONFIG_BSP_NAME="omap"
# CONFIG_PF_OMAP3_OMAP35XEVM is not set
# CONFIG_PF_OMAP3_BEAGLEBOARD is not set
# CONFIG_PF_OMAP3_AM33XX is not set
@@ -30,8 +31,10 @@ CONFIG_CAN_ARM_CPU_CORTEX_A9=y
CONFIG_CAN_ARM_CACHE_L2CXX0=y
CONFIG_ARM_CORTEX_A9=y
# CONFIG_ARM_ALIGNMENT_CHECK is not set
# CONFIG_ARM_TZ is not set
CONFIG_ARM_CA9_ENABLE_SWP=y
CONFIG_ARM_EM_STD=y
# CONFIG_ARM_EM_NS is not set
# CONFIG_ARM_EM_TZ is not set
# CONFIG_ARM_ENABLE_SWP is not set
CONFIG_ARM_CACHE_L2CXX0=y
CONFIG_FPU=y
# CONFIG_ARM_CPU_ERRATA is not set
@@ -47,6 +50,7 @@ CONFIG_SCHED_FIXED_PRIO=y
# CONFIG_SCHED_WFQ is not set
# CONFIG_SCHED_FP_WFQ is not set
# CONFIG_DISABLE_VIRT_OBJ_SPACE is not set
CONFIG_VIRT_OBJ_SPACE=y
#
# Debugging

View File

@@ -23,22 +23,27 @@ CONFIG_CPU_ARM_ARMV7A=y
# CONFIG_CPU_ARM_ARMV7R is not set
CONFIG_CPU_ARMV6KPLUS=y
CONFIG_CPU_ARMV6PLUS=y
# CONFIG_PLATFORM_TYPE_arndale is not set
# CONFIG_PLATFORM_TYPE_imx53 is not set
# CONFIG_PLATFORM_TYPE_imx35 is not set
# CONFIG_PLATFORM_TYPE_rv_pbx is not set
# CONFIG_PLATFORM_TYPE_exynos5 is not set
# CONFIG_PLATFORM_TYPE_rv is not set
# CONFIG_PLATFORM_TYPE_kirkwood is not set
CONFIG_PLATFORM_TYPE_pandaboard=y
# CONFIG_PLATFORM_TYPE_tegra3 is not set
# CONFIG_PLATFORM_TYPE_tegra2 is not set
# CONFIG_PLATFORM_TYPE_imx6 is not set
# CONFIG_PLATFORM_TYPE_exynos4 is not set
# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set
# CONFIG_PLATFORM_TYPE_rpi_b is not set
# CONFIG_PLATFORM_TYPE_rv_vexpress_a15 is not set
# CONFIG_PLATFORM_TYPE_imx51 is not set
# CONFIG_PLATFORM_TYPE_omap3evm is not set
# CONFIG_PLATFORM_TYPE_beagleboard is not set
# CONFIG_PLATFORM_TYPE_imx21 is not set
# CONFIG_PLATFORM_TYPE_imx35 is not set
# CONFIG_PLATFORM_TYPE_imx51 is not set
# CONFIG_PLATFORM_TYPE_imx53 is not set
# CONFIG_PLATFORM_TYPE_imx6 is not set
# CONFIG_PLATFORM_TYPE_integrator is not set
# CONFIG_PLATFORM_TYPE_kirkwood is not set
# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set
# CONFIG_PLATFORM_TYPE_omap3evm is not set
CONFIG_PLATFORM_TYPE_pandaboard=y
# CONFIG_PLATFORM_TYPE_rv is not set
# CONFIG_PLATFORM_TYPE_rv_pbx is not set
# CONFIG_PLATFORM_TYPE_rv_vexpress is not set
# CONFIG_PLATFORM_TYPE_tegra2 is not set
# CONFIG_PLATFORM_TYPE_rpi_a is not set
# CONFIG_PLATFORM_TYPE_integrator is not set
# CONFIG_PLATFORM_TYPE_custom is not set
CONFIG_PLATFORM_TYPE="pandaboard"
# CONFIG_USE_DROPS_STDDIR is not set

View File

@@ -12,13 +12,14 @@ CONFIG_ARM=y
# CONFIG_PF_IMX is not set
CONFIG_PF_REALVIEW=y
# CONFIG_PF_S3C2410 is not set
# CONFIG_PF_TEGRA2 is not set
# CONFIG_PF_TEGRA is not set
# CONFIG_PF_OMAP is not set
# CONFIG_PF_SA1100 is not set
# CONFIG_PF_XSCALE is not set
# CONFIG_PF_EXYNOS is not set
# CONFIG_PF_KIRKWOOD is not set
# CONFIG_PF_INTEGRATOR is not set
# CONFIG_PF_EXYNOS5 is not set
# CONFIG_PF_BCM2835 is not set
CONFIG_BSP_NAME="realview"
# CONFIG_PF_REALVIEW_EB is not set
# CONFIG_PF_REALVIEW_PB11MP is not set
@@ -34,7 +35,10 @@ CONFIG_CAN_ARM_CPU_CORTEX_A9=y
CONFIG_CAN_ARM_CACHE_L2CXX0=y
CONFIG_ARM_CORTEX_A9=y
# CONFIG_ARM_ALIGNMENT_CHECK is not set
# CONFIG_ARM_CA9_ENABLE_SWP is not set
CONFIG_ARM_EM_STD=y
# CONFIG_ARM_EM_NS is not set
# CONFIG_ARM_EM_TZ is not set
# CONFIG_ARM_ENABLE_SWP is not set
# CONFIG_ARM_CACHE_L2CXX0 is not set
CONFIG_FPU=y
CONFIG_ARM_CPU_ERRATA=y
@@ -46,6 +50,7 @@ CONFIG_ARM_CPU_ERRATA=y
CONFIG_CONTEXT_4K=y
# CONFIG_FINE_GRAINED_CPUTIME is not set
CONFIG_SCHED_FIXED_PRIO=y
CONFIG_VIRT_OBJ_SPACE=y
#
# Debugging

View File

@@ -23,22 +23,27 @@ CONFIG_CPU_ARM_ARMV7A=y
# CONFIG_CPU_ARM_ARMV7R is not set
CONFIG_CPU_ARMV6KPLUS=y
CONFIG_CPU_ARMV6PLUS=y
# CONFIG_PLATFORM_TYPE_arndale is not set
# CONFIG_PLATFORM_TYPE_imx53 is not set
# CONFIG_PLATFORM_TYPE_imx35 is not set
CONFIG_PLATFORM_TYPE_rv_pbx=y
# CONFIG_PLATFORM_TYPE_exynos5 is not set
# CONFIG_PLATFORM_TYPE_rv is not set
# CONFIG_PLATFORM_TYPE_kirkwood is not set
# CONFIG_PLATFORM_TYPE_pandaboard is not set
# CONFIG_PLATFORM_TYPE_tegra3 is not set
# CONFIG_PLATFORM_TYPE_tegra2 is not set
# CONFIG_PLATFORM_TYPE_imx6 is not set
# CONFIG_PLATFORM_TYPE_exynos4 is not set
# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set
# CONFIG_PLATFORM_TYPE_rpi_b is not set
# CONFIG_PLATFORM_TYPE_rv_vexpress_a15 is not set
# CONFIG_PLATFORM_TYPE_imx51 is not set
# CONFIG_PLATFORM_TYPE_omap3evm is not set
# CONFIG_PLATFORM_TYPE_beagleboard is not set
# CONFIG_PLATFORM_TYPE_imx21 is not set
# CONFIG_PLATFORM_TYPE_imx35 is not set
# CONFIG_PLATFORM_TYPE_imx51 is not set
# CONFIG_PLATFORM_TYPE_imx53 is not set
# CONFIG_PLATFORM_TYPE_imx6 is not set
# CONFIG_PLATFORM_TYPE_integrator is not set
# CONFIG_PLATFORM_TYPE_kirkwood is not set
# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set
# CONFIG_PLATFORM_TYPE_omap3evm is not set
# CONFIG_PLATFORM_TYPE_pandaboard is not set
# CONFIG_PLATFORM_TYPE_rv is not set
CONFIG_PLATFORM_TYPE_rv_pbx=y
# CONFIG_PLATFORM_TYPE_rv_vexpress is not set
# CONFIG_PLATFORM_TYPE_tegra2 is not set
# CONFIG_PLATFORM_TYPE_rpi_a is not set
# CONFIG_PLATFORM_TYPE_integrator is not set
# CONFIG_PLATFORM_TYPE_custom is not set
CONFIG_PLATFORM_TYPE="rv_pbx"
# CONFIG_USE_DROPS_STDDIR is not set

View File

@@ -12,28 +12,34 @@ CONFIG_ARM=y
# CONFIG_PF_IMX is not set
CONFIG_PF_REALVIEW=y
# CONFIG_PF_S3C2410 is not set
# CONFIG_PF_TEGRA2 is not set
# CONFIG_PF_TEGRA is not set
# CONFIG_PF_OMAP is not set
# CONFIG_PF_SA1100 is not set
# CONFIG_PF_XSCALE is not set
# CONFIG_PF_EXYNOS is not set
# CONFIG_PF_KIRKWOOD is not set
# CONFIG_PF_INTEGRATOR is not set
# CONFIG_PF_EXYNOS5 is not set
# CONFIG_PF_BCM2835 is not set
CONFIG_BSP_NAME="realview"
# CONFIG_PF_REALVIEW_EB is not set
# CONFIG_PF_REALVIEW_PB11MP is not set
# CONFIG_PF_REALVIEW_PBX is not set
CONFIG_PF_REALVIEW_VEXPRESS=y
CONFIG_PF_REALVIEW_VEXPRESS_A9=y
# CONFIG_PF_REALVIEW_RAM_PHYS_BASE_0x0 is not set
CONFIG_PF_REALVIEW_RAM_PHYS_BASE_0x6=y
CONFIG_PF_REALVIEW_RAM_PHYS_BASE=0x60000000
CONFIG_ABI_VF=y
CONFIG_PF_ARM_MP_CAPABLE=y
CONFIG_CAN_ARM_CPU_CORTEX_A9=y
CONFIG_CAN_ARM_CPU_CORTEX_A15=y
CONFIG_ARM_CORTEX_A9=y
# CONFIG_ARM_CORTEX_A15 is not set
# CONFIG_ARM_ALIGNMENT_CHECK is not set
# CONFIG_ARM_TZ is not set
# CONFIG_ARM_CA9_ENABLE_SWP is not set
CONFIG_ARM_EM_STD=y
# CONFIG_ARM_EM_NS is not set
# CONFIG_ARM_EM_TZ is not set
# CONFIG_ARM_ENABLE_SWP is not set
CONFIG_FPU=y
CONFIG_ARM_CPU_ERRATA=y
@@ -48,6 +54,7 @@ CONFIG_SCHED_FIXED_PRIO=y
# CONFIG_SCHED_WFQ is not set
# CONFIG_SCHED_FP_WFQ is not set
# CONFIG_DISABLE_VIRT_OBJ_SPACE is not set
CONFIG_VIRT_OBJ_SPACE=y
#
# Debugging

View File

@@ -23,22 +23,27 @@ CONFIG_CPU_ARM_ARMV7A=y
# CONFIG_CPU_ARM_ARMV7R is not set
CONFIG_CPU_ARMV6KPLUS=y
CONFIG_CPU_ARMV6PLUS=y
# CONFIG_PLATFORM_TYPE_arndale is not set
# CONFIG_PLATFORM_TYPE_imx53 is not set
# CONFIG_PLATFORM_TYPE_imx35 is not set
# CONFIG_PLATFORM_TYPE_rv_pbx is not set
# CONFIG_PLATFORM_TYPE_exynos5 is not set
# CONFIG_PLATFORM_TYPE_rv is not set
# CONFIG_PLATFORM_TYPE_kirkwood is not set
# CONFIG_PLATFORM_TYPE_pandaboard is not set
# CONFIG_PLATFORM_TYPE_tegra3 is not set
# CONFIG_PLATFORM_TYPE_tegra2 is not set
# CONFIG_PLATFORM_TYPE_imx6 is not set
# CONFIG_PLATFORM_TYPE_exynos4 is not set
# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set
# CONFIG_PLATFORM_TYPE_rpi_b is not set
# CONFIG_PLATFORM_TYPE_rv_vexpress_a15 is not set
# CONFIG_PLATFORM_TYPE_imx51 is not set
# CONFIG_PLATFORM_TYPE_omap3evm is not set
# CONFIG_PLATFORM_TYPE_beagleboard is not set
# CONFIG_PLATFORM_TYPE_imx21 is not set
# CONFIG_PLATFORM_TYPE_imx35 is not set
# CONFIG_PLATFORM_TYPE_imx51 is not set
# CONFIG_PLATFORM_TYPE_imx53 is not set
# CONFIG_PLATFORM_TYPE_imx6 is not set
# CONFIG_PLATFORM_TYPE_integrator is not set
# CONFIG_PLATFORM_TYPE_kirkwood is not set
# CONFIG_PLATFORM_TYPE_omap3_am33xx is not set
# CONFIG_PLATFORM_TYPE_omap3evm is not set
# CONFIG_PLATFORM_TYPE_pandaboard is not set
# CONFIG_PLATFORM_TYPE_rv is not set
# CONFIG_PLATFORM_TYPE_rv_pbx is not set
CONFIG_PLATFORM_TYPE_rv_vexpress=y
# CONFIG_PLATFORM_TYPE_tegra2 is not set
# CONFIG_PLATFORM_TYPE_rpi_a is not set
# CONFIG_PLATFORM_TYPE_integrator is not set
# CONFIG_PLATFORM_TYPE_custom is not set
CONFIG_PLATFORM_TYPE="rv_vexpress"
# CONFIG_USE_DROPS_STDDIR is not set

View File

@@ -39,6 +39,7 @@ CONFIG_CONTEXT_4K=y
# CONFIG_SYNC_TSC is not set
# CONFIG_FINE_GRAINED_CPUTIME is not set
CONFIG_SCHED_FIXED_PRIO=y
CONFIG_VIRT_OBJ_SPACE=y
#
# Debugging

View File

@@ -30,6 +30,7 @@ CONFIG_SCHED_FIXED_PRIO=y
# CONFIG_SCHED_WFQ is not set
# CONFIG_SCHED_FP_WFQ is not set
# CONFIG_DISABLE_VIRT_OBJ_SPACE is not set
CONFIG_VIRT_OBJ_SPACE=y
#
# Debugging

View File

@@ -54,6 +54,12 @@ just do:
This will install all necessary third-party source code in the 'contrib' folder.
For the vesa driver on x86 the x86emu library is required and can be downloaded
and prepared by invoking the following command from within the 'libports'
directory:
! make prepare PKG=x86emu
Now, go to a directory where you want the Genode/Fiasco.OC build directory to
remain. Use the helper script in the 'tool' directory of the Genode
source tree to create the initial build environment. You need to state the

View File

@@ -156,6 +156,11 @@ namespace Genode {
*/
void acknowledge_wakeup();
/**
* Reply to an exception IPC
*/
void acknowledge_exception();
/**
* Return thread ID of last faulter
*/
@@ -183,9 +188,15 @@ namespace Genode {
/**
* Copy the exception registers from the last exception
* to the given thread_state object.
* to the given Thread_state object.
*/
void copy_regs(Thread_state *state);
void get_regs(Thread_state *state);
/*
* Copy the exception reply registers from the given
* Thread_state object
*/
void set_regs(Thread_state state);
};
}

View File

@@ -11,15 +11,46 @@ namespace Fiasco {
#include <l4/sys/task.h>
enum Cap_selectors {
TASK_CAP = L4_BASE_TASK_CAP,
PARENT_CAP = 0x8UL << L4_CAP_SHIFT,
THREADS_BASE_CAP = 0x9UL << L4_CAP_SHIFT,
/**********************************************
** Capability seclectors controlled by core **
**********************************************/
TASK_CAP = L4_BASE_TASK_CAP, /* use the same task cap selector
like L4Re for compatibility in
L4Linux */
/*
* To not clash with other L4Re cap selector constants (e.g.: L4Linux)
* leave the following selectors (2-7) empty
*/
PARENT_CAP = 0x8UL << L4_CAP_SHIFT, /* cap to parent session */
/*
* Each thread has a designated slot in the core controlled cap
* selector area, where its ipc gate capability (for server threads),
* its irq capability (for locks), and the capability to its pager
* gate are stored
*/
THREAD_AREA_BASE = 0x9UL << L4_CAP_SHIFT, /* offset to thread area */
THREAD_AREA_SLOT = 0x3UL << L4_CAP_SHIFT, /* size of one thread slot */
THREAD_GATE_CAP = 0, /* offset to the ipc gate
cap selector in the slot */
THREAD_PAGER_CAP = 0x1UL << L4_CAP_SHIFT, /* offset to the pager
cap selector in the slot */
THREAD_IRQ_CAP = 0x2UL << L4_CAP_SHIFT, /* offset to the irq cap
selector in the slot */
MAIN_THREAD_CAP = THREAD_AREA_BASE + THREAD_GATE_CAP, /* shortcut to the
main thread's
gate cap */
/*********************************************************
** Capability seclectors controlled by the task itself **
*********************************************************/
USER_BASE_CAP = 0x200UL << L4_CAP_SHIFT,
THREAD_GATE_CAP = 0,
THREAD_PAGER_CAP = 0x1UL << L4_CAP_SHIFT,
THREAD_IRQ_CAP = 0x2UL << L4_CAP_SHIFT,
THREAD_CAP_SLOT = THREAD_IRQ_CAP + L4_CAP_SIZE,
MAIN_THREAD_CAP = THREADS_BASE_CAP + THREAD_GATE_CAP
};
enum Utcb_regs {

View File

@@ -18,11 +18,11 @@
#include <base/capability.h>
#include <base/lock.h>
#include <cpu/cpu_state.h>
#include <base/thread_state_base.h>
namespace Genode {
struct Thread_state : public Cpu_state
struct Thread_state : Thread_state_base
{
Native_thread kcap; /* thread's gate cap in its pd */
int id; /* id of gate capability */

View File

@@ -67,11 +67,23 @@ namespace Genode {
void single_step(Thread_capability thread, bool enable) {
call<Rpc_single_step>(thread, enable); }
unsigned num_cpus() const {
return call<Rpc_num_cpus>(); }
Affinity::Space affinity_space() const {
return call<Rpc_affinity_space>(); }
void affinity(Thread_capability thread, unsigned cpu) {
call<Rpc_affinity>(thread, cpu); }
void affinity(Thread_capability thread, Affinity::Location location) {
call<Rpc_affinity>(thread, location); }
Dataspace_capability trace_control() {
return call<Rpc_trace_control>(); }
unsigned trace_control_index(Thread_capability thread) {
return call<Rpc_trace_control_index>(thread); }
Dataspace_capability trace_buffer(Thread_capability thread) {
return call<Rpc_trace_buffer>(thread); }
Dataspace_capability trace_policy(Thread_capability thread) {
return call<Rpc_trace_policy>(thread); }
void enable_vcpu(Thread_capability cap, addr_t vcpu_state) {
call<Rpc_enable_vcpu>(cap, vcpu_state); }

View File

@@ -22,13 +22,13 @@ namespace Fiasco {
#if 1
#define ASSERT(e, s) \
do { if (!(e)) { \
Fiasco::outstring(ESC_ERR s ESC_END "\n"); \
Fiasco::outstring(__FILE__ ":"); \
Fiasco::outhex32((int)__LINE__); \
Fiasco::outstring("\n"); \
enter_kdebug("ASSERT"); \
} \
do { if (!(e)) { \
Fiasco::outstring(ESC_ERR s ESC_END "\n"); \
Fiasco::outstring(__FILE__ ":"); \
Fiasco::outdec(__LINE__); \
Fiasco::outstring("\n"); \
enter_kdebug("ASSERT"); \
} \
} while(0)
#else
#define ASSERT(e, s) do { } while (0)

View File

@@ -0,0 +1,3 @@
include $(REP_DIR)/lib/mk/base.inc
SRC_CC += thread/thread_context_area.cc

View File

@@ -6,8 +6,9 @@
LIBS += cxx syscall startup
SRC_CC += main_bootstrap.cc
SRC_CC += ipc/ipc.cc ipc/pager.cc
SRC_CC += pager/pager.cc
SRC_CC += pager/pager.cc pager/common.cc
SRC_CC += avl_tree/avl_tree.cc
SRC_CC += allocator/slab.cc
SRC_CC += allocator/allocator_avl.cc
@@ -20,9 +21,14 @@ SRC_CC += lock/lock.cc
SRC_CC += env/spin_lock.cc env/cap_map.cc
SRC_CC += signal/signal.cc signal/common.cc
SRC_CC += server/server.cc server/common.cc
SRC_CC += thread/thread.cc thread/thread_bootstrap.cc
SRC_CC += thread/thread.cc thread/thread_bootstrap.cc thread/trace.cc
INC_DIR += $(REP_DIR)/src/base/lock $(BASE_DIR)/src/base/lock
INC_DIR += $(REP_DIR)/src/base/lock
INC_DIR += $(BASE_DIR)/src/base/lock
INC_DIR += $(BASE_DIR)/src/base/thread
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
vpath main_bootstrap.cc $(REP_DIR)/src/platform
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
# vi: set ft=make :

View File

@@ -9,7 +9,7 @@ LIBS += base-common
SRC_CC += console/log_console.cc
SRC_CC += env/env.cc env/context_area.cc env/reload_parent_cap.cc \
env/cap_map_remove.cc env/cap_alloc.cc
SRC_CC += thread/thread_start.cc thread/thread_context_area.cc
SRC_CC += thread/thread_start.cc
INC_DIR += $(BASE_DIR)/src/base/env

View File

@@ -0,0 +1,3 @@
include $(REP_DIR)/lib/mk/base.inc
SRC_CC += thread/arndale/thread_context_area.cc

View File

@@ -0,0 +1,3 @@
include $(REP_DIR)/lib/mk/base.inc
SRC_CC += thread/thread_context_area.cc

View File

@@ -1,4 +1,5 @@
SPECS += foc_arm platform_arndale uboot
include $(call select_from_repositories,mk/spec-fpu_vfpv3.mk)
include $(call select_from_repositories,mk/spec-platform_arndale.mk)
include $(call select_from_repositories,mk/spec-foc_arm.mk)

View File

@@ -11,6 +11,7 @@
#
proc install_pxe_bootloader_to_run_dir { } {
exec cp [genode_dir]/tool/boot/pulsar [run_dir]/boot/pulsar
exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender
}
##
@@ -123,37 +124,6 @@ proc bin_dir { } {
exit 1
}
#
# Parse entry point address out of final elf image for u-boot
#
proc entrypoint { } {
global _entrypoint
set _entrypoint [exec [cross_dev_prefix]readelf -h [run_dir]/image.elf | grep "Entry point" | sed -e "s/.*Entry point address: *//"]
return $_entrypoint
}
#
# Parse load address out of final elf image for u-boot
#
proc loadaddr { } {
global _loadaddr
set _loadaddr [regexp -inline -all -- {\S+} [exec [cross_dev_prefix]readelf -l [run_dir]/image.elf | grep -m 1 "LOAD"]]
return [lindex $_loadaddr 3]
}
#
# Create an u-boot image if appropriated SPEC is set
#
proc build_boot_uimage { } {
if {[have_spec uboot]} {
exec [cross_dev_prefix]objcopy -O binary [run_dir]/image.elf [run_dir]/image.bin
exec gzip --best --force [run_dir]/image.bin
exec mkimage -A arm -O linux -T kernel -C gzip -a [loadaddr] -e [entrypoint] -d [run_dir]/image.bin.gz [run_dir]/uImage
}
}
set fiasco_serial_esc_arg "-serial_esc "
proc build_boot_image_x86 {binaries} {
@@ -209,7 +179,8 @@ proc build_boot_image_x86 {binaries} {
# Generate pulsar config file
#
set fh [open "[run_dir]/config-52-54-00-12-34-56" "WRONLY CREAT TRUNC"]
puts $fh " exec /fiasco/bootstrap -modaddr=0x01100000"
puts $fh " exec /boot/bender"
puts $fh " load /fiasco/bootstrap -modaddr=0x01100000"
puts $fh " load /fiasco/fiasco -serial_esc"
puts $fh " load /fiasco/sigma0"
puts $fh " load /genode/core"
@@ -223,17 +194,15 @@ proc build_boot_image_x86 {binaries} {
# Generate pulsar config file pointing to the config file above.
#
if {[info exists ::env(PXE_TFTP_DIR_BASE)] && [info exists ::env(PXE_TFTP_DIR_OFFSET)]} {
set len [string length $::env(PXE_TFTP_DIR_BASE)]
set tmp [string range [pwd] 0 $len-1]
# if PXE_TFTP_DIR_BASE is part of pwd (autopilot) we don't need DIR_OFFSET
if ([string match $tmp $::env(PXE_TFTP_DIR_BASE)]) {
set tftp_local_offset [string range [pwd] $len [string length [pwd]]]
} else {
set tftp_local_offset $::env(PXE_TFTP_DIR_OFFSET)
exec ln -nfs "[pwd]" "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)"
set tftp_base ""
if {[get_cmd_switch --tftp-absolute]} {
set tftp_base $::env(PXE_TFTP_DIR_BASE)
}
set fh [open "$::env(PXE_TFTP_DIR_BASE)$::env(PXE_TFTP_DIR_OFFSET)/config-00-00-00-00-00-00" "WRONLY CREAT TRUNC"]
puts $fh " root $tftp_local_offset/[run_dir]"
puts $fh " root $tftp_base$::env(PXE_TFTP_DIR_OFFSET)/[run_dir]"
puts $fh " config config-52-54-00-12-34-56"
close $fh
}
@@ -277,7 +246,7 @@ proc build_boot_image_arm {binaries} {
}
exec cp [bin_dir]/bootstrap.elf [run_dir]/image.elf
build_boot_uimage
build_uboot_image [run_dir]/image.elf
puts "\nboot image: [run_dir]/image.elf\n"
@@ -319,7 +288,7 @@ proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id
return
}
if {[is_serial_available]} {
spawn_serial $wait_for_re $timeout_value
spawn_serial $wait_for_re $timeout_value "L4 Bootstrapper"
return
}

View File

@@ -17,23 +17,46 @@
#include <base/ipc_pager.h>
void Genode::Ipc_pager::copy_regs(Thread_state *state)
void Genode::Ipc_pager::get_regs(Thread_state *state)
{
state->ip = _regs.pc;
state->sp = _regs.sp;
state->r0 = _regs.r[0];
state->r1 = _regs.r[1];
state->r2 = _regs.r[2];
state->r3 = _regs.r[3];
state->r4 = _regs.r[4];
state->r5 = _regs.r[5];
state->r6 = _regs.r[6];
state->r7 = _regs.r[7];
state->r8 = _regs.r[8];
state->r9 = _regs.r[9];
state->r10 = _regs.r[10];
state->r11 = _regs.r[11];
state->r12 = _regs.r[12];
state->lr = _regs.ulr;
state->ip = _regs.pc;
state->sp = _regs.sp;
state->r0 = _regs.r[0];
state->r1 = _regs.r[1];
state->r2 = _regs.r[2];
state->r3 = _regs.r[3];
state->r4 = _regs.r[4];
state->r5 = _regs.r[5];
state->r6 = _regs.r[6];
state->r7 = _regs.r[7];
state->r8 = _regs.r[8];
state->r9 = _regs.r[9];
state->r10 = _regs.r[10];
state->r11 = _regs.r[11];
state->r12 = _regs.r[12];
state->lr = _regs.ulr;
state->cpsr = _regs.cpsr;
}
void Genode::Ipc_pager::set_regs(Thread_state state)
{
_regs.pc = state.ip;
_regs.sp = state.sp;
_regs.r[0] = state.r0;
_regs.r[1] = state.r1;
_regs.r[2] = state.r2;
_regs.r[3] = state.r3;
_regs.r[4] = state.r4;
_regs.r[5] = state.r5;
_regs.r[6] = state.r6;
_regs.r[7] = state.r7;
_regs.r[8] = state.r8;
_regs.r[9] = state.r9;
_regs.r[10] = state.r10;
_regs.r[11] = state.r11;
_regs.r[12] = state.r12;
_regs.ulr = state.lr;
_regs.cpsr = state.cpsr;
}

View File

@@ -291,8 +291,8 @@ void Ipc_client::_call()
}
Ipc_client::Ipc_client(Native_capability const &srv,
Msgbuf_base *snd_msg, Msgbuf_base *rcv_msg)
Ipc_client::Ipc_client(Native_capability const &srv, Msgbuf_base *snd_msg,
Msgbuf_base *rcv_msg, unsigned short)
: Ipc_istream(rcv_msg), Ipc_ostream(srv, snd_msg), _result(0) { }

View File

@@ -112,6 +112,14 @@ void Ipc_pager::acknowledge_wakeup()
}
void Ipc_pager::acknowledge_exception()
{
memcpy(l4_utcb_exc(), &_regs, sizeof(l4_exc_regs_t));
l4_cap_idx_t dst = Fiasco::Capability::valid(_last) ? _last : L4_SYSF_REPLY;
l4_ipc_send(dst, l4_utcb(), l4_msgtag(0, L4_UTCB_EXCEPTION_REGS_SIZE, 0, 0), L4_IPC_SEND_TIMEOUT_0);
}
Ipc_pager::Ipc_pager()
: Native_capability((Cap_index*)Fiasco::l4_utcb_tcr()->user[Fiasco::UTCB_TCR_BADGE]),
_badge(0) { }

View File

@@ -17,7 +17,7 @@
#include <base/ipc_pager.h>
void Genode::Ipc_pager::copy_regs(Thread_state *state)
void Genode::Ipc_pager::get_regs(Genode::Thread_state *state)
{
state->ip = _regs.ip;
state->sp = _regs.sp;
@@ -33,3 +33,22 @@ void Genode::Ipc_pager::copy_regs(Thread_state *state)
state->eflags = _regs.flags;
state->trapno = _regs.trapno;
}
void Genode::Ipc_pager::set_regs(Genode::Thread_state state)
{
_regs.ip = state.ip;
_regs.sp = state.sp;
_regs.edi = state.edi;
_regs.esi = state.esi;
_regs.ebp = state.ebp;
_regs.ebx = state.ebx;
_regs.edx = state.edx;
_regs.ecx = state.ecx;
_regs.eax = state.eax;
_regs.gs = state.gs;
_regs.fs = state.fs;
_regs.flags = state.eflags;
_regs.trapno = state.trapno;
}

View File

@@ -17,7 +17,7 @@
#include <base/ipc_pager.h>
void Genode::Ipc_pager::copy_regs(Thread_state *state)
void Genode::Ipc_pager::get_regs(Thread_state *state)
{
state->ip = _regs.ip;
state->sp = _regs.sp;
@@ -40,3 +40,29 @@ void Genode::Ipc_pager::copy_regs(Thread_state *state)
state->eflags = _regs.flags;
state->trapno = _regs.trapno;
}
void Genode::Ipc_pager::set_regs(Thread_state state)
{
_regs.ip = state.ip;
_regs.sp = state.sp;
_regs.r8 = state.r8;
_regs.r9 = state.r9;
_regs.r10 = state.r10;
_regs.r11 = state.r11;
_regs.r12 = state.r12;
_regs.r13 = state.r13;
_regs.r14 = state.r14;
_regs.r15 = state.r15;
_regs.rax = state.rax;
_regs.rbx = state.rbx;
_regs.rcx = state.rcx;
_regs.rdx = state.rdx;
_regs.rdi = state.rdi;
_regs.rsi = state.rsi;
_regs.rbp = state.rbp;
_regs.ss = state.ss;
_regs.flags = state.eflags;
_regs.trapno = state.trapno;
}

View File

@@ -71,7 +71,7 @@ void Pager_activation_base::entry()
{
if (pager.is_exception()) {
Lock::Guard guard(obj->state.lock);
pager.copy_regs(&obj->state);
pager.get_regs(&obj->state);
obj->state.exceptions++;
obj->state.in_exception = true;
obj->submit_exception_signal();
@@ -81,6 +81,8 @@ void Pager_activation_base::entry()
/* handle request */
if (obj->pager(pager)) {
/* could not resolv - leave thread in pagefault */
Lock::Guard guard(obj->state.lock);
obj->state.unresolved_page_fault = true;
PDBG("Could not resolve pf=%p ip=%p",
(void*)pager.fault_addr(), (void*)pager.fault_ip());
} else {
@@ -105,15 +107,17 @@ void Pager_activation_base::entry()
pager.set_reply_dst(Native_thread());
pager.acknowledge_wakeup();
/* revert exception flag */
{
Lock::Guard guard(obj->state.lock);
/* revert exception flag */
obj->state.in_exception = false;
/* set new register contents */
pager.set_regs(obj->state);
}
/* send wake up message to requested thread */
pager.set_reply_dst(obj->badge());
pager.acknowledge_wakeup();
pager.acknowledge_exception();
break;
}
@@ -124,8 +128,7 @@ void Pager_activation_base::entry()
case Ipc_pager::PAUSE:
{
Lock::Guard guard(obj->state.lock);
pager.copy_regs(&obj->state);
pager.get_regs(&obj->state);
obj->state.exceptions++;
obj->state.in_exception = true;

View File

@@ -6,6 +6,10 @@
* We need to place the context area within core outside the physical memory.
* Sigma0 maps physical to core-local memory always 1:1 when using
* SIGMA0_REQ_FPAGE_ANY. Those mappings would interfere with the context area.
*
* Because the UTCB area of a task resides at the end of the context area and
* its address gets calculated by core, the context area in other tasks needs
* to be at the same address as in core.
*/
#include <base/native_types.h>

View File

@@ -182,7 +182,8 @@ void Thread_base::name(char *dst, size_t dst_len)
}
Thread_base *Thread_base::myself() {
Thread_base *Thread_base::myself()
{
using namespace Fiasco;
return reinterpret_cast<Thread_base*>(l4_utcb_tcr()->user[UTCB_TCR_THREAD_OBJ]);

View File

@@ -1,5 +1,5 @@
# override default location of thread context area within core
vpath thread_context_area.cc $(PRG_DIR)
vpath thread_context_area.cc $(REP_DIR)/src/base/thread/arndale
include $(PRG_DIR)/../target.inc

View File

@@ -1,6 +1,7 @@
/*
* \brief Core-specific instance of the CPU session/thread interfaces
* \author Christian Helmuth
* \author Norman Feske
* \author Stefan Kalkowski
* \date 2006-07-17
*/
@@ -26,6 +27,8 @@
/* core includes */
#include <platform_thread.h>
#include <trace/control_area.h>
#include <trace/source_registry.h>
namespace Genode {
@@ -45,18 +48,33 @@ namespace Genode {
class Cpu_thread_component : public Rpc_object<Cpu_thread>,
public List<Cpu_thread_component>::Element
{
public:
typedef Trace::Session_label Session_label;
typedef Trace::Thread_name Thread_name;
private:
Thread_name const _name;
Platform_thread _platform_thread;
bool _bound; /* pd binding flag */
Signal_context_capability _sigh; /* exception handler */
unsigned const _trace_control_index;
Trace::Source _trace_source;
public:
Cpu_thread_component(const char *name, unsigned priority, addr_t utcb,
Signal_context_capability sigh)
Cpu_thread_component(Session_label const &label,
Thread_name const &name,
unsigned priority, addr_t utcb,
Signal_context_capability sigh,
unsigned trace_control_index,
Trace::Control &trace_control)
:
_platform_thread(name, priority), _bound(false), _sigh(sigh)
_name(name),
_platform_thread(name.string(), priority, utcb), _bound(false),
_sigh(sigh), _trace_control_index(trace_control_index),
_trace_source(label, _name, trace_control)
{
update_exception_sigh();
}
@@ -66,9 +84,10 @@ namespace Genode {
** Accessor functions **
************************/
inline Platform_thread * platform_thread() { return &_platform_thread; }
inline bool bound() const { return _bound; }
inline void bound(bool b) { _bound = b; }
Platform_thread *platform_thread() { return &_platform_thread; }
bool bound() const { return _bound; }
void bound(bool b) { _bound = b; }
Trace::Source *trace_source() { return &_trace_source; }
void sigh(Signal_context_capability sigh)
{
@@ -80,11 +99,20 @@ namespace Genode {
* Propagate exception handler to platform thread
*/
void update_exception_sigh();
/**
* Return index within the CPU-session's trace control area
*/
unsigned trace_control_index() const { return _trace_control_index; }
};
class Cpu_session_component : public Rpc_object<Foc_cpu_session>
{
public:
typedef Cpu_thread_component::Session_label Session_label;
private:
/**
@@ -93,16 +121,21 @@ namespace Genode {
*/
typedef Tslab<Cpu_thread_component, 1024> Cpu_thread_allocator;
Session_label _label;
Rpc_entrypoint *_thread_ep;
Pager_entrypoint *_pager_ep;
Allocator_guard _md_alloc; /* guarded meta-data allocator */
Cpu_thread_allocator _thread_alloc; /* meta-data allocator */
Lock _thread_alloc_lock; /* protect alloc access */
Lock _thread_alloc_lock; /* protect allocator access */
List<Cpu_thread_component> _thread_list;
Lock _thread_list_lock; /* protect thread list */
unsigned _priority; /* priority of threads
created with this
session */
Affinity::Location _location; /* CPU affinity of this
session */
Trace::Source_registry &_trace_sources;
Trace::Control_area _trace_control_area;
/**
* Exception handler that will be invoked unless overridden by a
@@ -125,9 +158,11 @@ namespace Genode {
/**
* Constructor
*/
Cpu_session_component(Rpc_entrypoint *thread_ep,
Pager_entrypoint *pager_ep,
Allocator *md_alloc, const char *args);
Cpu_session_component(Rpc_entrypoint *thread_ep,
Pager_entrypoint *pager_ep,
Allocator *md_alloc,
Trace::Source_registry &trace_sources,
const char *args, Affinity const &affinity);
/**
* Destructor
@@ -159,8 +194,12 @@ namespace Genode {
Thread_state state(Thread_capability);
void state(Thread_capability, Thread_state const &);
void exception_handler(Thread_capability, Signal_context_capability);
unsigned num_cpus() const;
void affinity(Thread_capability, unsigned);
Affinity::Space affinity_space() const;
void affinity(Thread_capability, Affinity::Location);
Dataspace_capability trace_control();
unsigned trace_control_index(Thread_capability);
Dataspace_capability trace_buffer(Thread_capability);
Dataspace_capability trace_policy(Thread_capability);
/***********************************

View File

@@ -159,6 +159,7 @@ namespace Genode {
addr_t vm_start() const { return _vm_start; }
size_t vm_size() const { return _vm_size; }
Rom_fs *rom_fs() { return &_rom_fs; }
Affinity::Space affinity_space() const;
void wait_for_exit();
};

View File

@@ -37,20 +37,22 @@ namespace Genode {
friend class Platform_pd;
State _state;
bool _core_thread;
Cap_mapping _thread;
Cap_mapping _gate;
Cap_mapping _pager;
Cap_mapping _irq;
Native_utcb _utcb;
char _name[32]; /* thread name that will be
registered at the kernel
debugger */
Platform_pd *_platform_pd; /* protection domain thread
is bound to */
Pager_object *_pager_obj;
unsigned _prio;
State _state;
bool _core_thread;
Cap_mapping _thread;
Cap_mapping _gate;
Cap_mapping _pager;
Cap_mapping _irq;
Native_utcb _utcb;
char _name[32]; /* thread name that will be
registered at the kernel
debugger */
Platform_pd *_platform_pd; /* protection domain thread
is bound to */
Pager_object *_pager_obj;
unsigned _prio;
Affinity::Location _location;
void _create_thread(void);
void _finalize_construction(const char *name);
@@ -63,7 +65,7 @@ namespace Genode {
/**
* Constructor for non-core threads
*/
Platform_thread(const char *name, unsigned priority);
Platform_thread(const char *name, unsigned priority, addr_t);
/**
* Constructor for core main-thread
@@ -136,7 +138,12 @@ namespace Genode {
/**
* Set the executing CPU for this thread
*/
void affinity(unsigned cpu);
void affinity(Affinity::Location location);
/**
* Get the executing CPU for this thread
*/
Affinity::Location affinity();
/**
* Return the address space to which the thread is bound

View File

@@ -48,7 +48,7 @@ class Genode::Interrupt_handler : public Thread<4096>
{
private:
Interrupt_handler() { start(); }
Interrupt_handler() : Thread("irq_handler") { start(); }
public:
@@ -170,7 +170,7 @@ Irq_session_component::Irq_session_component(Cap_session *cap_session,
PERR("Unavailable IRQ %lx requested", irq_number);
throw Root::Invalid_args();
}
long irq_trigger = Arg_string::find_arg(args, "irq_trigger").long_value(-1);
irq_trigger = irq_trigger == -1 ? 0 : irq_trigger;
@@ -216,10 +216,8 @@ void Irq_session_component::wait_for_irq()
}
Irq_session_component::~Irq_session_component()
{
PERR("Implement me, immediately!");
}
Irq_session_component::~Irq_session_component() {
_proxy->remove_sharer(); }
/***************************************

View File

@@ -35,6 +35,7 @@ namespace Fiasco {
#include <l4/sys/thread.h>
#include <l4/sys/types.h>
#include <l4/sys/utcb.h>
#include <l4/sys/scheduler.h>
static l4_kernel_info_t *kip;
}
@@ -120,7 +121,7 @@ static void _core_pager_loop()
}
Platform::Sigma0::Sigma0(Cap_index* i) : Pager_object(0)
Platform::Sigma0::Sigma0(Cap_index* i) : Pager_object(0, Affinity::Location())
{
/*
* We use the Pager_object here in a slightly different manner,
@@ -131,7 +132,7 @@ Platform::Sigma0::Sigma0(Cap_index* i) : Pager_object(0)
Platform::Core_pager::Core_pager(Platform_pd *core_pd, Sigma0 *sigma0)
: Platform_thread("core.pager"), Pager_object(0)
: Platform_thread("core.pager"), Pager_object(0, Affinity::Location())
{
Platform_thread::pager(sigma0);
@@ -387,7 +388,7 @@ void Platform::_setup_basics()
Native_config::context_area_virtual_size());
/* preserve utcb- area in core's virtual address space */
_region_alloc.remove_range((addr_t)l4_utcb(), L4_PAGESIZE);
_region_alloc.remove_range((addr_t)l4_utcb(), L4_PAGESIZE * 16);
/* I/O memory could be the whole user address space */
/* FIXME if the kernel helps to find out max address - use info here */
@@ -511,4 +512,31 @@ void Platform::wait_for_exit()
}
Affinity::Space Platform::affinity_space() const
{
using namespace Genode;
using namespace Fiasco;
l4_sched_cpu_set_t cpus = l4_sched_cpu_set(0, 0, 1);
l4_umword_t cpus_max;
l4_msgtag_t res = l4_scheduler_info(L4_BASE_SCHEDULER_CAP, &cpus_max,
&cpus);
if (l4_error(res)) {
PERR("could not detect number of CPUs - assuming 1 CPU");
return 1;
}
unsigned cpus_online = 0;
for (unsigned i = 0; i < sizeof(cpus.map) * 8; i++)
if ((cpus.map >> i) & 0x1)
cpus_online ++;
/*
* Currently, we do not gather any information about the topology of CPU
* nodes but just return a one-dimensional affinity space.
*/
return Affinity::Space(cpus_online, 1);
}
void Core_parent::exit(int exit_value) { }

View File

@@ -53,7 +53,7 @@ int Platform_pd::bind_thread(Platform_thread *thread)
else
thread->_utcb =
reinterpret_cast<l4_utcb_t*>(utcb_area_start() + i * L4_UTCB_OFFSET);
Native_thread cap_offset = THREADS_BASE_CAP + i * THREAD_CAP_SLOT;
Native_thread cap_offset = THREAD_AREA_BASE + i * THREAD_AREA_SLOT;
thread->_gate.remote = cap_offset + THREAD_GATE_CAP;
thread->_pager.remote = cap_offset + THREAD_PAGER_CAP;
thread->_irq.remote = cap_offset + THREAD_IRQ_CAP;

View File

@@ -174,8 +174,8 @@ void Platform_thread::pager(Pager_object *pager_obj)
void Platform_thread::state(Thread_state s)
{
PDBG("Not implemented");
throw Cpu_session::State_access_failed();
if (_pager_obj)
_pager_obj->state = s;
}
@@ -198,8 +198,12 @@ void Platform_thread::cancel_blocking()
}
void Platform_thread::affinity(unsigned cpu)
void Platform_thread::affinity(Affinity::Location location)
{
_location = location;
int const cpu = location.xpos();
l4_sched_param_t params = l4_sched_param(_prio);
params.affinity = l4_sched_cpu_set(cpu, 0, 1);
l4_msgtag_t tag = l4_scheduler_run_thread(L4_BASE_SCHEDULER_CAP,
@@ -209,6 +213,12 @@ void Platform_thread::affinity(unsigned cpu)
}
Affinity::Location Platform_thread::affinity()
{
return _location;
}
void Platform_thread::_create_thread()
{
l4_msgtag_t tag = l4_factory_create_thread(L4_BASE_FACTORY_CAP,
@@ -251,8 +261,7 @@ Weak_ptr<Address_space> Platform_thread::address_space()
}
Platform_thread::Platform_thread(const char *name,
unsigned prio)
Platform_thread::Platform_thread(const char *name, unsigned prio, addr_t)
: _state(DEAD),
_core_thread(false),
_thread(true),

View File

@@ -31,6 +31,7 @@ SRC_CC = cap_session_component.cc \
rom_session_component.cc \
signal_session_component.cc \
signal_source_component.cc \
trace_session_component.cc \
thread_start.cc \
thread_context_area.cc \
core_printf.cc
@@ -39,6 +40,7 @@ INC_DIR += $(REP_DIR)/src/core/include \
$(GEN_CORE_DIR)/include \
$(REP_DIR)/src/base/lock \
$(BASE_DIR)/src/base/lock \
$(BASE_DIR)/src/base/thread \
$(REP_DIR)/src/base/console
vpath context_area.cc $(GEN_CORE_DIR)
@@ -54,6 +56,7 @@ vpath ram_session_component.cc $(GEN_CORE_DIR)
vpath rm_session_component.cc $(GEN_CORE_DIR)
vpath rom_session_component.cc $(GEN_CORE_DIR)
vpath signal_session_component.cc $(GEN_CORE_DIR)
vpath trace_session_component.cc $(GEN_CORE_DIR)
vpath core_printf.cc $(BASE_DIR)/src/base/console
vpath %.cc $(REP_DIR)/src/core
vpath %.cc $(REP_DIR)/src/base/thread

View File

@@ -64,15 +64,20 @@ void Genode::Platform::setup_irq_mode(unsigned irq_number, unsigned trigger,
/*
* Translate ACPI interrupt mode (trigger/polarity) to Fiasco APIC
* values. Default is level low for IRQs > 15
* values. Default is level low
*/
mode = (trigger == Irq_session::TRIGGER_LEVEL) ||
(irq_number > 15 && trigger == Irq_session::TRIGGER_UNCHANGED)
? L4_IRQ_F_LEVEL : L4_IRQ_F_EDGE;
mode |= (polarity == Irq_session::POLARITY_LOW) ||
(irq_number > 15 && polarity == Irq_session::POLARITY_UNCHANGED)
? L4_IRQ_F_NEG : L4_IRQ_F_POS;
if (trigger == Irq_session::TRIGGER_LEVEL || trigger == Irq_session::TRIGGER_UNCHANGED) {
if (polarity == Irq_session::POLARITY_LOW || polarity == Irq_session::POLARITY_UNCHANGED)
mode = L4_IRQ_F_LEVEL_LOW;
else
mode = L4_IRQ_F_LEVEL_HIGH;
}
else {
if (polarity == Irq_session::POLARITY_LOW || polarity == Irq_session::POLARITY_UNCHANGED)
mode = L4_IRQ_F_NEG_EDGE;
else
mode = L4_IRQ_F_POS_EDGE;
}
}
/*

View File

@@ -1,6 +1,7 @@
/*
* \brief Platform-specific helper functions for the _main() function
* \author Christian Prochaska
* \author Christian Helmuth
* \date 2009-08-05
*/
@@ -11,9 +12,6 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _PLATFORM___MAIN_HELPER_H_
#define _PLATFORM___MAIN_HELPER_H_
/* Genode includes */
#include <base/stdint.h>
#include <base/native_types.h>
@@ -23,16 +21,21 @@ namespace Fiasco {
#include <l4/sys/utcb.h>
}
enum { MAIN_THREAD_CAP_ID = 1 };
static void main_thread_bootstrap() {
using namespace Genode;
namespace Genode { void platform_main_bootstrap(); }
Cap_index *i
= cap_map()->insert(MAIN_THREAD_CAP_ID, Fiasco::MAIN_THREAD_CAP);
Fiasco::l4_utcb_tcr()->user[Fiasco::UTCB_TCR_BADGE] = (unsigned long) i;
Fiasco::l4_utcb_tcr()->user[Fiasco::UTCB_TCR_THREAD_OBJ] = 0;
void Genode::platform_main_bootstrap()
{
static struct Bootstrap
{
enum { MAIN_THREAD_CAP_ID = 1 };
Bootstrap()
{
Cap_index *i(cap_map()->insert(MAIN_THREAD_CAP_ID, Fiasco::MAIN_THREAD_CAP));
Fiasco::l4_utcb_tcr()->user[Fiasco::UTCB_TCR_BADGE] = (unsigned long) i;
Fiasco::l4_utcb_tcr()->user[Fiasco::UTCB_TCR_THREAD_OBJ] = 0;
}
} bootstrap;
}
#endif /* _PLATFORM___MAIN_HELPER_H_ */

View File

@@ -8,7 +8,7 @@ LIBS += cxx
SRC_CC += cap_copy.cc
SRC_CC += ipc/ipc.cc ipc/ipc_marshal_cap.cc
SRC_CC += pager/pager.cc
SRC_CC += pager/pager.cc pager/common.cc
SRC_CC += avl_tree/avl_tree.cc
SRC_CC += allocator/slab.cc
SRC_CC += allocator/allocator_avl.cc

View File

@@ -52,8 +52,8 @@ Ipc_istream::~Ipc_istream() { }
void Ipc_client::_call() { }
Ipc_client::Ipc_client(Native_capability const &srv,
Msgbuf_base *snd_msg, Msgbuf_base *rcv_msg)
Ipc_client::Ipc_client(Native_capability const &srv, Msgbuf_base *snd_msg,
Msgbuf_base *rcv_msg, unsigned short)
: Ipc_istream(rcv_msg), Ipc_ostream(srv, snd_msg), _result(0)
{ }

View File

@@ -1,27 +0,0 @@
/*
* \brief Syscall declarations specific for ARM V7A systems
* \author Martin Stein
* \date 2011-11-30
*/
/*
* Copyright (C) 2011-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__ARM__BASE__SYSCALL_H_
#define _INCLUDE__ARM__BASE__SYSCALL_H_
/* Genode includes */
#include <base/stdint.h>
namespace Kernel
{
typedef Genode::uint32_t Syscall_arg;
typedef Genode::uint32_t Syscall_ret;
}
#endif /* _INCLUDE__ARM__BASE__SYSCALL_H_ */

View File

@@ -0,0 +1,66 @@
/*
* \brief Interface between kernel and userland
* \author Martin Stein
* \date 2011-11-30
*/
/*
* Copyright (C) 2011-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _KERNEL__INTERFACE_SUPPORT_H_
#define _KERNEL__INTERFACE_SUPPORT_H_
/* Genode includes */
#include <base/stdint.h>
namespace Kernel
{
typedef Genode::uint32_t Call_arg;
typedef Genode::uint32_t Call_ret;
/**
* Registers that are provided by a kernel thread-object for user access
*/
struct Thread_reg_id
{
enum {
R0 = 0,
R1 = 1,
R2 = 2,
R3 = 3,
R4 = 4,
R5 = 5,
R6 = 6,
R7 = 7,
R8 = 8,
R9 = 9,
R10 = 10,
R11 = 11,
R12 = 12,
SP = 13,
LR = 14,
IP = 15,
CPSR = 16,
CPU_EXCEPTION = 17,
FAULT_TLB = 18,
FAULT_ADDR = 19,
FAULT_WRITES = 20,
FAULT_SIGNAL = 21,
};
};
/**
* Events that are provided by a kernel thread-object for user handling
*/
struct Thread_event_id
{
enum { FAULT = 0 };
};
}
#endif /* _KERNEL__INTERFACE_SUPPORT_H_ */

View File

@@ -1,174 +0,0 @@
/*
* \brief IPC backend for a Genode pager
* \author Martin Stein
* \date 2012-03-28
*/
/*
* Copyright (C) 2012-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__IPC_PAGER_H_
#define _INCLUDE__BASE__IPC_PAGER_H_
/* Genode includes */
#include <base/thread.h>
#include <base/ipc.h>
#include <base/native_types.h>
#include <kernel/log.h>
namespace Genode
{
class Pager_object;
/**
* Translation of a virtual page frame
*/
struct Mapping
{
addr_t virt_address;
addr_t phys_address;
bool write_combined;
bool io_mem;
unsigned size_log2;
bool writable;
/**
* Construct valid mapping
*/
Mapping(addr_t const va, addr_t const pa, bool const wc,
bool io, unsigned const sl2 = MIN_MAPPING_SIZE_LOG2,
bool const w = 1)
:
virt_address(va), phys_address(pa), write_combined(wc),
io_mem(io), size_log2(sl2), writable(w)
{ }
/**
* Construct invalid mapping
*/
Mapping() : size_log2(0) { }
/**
* Dummy, all data is available since construction
*/
void prepare_map_operation() { }
/**
* Validation
*/
bool valid() { return size_log2 > 0; }
};
/**
* Message format for the acknowledgment of a resolved pagefault
*/
struct Pagefault_resolved
{
Native_thread_id const reply_dst;
Pager_object * const pager_object;
};
/**
* Special paging server class
*/
class Ipc_pager : public Native_capability
{
enum { VERBOSE = 1 };
Pagefault _pagefault; /* data of lastly received pagefault */
Mapping _mapping; /* mapping to resolve last pagefault */
public:
/**
* Constructor
*/
Ipc_pager() :
Native_capability(Genode::thread_get_my_native_id(), 0)
{
/* check if we can distinguish all message types */
if (sizeof(Pagefault) == sizeof(Pagefault_resolved))
{
kernel_log() << __PRETTY_FUNCTION__
<< ": Message types indiscernible\n";
while (1) ;
}
}
/**
* Wait for the next pagefault request
*/
void wait_for_fault();
/**
* Resolve current pagefault and wait for a new one
*/
void resolve_and_wait_for_fault();
/**
* Request instruction pointer of current page fault
*/
addr_t fault_ip() { return _pagefault.virt_ip; }
/**
* Request fault address of current page fault
*/
addr_t fault_addr() { return _pagefault.virt_address; }
/**
* Set parameters for next reply
*/
void set_reply_mapping(Mapping m) { _mapping = m; }
/**
* Set destination for next reply
*/
void set_reply_dst(Native_capability pager_object) {
kernel_log() << __PRETTY_FUNCTION__ << ": Not implemented\n";
while (1) ;
}
/**
* Answer call without sending a flex-page mapping
*
* This function is used to acknowledge local calls from one of
* core's region-manager sessions.
*/
void acknowledge_wakeup() {
kernel_log() << __PRETTY_FUNCTION__ << ": Not implemented\n";
while (1) ;
}
/**
* Return thread ID of last faulter
*/
Native_thread_id last() const { return _pagefault.thread_id; }
/**
* Return badge for faulting thread
*/
unsigned badge() const { return _pagefault.thread_id; }
/**
* Return true if last fault was a write fault
*/
bool is_write_fault() const { return _pagefault.write; }
/**
* Return true if last fault was an exception
*/
bool is_exception() const
{
kernel_log() << __PRETTY_FUNCTION__ << ": Not implemented\n";
while (1) ;
return false;
}
};
}
#endif /* _INCLUDE__BASE__IPC_PAGER_H_ */

View File

@@ -1,5 +1,5 @@
/*
* \brief Platform specific basic Genode types
* \brief Basic Genode types
* \author Martin Stein
* \date 2012-01-02
*/
@@ -11,11 +11,11 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__BASE__NATIVE_TYPES_H_
#define _INCLUDE__BASE__NATIVE_TYPES_H_
#ifndef _BASE__NATIVE_TYPES_H_
#define _BASE__NATIVE_TYPES_H_
/* Genode includes */
#include <kernel/syscalls.h>
#include <kernel/interface.h>
#include <base/native_capability.h>
#include <base/stdint.h>
@@ -28,8 +28,8 @@ namespace Genode
struct Native_thread
{
Native_thread_id tid;
Platform_thread *pt;
Platform_thread * platform_thread;
Native_thread_id thread_id;
};
typedef int Native_connection_state;
@@ -38,72 +38,55 @@ namespace Genode
enum { MIN_MAPPING_SIZE_LOG2 = 12 };
/**
* Get kernel-object identifier of the current thread
* Return kernel thread-name of the caller
*/
inline Native_thread_id thread_get_my_native_id()
{ return Kernel::current_thread_id(); }
Native_thread_id thread_get_my_native_id();
/**
* Get the thread ID, wich is handled as invalid by the kernel
* Return an invalid kernel thread-name
*/
inline Native_thread_id thread_invalid_id() { return 0; }
/**
* Describes a pagefault
* Message that is communicated synchronously
*/
struct Pagefault
struct Msg
{
unsigned thread_id; /* thread ID of the faulter */
Tlb * tlb; /* TLB to wich the faulter is assigned */
addr_t virt_ip; /* the faulters virtual instruction pointer */
addr_t virt_address; /* virtual fault address */
bool write; /* write access attempted at fault? */
/**
* Placement new operator
* Types of synchronously communicated messages
*/
void * operator new (size_t, void * p) { return p; }
struct Type
{
enum Id {
INVALID = 0,
STARTUP = 1,
IPC = 2,
};
};
/**
* Construct invalid pagefault
*/
Pagefault() : thread_id(0) { }
/**
* Construct valid pagefault
*/
Pagefault(unsigned const tid, Tlb * const tlb,
addr_t const vip, addr_t const va, bool const w)
:
thread_id(tid), tlb(tlb), virt_ip(vip),
virt_address(va), write(w)
{ }
/**
* Validation
*/
bool valid() const { return thread_id != 0; }
Type::Id type;
uint8_t data[];
};
/**
* Describes a userland-thread-context region
* Message that is communicated between user threads
*/
struct Native_utcb
struct Ipc_msg : Msg
{
/* UTCB payload */
char payload[1<<MIN_MAPPING_SIZE_LOG2];
/**
* Get the base of the UTCB
*/
void * base() { return payload; }
/**
* Get the UTCB size
*/
size_t size() { return sizeof(payload); }
size_t size;
uint8_t data[];
};
/**
* Message that is communicated from a thread creator to the new thread
*/
class Startup_msg;
/**
* Memory region that is exclusive to every thread and known by the kernel
*/
struct Native_utcb;
struct Cap_dst_policy
{
typedef Native_thread_id Dst;
@@ -128,7 +111,7 @@ namespace Genode
typedef Native_capability_tpl<Cap_dst_policy> Native_capability;
/**
* A coherent address region
* Coherent address region
*/
struct Native_region
{
@@ -153,5 +136,76 @@ namespace Genode
struct Native_pd_args { };
}
#endif /* _INCLUDE__BASE__NATIVE_TYPES_H_ */
class Genode::Startup_msg : public Msg
{
private:
Native_thread_id _thread_id;
public:
/**
* Set-up valid startup message
*
* \param thread_id kernel name of the thread that is started
*/
void init(Native_thread_id const thread_id)
{
_thread_id = thread_id;
type = Msg::Type::STARTUP;
}
/**
* Return kernel name of started thread message-type-save
*/
Native_thread_id thread_id() const
{
if (type == Msg::Type::STARTUP) { return _thread_id; }
return thread_invalid_id();
}
};
struct Genode::Native_utcb
{
union {
uint8_t data[1 << MIN_MAPPING_SIZE_LOG2];
Msg msg;
Ipc_msg ipc_msg;
Startup_msg startup_msg;
};
void call_wait_for_request(void * & buf_base, size_t & buf_size)
{
msg.type = Msg::Type::INVALID;
buf_base = base();
buf_size = size();
}
void call_request_and_wait(void * & msg_base, size_t & msg_size,
void * & buf_base, size_t & buf_size)
{
msg.type = Msg::Type::IPC;
msg_base = ipc_msg_base();
msg_size = ipc_msg_size();
buf_base = base();
buf_size = size();
}
void call_reply(void * & msg_base, size_t & msg_size)
{
msg.type = Msg::Type::IPC;
msg_base = ipc_msg_base();
msg_size = ipc_msg_size();
}
size_t size() { return sizeof(data) / sizeof(data[0]); }
void * base() { return &data; }
addr_t top() { return (addr_t)base() + size(); }
void * ipc_msg_base() { return &ipc_msg; }
size_t ipc_msg_size() { return ipc_msg_header_size() + ipc_msg.size; }
size_t ipc_msg_max_size() { return top() - (addr_t)&ipc_msg; }
size_t ipc_msg_header_size() { return (addr_t)ipc_msg.data - (addr_t)&ipc_msg; }
};
#endif /* _BASE__NATIVE_TYPES_H_ */

View File

@@ -0,0 +1,303 @@
/*
* \brief Paging framework
* \author Martin Stein
* \date 2013-11-07
*/
/*
* Copyright (C) 2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _BASE__PAGER_H_
#define _BASE__PAGER_H_
/* Genode includes */
#include <base/thread.h>
#include <base/object_pool.h>
#include <base/signal.h>
#include <pager/capability.h>
namespace Genode
{
class Cap_session;
/**
* Translation of a virtual page frame
*/
struct Mapping;
/**
* Interface between the generic paging system and the base-hw backend
*/
class Ipc_pager;
/**
* Represents a faulter and its paging context
*/
class Pager_object;
/**
* Paging entry point that manages a pool of pager objects
*/
class Pager_entrypoint;
/**
* A thread that processes one page fault of a pager object at a time
*/
class Pager_activation_base;
/**
* Pager-activation base with custom stack size
*/
template <unsigned STACK_SIZE> class Pager_activation;
}
struct Genode::Mapping
{
addr_t virt_address;
addr_t phys_address;
bool write_combined;
bool io_mem;
unsigned size_log2;
bool writable;
/**
* Constructor for invalid mappings
*/
Mapping();
/**
* Constructor for valid mappings
*/
Mapping(addr_t const va, addr_t const pa, bool const wc,
bool const io, unsigned const sl2, bool const w);
/**
* Prepare for the application of the mapping
*/
void prepare_map_operation();
};
class Genode::Ipc_pager
{
protected:
/**
* Page-fault data that is read from the faulters thread registers
*/
struct Fault_thread_regs
{
addr_t tlb;
addr_t ip;
addr_t addr;
addr_t writes;
addr_t signal;
};
Fault_thread_regs _fault;
Mapping _mapping;
public:
/**
* Instruction pointer of current page fault
*/
addr_t fault_ip() const;
/**
* Faulter-local fault address of current page fault
*/
addr_t fault_addr() const;
/**
* Access direction of current page fault
*/
bool is_write_fault() const;
/**
* Input mapping data as reply to current page fault
*/
void set_reply_mapping(Mapping m);
};
class Genode::Pager_object : public Object_pool<Pager_object>::Entry,
public Signal_context
{
friend class Pager_entrypoint;
private:
Signal_context_capability _signal_context_cap;
Thread_capability _thread_cap;
char _signal_buf[sizeof(Signal)];
unsigned const _badge;
/***************
** Accessors **
***************/
Signal * _signal() const;
public:
/**
* Constructor
*
* \param badge user identifaction of pager object
*/
Pager_object(unsigned const badge, Affinity::Location);
/**
* Destructor
*/
virtual ~Pager_object() { }
/**
* The faulter has caused a fault and awaits paging
*
* \param s signal that communicated the fault
*/
void fault_occured(Signal const & s);
/**
* Current fault has been resolved so resume faulter
*/
void fault_resolved();
/**
* User identification of pager object
*/
unsigned badge() const;
/**
* Resume faulter
*/
void wake_up();
/**
* Unnecessary as base-hw doesn't use exception handlers
*/
void exception_handler(Signal_context_capability);
/******************
** Pure virtual **
******************/
/**
* Request a mapping that resolves a fault directly
*
* \param p offers the fault data and receives mapping data
*
* \retval 0 succeeded
* \retval !=0 fault can't be received directly
*/
virtual int pager(Ipc_pager & p) = 0;
/***************
** Accessors **
***************/
Thread_capability thread_cap() const;
void thread_cap(Thread_capability const & c);
void cap(Native_capability const & c);
unsigned signal_context_id() const;
};
class Genode::Pager_activation_base : public Thread_base,
public Signal_receiver,
public Ipc_pager
{
private:
Native_capability _cap;
Lock _cap_valid;
Pager_entrypoint * _ep;
public:
/**
* Constructor
*
* \param name name of the new thread
* \param stack_size stack size of the new thread
*/
Pager_activation_base(char const * const name,
size_t const stack_size);
/**
* Bring current mapping data into effect
*
* \retval 0 succeeded
* \retval -1 failed
*/
int apply_mapping();
/**********************
** Thread interface **
**********************/
void entry();
/***************
** Accessors **
***************/
Native_capability cap();
void ep(Pager_entrypoint * const ep);
};
class Genode::Pager_entrypoint : public Object_pool<Pager_object>
{
private:
Pager_activation_base * const _activation;
public:
/**
* Constructor
*
* \param a activation that shall handle the objects of the entrypoint
*/
Pager_entrypoint(Cap_session *, Pager_activation_base * const a);
/**
* Associate pager object 'obj' with entry point
*/
Pager_capability manage(Pager_object * const obj);
/**
* Dissolve pager object 'obj' from entry point
*/
void dissolve(Pager_object * const obj);
};
template <unsigned STACK_SIZE>
class Genode::Pager_activation : public Pager_activation_base
{
public:
/**
* Constructor
*/
Pager_activation()
:
Pager_activation_base("pager_activation", STACK_SIZE)
{
start();
}
};
#endif /* _BASE__PAGER_H_ */

View File

@@ -31,10 +31,11 @@ namespace Genode {
* \param priority designated priority of all threads created
* with this CPU session
*/
Cpu_connection(const char *label = "", long priority = DEFAULT_PRIORITY)
Cpu_connection(const char *label = "", long priority = DEFAULT_PRIORITY,
Affinity const &affinity = Affinity())
:
Connection<Cpu_session>(
session("priority=0x%lx, ram_quota=128K, label=\"%s\"",
session(affinity, "priority=0x%lx, ram_quota=128K, label=\"%s\"",
priority, label)),
Cpu_session_client(cap()) { }
};

View File

@@ -0,0 +1,62 @@
/*
* \brief Client-side IRQ session interface
* \author Martin Stein
* \date 2013-10-24
*/
/*
* Copyright (C) 2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _IRQ_SESSION__CLIENT_H_
#define _IRQ_SESSION__CLIENT_H_
/* Genode includes */
#include <irq_session/capability.h>
#include <base/rpc_client.h>
namespace Genode
{
/**
* Client-side IRQ session interface
*/
struct Irq_session_client : Rpc_client<Irq_session>
{
/*
* FIXME: This is used only client-internal and could thus be protected.
*/
Irq_signal const irq_signal;
/**
* Constructor
*
* \param session pointer to the session backend
*/
explicit Irq_session_client(Irq_session_capability const & session)
:
Rpc_client<Irq_session>(session),
irq_signal(signal())
{ }
/*****************
** Irq_session **
*****************/
Irq_signal signal() { return call<Rpc_signal>(); }
void wait_for_irq()
{
while (Kernel::await_signal(irq_signal.receiver_id,
irq_signal.context_id))
{
PERR("failed to receive interrupt");
}
}
};
}
#endif /* _IRQ_SESSION__CLIENT_H_ */

View File

@@ -0,0 +1,82 @@
/*
* \brief IRQ session interface
* \author Martin Stein
* \date 2013-10-24
*/
/*
* Copyright (C) 2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _IRQ_SESSION__IRQ_SESSION_H_
#define _IRQ_SESSION__IRQ_SESSION_H_
/* Genode includes */
#include <base/capability.h>
#include <session/session.h>
namespace Genode
{
/**
* Information that enables a user to await and ack an IRQ directly
*/
struct Irq_signal
{
unsigned receiver_id;
unsigned context_id;
};
/**
* IRQ session interface
*/
struct Irq_session : Session
{
/**
* Interrupt trigger
*/
enum Trigger { TRIGGER_UNCHANGED = 0, TRIGGER_LEVEL, TRIGGER_EDGE };
/**
* Interrupt trigger polarity
*/
enum Polarity { POLARITY_UNCHANGED = 0, POLARITY_HIGH, POLARITY_LOW };
/**
* Destructor
*/
virtual ~Irq_session() { }
/**
* Await the next occurence of the interrupt of this session
*/
virtual void wait_for_irq() = 0;
/**
* Get information for direct interrupt handling
*
* FIXME: This is used only client-internal and could thus be protected.
*/
virtual Irq_signal signal() = 0;
/*************
** Session **
*************/
static const char * service_name() { return "IRQ"; }
/*********************
** RPC declaration **
*********************/
GENODE_RPC(Rpc_wait_for_irq, void, wait_for_irq);
GENODE_RPC(Rpc_signal, Irq_signal, signal);
GENODE_RPC_INTERFACE(Rpc_wait_for_irq, Rpc_signal);
};
}
#endif /* _IRQ_SESSION__IRQ_SESSION_H_ */

View File

@@ -0,0 +1,593 @@
/*
* \brief Interface between kernel and userland
* \author Martin stein
* \date 2011-11-30
*/
/*
* Copyright (C) 2011-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _KERNEL__INTERFACE_H_
#define _KERNEL__INTERFACE_H_
/* Genode includes */
#include <kernel/interface_support.h>
namespace Genode
{
class Native_utcb;
class Platform_pd;
class Tlb;
}
namespace Kernel
{
typedef Genode::Tlb Tlb;
typedef Genode::addr_t addr_t;
typedef Genode::size_t size_t;
typedef Genode::Platform_pd Platform_pd;
typedef Genode::Native_utcb Native_utcb;
/**
* Kernel names of all kernel calls
*/
struct Call_id
{
enum {
NEW_THREAD = 0,
KILL_THREAD = 1,
START_THREAD = 2,
PAUSE_THREAD = 3,
RESUME_THREAD = 4,
YIELD_THREAD = 5,
ACCESS_THREAD_REGS = 6,
ROUTE_THREAD_EVENT = 7,
UPDATE_PD = 8,
UPDATE_REGION = 9,
NEW_PD = 10,
KILL_PD = 11,
REQUEST_AND_WAIT = 12,
REPLY = 13,
WAIT_FOR_REQUEST = 14,
NEW_SIGNAL_RECEIVER = 15,
NEW_SIGNAL_CONTEXT = 16,
KILL_SIGNAL_CONTEXT = 17,
KILL_SIGNAL_RECEIVER = 18,
SUBMIT_SIGNAL = 19,
AWAIT_SIGNAL = 20,
SIGNAL_PENDING = 21,
ACK_SIGNAL = 22,
NEW_VM = 23,
RUN_VM = 24,
PAUSE_VM = 25,
PRINT_CHAR = 26,
};
};
/*****************************************************************
** Kernel call with 1 to 6 arguments **
** **
** These functions must not be inline to ensure that objects, **
** wich are referenced by arguments, are tagged as "used" even **
** though only the pointer gets handled in here. **
*****************************************************************/
Call_ret call(Call_arg arg_0);
Call_ret call(Call_arg arg_0,
Call_arg arg_1);
Call_ret call(Call_arg arg_0,
Call_arg arg_1,
Call_arg arg_2);
Call_ret call(Call_arg arg_0,
Call_arg arg_1,
Call_arg arg_2,
Call_arg arg_3);
Call_ret call(Call_arg arg_0,
Call_arg arg_1,
Call_arg arg_2,
Call_arg arg_3,
Call_arg arg_4);
Call_ret call(Call_arg arg_0,
Call_arg arg_1,
Call_arg arg_2,
Call_arg arg_3,
Call_arg arg_4,
Call_arg arg_5);
/**
* Virtual range of the mode transition region in every PD
*/
addr_t mode_transition_virt_base();
size_t mode_transition_size();
/**
* Get sizes of the kernel objects
*/
size_t thread_size();
size_t pd_size();
size_t signal_context_size();
size_t signal_receiver_size();
size_t vm_size();
/**
* Get alignment constraints of the kernel objects
*/
unsigned kernel_pd_alignm_log2();
/**
* Create a protection domain
*
* \param p appropriate memory donation for the kernel object
* \param pd core local Platform_pd object
*
* \retval >0 kernel name of the new protection domain
* \retval 0 failed
*
* Restricted to core threads. Regaining of the supplied memory is not
* supported by now.
*/
inline unsigned new_pd(void * const dst, Platform_pd * const pd)
{
return call(Call_id::NEW_PD, (Call_arg)dst, (Call_arg)pd);
}
/**
* Destruct a protection domain
*
* \param pd_id kernel name of the targeted protection domain
*
* \retval 0 succeeded
* \retval -1 failed
*/
inline int kill_pd(unsigned const pd_id)
{
return call(Call_id::KILL_PD, pd_id);
}
/**
* Propagate changes in PD configuration
*
* \param pd_id ID of the PD that has been configured
*
* It might be, that the kernel and/or the hardware caches parts of PD
* configurations such as virtual address translations. This function
* ensures that the current configuration of the targeted PD gets fully
* applied from the moment it returns to the userland. This function is
* inappropriate in case that a PD wants to change its own configuration.
* There's no need for this function after a configuration change that
* can't affect the kernel- and/or hardware-caches.
*
* Restricted to core threads.
*/
inline void update_pd(unsigned const pd_id)
{
call(Call_id::UPDATE_PD, pd_id);
}
/**
* Propagate memory-updates within a given virtual region
*
* \param base virtual base of the region
* \param size size of the region
*
* If one updates a memory region and must ensure that the update
* gets visible directly to other address spaces, this function does
* the job.
*
* Restricted to core threads.
*/
inline void update_region(addr_t const base, size_t const size)
{
call(Call_id::UPDATE_REGION, (Call_arg)base, (Call_arg)size);
}
/**
* Create kernel object that acts as thread that isn't executed initially
*
* \param p memory donation for the new kernel thread object
* \param priority scheduling priority of the new thread
* \param label debugging label of the new thread
*
* \retval >0 kernel name of the new thread
* \retval 0 failed
*
* Restricted to core threads.
*/
inline int new_thread(void * const p, unsigned const priority,
char const * const label)
{
return call((Call_arg)Call_id::NEW_THREAD, (Call_arg)p, (Call_arg)priority,
(Call_arg)label);
}
/**
* Destruct kernel thread-object
*
* \param thread_id kernel name of the targeted thread
*
* Restricted to core threads.
*/
inline void kill_thread(unsigned const thread_id)
{
call(Call_id::KILL_THREAD, thread_id);
}
/**
* Start executing a thread
*
* \param thread_id kernel name of targeted thread
* \param cpu_id kernel name of targeted processor
* \param pd_id kernel name of targeted protection domain
* \param utcb core local pointer to userland thread-context
*
* Restricted to core threads.
*/
inline Tlb * start_thread(unsigned const thread_id, unsigned const cpu_id,
unsigned const pd_id, Native_utcb * const utcb)
{
return (Tlb *)call(Call_id::START_THREAD, thread_id, cpu_id, pd_id,
(Call_arg)utcb);
}
/**
* Prevent thread from participating in CPU scheduling
*
* \param thread_id kernel name of the targeted thread or 0
*
* \retval 0 succeeded
* \retval -1 the targeted thread does not exist or is still active
*
* If thread_id is set to 0 the caller targets itself. If the caller
* doesn't target itself, the call is restricted to core threads.
*/
inline int pause_thread(unsigned const thread_id)
{
return call(Call_id::PAUSE_THREAD, thread_id);
}
/**
* Let an already started thread participate in CPU scheduling
*
* \param thread_id kernel name of the targeted thread
*
* \retval 0 succeeded and thread was paused beforehand
* \retval 1 succeeded and thread was active beforehand
* \retval -1 failed
*
* If the targeted thread blocks for any event except a 'start_thread'
* call this call cancels the blocking.
*/
inline int resume_thread(unsigned const thread_id)
{
return call(Call_id::RESUME_THREAD, thread_id);
}
/**
* Let the current thread give up its remaining timeslice
*
* \param thread_id kernel name of the benefited thread
*
* If thread_id is valid the call will resume the targeted thread
* additionally.
*/
inline void yield_thread(unsigned const thread_id)
{
call(Call_id::YIELD_THREAD, thread_id);
}
/**
* Set or unset the handler of an event a kernel thread-object triggers
*
* \param thread_id kernel name of the targeted thread
* \param event_id kernel name of the targeted thread event
* \param signal_context_id kernel name of the handlers signal context
*
* Restricted to core threads.
*/
inline int route_thread_event(unsigned const thread_id,
unsigned const event_id,
unsigned const signal_context_id)
{
return call(Call_id::ROUTE_THREAD_EVENT, thread_id,
event_id, signal_context_id);
}
/**
* Send IPC request and await corresponding IPC reply
*
* \param id kernel name of the server thread
*
* As soon as call returns, callers UTCB provides received message.
*/
inline void request_and_wait(unsigned const id)
{
call(Call_id::REQUEST_AND_WAIT, id);
}
/**
* Await the receipt of a message
*
* \return type of received message
*
* As soon as call returns, callers UTCB provides received message.
*/
inline void wait_for_request()
{
call(Call_id::WAIT_FOR_REQUEST);
}
/**
* Reply to lastly received message
*
* \param await_message wether the call shall await receipt of a message
*
* If await_request = 1, callers UTCB provides received message
* as soon as call returns
*/
inline void reply(bool const await_message)
{
call(Call_id::REPLY, await_message);
}
/**
* Print a char 'c' to the kernels serial ouput
*/
inline void print_char(char const c)
{
call(Call_id::PRINT_CHAR, c);
}
/**
* Access plain member variables of a kernel thread-object
*
* \param thread_id kernel name of the targeted thread
* \param reads amount of read operations
* \param writes amount of write operations
* \param read_values base of value buffer for read operations
* \param write_values base of value buffer for write operations
*
* \retval 0 all operations done
* \retval >0 amount of undone operations
* \retval -1 failed to start processing operations
*
* Restricted to core threads. Operations are processed in order of the
* appearance of the register names in the callers UTCB. If reads = 0,
* read_values is of no relevance. If writes = 0, write_values is of no
* relevance.
*
* Expected structure at the callers UTCB base:
*
* 0 * sizeof(addr_t): read register name #1
* ... ...
* (reads - 1) * sizeof(addr_t): read register name #reads
* (reads - 0) * sizeof(addr_t): write register name #1
* ... ...
* (reads + writes - 1) * sizeof(addr_t): write register name #writes
*
* Expected structure at write_values:
*
* 0 * sizeof(addr_t): write value #1
* ... ...
* (writes - 1) * sizeof(addr_t): write value #writes
*/
inline int access_thread_regs(unsigned const thread_id,
unsigned const reads,
unsigned const writes,
addr_t * const read_values,
addr_t * const write_values)
{
return call(Call_id::ACCESS_THREAD_REGS, thread_id, reads, writes,
(Call_arg)read_values, (Call_arg)write_values);
}
/**
* Create a kernel object that acts as a signal receiver
*
* \param p memory donation for the kernel signal-receiver object
*
* \retval >0 kernel name of the new signal receiver
* \retval 0 failed
*
* Restricted to core threads.
*/
inline unsigned new_signal_receiver(addr_t const p)
{
return call(Call_id::NEW_SIGNAL_RECEIVER, p);
}
/**
* Create kernel object that acts as a signal context and assign it
*
* \param p memory donation for the kernel signal-context object
* \param receiver kernel name of targeted signal receiver
* \param imprint user label of the signal context
*
* \retval >0 kernel name of the new signal context
* \retval 0 failed
*
* Restricted to core threads.
*/
inline unsigned new_signal_context(addr_t const p,
unsigned const receiver,
unsigned const imprint)
{
return call(Call_id::NEW_SIGNAL_CONTEXT, p, receiver, imprint);
}
/**
* Await any context of a receiver and optionally ack a context before
*
* \param receiver_id kernel name of the targeted signal receiver
* \param context_id kernel name of a context that shall be acknowledged
*
* \retval 0 suceeded
* \retval -1 failed
*
* If context is set to 0, the call doesn't acknowledge any context.
* If this call returns 0, an instance of 'Signal::Data' is located at the
* base of the callers UTCB. Every occurence of a signal is provided
* through this function until it gets delivered through this function or
* context respectively receiver get destructed. If multiple threads
* listen at the same receiver, and/or multiple contexts of the receiver
* trigger simultanously, there is no assertion about wich thread
* receives, and from wich context. A context that delivered once doesn't
* deliver again unless its last delivery has been acknowledged via
* ack_signal.
*/
inline int await_signal(unsigned const receiver_id,
unsigned const context_id)
{
return call(Call_id::AWAIT_SIGNAL, receiver_id, context_id);
}
/**
* Return wether any context of a receiver is pending
*
* \param receiver kernel name of the targeted signal receiver
*
* \retval 0 none of the contexts is pending or the receiver doesn't exist
* \retval 1 a context of the signal receiver is pending
*/
inline bool signal_pending(unsigned const receiver)
{
return call(Call_id::SIGNAL_PENDING, receiver);
}
/**
* Trigger a specific signal context
*
* \param context kernel name of the targeted signal context
* \param num how often the context shall be triggered by this call
*
* \retval 0 suceeded
* \retval -1 failed
*/
inline int submit_signal(unsigned const context, unsigned const num)
{
return call(Call_id::SUBMIT_SIGNAL, context, num);
}
/**
* Acknowledge the processing of the last delivery of a signal context
*
* \param context kernel name of the targeted signal context
*/
inline void ack_signal(unsigned const context)
{
call(Call_id::ACK_SIGNAL, context);
}
/**
* Destruct a signal context
*
* \param context kernel name of the targeted signal context
*
* \retval 0 suceeded
* \retval -1 failed
*
* Restricted to core threads.
*/
inline int kill_signal_context(unsigned const context)
{
return call(Call_id::KILL_SIGNAL_CONTEXT, context);
}
/**
* Destruct a signal receiver
*
* \param receiver kernel name of the targeted signal receiver
*
* \retval 0 suceeded
* \retval -1 failed
*
* Restricted to core threads.
*/
inline int kill_signal_receiver(unsigned const receiver)
{
return call(Call_id::KILL_SIGNAL_RECEIVER, receiver);
}
/**
* Create a virtual machine that is stopped initially
*
* \param dst memory donation for the kernel VM-object
* \param state location of the CPU state of the VM
* \param signal_context_id kernel name of the signal context for VM events
*
* \retval >0 kernel name of the new VM
* \retval 0 failed
*
* Restricted to core threads. Regaining of the supplied memory is not
* supported by now.
*/
inline int new_vm(void * const dst, void * const state,
unsigned const signal_context_id)
{
return call(Call_id::NEW_VM, (Call_arg)dst, (Call_arg)state,
signal_context_id);
}
/**
* Execute a virtual-machine (again)
*
* \param vm_id kernel name of the targeted VM
*
* Restricted to core threads.
*/
inline void run_vm(unsigned const vm_id)
{
call(Call_id::RUN_VM, vm_id);
}
/**
* Stop execution of a virtual-machine
*
* \param vm_id kernel name of the targeted VM
*
* Restricted to core threads.
*/
inline void pause_vm(unsigned const vm_id)
{
call(Call_id::PAUSE_VM, vm_id);
}
}
#endif /* _KERNEL__INTERFACE_H_ */

View File

@@ -11,11 +11,11 @@
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__KERNEL__LOG_H_
#define _INCLUDE__KERNEL__LOG_H_
#ifndef _KERNEL__LOG_H_
#define _KERNEL__LOG_H_
/* Genode includes */
#include <kernel/syscalls.h>
#include <kernel/interface.h>
namespace Genode
{
@@ -105,5 +105,5 @@ namespace Genode
}
}
#endif /* _INCLUDE__KERNEL__LOG_H_ */
#endif /* _KERNEL__LOG_H_ */

View File

@@ -0,0 +1,31 @@
/*
* \brief Performance counter specific functions
* \author Josef Soentgen
* \date 2013-09-26
*/
/*
* Copyright (C) 2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _PERF_COUNTER_H_
#define _PERF_COUNTER_H_
namespace Kernel {
class Perf_counter
{
public:
void enable();
};
extern Perf_counter *perf_counter();
}
#endif /* _PERF_COUNTER_H_ */

View File

@@ -1,584 +0,0 @@
/*
* \brief Kernels syscall frontend
* \author Martin stein
* \date 2011-11-30
*/
/*
* Copyright (C) 2011-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__KERNEL__SYSCALLS_H_
#define _INCLUDE__KERNEL__SYSCALLS_H_
/* Genode includes */
#include <base/syscall_types.h>
namespace Genode
{
class Platform_thread;
class Platform_pd;
class Tlb;
}
namespace Kernel
{
typedef Genode::Tlb Tlb;
typedef Genode::addr_t addr_t;
typedef Genode::size_t size_t;
typedef Genode::Platform_thread Platform_thread;
typedef Genode::Platform_pd Platform_pd;
/**
* Unique opcodes of all syscalls supported by the kernel
*/
enum Syscall_type
{
INVALID_SYSCALL = 0,
/* execution control */
NEW_THREAD = 1,
DELETE_THREAD = 26,
START_THREAD = 2,
PAUSE_THREAD = 3,
RESUME_THREAD = 4,
RESUME_FAULTER = 28,
GET_THREAD = 5,
CURRENT_THREAD_ID = 6,
YIELD_THREAD = 7,
READ_THREAD_STATE = 18,
WRITE_THREAD_STATE = 19,
/* interprocess communication */
REQUEST_AND_WAIT = 8,
REPLY = 9,
WAIT_FOR_REQUEST = 10,
/* management of resource protection-domains */
SET_PAGER = 11,
UPDATE_PD = 12,
UPDATE_REGION = 32,
NEW_PD = 13,
/* interrupt handling */
ALLOCATE_IRQ = 14,
AWAIT_IRQ = 15,
FREE_IRQ = 16,
/* debugging */
PRINT_CHAR = 17,
/* asynchronous signalling */
NEW_SIGNAL_RECEIVER = 20,
NEW_SIGNAL_CONTEXT = 21,
KILL_SIGNAL_CONTEXT = 30,
AWAIT_SIGNAL = 22,
SUBMIT_SIGNAL = 23,
SIGNAL_PENDING = 27,
ACK_SIGNAL = 29,
/* vm specific */
NEW_VM = 24,
RUN_VM = 25,
PAUSE_VM = 31,
};
/*****************************************************************
** Syscall with 1 to 6 arguments **
** **
** These functions must not be inline to ensure that objects, **
** wich are referenced by arguments, are tagged as "used" even **
** though only the pointer gets handled in here. **
*****************************************************************/
Syscall_ret syscall(Syscall_arg arg_0);
Syscall_ret syscall(Syscall_arg arg_0,
Syscall_arg arg_1);
Syscall_ret syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2);
Syscall_ret syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2,
Syscall_arg arg_3);
Syscall_ret syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2,
Syscall_arg arg_3,
Syscall_arg arg_4);
Syscall_ret syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2,
Syscall_arg arg_3,
Syscall_arg arg_4,
Syscall_arg arg_5);
/**
* Virtual range of the mode transition region in every PD
*/
addr_t mode_transition_virt_base();
size_t mode_transition_size();
/**
* Get sizes of the kernel objects
*/
size_t thread_size();
size_t pd_size();
size_t signal_context_size();
size_t signal_receiver_size();
size_t vm_size();
/**
* Get alignment constraints of the kernel objects
*/
unsigned kernel_pd_alignm_log2();
/**
* Create a new PD
*
* \param dst physical base of an appropriate portion of memory
* that is thereupon allocated to the kernel
* \param pd core local Platform_pd object
*
* \retval >0 ID of the new PD
* \retval 0 if no new PD was created
*
* Restricted to core threads. Regaining of the supplied memory is not
* supported by now.
*/
inline int new_pd(void * const dst, Platform_pd * const pd) {
return syscall(NEW_PD, (Syscall_arg)dst, (Syscall_arg)pd); }
/**
* Propagate changes in PD configuration
*
* \param pd_id ID of the PD that has been configured
*
* It might be, that the kernel and/or the hardware caches parts of PD
* configurations such as virtual address translations. This syscall
* ensures that the current configuration of the targeted PD gets fully
* applied from the moment it returns to the userland. This syscall is
* inappropriate in case that a PD wants to change its own configuration.
* There's no need for this syscall after a configuration change that
* can't affect the kernel- and/or hardware-caches.
*
* Restricted to core threads.
*/
inline void update_pd(unsigned const pd_id) {
syscall(UPDATE_PD, (Syscall_arg)pd_id); }
/**
* Propagate memory-updates within a given virtual region
*
* \param base virtual base of the region
* \param size size of the region
*
* If one updates a memory region and must ensure that the update
* gets visible directly to other address spaces, this syscall does
* the job.
*
* Restricted to core threads.
*/
inline void update_region(addr_t base, size_t size) {
syscall(UPDATE_REGION, (Syscall_arg)base, (Syscall_arg)size); }
/**
* Create a new thread that is stopped initially
*
* \param dst physical base of an appropriate portion of memory
* that is thereupon allocated to the kernel
* \param pt assigned platform thread
*
* \retval >0 ID of the new thread
* \retval 0 if no new thread was created
*
* Restricted to core threads. Regaining of the supplied memory can be done
* through 'delete_thread'.
*/
inline int
new_thread(void * const dst, Platform_thread * const pt) {
return syscall(NEW_THREAD, (Syscall_arg)dst, (Syscall_arg)pt); }
/**
* Delete an existing thread
*
* \param id kernel name of the targeted thread
*
* Restricted to core threads. After calling this, the memory that was
* granted beforehand by 'new_thread' to kernel for managing this thread
* is freed again.
*/
inline void delete_thread(unsigned thread_id) {
syscall(DELETE_THREAD, (Syscall_arg)thread_id); }
/**
* Start thread with a given context and let it participate in CPU scheduling
*
* \param id ID of targeted thread
* \param ip initial instruction pointer
* \param sp initial stack pointer
*
* \retval >0 success, return value is the TLB of the thread
* \retval 0 the targeted thread wasn't started or was already started
* when this gets called (in both cases it remains untouched)
*
* Restricted to core threads.
*/
inline Tlb * start_thread(Platform_thread * const phys_pt, void * ip,
void * sp, unsigned cpu_no)
{
return (Tlb *)syscall(START_THREAD, (Syscall_arg)phys_pt,
(Syscall_arg)ip, (Syscall_arg)sp,
(Syscall_arg)cpu_no);
}
/**
* Prevent thread from participating in CPU scheduling
*
* \param id ID of the targeted thread. If not set
* this will target the current thread.
*
* \retval 0 syscall was successful
* \retval <0 if the targeted thread does not exist or still participates
* in CPU scheduling after
*
* If the caller doesn't target itself, this is restricted to core threads.
*/
inline int pause_thread(unsigned const id = 0) {
return syscall(PAUSE_THREAD, id); }
/**
* Let an already started thread participate in CPU scheduling
*
* \param id ID of the targeted thread
*
* \retval 0 if syscall was successful and thread were paused beforehand
* \retval >0 if syscall was successful and thread were already active
* \retval <0 if targeted thread doesn't participate in CPU
* scheduling after
*
* If the targeted thread blocks for any event except a 'start_thread'
* call this call cancels the blocking.
*/
inline int resume_thread(unsigned const id = 0) {
return syscall(RESUME_THREAD, id); }
/**
* Continue thread after a pagefault that could be resolved
*
* \param id ID of the targeted thread
*/
inline void resume_faulter(unsigned const id = 0) {
syscall(RESUME_FAULTER, id); }
/**
* Let the current thread give up its remaining timeslice
*
* \param id if this thread ID is set and valid this will resume the
* targeted thread additionally
*/
inline void yield_thread(unsigned const id = 0) {
syscall(YIELD_THREAD, id); }
/**
* Get the thread ID of the current thread
*/
inline int current_thread_id() { return syscall(CURRENT_THREAD_ID); }
/**
* Get platform thread by ID or 0 if target is "core main" or "idle"
*
* \param id ID of the targeted thread or 0 if caller targets itself
*
* Restricted to core threads.
*/
inline Platform_thread * get_thread(unsigned const id = 0) {
return (Platform_thread *)syscall(GET_THREAD, id); }
/**
* Send IPC request and wait for reply
*
* \param id ID of the receiver thread
* \param size request size (beginning with the callers UTCB base)
*
* \return size of received reply (beginning with the callers UTCB base)
*
* If the receiver exists, this blocks execution until a dedicated reply
* message has been send by the receiver. The receiver may never do so.
*/
inline size_t request_and_wait(unsigned const id, size_t const size) {
return (size_t)syscall(REQUEST_AND_WAIT, id, size); }
/**
* Wait for next IPC request, discard current request
*
* \return size of received request (beginning with the callers UTCB base)
*/
inline size_t wait_for_request() {
return (size_t)syscall(WAIT_FOR_REQUEST); }
/**
* Reply to last IPC request
*
* \param size reply size (beginning with the callers UTCB base)
* \param await_request if the call shall await and fetch next request
*
* \return request size (beginning with the callers UTCB base)
* if await_request was set
*/
inline size_t reply(size_t const size, bool const await_request) {
return (size_t)syscall(REPLY, size, await_request); }
/**
* Set a thread that gets informed about pagefaults of another thread
*
* \param pager_id ID of the thread that shall get informed.
* Subsequently this thread gets an IPC message,
* wich contains an according 'Pagefault' object for
* every pagefault the faulter throws.
* \param faulter_id ID of the thread that throws the pagefaults
* wich shall be notified. After every pagefault this
* thread remains paused to be reactivated by
* 'resume_thread'.
*
* Restricted to core threads.
*/
inline void set_pager(unsigned const pager_id, unsigned const faulter_id) {
syscall(SET_PAGER, pager_id, faulter_id); }
/**
* Print a char 'c' to the kernels serial ouput
*/
inline void print_char(char const c)
{ syscall(PRINT_CHAR, (Syscall_arg)c); }
/**
* Allocate an IRQ to the caller if the IRQ is not allocated already
*
* \param id ID of the targeted IRQ
*
* \return wether the IRQ has been allocated to this thread or not
*
* Restricted to core threads.
*/
inline bool allocate_irq(unsigned const id) {
return syscall(ALLOCATE_IRQ, (Syscall_arg)id); }
/**
* Free an IRQ from allocation if it is allocated by the caller
*
* \param id ID of the targeted IRQ
*
* \return wether the IRQ has been freed or not
*
* Restricted to core threads.
*/
inline bool free_irq(unsigned const id) {
return syscall(FREE_IRQ, (Syscall_arg)id); }
/**
* Block caller for the occurence of its IRQ
*
* Restricted to core threads. Blocks the caller forever
* if he has not allocated any IRQ.
*/
inline void await_irq() { syscall(AWAIT_IRQ); }
/**
* Copy the current state of a thread to the callers UTCB
*
* \param thread_id ID of the targeted thread
*
* Restricted to core threads. One can also read from its own context,
* or any thread that is active in the meantime. In these cases
* be aware of the fact, that the result reflects the thread
* state that were backed at the last kernel entry of the thread.
* The copy might be incoherent when this function returns because
* the caller might get scheduled away before then.
*/
inline void read_thread_state(unsigned const thread_id) {
syscall(READ_THREAD_STATE, (Syscall_arg)thread_id); }
/**
* Override the state of a thread with the callers UTCB content
*
* \param thread_id ID of the targeted thread
*
* Restricted to core threads. One can also write to its own context, or
* to that of a thread that is active in the meantime.
*/
inline void write_thread_state(unsigned const thread_id) {
syscall(WRITE_THREAD_STATE, (Syscall_arg)thread_id); }
/**
* Create a kernel object that acts as receiver for asynchronous signals
*
* \param dst physical base of an appropriate portion of memory
* that is thereupon allocated to the kernel
*
* \return ID of the new kernel object
*
* Restricted to core threads. Regaining of the supplied memory is not
* supported by now.
*/
inline unsigned new_signal_receiver(void * dst) {
return syscall(NEW_SIGNAL_RECEIVER, (Syscall_arg)dst); }
/**
* Create a kernel object that acts as a distinct signal type at a receiver
*
* \param dst physical base of an appropriate portion of memory
* that is thereupon allocated to the kernel
* \param receiver_id ID of the receiver kernel-object that shall
* provide the new signal context
* \param imprint Every signal, one receives at the new context,
* will hold this imprint. This enables the receiver
* to interrelate signals with the context.
*
* \return ID of the new kernel object
*
* Core-only syscall. Regaining of the supplied memory is not
* supported by now.
*/
inline unsigned new_signal_context(void * dst, unsigned receiver_id,
unsigned imprint)
{
return syscall(NEW_SIGNAL_CONTEXT, (Syscall_arg)dst,
(Syscall_arg)receiver_id, (Syscall_arg)imprint);
}
/**
* Wait for occurence of at least one signal at any context of a receiver
*
* \param receiver_id ID of the targeted receiver kernel-object
*
* When this call returns, an instance of 'Signal::Data' is located at the
* base of the callers UTCB. It's granted that every occurence of a signal
* is provided through this function, exactly till it gets delivered through
* this function. If multiple threads listen at the same receiver, and/or
* multiple contexts of the receiver trigger simultanously, there is no
* assertion about wich thread receives, and from wich context. But
* deliveries belonging to the same context are serialized through
* 'ack_signal', to enable synchronization in 'kill_signal'.
*/
inline void await_signal(unsigned receiver_id) {
syscall(AWAIT_SIGNAL, (Syscall_arg)receiver_id); }
/**
* Get summarized state of all contexts of a signal receiver
*
* \param receiver_id ID of the targeted receiver kernel-object
*/
inline bool signal_pending(unsigned receiver_id) {
return syscall(SIGNAL_PENDING, (Syscall_arg)receiver_id); }
/**
* Trigger a specific signal context
*
* \param context_id ID of the targeted context kernel-object
* \param num how often the context shall be triggered by this call
*/
inline void submit_signal(unsigned context_id, int num) {
syscall(SUBMIT_SIGNAL, (Syscall_arg)context_id, (Syscall_arg)num); }
/**
* Acknowledge the processing of the last signal of a signal context
*
* \param context_id kernel name of the targeted signal context
*
* Should be called after all signal objects, that reference the targeted
* signal context in userland are destructed. The signal context wont
* deliver a new signal until the old signal is acknowledged.
*/
inline void ack_signal(unsigned context_id) {
syscall(ACK_SIGNAL, (Syscall_arg)context_id); }
/**
* Destruct a signal context
*
* \param context_id kernel name of the targeted signal context
*
* \return wether the context could be destructed
*
* Blocks the caller until the last delivered signal of the targeted
* context is acknowledged. Then the context gets destructed, losing
* all submits that were not delivered when this syscall occured.
*/
inline bool kill_signal_context(unsigned context_id) {
return syscall(KILL_SIGNAL_CONTEXT, (Syscall_arg)context_id); }
/**
* Create a new virtual-machine that is stopped initially
*
* \param dst physical base of an appropriate portion of memory
* that is thereupon allocated to the kernel
* \param state location of the CPU state of the VM
* \param context_id ID of the targeted signal context
*
* \retval >0 ID of the new VM
* \retval 0 if no new VM was created
*
* Restricted to core threads. Regaining of the supplied memory is not
* supported by now.
*/
inline int new_vm(void * const dst, void * const state,
unsigned context_id)
{
return syscall(NEW_VM, (Syscall_arg)dst, (Syscall_arg)state,
(Syscall_arg)context_id);
}
/**
* Execute a virtual-machine (again)
*
* \param id ID of the targeted VM
*
* Restricted to core threads.
*/
inline void run_vm(unsigned const id) {
syscall(RUN_VM, (Syscall_arg)id); }
/**
* Stop execution of a virtual-machine
*
* \param id ID of the targeted VM
*
* Restricted to core threads.
*/
inline void pause_vm(unsigned const id) {
syscall(PAUSE_VM, (Syscall_arg)id); }
}
#endif /* _INCLUDE__KERNEL__SYSCALLS_H_ */

View File

@@ -0,0 +1,33 @@
/*
* \brief TrustZone specific definitions for the i.MX53 board
* \author Stefan Kalkowski
* \date 2013-11-15
*/
/*
* Copyright (C) 2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__PLATFORM__IMX53__DRIVERS__TRUSTZONE_H_
#define _INCLUDE__PLATFORM__IMX53__DRIVERS__TRUSTZONE_H_
/* Genode includes */
#include <drivers/board_base.h>
namespace Trustzone
{
enum {
VM_STATE_SIZE = 1 << 20,
SECURE_RAM_BASE = Genode::Board_base::RAM0_BASE,
SECURE_RAM_SIZE = Genode::Board_base::RAM0_SIZE - VM_STATE_SIZE,
VM_STATE_BASE = SECURE_RAM_BASE + SECURE_RAM_SIZE,
NONSECURE_RAM_BASE = Genode::Board_base::RAM1_BASE,
NONSECURE_RAM_SIZE = Genode::Board_base::RAM1_SIZE,
};
}
#endif /* _INCLUDE__PLATFORM__IMX53__DRIVERS__TRUSTZONE_H_ */

View File

@@ -0,0 +1,33 @@
/*
* \brief TrustZone specific definitions for the Versatile Express board
* \author Stefan Kalkowski
* \date 2013-11-15
*/
/*
* Copyright (C) 2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__PLATFORM__VEA9X4__DRIVERS__TRUSTZONE_H_
#define _INCLUDE__PLATFORM__VEA9X4__DRIVERS__TRUSTZONE_H_
/* Genode includes */
#include <drivers/board_base.h>
namespace Trustzone
{
enum {
VM_STATE_SIZE = 1 << 20,
SECURE_RAM_BASE = Genode::Board_base::RAM_3_BASE,
SECURE_RAM_SIZE = Genode::Board_base::RAM_3_SIZE - VM_STATE_SIZE,
VM_STATE_BASE = SECURE_RAM_BASE + SECURE_RAM_SIZE,
NONSECURE_RAM_BASE = 0x80000000,
NONSECURE_RAM_SIZE = 0x20000000,
};
}
#endif /* _INCLUDE__PLATFORM__VEA9X4__DRIVERS__TRUSTZONE_H_ */

View File

@@ -46,6 +46,9 @@ namespace Genode
unsigned const imprint) {
return call<Rpc_alloc_context>(r, imprint); }
void free_receiver(Signal_receiver_capability cap) {
call<Rpc_free_receiver>(cap); }
void free_context(Signal_context_capability cap) {
call<Rpc_free_context>(cap); }
};

View File

@@ -1,33 +0,0 @@
/*
* \brief base-hw specific (higher ram-quota) connection to signal service
* \author Norman Feske
* \author Stefan Kalkowski
* \date 2009-08-05
*/
/*
* Copyright (C) 2009-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _INCLUDE__SIGNAL_SESSION__CONNECTION_H_
#define _INCLUDE__SIGNAL_SESSION__CONNECTION_H_
#include <signal_session/client.h>
#include <base/connection.h>
namespace Genode {
struct Signal_connection : Connection<Signal_session>, Signal_session_client
{
Signal_connection()
:
Connection<Signal_session>(session("ram_quota=16K")),
Signal_session_client(cap())
{ }
};
}
#endif /* _INCLUDE__CAP_SESSION__CONNECTION_H_ */

View File

@@ -41,7 +41,11 @@ namespace Genode
*/
struct Signal_session : Session
{
class Out_of_metadata : public Exception { };
class Out_of_metadata : public Exception { };
class Create_receiver_failed : public Exception { };
class Create_context_failed : public Exception { };
class Kill_receiver_failed : public Exception { };
class Kill_context_failed : public Exception { };
/**
* String that can be used to refer to this service
@@ -50,20 +54,24 @@ namespace Genode
/**
* Destructor
*
* \throw Kill_context_failed
* \throw Kill_receiver_failed
*/
virtual ~Signal_session() { }
/**
* Create a new signal-receiver kernel-object
* Create and manage a new signal receiver
*
* \return a cap that acts as reference to the created object
*
* \throw Out_of_metadata
* \throw Create_receiver_failed
*/
virtual Signal_receiver_capability alloc_receiver() = 0;
/**
* Create a new signal-context kernel-object
* Create and manage a new signal context
*
* \param r names the signal receiver that shall provide
* the new context
@@ -73,32 +81,54 @@ namespace Genode
* \return a cap that acts as reference to the created object
*
* \throw Out_of_metadata
* \throw Create_context_failed
*/
virtual Signal_context_capability
alloc_context(Signal_receiver_capability const r,
alloc_context(Signal_receiver_capability r,
unsigned const imprint) = 0;
/**
* Free signal-context
* Free a signal receiver
*
* \param cap capability of signal-context to release
* \param cap capability of targeted signal receiver
*
* \throw Kill_receiver_failed
*/
virtual void free_receiver(Signal_receiver_capability cap) = 0;
/**
* Free a signal context
*
* \param cap capability of targeted signal context
*
* \throw Kill_context_failed
*/
virtual void free_context(Signal_context_capability cap) = 0;
/*********************
** RPC declaration **
*********************/
GENODE_RPC_THROW(Rpc_alloc_receiver, Signal_receiver_capability,
alloc_receiver, GENODE_TYPE_LIST(Out_of_metadata));
alloc_receiver, GENODE_TYPE_LIST(Out_of_metadata,
Create_receiver_failed));
GENODE_RPC_THROW(Rpc_alloc_context, Signal_context_capability,
alloc_context, GENODE_TYPE_LIST(Out_of_metadata),
Signal_receiver_capability, unsigned);
GENODE_RPC(Rpc_free_context, void, free_context,
Signal_context_capability);
alloc_context, GENODE_TYPE_LIST(Out_of_metadata,
Create_context_failed), Signal_receiver_capability,
unsigned);
GENODE_RPC_THROW(Rpc_free_receiver, void, free_receiver,
GENODE_TYPE_LIST(Kill_receiver_failed),
Signal_receiver_capability);
GENODE_RPC_THROW(Rpc_free_context, void, free_context,
GENODE_TYPE_LIST(Kill_context_failed),
Signal_context_capability);
GENODE_RPC_INTERFACE(Rpc_alloc_receiver, Rpc_alloc_context,
Rpc_free_context);
Rpc_free_receiver, Rpc_free_context);
};
}

View File

@@ -0,0 +1,2 @@
SRC_CC = kernel/interface.cc
vpath % $(REP_DIR)/src/arm

View File

@@ -1,10 +0,0 @@
#
# \brief Linked against any program expect LDSO and dynamic binaries
# \author Martin Stein
# \date 2012-04-16
#
include $(BASE_DIR)/lib/mk/startup.inc
vpath crt0.s $(REP_DIR)/src/platform/arm

View File

@@ -1,5 +0,0 @@
SRC_CC = syscall.cc
vpath syscall.cc $(REP_DIR)/src/base/arm

View File

@@ -0,0 +1,3 @@
SRC_CC = perf_counter.cc
vpath %.cc $(REP_DIR)/src/core/arm_v6

View File

@@ -0,0 +1,3 @@
SRC_CC = perf_counter.cc
vpath %.cc $(REP_DIR)/src/core/arm_v7

View File

@@ -4,8 +4,9 @@
# \date 2013-02-14
#
LIBS += cxx syscall
LIBS += cxx kernel_interface
SRC_CC += main_bootstrap.cc
SRC_CC += ipc.cc ipc/ipc_marshal_cap.cc
SRC_CC += avl_tree/avl_tree.cc
SRC_CC += allocator/slab.cc
@@ -18,9 +19,12 @@ SRC_CC += console/console.cc
SRC_CC += lock/lock.cc
SRC_CC += signal/signal.cc signal/common.cc
SRC_CC += server/server.cc server/common.cc
SRC_CC += thread/thread_bootstrap.cc
SRC_CC += thread/thread_bootstrap.cc thread/trace.cc
INC_DIR += $(REP_DIR)/src/base/lock $(BASE_DIR)/src/base/lock
INC_DIR += $(REP_DIR)/src/base/lock
INC_DIR += $(BASE_DIR)/src/base/lock
INC_DIR += $(BASE_DIR)/src/base/thread
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base
vpath main_bootstrap.cc $(REP_DIR)/src/platform
vpath %.cc $(REP_DIR)/src/base
vpath %.cc $(BASE_DIR)/src/base

View File

@@ -0,0 +1,3 @@
SRC_CC = perf_counter.cc
vpath %.cc $(REP_DIR)/src/core/

View File

@@ -0,0 +1 @@
LIBS += enable_perf_counter

View File

@@ -8,7 +8,7 @@
SPECS += hw platform_imx53 epit
# set address where to link the text segment at
LD_TEXT_ADDR ?= 0x70001000
LD_TEXT_ADDR ?= 0x70010000
# include implied specs
include $(call select_from_repositories,mk/spec-hw.mk)

View File

@@ -8,7 +8,7 @@
SPECS += hw platform_rpi
# set address where to link the text segment at
LD_TEXT_ADDR ?= 0x400000
LD_TEXT_ADDR ?= 0x800000
# include implied specs
include $(call select_from_repositories,mk/spec-hw.mk)

View File

@@ -172,29 +172,7 @@ proc build_boot_image {binaries} {
exec cp -L bin/core $elf_img
exec [cross_dev_prefix]strip $elf_img
# target specific ops
if {[regexp "uboot" $run_target]} {
# parse ELF entrypoint and load address
set entrypoint [exec [cross_dev_prefix]readelf -h $elf_img | \
grep "Entry point address: " | \
sed -e "s/.*Entry point address: *//"]
set load_addr [exec [cross_dev_prefix]readelf -l $elf_img | \
grep -m 1 "LOAD"]
set load_addr [lindex [regexp -inline -all -- {\S+} $load_addr] 3]
# compress ELF
set bin_img "[run_dir]/image.bin"
exec [cross_dev_prefix]objcopy -O binary $elf_img $bin_img
exec gzip --best --force $bin_img
# create compressed uImage
set uboot_img [run_dir]/uImage
exec mkimage -A arm -O linux -T kernel -C gzip -a $load_addr \
-e $entrypoint -d $bin_img.gz $uboot_img
exec rm -rf $bin_img.gz
}
build_uboot_image $elf_img
# set symbolic link to image.elf file in TFTP directory for PXE boot
if {[info exists ::env(PXE_TFTP_DIR_BASE)] &&
@@ -207,7 +185,8 @@ proc build_boot_image {binaries} {
}
# retrieve stand-alone core
exec mv core/core.standalone bin/core
exec cp core/core.standalone bin/core
exec rm core/core.standalone
}
@@ -228,7 +207,7 @@ proc run_genode_until {{wait_for_re forever} {timeout_value 0} {running_spawn_id
return
}
if {[is_serial_available]} {
spawn_serial $wait_for_re $timeout_value
spawn_serial $wait_for_re $timeout_value "create local services"
return
}

View File

@@ -0,0 +1,180 @@
/*
* \brief Interface between kernel and userland
* \author Martin stein
* \date 2011-11-30
*/
/*
* Copyright (C) 2011-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
/* Genode includes */
#include <kernel/interface.h>
using namespace Kernel;
/**********************************************************************
** Inline assembly templates for kernel calls with 1 to 6 arguments **
**********************************************************************/
#define CALL_6_ASM_OPS \
"mov r5, #0 \n" \
"add r5, %[arg_5] \n" \
CALL_5_ASM_OPS
#define CALL_5_ASM_OPS \
"mov r4, #0 \n" \
"add r4, %[arg_4] \n" \
CALL_4_ASM_OPS
#define CALL_4_ASM_OPS \
"mov r3, #0 \n" \
"add r3, %[arg_3] \n" \
CALL_3_ASM_OPS
#define CALL_3_ASM_OPS \
"mov r2, #0 \n" \
"add r2, %[arg_2] \n" \
CALL_2_ASM_OPS
#define CALL_2_ASM_OPS \
"mov r1, #0 \n" \
"add r1, %[arg_1] \n" \
CALL_1_ASM_OPS
#define CALL_1_ASM_OPS \
"mov r0, #0 \n" \
"add r0, %[arg_0] \n" \
"swi 0 \n" \
"mov %[result], #0 \n" \
"add %[result], r0 "
/****************************************************************************
** Inline assembly "writeable" tpl-args for kernel calls with 1 to 6 args **
****************************************************************************/
#define CALL_6_ASM_WRITE [arg_5] "+r" (arg_5), CALL_5_ASM_WRITE
#define CALL_5_ASM_WRITE [arg_4] "+r" (arg_4), CALL_4_ASM_WRITE
#define CALL_4_ASM_WRITE [arg_3] "+r" (arg_3), CALL_3_ASM_WRITE
#define CALL_3_ASM_WRITE [arg_2] "+r" (arg_2), CALL_2_ASM_WRITE
#define CALL_2_ASM_WRITE [arg_1] "+r" (arg_1), CALL_1_ASM_WRITE
#define CALL_1_ASM_WRITE \
[arg_0] "+r" (arg_0), \
[result] "+r" (result)
/**************************************************************************
** Inline assembly clobber lists for kernel calls with 1 to 6 arguments **
**************************************************************************/
#define CALL_6_ASM_CLOBBER "r5", CALL_5_ASM_CLOBBER
#define CALL_5_ASM_CLOBBER "r4", CALL_4_ASM_CLOBBER
#define CALL_4_ASM_CLOBBER "r3", CALL_3_ASM_CLOBBER
#define CALL_3_ASM_CLOBBER "r2", CALL_2_ASM_CLOBBER
#define CALL_2_ASM_CLOBBER "r1", CALL_1_ASM_CLOBBER
#define CALL_1_ASM_CLOBBER "r0"
/************************************
** Calls with 1 to 6 arguments **
************************************/
Call_ret Kernel::call(Call_arg arg_0)
{
Call_ret result = 0;
asm volatile(CALL_1_ASM_OPS
: CALL_1_ASM_WRITE
:: CALL_1_ASM_CLOBBER);
return result;
}
Call_ret Kernel::call(Call_arg arg_0,
Call_arg arg_1)
{
Call_ret result = 0;
asm volatile(CALL_2_ASM_OPS
: CALL_2_ASM_WRITE
:: CALL_2_ASM_CLOBBER);
return result;
}
Call_ret Kernel::call(Call_arg arg_0,
Call_arg arg_1,
Call_arg arg_2)
{
Call_ret result = 0;
asm volatile(CALL_3_ASM_OPS
: CALL_3_ASM_WRITE
:: CALL_3_ASM_CLOBBER);
return result;
}
Call_ret Kernel::call(Call_arg arg_0,
Call_arg arg_1,
Call_arg arg_2,
Call_arg arg_3)
{
Call_ret result = 0;
asm volatile(CALL_4_ASM_OPS
: CALL_4_ASM_WRITE
:: CALL_4_ASM_CLOBBER);
return result;
}
Call_ret Kernel::call(Call_arg arg_0,
Call_arg arg_1,
Call_arg arg_2,
Call_arg arg_3,
Call_arg arg_4)
{
Call_ret result = 0;
asm volatile(CALL_5_ASM_OPS
: CALL_5_ASM_WRITE
:: CALL_5_ASM_CLOBBER);
return result;
}
Call_ret Kernel::call(Call_arg arg_0,
Call_arg arg_1,
Call_arg arg_2,
Call_arg arg_3,
Call_arg arg_4,
Call_arg arg_5)
{
Call_ret result = 0;
asm volatile(CALL_6_ASM_OPS
: CALL_6_ASM_WRITE
:: CALL_6_ASM_CLOBBER);
return result;
}
/*************************
** CPU-state utilities **
*************************/
typedef Thread_reg_id Reg_id;
static addr_t const _cpu_state_regs[] = {
Reg_id::R0, Reg_id::R1, Reg_id::R2, Reg_id::R3, Reg_id::R4,
Reg_id::R5, Reg_id::R6, Reg_id::R7, Reg_id::R8, Reg_id::R9,
Reg_id::R10, Reg_id::R11, Reg_id::R12, Reg_id::SP, Reg_id::LR,
Reg_id::IP, Reg_id::CPSR, Reg_id::CPU_EXCEPTION };
addr_t const * cpu_state_regs() { return _cpu_state_regs; }
size_t cpu_state_regs_length()
{
return sizeof(_cpu_state_regs)/sizeof(_cpu_state_regs[0]);
}

View File

@@ -1,163 +0,0 @@
/*
* \brief Syscall-framework implementation for ARM
* \author Martin stein
* \date 2011-11-30
*
* The code in this file is compliant to the general ARM instruction- and
* register-set but the semantics are tested only on ARMv6 and ARMv7 by now.
*/
/*
* Copyright (C) 2011-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
/* Genode includes */
#include <kernel/syscalls.h>
using namespace Kernel;
/******************************************************************
** Inline assembly templates for syscalls with 1 to 6 arguments **
******************************************************************/
#define SYSCALL_6_ASM_OPS \
"mov r5, #0 \n" \
"add r5, %[arg_5] \n" \
SYSCALL_5_ASM_OPS
#define SYSCALL_5_ASM_OPS \
"mov r4, #0 \n" \
"add r4, %[arg_4] \n" \
SYSCALL_4_ASM_OPS
#define SYSCALL_4_ASM_OPS \
"mov r3, #0 \n" \
"add r3, %[arg_3] \n" \
SYSCALL_3_ASM_OPS
#define SYSCALL_3_ASM_OPS \
"mov r2, #0 \n" \
"add r2, %[arg_2] \n" \
SYSCALL_2_ASM_OPS
#define SYSCALL_2_ASM_OPS \
"mov r1, #0 \n" \
"add r1, %[arg_1] \n" \
SYSCALL_1_ASM_OPS
#define SYSCALL_1_ASM_OPS \
"mov r0, #0 \n" \
"add r0, %[arg_0] \n" \
"swi 0 \n" \
"mov %[result], #0 \n" \
"add %[result], r0 "
/*****************************************************************************
** Inline assembly "writeable" template-args for syscalls with 1 to 6 args **
*****************************************************************************/
#define SYSCALL_6_ASM_WRITE [arg_5] "+r" (arg_5), SYSCALL_5_ASM_WRITE
#define SYSCALL_5_ASM_WRITE [arg_4] "+r" (arg_4), SYSCALL_4_ASM_WRITE
#define SYSCALL_4_ASM_WRITE [arg_3] "+r" (arg_3), SYSCALL_3_ASM_WRITE
#define SYSCALL_3_ASM_WRITE [arg_2] "+r" (arg_2), SYSCALL_2_ASM_WRITE
#define SYSCALL_2_ASM_WRITE [arg_1] "+r" (arg_1), SYSCALL_1_ASM_WRITE
#define SYSCALL_1_ASM_WRITE \
[arg_0] "+r" (arg_0), \
[result] "+r" (result)
/**********************************************************************
** Inline assembly clobber lists for syscalls with 1 to 6 arguments **
**********************************************************************/
#define SYSCALL_6_ASM_CLOBBER "r5", SYSCALL_5_ASM_CLOBBER
#define SYSCALL_5_ASM_CLOBBER "r4", SYSCALL_4_ASM_CLOBBER
#define SYSCALL_4_ASM_CLOBBER "r3", SYSCALL_3_ASM_CLOBBER
#define SYSCALL_3_ASM_CLOBBER "r2", SYSCALL_2_ASM_CLOBBER
#define SYSCALL_2_ASM_CLOBBER "r1", SYSCALL_1_ASM_CLOBBER
#define SYSCALL_1_ASM_CLOBBER "r0"
/************************************
** Syscalls with 1 to 6 arguments **
************************************/
Syscall_ret Kernel::syscall(Syscall_arg arg_0)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_1_ASM_OPS
: SYSCALL_1_ASM_WRITE
:: SYSCALL_1_ASM_CLOBBER);
return result;
}
Syscall_ret Kernel::syscall(Syscall_arg arg_0,
Syscall_arg arg_1)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_2_ASM_OPS
: SYSCALL_2_ASM_WRITE
:: SYSCALL_2_ASM_CLOBBER);
return result;
}
Syscall_ret Kernel::syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_3_ASM_OPS
: SYSCALL_3_ASM_WRITE
:: SYSCALL_3_ASM_CLOBBER);
return result;
}
Syscall_ret Kernel::syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2,
Syscall_arg arg_3)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_4_ASM_OPS
: SYSCALL_4_ASM_WRITE
:: SYSCALL_4_ASM_CLOBBER);
return result;
}
Syscall_ret Kernel::syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2,
Syscall_arg arg_3,
Syscall_arg arg_4)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_5_ASM_OPS
: SYSCALL_5_ASM_WRITE
:: SYSCALL_5_ASM_CLOBBER);
return result;
}
Syscall_ret Kernel::syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2,
Syscall_arg arg_3,
Syscall_arg arg_4,
Syscall_arg arg_5)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_6_ASM_OPS
: SYSCALL_6_ASM_WRITE
:: SYSCALL_6_ASM_CLOBBER);
return result;
}

View File

@@ -1,160 +0,0 @@
/*
* \brief Syscall-framework implementation for ARM V7A systems
* \author Martin stein
* \date 2011-11-30
*/
/*
* Copyright (C) 2011-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
/* Genode includes */
#include <base/syscall.h>
using namespace Kernel;
/******************************************************************
** Inline assembly templates for syscalls with 1 to 6 arguments **
******************************************************************/
#define SYSCALL_6_ASM_OPS \
"mov r5, #0 \n" \
"add r5, %[arg_5] \n" \
SYSCALL_5_ASM_OPS
#define SYSCALL_5_ASM_OPS \
"mov r4, #0 \n" \
"add r4, %[arg_4] \n" \
SYSCALL_4_ASM_OPS
#define SYSCALL_4_ASM_OPS \
"mov r3, #0 \n" \
"add r3, %[arg_3] \n" \
SYSCALL_3_ASM_OPS
#define SYSCALL_3_ASM_OPS \
"mov r2, #0 \n" \
"add r2, %[arg_2] \n" \
SYSCALL_2_ASM_OPS
#define SYSCALL_2_ASM_OPS \
"mov r1, #0 \n" \
"add r1, %[arg_1] \n" \
SYSCALL_1_ASM_OPS
#define SYSCALL_1_ASM_OPS \
"mov r0, #0 \n" \
"add r0, %[arg_0] \n" \
"svc 0x0 \n" \
"mov %[result], #0 \n" \
"add %[result], r0 "
/*****************************************************************************
** Inline assembly "writeable" template-args for syscalls with 1 to 6 args **
*****************************************************************************/
#define SYSCALL_6_ASM_WRITE [arg_5] "+r" (arg_5), SYSCALL_5_ASM_WRITE
#define SYSCALL_5_ASM_WRITE [arg_4] "+r" (arg_4), SYSCALL_4_ASM_WRITE
#define SYSCALL_4_ASM_WRITE [arg_3] "+r" (arg_3), SYSCALL_3_ASM_WRITE
#define SYSCALL_3_ASM_WRITE [arg_2] "+r" (arg_2), SYSCALL_2_ASM_WRITE
#define SYSCALL_2_ASM_WRITE [arg_1] "+r" (arg_1), SYSCALL_1_ASM_WRITE
#define SYSCALL_1_ASM_WRITE \
[arg_0] "+r" (arg_0), \
[result] "+r" (result)
/**********************************************************************
** Inline assembly clobber lists for syscalls with 1 to 6 arguments **
**********************************************************************/
#define SYSCALL_6_ASM_CLOBBER "r5", SYSCALL_5_ASM_CLOBBER
#define SYSCALL_5_ASM_CLOBBER "r4", SYSCALL_4_ASM_CLOBBER
#define SYSCALL_4_ASM_CLOBBER "r3", SYSCALL_3_ASM_CLOBBER
#define SYSCALL_3_ASM_CLOBBER "r2", SYSCALL_2_ASM_CLOBBER
#define SYSCALL_2_ASM_CLOBBER "r1", SYSCALL_1_ASM_CLOBBER
#define SYSCALL_1_ASM_CLOBBER "r0"
/************************************
** Syscalls with 1 to 6 arguments **
************************************/
Syscall_ret Kernel::syscall(Syscall_arg arg_0)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_1_ASM_OPS
: SYSCALL_1_ASM_WRITE
:: SYSCALL_1_ASM_CLOBBER);
return result;
}
Syscall_ret Kernel::syscall(Syscall_arg arg_0,
Syscall_arg arg_1)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_2_ASM_OPS
: SYSCALL_2_ASM_WRITE
:: SYSCALL_2_ASM_CLOBBER);
return result;
}
Syscall_ret Kernel::syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_3_ASM_OPS
: SYSCALL_3_ASM_WRITE
:: SYSCALL_3_ASM_CLOBBER);
return result;
}
Syscall_ret Kernel::syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2,
Syscall_arg arg_3)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_4_ASM_OPS
: SYSCALL_4_ASM_WRITE
:: SYSCALL_4_ASM_CLOBBER);
return result;
}
Syscall_ret Kernel::syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2,
Syscall_arg arg_3,
Syscall_arg arg_4)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_5_ASM_OPS
: SYSCALL_5_ASM_WRITE
:: SYSCALL_5_ASM_CLOBBER);
return result;
}
Syscall_ret Kernel::syscall(Syscall_arg arg_0,
Syscall_arg arg_1,
Syscall_arg arg_2,
Syscall_arg arg_3,
Syscall_arg arg_4,
Syscall_arg arg_5)
{
Syscall_ret result = 0;
asm volatile(SYSCALL_6_ASM_OPS
: SYSCALL_6_ASM_WRITE
:: SYSCALL_6_ASM_CLOBBER);
return result;
}

View File

@@ -14,7 +14,9 @@
/* Genode includes */
#include <base/ipc.h>
#include <base/thread.h>
#include <kernel/syscalls.h>
/* base-hw includes */
#include <kernel/interface.h>
#include <kernel/log.h>
using namespace Genode;
@@ -38,40 +40,38 @@ enum
***************/
/**
* Limit message size to the size of UTCB and message buffer
* Copy message from the callers UTCB to message buffer
*/
void limit_msg_size(Msgbuf_base * const msgbuf, Native_utcb * const utcb,
size_t & size)
{
if (size > utcb->size() || size > msgbuf->size()) {
kernel_log() << __PRETTY_FUNCTION__ << ": truncate message\n";
size = utcb->size() < msgbuf->size() ? utcb->size() : msgbuf->size();
}
}
/**
* Copy message payload to message buffer
*/
static void utcb_to_msgbuf(Msgbuf_base * const msgbuf, size_t size)
static void utcb_to_msgbuf(Msgbuf_base * const msgbuf)
{
Native_utcb * const utcb = Thread_base::myself()->utcb();
limit_msg_size(msgbuf, utcb, size);
memcpy(msgbuf->buf, utcb->base(), size);
size_t msg_size = utcb->ipc_msg.size;
if (msg_size > msgbuf->size()) {
kernel_log() << "oversized IPC message\n";
msg_size = msgbuf->size();
}
memcpy(msgbuf->buf, utcb->ipc_msg.data, msg_size);
}
/**
* Copy message payload to the UTCB
* Copy message from message buffer to the callers UTCB
*/
static void msgbuf_to_utcb(Msgbuf_base * const msgbuf, size_t size,
static void msgbuf_to_utcb(Msgbuf_base * const msg_buf, size_t msg_size,
unsigned const local_name)
{
Native_utcb * const utcb = Thread_base::myself()->utcb();
*(unsigned *)utcb->base() = local_name;
size += sizeof(local_name);
limit_msg_size(msgbuf, utcb, size);
memcpy((unsigned *)utcb->base() + 1, (unsigned *)msgbuf->buf + 1, size);
enum { NAME_SIZE = sizeof(local_name) };
size_t const ipc_msg_size = msg_size + NAME_SIZE;
if (ipc_msg_size > utcb->ipc_msg_max_size()) {
kernel_log() << "oversized IPC message\n";
msg_size = utcb->ipc_msg_max_size() - NAME_SIZE;
}
*(unsigned *)utcb->ipc_msg.data = local_name;
void * const utcb_msg = (void *)((addr_t)utcb->ipc_msg.data + NAME_SIZE);
void * const buf_msg = (void *)((addr_t)msg_buf->buf + NAME_SIZE);
memcpy(utcb_msg, buf_msg, msg_size);
utcb->ipc_msg.size = ipc_msg_size;
}
@@ -94,8 +94,8 @@ Ipc_ostream::Ipc_ostream(Native_capability dst, Msgbuf_base *snd_msg)
void Ipc_istream::_wait()
{
/* FIXME this shall be not supported */
Kernel::pause_thread();
/* FIXME: this shall be not supported */
Kernel::pause_thread(0);
}
@@ -118,18 +118,26 @@ void Ipc_client::_call()
{
using namespace Kernel;
/* send request and receive reply */
msgbuf_to_utcb(_snd_msg, _write_offset, Ipc_ostream::_dst.local_name());
size_t const s = request_and_wait(Ipc_ostream::_dst.dst(), _write_offset);
utcb_to_msgbuf(_rcv_msg, s);
/* send request */
unsigned const local_name = Ipc_ostream::_dst.local_name();
msgbuf_to_utcb(_snd_msg, _write_offset, local_name);
request_and_wait(Ipc_ostream::_dst.dst());
/* receive reply */
Native_utcb * const utcb = Thread_base::myself()->utcb();
if (utcb->msg.type != Msg::Type::IPC) {
PERR("failed to receive reply");
throw Blocking_canceled();
}
utcb_to_msgbuf(_rcv_msg);
/* reset unmarshaller */
_write_offset = _read_offset = RPC_OBJECT_ID_SIZE;
}
Ipc_client::Ipc_client(Native_capability const &srv,
Msgbuf_base *snd_msg, Msgbuf_base *rcv_msg)
Ipc_client::Ipc_client(Native_capability const &srv, Msgbuf_base *snd_msg,
Msgbuf_base *rcv_msg, unsigned short)
: Ipc_istream(rcv_msg), Ipc_ostream(srv, snd_msg), _result(0) { }
@@ -161,27 +169,46 @@ void Ipc_server::_prepare_next_reply_wait()
void Ipc_server::_wait()
{
/* receive next request */
utcb_to_msgbuf(_rcv_msg, Kernel::wait_for_request());
Kernel::wait_for_request();
Native_utcb * const utcb = Thread_base::myself()->utcb();
if (utcb->msg.type != Msg::Type::IPC) {
PERR("failed to receive request");
throw Blocking_canceled();
}
utcb_to_msgbuf(_rcv_msg);
/* update server state */
_prepare_next_reply_wait();
}
void Ipc_server::_reply() { Kernel::reply(_write_offset, 0); }
void Ipc_server::_reply()
{
Native_utcb * const utcb = Thread_base::myself()->utcb();
utcb->ipc_msg.size = _write_offset;
Kernel::reply(0);
}
void Ipc_server::_reply_wait()
{
/* if there is no reply simply do wait for request */
/* FIXME this shall be not supported */
/* if there is no reply, wait for request */
if (!_reply_needed) {
_wait();
return;
}
/* send reply and receive next request */
msgbuf_to_utcb(_snd_msg, _write_offset, Ipc_ostream::_dst.local_name());
utcb_to_msgbuf(_rcv_msg, Kernel::reply(_write_offset, 1));
/* send reply an await request */
unsigned const local_name = Ipc_ostream::_dst.local_name();
msgbuf_to_utcb(_snd_msg, _write_offset, local_name);
Kernel::reply(1);
/* fetch request */
Native_utcb * const utcb = Thread_base::myself()->utcb();
if (utcb->msg.type != Msg::Type::IPC) {
PERR("failed to receive request");
throw Blocking_canceled();
}
utcb_to_msgbuf(_rcv_msg);
/* update server state */
_prepare_next_reply_wait();

Some files were not shown because too many files have changed in this diff Show More