Commit Graph

205 Commits

Author SHA1 Message Date
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 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 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 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 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 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
Norman Feske f1dcaa746d Enable C++11 by default 2013-09-23 14:26:01 +02:00
Norman Feske 0f663991c1 base-hw: Pic::mask for rpi 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
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
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
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
Norman Feske 35723d813d core: evaluate CPU session affinity argument 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 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
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 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 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
Martin Stein 1b96e8a7e1 hw: use generic genode.ld
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
Stefan Kalkowski e06a154294 Add __initial_sp variable to base-hw specific crt0
Fixes #756
2013-06-12 11:35:13 +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
Martin Stein 2e7802b799 base-hw: flush cached zeroes in 'clear_ds(...)'
Ref #706
2013-05-22 18:32:05 +02:00
Martin Stein a0d182e25a hw_arndale: userland timer driver
Ref #706
2013-05-22 18:32:05 +02:00
Martin Stein 65136c2289 hw_arndale: use core local timer in kernel
Ref #706
2013-05-22 18:32:05 +02:00
Norman Feske 8ac6d8c96c base-hw: Support for Raspberry Pi 2013-05-15 20:48:07 +02:00
Norman Feske 65f20262cb base-hw: Enable caches on ARM v6 2013-05-15 20:48:00 +02:00
Norman Feske d43d9900ab base-hw: Make memory_region_attr CPU-specific
This patch moves the implementation of the 'Arm::memory_region_attr'
function from the generic ARM code to the ARM v6/v7 specific code
to enable the customization of page-table bits depending on the
specific CPU core type. I.e., the ARM1176 apparently does not cope
well with setting the 'Tex::bits(2)' for MMIO mappings.
2013-05-15 20:47:52 +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
Norman Feske 0561538919 Spelling fix 2013-05-15 20:47:24 +02:00
Stefan Kalkowski 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
Alexander Boettcher 138a37765f run: add support for IP power switch NETIO-230B 2013-05-10 11:16:12 +02:00
Alexander Boettcher 85c6640795 run: add support to specify 'serial' via RUN_OPT
If the target machine is connected locally one may specify
"serial" as target in the RUN_OPT variable to get the test output.

Used for panda and arndale on foc and hw.
2013-05-10 11:16:10 +02:00
Alexander Boettcher df985bda84 run: support RUN_OPT for all platforms
Use RUN_OPT="--target ..." to select the backend test method.

Supported values so far:

qemu     - qemu + grub bootloader (default)
qemu+pxe - qemu + pulsar bootloader (PXE)
amt      - Intel AMT (reset+serial output) + pulsar bootloader

Related to issue #598
2013-05-10 11:16:10 +02:00
Alexander Boettcher 2a761c7fea run: extend genode_until_run by a spawn id
genode_until_run can be called now with a spawn id to able to reattach to a
spawned process (amt, serial output). Run scripts can now call genode_until_run
multiple times.
2013-05-08 09:42:44 +02:00
Martin Stein ef572f7ef8 hw & core: provide env_context_area_rm_session()
Ref #734
2013-05-07 21:56:07 +02:00
Norman Feske d339eb734f base-hw: Fix error message in run env 2013-04-10 14:33:47 +02:00
Martin Stein 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
Martin Stein ea7ed5947a base: hand over Pd_connection label to Platform_pd
fix: #656
2013-04-08 11:42:24 +02:00
Stefan Kalkowski ce58a63fb6 Remove 'epit' from generic i.MX platform spec
Remove the 'epit' variable from the generic imx31 and imx53 specification,
and only add it to base-hw specific i.MX specs. Thereby the EPIT timer
library gets build for base-hw only.
Moreover, fix some const-ness issues in the platform_timer implementation
for the EPIT timer.
Fixes #688.
2013-03-14 11:27:51 +01:00
Norman Feske 21de42c45d core: Introduce 'Address_space' interface
The new core-internal 'Address_space' interface enables cores RM service
to flush mappings of a PD in which a given 'Rm_client' thread resides.
Prior this patch, each platform invented their own way to flush mappings
in the respective 'rm_session_support.cc' implementation. However, those
implementations used to deal poorly with some corner cases. In
particular, if a PD session was destroyed prior a RM session, the RM
session would try to use no longer existing PD session. The new
'Address_space' uses the just added weak-pointer mechanism to deal with
this issue.

Furthermore, the generic 'Rm_session_component::detach' function has
been improved to avoid duplicated unmap operations for platforms that
implement the 'Address_space' interface. Therefore, it is related to
issue #595. Right now, this is OKL4 only, but other platforms will follow.
2013-03-12 21:53:08 +01: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
Martin Stein 79d5f9c565 base-hw: Adaptation to new base library layout
This is a follow-up fix of fae63f4fa9

Fix #18
2013-02-20 19:41:49 +01:00
Martin Stein 251d08d511 base-hw: useless default assignment in syscalls.h
fix #588
2013-02-20 19:41:21 +01:00
Martin Stein 96fbd9e832 base-hw: provide SIGNAL service in nested_init.run
ref #601
2013-02-20 19:40:58 +01:00
Martin Stein 5d8a43dd08 base-hw: rework 'run/env', enable '--target uboot'
ref #601
ref #598
2013-02-20 19:40:46 +01:00
Martin Stein 60fbbc1fd1 hw_arndale: enable nested init test
fix #601
2013-02-20 19:39:16 +01:00
Martin Stein 86785e70e6 base-hw & arm_v7: fix CPU initialization bug
ref #601
2013-02-20 19:37:36 +01:00
Martin Stein 02fccf5cb2 base-hw: fix bug in 'Platform_thread::pager()' 2013-02-20 19:37:25 +01:00
Martin Stein 3047e32dfd base-hw & arm: bugs when zero-filling BSS
fix #654
2013-02-20 19:29:00 +01:00
Norman Feske fae63f4fa9 Merge base libraries into a single library
This patch simplifies the way of how Genode's base libraries are
organized. Originally, the base API was implemented in the form of many
small libraries such as 'thread', 'env', 'server', etc. Most of them
used to consist of only a small number of files. Because those libraries
are incorporated in any build, the checking of their inter-dependencies
made the build process more verbose than desired. Also, the number of
libraries and their roles (core only, non-core only, shared by both core
and non-core) were not easy to capture.

Hereby, the base libraries have been reduced to the following few
libraries:

- startup.mk contains the startup code for normal Genode processes.
  On some platform, core is able to use the library as well.
- base-common.mk contains the parts of the base library that are
  identical by core and non-core processes.
- base.mk contains the complete base API implementation for non-core
  processes

Consequently, the 'LIBS' declaration in 'target.mk' files becomes
simpler as well. In the most simple case, only the 'base' library must
be mentioned.

Fixes #18
2013-02-19 14:45:55 +01:00
Norman Feske 1ab0ae908b base-hw: Adaptation to signal API change
This patch is an interim fix for building base-hw until the signal
implementation is revisited on this platform.
2013-02-14 13:23:37 +01:00
Norman Feske bcdc706f42 Unify 'ipc.h' and 'ipc_generic.h' across platforms
The distinction between 'ipc.h' and 'ipc_generic.h' is no more. The only
use case for platform-specific extensions of the IPC support was the
marshalling of capabilities. However, this case is accommodated by a
function interface ('_marshal_capability', '_unmarshal_capability'). By
moving the implementation of these functions from the headers into the
respective ipc libraries, we can abandon the platform-specific 'ipc.h'
headers.
2013-02-14 13:23:37 +01:00
Norman Feske bbca9912e2 Remove 'Native_lock' type from 'native_types.h' 2013-02-14 13:23:36 +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