Commit Graph

347 Commits

Author SHA1 Message Date
Martin Stein
8ce197d7fa hw: do inter-processor interrupt only when needed
The processor scheduler can determine without much overhead wether
the currently scheduled client becomes out-dated due to the insertion
of another client. This can be used to safe inter-processor interrupts
when a remote insertion doesn't imply an update of the currently
scheduled client.

fix #1088
2014-03-14 13:17:37 +01:00
Martin Stein
18cee192e2 hw: don't do redundant inter-processor interrupts
At least with the ARM generic interrupt controller, inter-processor interrupts
are edge triggered and banked for all source processors. Thus it might be
possible that such an interrupt gets triggered redundantly until the targeted
processor is able to grab the kernel lock. As we're only interested in making
a processor recognize accumulative updates to its scheduler, we can omit
further interrupts if there is one pending already at the targeted processor.

ref #1088
2014-03-14 13:17:37 +01:00
Martin Stein
852785324f hw: move Processor_client to processor.h
ref #1088
2014-03-14 13:17:37 +01:00
Martin Stein
8818d810a1 hw: clean-up destruction of processor clients
ref #1088
2014-03-14 13:17:36 +01:00
Martin Stein
17f17df74b hw: rename Execution_context in Processor_client
ref #1088
2014-03-14 13:17:36 +01:00
Martin Stein
010e00ae7a hw: rename Cpu_scheduler in Processor_scheduler
ref #1088
2014-03-14 13:17:36 +01:00
Martin Stein
a8d071b372 hw: inter-processor interrupt on remote scheduling
ref #1088
2014-03-14 13:17:36 +01:00
Martin Stein
044a109c3a hw: reset scheduling timeout implicitely
This is needed as soon as we do inter-processor interrupts to
inform a processor about a remote modification in its scheduling plan.
In this case we can not explicitely decide wether to reset timer
or not. Instead we must decide it according to the choices of the
scheduler before and after the modification.

ref #1088
2014-03-14 13:17:36 +01:00
Martin Stein
b9041d601d hw: Fix name of Page_flags type
The type was accidentally changed by "hw & arm_v6: clean up TLB driver"

ref #1076
2014-03-14 13:16:05 +01:00
Martin Stein
6e21ab42d2 hw: apply MMU cache-flushes to all processors
ref #1076
2014-03-14 13:16:05 +01:00
Martin Stein
56e4588e91 hw: provide processor broadcasts in core
A processor broadcast executes a function on all available processors
which is needed at least to do MMU cache-flushes globally.

ref #1076
2014-03-14 13:16:05 +01:00
Martin Stein
395e955756 hw: set affinity of core threads
ref #1076
2014-03-14 13:16:05 +01:00
Martin Stein
a586828844 hw: consider affinity location in Platform_thread
ref #1076
2014-03-14 13:16:05 +01:00
Martin Stein
49bf33e404 hw: multiprocessor aware processor scheduling
ref #1076
2014-03-14 13:16:05 +01:00
Martin Stein
f545fa0e36 hw: provide identification of a processor object
ref #1076
2014-03-14 13:16:04 +01:00
Martin Stein
e38060d81e hw: get a thread cap in Thread_base constructor
Previously this was not done before Thread_base::start(..) in
base-hw as it was not needed to have a valid cap that early. However,
when changing the affinity of a thread we need the cap to be valid
before Thread_base::start(..).

