Commit Graph

1385 Commits

Author SHA1 Message Date
Johannes Schlatow
0622446f09 base: print last character of unterminated strings
The last character should only be skipped if a `\0` or `\n` is found. If
the string ends without such a character or the maximum line length is
hit, we do not skip the last character.

Fixes genodelabs/genode#4985
2023-08-24 14:12:21 +02:00
Christian Helmuth
134a785fe0 depot: update recipe hashes 2023-08-24 11:01:40 +02:00
Christian Prochaska
8b7f959451 hw: send exception signals and support single-stepping
Fixes #4975
2023-08-23 13:46:37 +02:00
Christian Prochaska
419e5e46f6 base: add more x86_64 exception type enums
Fixes #4972
2023-08-21 08:12:01 +02:00
Martin Stein
c47a6b0830 depot_autopilot: simplify success-criterion syntax
* Removes the <event> tag from all test package runtime files and replaces the
  contained <timeout> and <log> sub-tags with the new tags <succeed> and
  <fail>. If a <succeed> or <fail> tag has a content, it defines a log pattern
  that should be recognized and render the test failed or successful. If a
  <succeed> or <fail> tag has an attribute after_seconds that is not set to 0,
  it defines a timeout after which the test should be rendered failed or
  successful.

* Adapts the Depot Autopilot to support the new syntax in the test-package
  runtime files. However, for now, the Depot Autopilot is kept compatible to
  the old syntax as well. If the <events> tag is present, it is prioritized
  over the new syntax.

Fixes #4922
2023-08-21 08:12:01 +02:00
Norman Feske
7aa301361d depot: update recipe hashes 2023-07-14 12:06:32 +02:00
Martin Stein
c05a0eca86 xml_unquoted: fix bug with string of length 0
Ref #4922
2023-07-14 12:06:32 +02:00
Christian Helmuth
6e7b66cb8a Finally move __dso_handle into genode.ld
Issue #4784
2023-07-14 12:06:32 +02:00
Christian Helmuth
f6dcc3ca74 genode.ld: preserve ctors/dtors sections for analysis
Issue #3509
2023-07-14 12:06:32 +02:00
Norman Feske
fa3f5edcc2 base: remove deinit_heartbeat_monitoring function
Issue #4940
2023-07-14 12:06:31 +02:00
Norman Feske
f9bb7246ef base: remove destroy_signal_thread function
With the removal of the 'Entrypoint::schedule_suspend' mechanism, this
function is no longer called.

Issue #4940
2023-07-14 12:06:31 +02:00
Norman Feske
4193279560 base: remove entrypoint.cc from core
Since component.cc is no longer linked to core, we can also remove
entrypoint.cc, which was merely a dependency of component.cc.

Related to issue #4784
2023-07-14 12:06:31 +02:00
Stefan Kalkowski
5e7e6514be Remove i.MX6 platforms from base repositories
Fix genodelabs/genode#4941
2023-07-14 12:06:31 +02:00
Christian Helmuth
7563cf5c55 Remove blank lines between template<> and struct
The blank line disconnects the struct from its template definition,
which makes the whole definition harder to comprehend.
2023-07-14 12:06:31 +02:00
Norman Feske
1139492c4f base: remove Entrypoint::schedule_suspend
Fixes #4940
2023-07-14 12:06:31 +02:00
Norman Feske
e2836bf68a ldso: remove deprecated support for legacy 'main'
Besides the removal of the legacy 'main' support, this patch simplifies
the lib/startup/_main.cc.

Issue #2199
2023-07-14 12:06:31 +02:00
Norman Feske
7e1a2ac684 base: remove internal use of 'env_deprecated'
Fixes #4784
2023-07-14 12:06:31 +02:00
Norman Feske
de99945af0 base: pass 'Platform &' to 'bootstrap_component'
This eliminates the need of component.cc to pull the platform resources
out of thin air (calling 'env_deprecated()').

Issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
415d4ab23d startup: merge init_main_thread.cc into _main.cc
This makes the interplay of 'init_main_thread', 'init_platform',
'_main', and 'bootstrap_component' easier to follow.

Issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
7093258649 base: move 'prepare_init_main_thread' to Genode::
Issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
3f9698a292 base: remove component.cc from core
Issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
3a8c3dcc2d base: unify platform.cc between base, base-linux
This is a preparatory step for merging 'init_platform()' with
'bootstrap_component()'.

Issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
54cc70f9b1 base: remove Env arg from init_exception_handling
By supplying only the parts of the Env that are actually relevant for
initializing the cxx heap, we avoid the need for the 'Env' interface.
The patch also moves the call of 'init_ldso_phdr' to the outside
of the cxx library because it does not belong there.

Issue #4784
2023-07-14 12:06:31 +02:00
Christian Prochaska
8264b63e0b core: replenish UTCB quota in exception case
Fixes #4933
2023-07-14 12:06:31 +02:00
Norman Feske
0ab69a2bb8 base: de-duplicate src/lib/base/platform.cc
By splitting the 'init_capability_slab()' implementation to a separate
compilation unit 'capability_slab.cc', base-hw no longer needs a
customized version of 'lib/base/platform.cc'.

Related to issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
6e30d00eef base: remove env_deprecated from signalling code
Issue #4784
2023-07-14 12:06:31 +02:00
Norman Feske
3489672bc0 base: remove env_deprecated from thread-start code
This patch replaces the internal use 'env_deprecated()' from the
implementation of the thread API in the base library. It also
replaces the global accessor 'main_thread_cap' by the explicit
propagation of the main-thread's capability to the single point of
use via a new 'init_thread_bootstap' function.

Issue #4784
2023-07-14 12:01:19 +02:00
Martin Stein
c907e44a02 register framework: read bitfields to fitting uint
* Replaces bool access types with uint8_t access types
* Ensures, that the framework always uses the smalles possible uint type
  for the return value wherever a bitfield is read and returned to the user.

Ref #4924
2023-07-14 12:01:18 +02:00
Norman Feske
79e262921e depot: update recipe hashes 2023-06-16 11:24:26 +02:00
Norman Feske
3c5d27506f base: stricter distinction between rx and rwx
This patch restricts 'Region_map::attach_executable' to create read-only
mappings, while offering the option to map the full rights using a new
'attach_rwx' method.

The 'attach_rwx' method is now used by the dynamic linker to explicitly
attach the linker area with full rwx rights. With the old page-fault
handling code, the execute flag was evaluated only for leaf dataspaces,
not for managed dataspaces while traversing region-map hierarchies.
With the new page-fault handling code, the execute bit is downgraded
to no-execute when passing a managed dataspace that is not attached
as executable.

Issue #4920
2023-06-16 11:24:26 +02:00
Norman Feske
a4c59c03e3 core: rework page-fault resolution
The change "core: allow offset-attached managed dataspaces" addressed a
corner case of the use of nested region maps. Apparently, this change
negatively affects other scenarios (tool_chain_auto).

In order to confidently cover all the differnt situations, this patch
reworks the page-fault resolution code for improved clarity and safety,
by introducing dedicated result types, reducing the use of basic types,
choosing expressive names, and fostering constness.

It also introduces a number of 'print' hooks that greatly ease manual
instrumentation and streamlines the error messages printed by core.
Those messages no longer appear when a user-level page-fault handler
is reistered for the faulted-at region map. So the monitor component
produces less noise on the attempt to dump non-existing memory.

Issue #4917
Fixes #4920
2023-06-16 11:24:26 +02:00
Norman Feske
6af42c9fb5 test-sanitizer: simplify, increase caps for sel4 2023-06-16 11:24:26 +02:00
Norman Feske
0d5571a820 base: close PD session last when destructing child
This patch moves the destruction of the child's PD session after the
closing of all other sessions because the PD session's role as resource
container might still be needed for orderly reverting the session quotas
when closing the other remaining sessions.

Issue #4917
2023-06-16 11:24:26 +02:00
Norman Feske
734fc252e8 base: add Child_policy::start_initial_thread
The added interface allows for the local interception of
'Cpu_thread::start' RPC calls.

