Commit Graph

990 Commits

Author SHA1 Message Date
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
Christian Helmuth
7ed1d7f11d depot: update recipe hashes 2019-11-19 14:54:14 +01:00
Norman Feske
539110c0b1 base: make 'Fifo::Element::enqueued' const
Issue #3547
2019-11-19 14:54:13 +01:00
Sebastian Sumpf
54643d6878 base: add entry to .dynanmic section in genode_dyn.ld
Make sure that at least entry is present in the .dynamic section, so the
PT_DYNAMIC segment points to something valid in case there are no
dynamic symbols.

issue #3537
2019-11-19 14:45:40 +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
Alexander Boettcher
1297a8fb57 trace: skip subject_id 0 in subject id allocator
Issue #3510
2019-11-19 14:23:55 +01:00
Christian Helmuth
e0af9c2d8b platform_drv.inc: reduce acpi_drv caps to 350
This value equals the configuration in drivers_managed-pc, i.e., Sculpt.
2019-11-19 14:23:54 +01:00
Christian Prochaska
5c25e0bdb0 heap: fix typo in alloc(0) diagnostic message
Fixes #3501
2019-11-19 14:19:34 +01:00
Norman Feske
697d496093 ldso: don't strip leading path from ROM name
This patch removes ldso's builtin policy of removing any path elements
prepending the ROM module name. Instead, the ROM name is used as is.
This clears the way to access different ROM modules that share the same
name but are stored at different directories behind an fs_rom (e.g.,
/bin/bash vs. /usr/local/bin/bash).

Issue #3500
2019-11-19 14:17:29 +01:00
Christian Helmuth
8d6285927b tools.conf: fix check for arm_64
Before arm matched first resulting in the wrong tool-chain binaries
being used.
2019-11-19 14:17:29 +01:00
Norman Feske
efe7f5172d ldso: prevent premature execution of ctors
Fixes #3487
2019-09-20 14:16:05 +02:00
Christian Helmuth
4a7b0e99a6 depot: update recipe hashes 2019-09-20 14:14:16 +02:00
Christian Helmuth
08aa7d310a Increase stack size in thread test for arm_v8a
It seems throwing an exception on arm_v8a needs a significant amount of
stack space (> 2048 bytes).
2019-09-03 12:12:46 +02:00
Christian Prochaska
ab017607a2 tool chain: TLS support
Fixes #3418
2019-09-02 16:29:33 +02:00
Christian Helmuth
b2c59576ae depot: update recipe hashes 2019-08-28 14:36:56 +02:00
Norman Feske
66d5359d75 ldso: heuristics for libs needed during execve
The allocation of regions within the linker area is normally left to the
best-fit 'Allocator_avl', which happens to populate the linker area
starting with the binary followed by all loaded libraried with no gaps
in between.

When replacing the binary during execve, however, we need to ensure that
the new binary does not conflict with any library that stays resident
during execve. This patch tweaks the linker's region allocation scheme
such that these libraries are placed at the end of the linker area.

Issue #3481
2019-08-28 14:18:45 +02: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
a98f78afd9 ldso: avoid 'dd' output in build log
This patch is a follow-up commit for "ld: load dynamic linker at static
address on Linux". It suppresses the stderr output of 'dd' when marking
the ELF binary as executable.

Issue #3479
2019-08-28 14:18:45 +02:00
Norman Feske
3c6fe6e741 ldso: statically allocate initial heap block
This patch enables the fork.run script to run on base-linux. It should
be regarded as an interim solution, however, because the randomization
performed by the Linux kernel may still - by chance - produce a
situation where one of the libc's malloc heap regions intersects with
another dataspace dynamically attached to the child.

The better solution would be to make the 'Region_map_mmap'
implementation not depend on the kernel's allocation policy by using a
locally implemented allocator.

Issue #3478
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
2cff12e1fb base: remove debug message 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
e499a04de7 ldso: config option to disarm ctors check
By specifying the config attribute 'check_ctors="no"', the dynamic
linker won't abort the program on a missing call of
'Env::exec_static_constructors'. This is the case for forked programs
where the ctors were already executed by the forking program prior the
fork operation.

Issue #3478
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
Norman Feske
b113f869bb Use I/O signals for resource-request responses 2019-08-21 13:39:44 +02:00
Norman Feske
6fb7022508 Cap-resource request on Pd_session::transfer_quota
This patch handles the case where a PD's cap quota becomes exhausted
on the attempt to transfer caps via 'Env::pd().transfer_quota'. The
solution mirrors the existing code for RAM quota.