ref #1076
2014-03-07 17:24:54 +01:00
Martin Stein
52addb591b hw: multiprocessor aware verbosity on thread start
ref #1076
2014-03-07 17:24:28 +01:00
Martin Stein
ed9c4f4427 hw: get start-thread syscall multiprocessing aware
ref #1076
2014-03-07 17:24:12 +01:00
Martin Stein
194b6b64c1 hw: rename Multiprocessor in Processor_pool
fix #1083
2014-03-04 19:05:21 +01:00
Martin Stein
d2fd00a828 hw: rename files multiprocessor.* in processor.*
ref #1083
2014-03-04 19:05:09 +01:00
Martin Stein
7bdb8c9007 hw: let Processor inherit from Processor_driver
ref #1083
2014-03-04 19:04:50 +01:00
Martin Stein
effeb765b9 hw: rename <spec>::Cpu in <spec>::Processor_driver
ref #1083
2014-03-04 19:04:32 +01:00
Martin Stein
5d444a12dc hw: rename Genode::Cpu in Processor_driver
ref #1083
2014-03-04 19:04:16 +01:00
Martin Stein
108b29d33d hw: adjust defines in processor_driver.h
ref #1083
2014-03-04 19:04:06 +01:00
Martin Stein
f9ea52db9a hw: rename cpu.h in processor_driver.h
ref #1083
2014-03-04 19:03:58 +01:00
Martin Stein
2a503d3599 hw: adjust defines in core/processor_driver/
ref #1083
2014-03-04 19:03:48 +01:00
Martin Stein
e3c262579d hw: rename core/cpu/ in core/processor_driver/
ref #1083
2014-03-04 19:03:13 +01:00
Martin Stein
1335b7b550 hw: rename handle_exception() in exception()
fix #1078
2014-03-04 19:02:30 +01:00
Martin Stein
3a4f7128fd hw: make _processor private to Execution_context
ref #1078
2014-03-04 19:01:45 +01:00
Martin Stein
ce9e43ae51 hw: move handle_interrupt to Execution_context
ref #1078
2014-03-04 19:01:29 +01:00
Martin Stein
7cea03f695 hw: move Thread::_processor to Execution_context
ref #1078
2014-03-04 18:58:51 +01:00
Martin Stein
6a3368ee27 hw_arndale: idle threads on secondary processors
fix #1006
2014-03-04 15:03:43 +01:00
Martin Stein
e83849cf99 hw & arm: clean up core CRT0
ref #1006
2014-03-04 15:01:59 +01:00
Martin Stein
1e7c0c2066 hw: fix assembly alignments
ref #1006
2014-03-04 14:58:50 +01:00
Martin Stein
722154f0a8 hw: kernel initialization in extra function
ref #1006
2014-03-04 14:56:44 +01:00
Martin Stein
c288973bf2 hw & arm: declare every mapping as MP shared
ref #1006
2014-03-04 14:55:04 +01:00
Martin Stein
f0c54a7ca3 hw & arm_v6: clean up TLB driver
ref #1006
2014-03-04 14:54:49 +01:00
Martin Stein
1730e10469 hw & arm_v7: clean up TLB driver
ref #1006
2014-03-04 14:54:27 +01:00
Martin Stein
be7a119deb hw & arm: simplify TLB descriptor-type bits
ref #1006
2014-03-04 14:53:52 +01:00
Martin Stein
6fcdbf5e9e hw & arm: simplify TLB permission bits via bitsets
ref #1006
2014-03-04 14:52:34 +01:00
Stefan Kalkowski
2ed22595ff hw: simplify Page_flags (fix #711)
Instead of using a special bitfield use a compound of boolean
values for the generic page attributes. To reduce copy overhead,
change the corresponding functions, where Page_flags are used as
arguments, to use references.
2014-03-03 14:11:22 +01:00
Stefan Kalkowski
28bb1f8fd7 hw: remove use of float in exynos timer (fix #713) 2014-03-03 13:00:36 +01:00
Stefan Kalkowski
83266db30b hw: disable assertions if release spec is set only
Fix #1071
2014-03-03 12:51:25 +01:00
Sebastian Sumpf
1295d5e062 hw: Change link address for Panda
Don't load image at beginning of RAM, this may cause u-boot to show
unpredictable behavior.
2014-02-28 10:11:13 +01:00
Martin Stein
99ec536c53 thread: init thread cap for non-core main threads
ref #989
2014-02-28 10:11:13 +01:00
Stefan Kalkowski
379c6c1cd4 i.MX53: fix incorrect DMA protection settings
Within the central security unit of the i.MX53 SoC, one can set protection
level of various DMA bus master requests, distinguishing them between normal,
and secure access. Although, the access level was meant to be set correctly,
the enumeration values that denoted the kind of access were incorrect. Thereby,
until now every DMA requests was set as being secure. This commit corrects
the enumeration values, and sets all DMA operations as being unsecure, accept
from the graphical subsystem which is controlled by the secure world only.

Thanks to Andrea Barisani and Andrej Rosano from Inverse Path for discovering
this bug, as well as the hardware limitation!
2014-02-28 10:11:13 +01:00
Stefan Kalkowski
3b69dc2a58 TrustZone: reenable memory protection (fix #1060) 2014-02-28 10:11:08 +01:00
Martin Stein
929a2387d1 hw: merge base-common and kernel_interface lib
Issue #1042
2014-02-25 14:58:08 +01:00
Martin Stein
13b1aab044 hw & arm7: prepare CPU driver for -O0 2014-02-25 14:58:08 +01:00
Martin Stein
6a2546d7e9 hw: ease syscall backends and prepare them for -O0
Previously we used to many registers in syscalls with much arguments
to build with optimization level O0. Additionally this fix fastens the
userland backend of syscalls.
2014-02-25 14:58:08 +01:00
Martin Stein
523791b361 base: generic implementation of Context_allocator
ref #989
2014-02-25 14:58:05 +01:00
Martin Stein
0b64328944 base: setup thread object for main thread in CRT0
For a main thread a thread object is created by the CRT0 before _main gets
called so that _main can already run in a generic environment that, e.g.,
catches stack overflows as a page-fault instead of corrupting the BSS.
Additionally dynamic programs have only one CRT0 - the one of the LDSO -
which does the initialization for both LDSO and program.

ref #989
2014-02-25 14:58:05 +01:00
Martin Stein
f7149623ca base: rename reload_parent_cap.cc
ref #989
2014-02-25 14:58:04 +01:00
Martin Stein
e68eadf57b hw: fix bug in IPC message-size calculation
ref #989
2014-02-25 14:58:02 +01:00
Martin Stein
a9747825fc hw: use descriptive bool value names in ipc.cc
ref #989
2014-02-25 14:58:02 +01:00
Martin Stein
901b3e2bb4 hw: ease usage of the kernel log
ref #989
2014-02-25 14:58:02 +01:00
Christian Helmuth
3234e4f775 Make Deallocator::need_size_for_free() pure virtual 2014-01-30 10:05:43 +01:00
Stefan Kalkowski
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
Christian Helmuth
7e517179c9 Unify stack alignment among all platforms
The alignment is now done in Thread_base::Context. Implementations are
forced to use Context::stack_top(), which aligns the stack top.
2014-01-27 18:54:08 +01:00
Martin Stein
49eeb485d9 hw: mark caller when printing an activity-table
ref #989
2013-12-20 14:48:06 +01:00
Martin Stein
906b4dc90a hw: format fix in activity table
ref #989
2013-12-20 14:48:06 +01:00
Martin Stein
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
Martin Stein
8eef91f2ac hw: do not block on destruction of signal receiver
As synchronization of signal contexts is now the users business instead of
cores and the signal framework ensures that every context of a receiver gets
synchronously destructed before the destruction of the receiver itself
synchronization and thus blocking at the destruction of a kernel
receiver-object isn't necessary anymore.

ref #989
2013-12-20 14:48:06 +01:00
Martin Stein
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
Martin Stein
2bdf0e70e9 hw: fix bug in Kernel::Thread::_print_activity
ref #989
2013-12-20 14:48:06 +01:00
Martin Stein
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
Martin Stein
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
Martin Stein
42f51cd802 hw: use core-PD class to prevent singleton clashes
ref #989
2013-12-20 14:48:05 +01:00
Martin Stein
77130a9404 hw: replace unsynchronized by unmanaged singleton
ref #989
2013-12-20 14:48:05 +01:00
Stefan Kalkowski
7b49dbf2f3 hw: basic support for ODROID XU board (Fix #991) 2013-12-03 11:30:07 +01:00
Martin Stein
31b4062688 hw: optionally provide activity table on RM faults
ref #964
2013-12-03 08:33:25 +01:00
Martin Stein
f356ad2bdf hw: print activity table via Kernel::print_char(0)
ref #964
2013-12-03 08:33:25 +01:00
Martin Stein
e35d7c979f hw: IPC nodes provide protected accessors
ref #964
2013-12-03 08:33:25 +01:00
Martin Stein
16d48eaf1e hw: signalling roles provide protected accessors
ref #964
2013-12-03 08:33:25 +01:00
Martin Stein
da116c66ba hw: public access to idle item of a scheduler
ref #964
2013-12-03 08:33:25 +01:00
Martin Stein
8d19aad601 hw_pbxa9: provide 768 MB RAM
The previously used RAM 0x0..0x10000000 was just an alias for
0x70000000..0x80000000. Qemu provides up to of 768 MB RAM with the
correct -m argument. This RAM is located at 0x70000000..0x90000000 and
0x20000000..0x30000000. At least the noux_tool_chain scripts are
happy to have that much RAM.

ref #964
2013-12-03 08:33:25 +01:00
Martin Stein
b5922fb7f1 hw: dissolve signal context in Pager_entrypoint
ref #964
2013-12-03 08:33:24 +01:00
Martin Stein
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
Martin Stein
2b8e5d7b19 hw: turn Native_utcb into restrictive class
fix #958
2013-12-03 08:33:24 +01:00
Martin Stein
5e3d505ef4 hw: bin stupid case in Thread::_await_ipc_failed
ref #958
2013-12-03 08:33:24 +01:00
Martin Stein
dc8cbbf022 hw: rename Startup_msg in Start_info
ref #958
2013-12-03 08:33:24 +01:00
Martin Stein
4359b99c4f hw: rename Ipc_msg in Message
ref #958
2013-12-03 08:33:23 +01:00
Martin Stein
575a81a633 hw: turn Ipc_msg into restrictive class
ref #958
2013-12-03 08:33:23 +01:00
Martin Stein
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
Martin Stein
d46b30a711 hw: clarify names of messaging kernel-calls
ref #958
2013-12-03 08:33:23 +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
Martin Stein
2124b4b9c2 hw_panda: provide EHCI interrupt for USB driver
fix #981
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
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
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
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
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
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