Commit Graph

456 Commits

Author SHA1 Message Date
Tomasz Gajewski
870d348d77 trace: redirect logs to trace based on policy
If trace is enabled for component than an attempt to put message into
trace buffer is performed using log_output policy. If it succeeds than
message is not put to logs using log service.

Fixes #3714
2020-04-17 12:47:48 +02:00
Tomasz Gajewski
1d9a2dce94 trace: extend policy with log_output
Issue #3714
2020-04-17 12:47:19 +02:00
Norman Feske
6dfd268ef1 base/registry.h: remove misleading comment 2020-04-17 12:40:13 +02:00
Alexander Boettcher
3956530634 base: use Mutex/Blockade
Issue #3612
2020-04-17 12:40:12 +02:00
Tomasz Gajewski
d111af922a trace documentation: fix reference to events definitions 2020-04-17 12:40:12 +02:00
Christian Helmuth
e63c5e6c69 base: rework interplay of signal-proxy and entrypoint
The former scheme left open a race window between
_process_incoming_signals() and wait_and_dispatch_one_io_signal()
resulting in both threads calling block_for_signal() and blocking
forever with one unprocessed signal.

Fixes #3704
2020-04-17 12:39:32 +02:00
Stefan Kalkowski
f051065582 Retire OMAP4 support
Fix #2850
2020-04-17 12:39:32 +02:00
Stefan Kalkowski
6d48b5484d hw: correct the ARM cache maintainance operations
This commit fixes the following issues regarding cache maintainance
under ARM:

* read out I-, and D-cache line size at runtime and use the correct one
* remove 'update_data_region' call from unprivileged syscalls
* rename 'update_instr_region' syscall to 'cache_coherent_region' to
  reflect what it doing, namely make I-, and D-cache coherent
* restrict 'cache_coherent_region' syscall to one page at a time
* lookup the region given in a 'cache_coherent_region' syscall in the
  page-table of the PD to prevent machine exceptions in the kernel
* only clean D-cache lines, do not invalidate them when pages where
  added on Cortex-A8 and ARMv6 (MMU sees phys. memory here)
* remove unused code relicts of cache maintainance

In addition it introduces per architecture memory clearance functions
used by core, when preparing new dataspaces. Thereby, it optimizes:

* on ARMv7 using per-word assignments
* on ARMv8 using cacheline zeroing
* on x86_64 using 'rept stosq' assembler instruction

Fix #3685
2020-03-26 11:38:55 +01:00
Christian Helmuth
d452094f43 Only rewind next-free pointer in Bit_allocator
Formerly, _next was always updated to the last free'd allocation, which
left large gaps on alloc/free bursts. Now, we try keep allocation
density high from the start of the array and ensure that allocations
happen at the lowest available index in the bit array.

Fixes #3679
2020-03-26 11:38:53 +01:00
Norman Feske
c340f57207 Xml_node: skip leading whitespace in with_raw_node
This patch makes the 'with_raw_node' method more useful in situations
where content of an Xml_node is fed into an Xml_generator, i.e., the
rules report/rom mechanism of the window layouter.
2020-02-27 14:46:59 +01:00
Stefan Thöni
a7a9855493 base: lay groundwork for base-linux caps change
Include the necessary hooks to introduce file descriptor
based capabilities in base linux.

Issue #3581
2020-02-27 14:46:58 +01:00
Alexander Boettcher
a9caf3fbe4 base: avoid wrong warning by Mutex::acquire
A _owner is only valid if lock is actually locked.

Issue #3612
2020-02-27 14:46:57 +01:00
Alexander Boettcher
5bbaa30655 base: use mutex in registry
Issue #3612
2020-02-20 12:11:22 +01:00
Alexander Boettcher
5440cd4b50 base: use blockade in thread
Issue #3612
2020-02-20 12:11:22 +01:00
Alexander Boettcher
e686ff78e9 base: add blockade as derivate of lock
Issue #3612
2020-02-20 12:11:22 +01:00
Alexander Boettcher
2bd77722c7 base: use mutex in heap
Issue #3612
2020-02-20 12:11:22 +01:00
Alexander Boettcher
00f69bc70d base: add mutex as derivate of lock
The mutex class is more restrictive in usage compared to
Genode::Lock.

- At initialiation time it is ever unlocked.
- No thread is permitted to lock twice. Warn about it
  in case it happens.
- Only the lock onwer is permitted to unlock the mutex.
  Warn about it and don't unlock the mutex in case it happens.

Issue #3612
2020-02-20 12:11:22 +01:00
Norman Feske
844af06782 base/buffered_output.h: flush at destruction time
By writing out all dangling characters at destruction time, the
'Buffered_output' utility can be used as a local variable rather
than a long-living object.
2020-02-20 12:08:16 +01:00
Sebastian Sumpf
de24035066 base: add 'wait_for_any' to 'Register_set'
This is the same as 'wait_for' with the difference that 'wait_for_any'
succeeds when *one* condition is met.

issue #3636
2020-02-10 16:00:40 +01:00
Alexander Boettcher
3a9d450106 trace: avoid page fault on client calling subjects
Fixes #3608
2020-02-07 14:14:20 +01:00
Norman Feske
567d9f7910 Xml_node::Unquoted utility for attribute values
The new utility can be used to revert quoted XML attribute values.
Such quoting is needed whenever an attribute value can contain '"'
characters. E.g., in the menu_view's <label text="..."> widget.

Issue #1757
2020-02-04 15:51:10 +01:00
Norman Feske
d70cf314d8 Never throw in 'Attached_rom_dataspace::size'
If the ROM service returned in invalid dataspace, reflect this condition
via a size of zero instead of triggering an exception of type
'Reconstructible<Attached_dataspace>::Deref_unconstructed_object'.