Prior this patch, the 'transfer_quota' operation would trigger an
'Out_of_caps' exception.
2019-08-21 13:38:24 +02:00
Christian Helmuth
312f801f8a depot: update recipe hashes 2019-08-21 13:25:26 +02:00
Sebastian Sumpf
2fc6cedcc0 ld: load dynamic linker at static address on Linux
* move stack area to static address at beginning of binary
* set ELF type of linker from shared to executable

fixes #3479
2019-08-21 13:25:25 +02:00
Sebastian Sumpf
f3a7d3750f base: Add Linux and GOT relative startup code on ARM
* Linux specific startup code for base-linux ARM
* load symbols global offset table relative in order to avoid text
  relocations

issue #3466
2019-08-21 13:25:25 +02:00
Johannes Kliemann
1bdd18a196 ada-runtime: update to 1.1 2019-08-21 13:25:25 +02:00
Christian Prochaska
85b1563e57 mk: generate .data symbols with distinct values/addresses
Prevent the static linker from assuming weak object symbols to be alias
symbols for unrelated non-weak symbols with the same value/address.

Fixes #3458
2019-08-21 12:37:01 +02:00
Norman Feske
686dd8affd ldso: ability to preload shared objects
Fixes #3472
2019-08-21 12:37:00 +02:00
Christian Prochaska
b9f0318ab8 mk: print symbol assembler file lines only once
Fixes #3461
2019-08-21 12:36:59 +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
1e379cb3a9 drivers/acpi: provide plain SMBIOS table as report
Ref #3430
2019-08-13 12:02:03 +02:00
Christian Prochaska
193a401097 Increase RAM quota of ACPI driver to 4M
On some machines, more than 3 MiB are needed. This finally equalizes all
occurences of RAM quotas with drivers_managed.

Fixes #3443
2019-08-13 12:02:03 +02:00
Christian Helmuth
17d32b3e15 depot: update recipe hashes 2019-07-09 09:06:54 +02:00
Christian Helmuth
949130d80e Remove warning exec_static_constructors() warning
The warning falsely detected cases where shared objects where loaded before
exec_static_constructors() was called as unneeded even in cases were the
binary itself contained static globals.

The commit also removes one redundant call to exec_static_constructors()
from the block tester.
2019-07-09 08:58:38 +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
25484f870e trace: make trace buffer resizeable
Trace buffers a re-allocated during subsequent calls to 'trace'.

issue #3294
2019-07-09 08:55:23 +02:00
Sebastian Sumpf
ac0ecdf855 base: make trace resumable
revert relocations so a paused subject can resume without changing its
policy.

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
Sebastian Sumpf
790a57041c base: add ARM 64-Bit to base API
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
Christian Helmuth
3c4c460f82 depot: update recipe hashes 2019-06-13 13:40:37 +02:00
Christian Helmuth
ed0d76552b Relax timing requirements in lazy timer test
The lazy-timer test depends on the faster-timer handler to be executed
before the fast timeout occurs, which was pretty hard to achieve on Qemu
and a busy host machine. Therefore, I increased the fast-to-faster
timeout ratio from 50/25 ms to 200/25 ms and set the test runtime to
4000 ms.
2019-06-13 12:22:49 +02:00
Christian Helmuth
5738e53be2 Warn about questionable call of wait_and_dispatch_one_io_signal
Issue #2399
2019-06-13 12:17:32 +02:00
Christian Helmuth
2b183f9497 depot: update recipe hashes 2019-05-29 10:20:52 +02:00
Christian Prochaska
ca39a9ea61 tool_chain: versioned install location
Issue #3307
2019-05-29 10:20:52 +02:00
Alexander Boettcher
ab6315d6b4 vm_session: add fpu state for x86
Issue #3111
2019-05-29 10:20:52 +02:00
Alexander Boettcher
9f70084524 base: add vm session API recipe
Issue #3111
2019-05-27 14:53:32 +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
Christian Prochaska
7fadfbbd9f Treat 'implicit fallthrough' errors as warnings
After fixing the warnings, the compiler option should be removed.

