Commit Graph

382 Commits

Author SHA1 Message Date
Christian Helmuth
f91b1b6258 base: test for races in thread-context allocation
Related to #1024.
2014-01-30 10:05:44 +01:00
Christian Helmuth
aa02fb8256 Revise delete with allocators
Delete operators with additional allocator reference/pointer parameters
are needed if the constructor of an 'new(allocator)' allocated object
throws an exception. Also, destroy now uses the operator to free memory
and provides variants with allocator reference and pointer.

The commit includes a simple test scripts 'run/new_delete', which
exercises the several 'delete' cases.

Related to #1030.
2014-01-30 10:05:44 +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
Stefan Kalkowski
66c5887bd3 Move Bit_allocator from base-nova to base
Change the template parameter for Bit_allocator, and Bit_array. Instead of
assigning words to be used by the bit array, you can now tell the count of
items that shall be used.

Moreover, some dead code, previously using the Bit_allocator, was removed.

Related to #1024
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
Norman Feske
6ec36350d6 base: New Genode::Deallocator interface
Splitting the new Genode::Deallocator interface from the former
Genode::Allocator interface enables us to restrict the accessible
operations for code that is only supposed to release memory, but not
perform any allocations.

Additionally, this patch introduces variants of the 'new' operator
that takes a reference (as opposed to a pointer) to a Genode::Allocator
as argument.
2014-01-27 18:54:08 +01:00
Norman Feske
f32a97da38 Use filename as default label for ROM connections
By assigning the file name as label, we may become able to remove the
filename argument in the future by just interpreting the last part of
the label as filename. By keeping only the label, we won't need to
consider conditional routing (via <if-arg>) based on session arguments
other than the label anymore.
2014-01-27 18:54:07 +01:00
Norman Feske
332aeba844 util/string.h: String::operator == 2014-01-27 18:54:07 +01:00
Norman Feske
8ca0f04ba0 Length and capacity accessors for Genode::String 2014-01-27 18:54:05 +01:00
Norman Feske
07b355b4e4 Clarify comment in base-libs.mk 2014-01-16 18:34:06 +01:00
Alexander Boettcher
22c1f8772b base: catch errors during ram_ds allocation
Issue #1011
2013-12-20 15:16:25 +01:00
Alexander Boettcher
b893968232 base: show size as %zu instead %zd
For big numbers otherwise negative sizes for memory chunks are displayed.

Issue #1011
2013-12-20 15:16:19 +01:00
Sebastian Sumpf
b8beba5bf3 ldso: Support for setting global object values
Make 'set_program_var' accessible outside of 'rtld.c'. Also, compile
dynamically linked programs with the '-fPIC' option. Doing not so,
yields to program-global symbols being put in the '.symtab' section
(which can be stripped) only. In order to get access to global
variables from the dynamic linker, the symbols need to reside within
the '.dynsym' section additionally. Hence the '-fPIC'.

ref #989
fix #1002
2013-12-20 14:48:06 +01:00
Martin Stein
750f5313f7 base: avoid compiler warning in Thread::stack_top
The statement _context->stack[-1] triggered the compiler warning
'array subscript is below array bounds'.

ref #989
2013-12-20 14:48:06 +01:00
Alexander Boettcher
a596bfe797 run: test for main thread_base object
ref #989
2013-12-20 14:48:05 +01:00
Martin Stein
4009619206 base: natural default align in unmanaged singleton
I have no idea where the previous default alignment = 2 in the unsynchronized
singleton came from but as at least the Arndale IC-driver in base-hw needs an
alignment of 4 = address width, unmanaged singleton now uses sizeof(addr_t)
as default alignment.

ref #989
2013-12-20 14:48:05 +01:00
Martin Stein
212fc47768 base: provide template for unmanaged singletons
An unmanaged singleton is a singleton object that isn't
constructed or destructed implicitly through the C++ runtime
enviroment. The new header provides a helper to create such objects
and is located in src/base/include.

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
f4c724639b arm: raise stack size of main thread
With 64K stack size, when doing 'make core' in noux on base-hw, the main thread
of /libexec/gcc/arm-elf-eabi/4.7.2/cc1plus runs into a stack overflow during
the compilation of core/main.o . Thus raise the stack size to 128K.

fix #964
2013-12-03 08:33:26 +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
062aa2851c usb & panda: move EHCI-interrupt to board spec
ref #981
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
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
864a047206 base: Local signal submit 2013-11-25 12:12:31 +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
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
5b5ea76039 hw_rpi: Hand out IRQ for USB host controller 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
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
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
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
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
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
Christian Prochaska
1a22664fee Call exit handlers before notfying the parent
Fixes #941.
2013-11-05 12:01:13 +01:00
Christian Prochaska
cc04ffcf42 GDB monitor: find out page faulting thread
Fixes #898.
2013-10-25 23:49:00 +02:00
Norman Feske
1c4e73d425 base: 'Allocator_guard::quota' accessor 2013-10-22 08:00:16 +02:00
Martin Stein
1113f36e2f arndale: specs to enable demo scenario
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
Martin Stein
ee5d213c1f base: do not allow unnamed threads
fix #901
2013-10-22 08:00:07 +02:00