Commit Graph

44 Commits

Author SHA1 Message Date
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
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
Alexander Boettcher
a6af6c80ab base: count caps replied by a rpc function
Issue #905
2013-11-18 11:01:45 +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
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
47744e0019 hw: handle interrupts via signals
fix #874
2013-11-14 19:57:30 +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
b5c6f2c260 hw: avoid generic exceptions in signal framework
ref #912
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
327cdfdf36 hw: always remove RM client on thread destruction
ref #589
2013-09-26 16:09:56 +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
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
5f64411ad7 hw: add missing include in singleton header
ref #528
2013-09-26 15:58:04 +02:00
Martin Stein
f7fd7b0b11 hw: no assertions in pagers
ref #528
2013-09-26 15:58:03 +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
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
ee28a69c98 hw: fully functional Thread_base::cancel_blocking
Thread_base::cancel_blocking brings a thread back to execution
from every state, except the thread is created but not started yet.

Fix #745
2013-05-22 18:53:18 +02:00
Norman Feske
71cd7b9d2e base-hw: Avoid early calls of cmpxchg
This patch eliminates calls of 'cmpxchg' prior enabling the MMU. This is
needed because the 'ldrex' and 'strex' instructions do not always work
with MMU and L1 cache disabled, i.e., on Raspberry Pi.
2013-05-15 20:47:46 +02:00
Christian Prochaska
a99193ad90 Rework the internal lock interface
With this patch, the 'futex' syscall gets used for blocking and unblocking
of threads in the Linux-specific lock implementation.

The 'Native_thread_id' type, which was previously used in the
lock-internal 'Applicant' class to identify a thread to be woken up,
was not suitable anymore for implementing this change. With this patch,
the 'Thread_base*' type gets used instead, which also has the positive
effect of making the public 'cancelable_lock.h' header file
platform-independent.

Fixes #646.
2013-02-25 22:14:21 +01:00
Martin Stein
438b8be2fa base-hw: destroy signal contexts, generic signal.h
fix #641
2013-02-22 20:28:28 +01:00
Alexander Boettcher
9453d319cb base: add remove_client to rm_session
Fixes #13
2013-02-11 12:01:25 +01:00
Norman Feske
73ab30c22c Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
Alexander Boettcher
c2d3543e62 base: replace obj_by_* by lookup_and_lock
Add functionality to lookup an object and lock it. Additional the case is
handled that a object may be already in-destruction and the lookup will deny
returning the object.

The object_pool generalize the lookup and lock functionality of the rpc_server
and serve as base for following up patches to fix dangling pointer issues.
2013-01-10 11:13:13 +01:00
Martin Stein
19398159e1 base-hw: use Genode::memcpy in base/ipc.cc
Ref #583
2013-01-08 11:36:52 +01:00
Martin Stein
4fb5c23a3c base-hw: don't use 'long' unnecessarily
Fix #581
2013-01-08 11:36:52 +01:00
Norman Feske
dfaecfb5ab Make quota-upgrading message more clear
Fixes #592
2012-12-22 13:04:04 +01:00
Martin Stein
240f1e334f base: Don't complete line breaks in UART drivers. 2012-12-07 08:55:16 +01:00
Martin Stein
8037277447 base-hw: reply to IPC without awaiting the next
Fix #544
2012-11-30 16:23:16 +01:00
Martin Stein
88b370bda2 base-hw: Full quota upgrading in signal receiver.
Fix #518
2012-11-26 20:58:10 +01:00
Norman Feske
bcabbe2c92 Add 'Thread_base::join()'
Using the new 'join()' function, the caller can explicitly block for the
completion of the thread's 'entry()' function. The test case for this
feature can be found at 'os/src/test/thread_join'. For hybrid
Linux/Genode programs, the 'Thread_base::join()' does not map directly
to 'pthread_join'. The latter function gets already called by the
destructor of 'Thread_base'. According to the documentation, subsequent
calls of 'pthread_join' for one thread may result in undefined behaviour.
So we use a 'Genode::Lock' on this platform, which is in line with the
other platforms.

Related to #194, #501
2012-11-19 12:43:34 +01:00
Martin Stein
cfa0a40d5e base_hw & omap4: USB HID and framebuffer driver.
Implement 'Signal_receiver::pending()'.

Provide display-subsystem MMIO.

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

Enables demo scenario with 'hw_panda_a2'.
2012-11-14 16:36:50 +01:00
Martin Stein
31d57a6257 Nested init on i.MX31 via base_hw. Rework base_hw.
Implies support for the ARMv6 architecture through 'base-hw'.

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

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

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

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

Beautify further stuff in 'base_hw'.

Test 'nested_init' with 'hw_imx31' (hardware) and 'hw_panda_a2' (hardware),
'demo' and 'signal' with 'hw_pbxa9' (qemu) and 'hw_vea9x4'
(hardware, no trustzone), and 'vmm' with 'hw_vea9x4'
(hardware, with trustzone).
2012-11-14 16:36:41 +01:00
Martin Stein
9dba710989 Enable 'signal' test on 'base_hw'. 2012-10-12 13:10:45 +02:00
Alexander Boettcher
ea38aad30e Move context area definition to native_type 2012-09-24 09:17:54 +02:00
Martin Stein
ff65f6f021 Run Genode directly on hardware with 'base-hw'. 2012-08-03 12:06:37 +02:00