Issue #3606
2020-02-04 15:51:10 +01:00
Norman Feske
640a001ab6 util/xml_node.h: avoid internal use of exceptions
The XML parser used to rely in C++ exceptions while parsing, which is an
artifact from the initial implementation. This patch reworks the code such
that exceptions are avoided in the common cases.

Fixes #3605
2020-02-04 15:51:09 +01:00
Alexander Boettcher
f09ac23144 base: Timestamp type on arm_64 is 64bit 2020-02-04 15:51:09 +01:00
Norman Feske
6947bddd3f base: avoid use of memcpy 2020-02-04 15:51:08 +01:00
Norman Feske
9bba6613e7 base/affinity.h: simplify member initialization
This is just a minor style improvement.
2020-02-04 15:51:08 +01:00
Norman Feske
783c05fd6c uart/exynos: be explicit about unused return value 2020-01-03 14:44:15 +01:00
Norman Feske
6ae98e2e6d base: mark Parent::Close_result with [[nodiscard]] 2020-01-03 14:44:15 +01:00
Christian Prochaska
a62fce8dc5 sd_card_drv: i.MX8 support
Fixes #3580
2019-12-19 17:01:42 +01:00
Stefan Kalkowski
4800bcf5a0 hw: correct the i.MX6 Sabrelite timer settings
Fix #3561
2019-11-25 15:43:59 +01:00
Stefan Kalkowski
f82714f341 vm_session: return vcpu id when creating vcpu
Ref #3553
2019-11-21 14:29:36 +01:00
Stefan Kalkowski
18dbd75860 base: explictly target entrypoint in timer session
Fix #3548
2019-11-21 14:29:36 +01:00
Norman Feske
539110c0b1 base: make 'Fifo::Element::enqueued' const
Issue #3547
2019-11-19 14:54:13 +01:00
Christian Helmuth
cd5e906bd0 imx: do not convert LF to CRLF in UART driver
This is done on higher level already.
2019-11-19 14:42:23 +01:00
Norman Feske
fa48054959 ldso: Dynamic_linker::respawn mechanism
This patch extends the interface of the dynamic linker with the ability
to replace the running binary executable by another one. It is
designated for the implementation of execve. The interface consists of
two new functions.

'Dynamic_linker::keep' marks the specified shared object as unloadable.
This can be used to pin a set of libraries (i.e., the libc) within the
local address space while replacing the binary and other higher-level
libraries.

'Dynamic_linker::respawn' unloads the current binary, loads the one
specifed as first argument, and looks up the entry point symbol of the
new binary, which would be "main" for POSIX programs.

In addition to implementing the new interface, the patch adjusts the
linker at various places that previously assumed the binary to be
constant over runtime.

Issue #3481
2019-08-28 14:18:45 +02:00
Norman Feske
354e310c87 heap: interface for obtaining backing-store info
The new 'Heap::for_each_region' method provides information about the
heap's used virtual-memory regions. This method allows for the
mirroring of the heap state as needed by 'fork'.

Issue #3478
2019-08-28 14:18:44 +02:00
Norman Feske
55e99e16ef base: add missing include in base/id_space.h 2019-08-28 14:18:44 +02:00
Norman Feske
abdf422681 ldso: interface to get infos about loaded objects
This patch enhances the 'base/shared_object.h' interface of the dynamic
linker with the function 'for_each_loaded_object', which allows the
caller to obtain information about the currently loaded binary and
shared libraries.

The new interface is a base mechanism needed for implementing 'fork' in
the libc.

Issue #3478
2019-08-21 14:08:18 +02:00
Stefan Thöni
f018dac506 util/fifo: Change empty() method of fifo to const.
Fixes #3464
2019-08-13 12:02:27 +02:00
Martin Stein
e199acca05 util/print_lines: don't skip end of long lines
Print the end of oversized lines (> 200 chars) to new lines instead of
skipping it

Fixes #3422
2019-07-09 08:55:24 +02:00
Sebastian Sumpf
24eea0b653 base: add 'trace' function to base/log.h
The 'Genode::trace' convenience function prints messages to Genode's
trace buffer (if tracing is enabled).

issue #3294
2019-07-09 08:55:23 +02:00
Sebastian Sumpf
1b489820a9 base: timestamp support for ARM 64-Bit
issue #3407
2019-07-09 08:55:23 +02:00
Stefan Kalkowski
90d07741aa hw: support for ARM64 Raspberry Pi 3
Restriction: enables only cpu core 0 and the timer interrupt by now.

Fix #3405
2019-07-09 08:55:22 +02:00
Tomasz Gajewski
0ecc48e6de Mini UART driver for Rpi3
Ref #3405
2019-07-09 08:55:22 +02:00
Alexander Boettcher
ab6315d6b4 vm_session: add fpu state for x86
Issue #3111
2019-05-29 10:20:52 +02:00
Norman Feske
405a9d2144 Refinements for updated "Genode Foundations" book
- Improve API descriptions
- Remove obsolete Xml_node::value method (fixes #3323)
- Follow coding style 'const char' -> 'char const'
- Avoid '>>' when nesting templates (limitation of parse_cxx)
2019-05-27 14:52:53 +02:00
Christian Helmuth
9288fe63ad arg_string: return default value on parsing error 2019-05-27 14:52:53 +02:00
Pirmin Duss
bd045c65a2 util/string.h: suppress case fallthrough warnings 2019-05-27 14:52:53 +02:00
Stefan Kalkowski
71a48c0a26 base: add initial support for ARM 64-bit
Ref #3260
2019-05-27 14:52:51 +02:00
Christian Prochaska
fe878e65de base: add copy constructor to 'Genode::Session_label'
Fixes #3333
2019-05-27 14:46:54 +02:00