Commit Graph

79 Commits

Author SHA1 Message Date
901b3e2bb4 hw: ease usage of the kernel log
ref #989
2014-02-25 14:58:02 +01:00
5447c406e5 thread: rearrange thread context management
Use a bit allocator for the allocation management of thread contexts,
instead of holding allocation information within the Thread_base objects,
which lead to race conditions in the past.

Moreover, extend the Thread_base class interface with the ability to
to add additional stacks to a thread, and associate the context they're
located in with the corresponding Thread_base object. Additional stacks
can be used to do user-level scheduling with stack switching, without breaking
Genode's API.

Fixes #1024
Fixes #1036
2014-01-27 18:54:09 +01:00
f4bd2368f6 hw: cancel unresolved faults before pager dissolve
If an RM client gets dissolved the RM server tries to first
dissolve and then destruct the according pager object. As pager objects
previously cancelled unresolved faults only in destructor the dissolve
operation blocked forever when an unresolved fault existed.
As every pager object should get dissolved before it gets destructed
(signal-context complains otherwise) no more unresolved-fault cancelling
is needed in the destructor.

ref #989
2013-12-20 14:48:06 +01:00
1c8c30e1f4 hw: sync signal contexts directly as user
Kernel::signal_context_kill can be used by any program to halt the processing
of a signal context synchronously to prevent broken refs when core destructs
the according kernel object. In turn, Kernel::bin_signal_context doesn't block
anymore and destructs a signal context no matter if there are unacknowledged
signals. This way, cores entrypoint doesn't depend on signal acks of a
untrustworthy client anymore.

ref #989
2013-12-20 14:48:06 +01:00
3bdf70f771 hw: rename kill_* functions in bin_*
In the future bin_* means the direct destruction of a kernel object
without any blocking. kill_* in contrast is used for bringing a
kernel object such as signal contexts synchronized into a sleeping
state from where they can be destructed without the risk of getting
broken refs in userland.

ref #989
2013-12-20 14:48:06 +01:00
6aa0ab1bf9 hw: communicate UTCB dataspace through start info
To remap its UTCB to its context area later, a main thread needs
to know the according dataspace capability. This is done through
the start-info it receives from its creator at startup.

ref #989
2013-12-20 14:48:05 +01:00
7b49dbf2f3 hw: basic support for ODROID XU board (Fix #991) 2013-12-03 11:30:07 +01:00
f356ad2bdf hw: print activity table via Kernel::print_char(0)
ref #964
2013-12-03 08:33:25 +01:00
54610247ad hw: don't communicate main-thread UTCB via SP
When using the initial SP of a main thread for the UTCB
startup-argument, fork_trampoline in libc_noux gets broken.
The function expects the SP to be initialized already in contrast
to the _start function in crt0.s that is called for processes that
are not forked. As the main-thread UTCB is located at the same virtual
address for every PD anyways, we can circumvent this problem by
defining it statically.

ref #964
2013-12-03 08:33:24 +01:00
2b8e5d7b19 hw: turn Native_utcb into restrictive class
fix #958
2013-12-03 08:33:24 +01:00
dc8cbbf022 hw: rename Startup_msg in Start_info
ref #958
2013-12-03 08:33:24 +01:00
4359b99c4f hw: rename Ipc_msg in Message
ref #958
2013-12-03 08:33:23 +01:00
575a81a633 hw: turn Ipc_msg into restrictive class
ref #958
2013-12-03 08:33:23 +01:00
f128a52e8b hw: get rid of struct Msg and Msg::Type
Struct Msg was introduced due to the handling of pagefaults
and interrupts via synchronous IPC. Its only purpose was to provide
the message type in front of the typed message. Now pagefaults and
interrupts are handled via signals and struct Msg is not necessary
anymore.

ref #958
2013-12-03 08:33:23 +01:00
d46b30a711 hw: clarify names of messaging kernel-calls
ref #958
2013-12-03 08:33:23 +01:00
c70bc350e8 tz_vmm: make scenario reproducible by everyone 2013-11-28 08:22:25 +01:00
23ce6dad50 hw_vea9x4: re-enable TrustZone support 2013-11-28 08:22:25 +01:00
5b90113d86 hw: no default values for kernel-call args
ref #967
2013-11-26 14:32:07 +01:00
6f136bef7a hw: add TrustZone support for i.MX53 (ref #954) 2013-11-25 09:46:08 +01:00
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
fde150b052 hw: rename delete_thread in kill_thread
ref #953
2013-11-25 09:45:31 +01:00
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
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
77f55232fd hw: remove Kernel::get_thread
ref #953
2013-11-25 09:45:31 +01:00
87da21d967 hw: use platform-thread pointer as pager badge
ref #953
2013-11-25 09:45:30 +01:00
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
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
15a56bd682 hw: provide and use syscall access_thread_regs
ref #935
2013-11-14 19:57:30 +01:00
47744e0019 hw: handle interrupts via signals
fix #874
2013-11-14 19:57:30 +01:00
002a5b8978 hw: distinct pagefault and IPC message type
ref #874
2013-11-14 19:56:39 +01:00
6f935af278 hw: communicate message type through UTCB
ref #874
2013-11-14 19:56:38 +01:00
1e7eb4512e hw: manage UTCB through use-case specific structs
ref #874
2013-11-14 19:56:38 +01:00
96bbca6191 hw: send reply size & receive request size by UTCB
ref #874
2013-11-14 19:56:38 +01:00
45d37e275d hw: send request size through UTCB
ref #874
2013-11-14 19:56:38 +01:00
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
bb9fa16a5e hw: throw expressive exceptions in signal session
ref #912
2013-10-16 09:26:11 +02:00
0ad655f4be hw: return error code on IPC replies
ref #899
2013-10-16 09:26:10 +02:00
36111587be hw: don't use assertions in Kernel::get_thread
ref #589
2013-09-26 16:09:56 +02:00
d86bf3db64 hw: destruct protection domains
ref #589
2013-09-26 16:09:55 +02:00
4f4738427d hw: release pagers from faulting threads
ref #589
2013-09-26 16:09:55 +02:00
349262a655 hw: handle pagefaults via IPC request/reply
ref #589
2013-09-26 15:58:04 +02:00
84c31a7ea1 hw: destruct signal receivers
ref #589
2013-09-26 15:58:04 +02:00
e33ea2a8b7 hw: completely release signal-context resources
ref #589
2013-09-26 15:58:04 +02:00
f7fd7b0b11 hw: no assertions in pagers
ref #528
2013-09-26 15:58:03 +02:00
35723d813d core: evaluate CPU session affinity argument 2013-08-13 17:08:25 +02:00
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
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
2e7802b799 base-hw: flush cached zeroes in 'clear_ds(...)'
Ref #706
2013-05-22 18:32:05 +02:00
ae291b557d Extend base-hw specific vm-session (fix #738)
Introduce pause syscall for VM objects, and extend the vm-session interface
to support it.
2013-05-10 11:16:13 +02:00
4b224dd67e base-hw: store Platform_pd pointer in Kernel::Pd
This enables the kernel to print out the label of the program
a thread belongs to.

fix #662
2013-04-09 14:24:25 +02:00