Issue #4917
2023-06-16 11:24:26 +02:00
Norman Feske
30b70da6c1 base/child.h: Child_policy::with_address_space
This patch replaces the former 'address_space' accessor by a new
'with_address_space' interface that grants access to the region map of
the child's address space, but limits the interface lifetime to the
scope of the caller.

Issue #4917
2023-06-16 11:24:26 +02:00
Norman Feske
f47c64e246 core: allow offset-attached managed dataspaces
This patch adds the missing application of the region offset to the
resolution of page faults inside managed dataspaces, which resulted in
an unexpected "invalid mapping" message after attaching a managed
dataspace with an offset.

This limitation could be observed during the implementation of the debug
monitor that locally maps a portion of the debugging target's address
space, e.g., a view port of 16 MiB. All traditional uses of managed
dataspaces (e.g., stack area, linker area) happened to attach the
managed dataspaces from their beginning.

Issue #4917
2023-06-16 11:24:26 +02:00
Alexander Boettcher
ceaa02230e qemu: set default cpu model for x86_64 explicitly
With the update to sel4 and the gcc 12, assembly instructions are generated
and used, like POPCNT. The instruction is available on our native hardware,
but not emulated by the default cpu model necessarily, which leads to
undefined opcode exceptions (Qemu 4.2.1 && seL4). Additionally, the features
of the default Qemu cpu model may vary between Qemu releases and makes it
harder to correlate effects.
2023-06-16 11:24:25 +02:00
Christian Helmuth
6cb697e6d8 base: remove ancient artifact of config library
The config library was removed in issue #2431 in 2017.
2023-06-16 11:24:25 +02:00
Christian Helmuth
7441548458 Configure ld soname also for lib.so files
Fixes #4914
2023-06-16 11:24:25 +02:00
Alexander Boettcher
11764ed755 core: remove io_mem attachments before destruction
The attachment removal is triggered actually on _ds member destruction time,
but after the io_mem representation for the specific base-<platform> possibly
vanished already during _unmap_local in the ~Io_mem_dataspace. This creates
on base-sel4 several kernel warnings about invalid capabilities.

Issue #4913
2023-06-16 11:24:25 +02:00
Alexander Boettcher
b349dd9c0a sel4: convert io memory on demand
instead all during boot. On x86 and qemu this takes quite a while until
the system is booted.

Fixes #4913
2023-06-16 11:24:25 +02:00
Christian Helmuth
583f2d6a36 depot: update recipe hashes 2023-05-30 12:13:34 +02:00
Benjamin Lamowski
b277b84e19 base: extend Vcpu_state for base-hw x86 virtualization
Changes are preliminary and will most certainly be removed when fully
enabling the virtualization feature on base-hw.

Ref #4826
2023-05-30 12:13:34 +02:00
Benjamin Lamowski
80c8775d77 base: make Entrypoint available in Vcpu_handler_base
Fixes #4906
2023-05-30 12:03:33 +02:00
Christian Helmuth
6b2338257d Let linker assume stacks are non-executable
In our binaries, the .note.GNU-stack section is missing, which is okay
as we do not interpret these sections anyway and map stack pages
non-executable per default.

Issue #4827
2023-05-30 12:03:33 +02:00
Christian Helmuth
4961ee293d Enable -std=gnu++20 by default
Issue #4827
2023-05-30 12:03:31 +02:00
Christian Prochaska
9e3233f13f test-timer_rate: fix build error with -std=gnu++20
Fixes #4898
2023-05-30 12:03:31 +02:00
Christian Prochaska
44bed3495d test-timer: fix build errors with -std=gnu++20
Fixes #4897
2023-05-30 12:03:31 +02:00
Christian Prochaska
d2b12b5c79 test-thread: fix build errors with -std=gnu++20
Fixes #4896
2023-05-30 12:03:31 +02:00
Christian Prochaska
87bed28ef8 test-smp: fix build errors with -std=gnu++20
Fixes #4895
2023-05-30 12:03:31 +02:00