Issue #3307
2019-05-27 14:52:52 +02:00
Christian Prochaska
8e2e4374f5 sanitizer: update to version 8.3.0
Issue #3307
2019-05-27 14:52:52 +02:00
Christian Prochaska
61140380ee base: update 'ld' symbols for tool chain 19.05
Issue #3307
2019-05-27 14:52:52 +02:00
Sebastian Sumpf
a8d856fb65 ldso: dynamic linking support for ARM 64-bit
* added relocation support
* added assembler invocation path for jump slot relocations

fixes issue #3260
2019-05-27 14:52:52 +02:00
Sebastian Sumpf
7dc875e8c7 base: dynamic linking support of crt0.s on ARM 64-bit
* added global offset table relative loading for global symbols
* removed 'initial_sp' and 'initial_x0' because they are currently not
  used on this platform. If required they are easy to resurrect.

issue #3260
2019-05-27 14:52:51 +02:00
Stefan Kalkowski
71a48c0a26 base: add initial support for ARM 64-bit
Ref #3260
2019-05-27 14:52:51 +02:00
Stefan Kalkowski
c98597a2c0 base: increase initial stack
Ref #3260
2019-05-27 14:52:51 +02:00
Christian Prochaska
6af3899bcb Enable C++17 by default
Issue #3307
2019-05-27 14:52:51 +02:00
Christian Prochaska
74260c96bf tool_chain: integrate 'ali2dep' tool
Fixes #3361
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
Christian Prochaska
c2c33d6808 base: save FPU registers in '_jmp_slot' function (x86_64)
Issue #3355
2019-05-27 14:46:53 +02:00
Stefan Kalkowski
a1e70b9ba4 kernel: differentiate board-specific components
Components like kernel, core, and bootstrap that are built for a
specific board need to reside inside the same architectural dependent
build directory. For instance there are sel4, foc, and hw kernel builds
for imx6q_sabrelite and imx7d_sabre, which have to reside inside the same
arm_v7 build directory.
This commit names those components explicitely, and adapts the run-tool to it.

Fix #3316
2019-05-27 14:46:52 +02:00
Christian Prochaska
02afb04b7d base: fix 'test-sanitizer' compile error with GCC 8.3.0
Fixes #3343
2019-05-16 13:11:03 +02:00
Martin Stein
8fb0d668e0 heap: fix exception handling in _allocate_dataspace
Previously, only Invalid_dataspace, Region_conflict, and Out_of_ram were
handled for both allocate and attach with the same handlers. However,
both operations can also throw Out_of_caps and for all exceptions during
attach, the dataspace must be freed again whereas this is not the case
when the exception occured during allocate.

Issue #2953
2019-05-16 13:11:02 +02:00
Sebastian Sumpf
467b96abf4 ldso: lazy binding support for RISC-V
* added assembler invocation path for jump slot relocations
* fix GOT initialization (jmp_slot pointer goes to GOT[0] not GOT[2] on
  RISC-V)

Fixes #3339
2019-05-16 13:11:02 +02:00
Christian Prochaska
96627df4d4 base: fix cxx library compile errors with GCC 8.3.0
Fixes #3322
2019-05-16 13:11:02 +02:00
Christian Prochaska
47a2ad604c base: fix xml_node test compile error with GCC 8.3.0
Fixes #3324
2019-05-16 13:11:02 +02:00
Stefan Kalkowski
4fa34190de platform_drv: check acpi ability by platform_info
Instead of retieving the information about the underlying platform from
the configuration, check the running kernel from the platform_info. This
commit removes the undocumented "acpi" config attribute.
2019-05-16 13:11:01 +02:00
d2ab699cd5 Remove Post_signal_hook from Entrypoint
The Post_signal_hook mechanism has been completely replaced by
Io_progress_handler and can be removed.

Ref #3132
Fix #3302
2019-05-16 13:11:00 +02:00
Stefan Kalkowski
312499a1ef os: name lan9118 nic driver explicitly
* it is not dependent on pbxa9 anymore, but configureable
* rename it to lan9118_nic_drv

Ref #2190
2019-05-16 13:11:00 +02:00
Stefan Kalkowski
dcc28b65cb run: use driver_nic-* pkg where possible (fix #3180) 2019-05-16 13:10:06 +02:00
Stefan Kalkowski
7c1e3c84ba os: name gpio_drv unambigously (ref #2190) 2019-05-16 12:52:59 +02:00
Stefan Kalkowski
911f4ada0a os: make platform_drv package ready for ARM
* Make target binaries independent of board SPECS
* Name binaries of one architecture unambigously
* Extend include path to match board specifics
* Adapt run-scripts to use the right binary

Ref #2190
Ref #3180
2019-05-16 12:52:59 +02:00
Christian Helmuth
ba51800b31 depot: update recipe hashes 2019-05-06 16:15:27 +02:00
Alexander Boettcher
c0a00019c0 foc/sel4: place vcpu thread on same cpu as ep
Issue #3111
2019-05-06 16:15:27 +02:00
Stefan Kalkowski
b85071174a base: wait a bit at the end of the smp test
Fix #3306
2019-05-06 16:15:27 +02:00
Alexander Boettcher
05fa063068 vm_session: support to trace vCPU
Issue #3111
2019-05-06 16:15:26 +02:00
Martin Stein
0b9916cae2 Timer::Connection: simplify curr_time
With the new fact that plain time values are always 64 bit unsigned, the
timestamp type is never bigger than the plain time type. Therefore, a code path
in the curr_time interpolation that treated this condition is not neccessary
anymore.

Ref #3208
2019-05-06 16:15:26 +02:00
Martin Stein
181c78d482 timeout: use uint64_t for all plain time values
This enforces the use of unsigned 64-bit values for time in the duration type,
the timeout framework, the timer session, the userland timer-drivers, and the
alarm framework on all platforms. The commit also adapts the code that uses
these tools accross all basic repositories (base, base-*, os. gems, libports,
ports, dde_*) to use unsigned 64-bit values for time as well as far as this
does not imply profound modifications.

Fixes #3208
2019-05-06 16:15:26 +02:00
Stefan Kalkowski
4bcd9169c0 sel4: add timer for imx7d_sabre
Fix #3292
2019-05-06 16:15:26 +02:00
Alexander Boettcher
8950de5a89 base: support whole addressable range in allocator
Issue #3111
2019-05-06 16:15:26 +02:00
Alexander Boettcher
393643515c base: extend attach of vm_session
by offset, size, writeable and executable parameter

Issue #3111
2019-05-06 16:15:25 +02:00
Stefan Kalkowski
7a45867841 vmm_arm: support for i.MX7 Dual SABRE board
Fix #3285
2019-05-06 16:15:25 +02:00
Norman Feske
ea6b1c255e base: add const version of 'Fifo::Element::object' 2019-05-06 16:15:25 +02:00
Alexander Boettcher
35cf804471 base: free up all blocks on avl destruction
Issue #3111

remove_range may deny to the job on memory pressure or insane ranges,
which ends up in an endless loop when the Avl allocator is in destruction.

Since the Avl gets destructed, solely the memory free up is of importance,
not the correct range adjustments during remove_range.
2019-05-06 16:15:25 +02:00
Alexander Boettcher
d2229ab381 vm_session: evaluate priority
Issue #3111
2019-05-06 16:15:25 +02:00
Alexander Boettcher
450c8dc149 vm_session: track dataspaces used by attach
Track the dataspaces used by attach and add handling of flushing VM space
when dataspace gets destroyed (not triggered via the vm_session interface).

Issue #3111
2019-05-06 16:15:25 +02:00
Alexander Boettcher
169c51d50d base: remove error message in slab block
Issue #3111
2019-05-06 16:15:25 +02:00
Alexander Boettcher
d1f37e66eb base: fix _sum_in_range in avl structure
Handles corner case when addr + size becomes exactly 0. Before the commit
the function returned that sum is not part of the range, which is wrong.

Issue #3111
2019-05-06 16:15:24 +02:00
Alexander Boettcher
812149ed29 core: add Region_map_detach interface
Issue #3111
2019-05-06 16:15:24 +02:00
Norman Feske
10c567daee base: add 'aligned' function to util/misc_math.h
This function simplifies the sanity checking of values that are expected
to be aligned, e.g., data offsets within packet streams.
2019-05-03 13:31:39 +02:00
Christian Helmuth
6ea1179145 depot: update recipe hashes 2019-04-09 12:30:35 +02:00
Alexander Boettcher
ae16edf1d6 trace: support more facets of execution time
- execution time per thread context
- execution time per scheduling context
- quantum and priority

Issue #3192
2019-04-09 12:30:34 +02:00