Commit Graph

1480 Commits

Author SHA1 Message Date
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
Christian Prochaska
0285e5f217 test-rm_fault: fix build error with -std=gnu++20
Fixes #4891
2023-05-30 12:03:31 +02:00
Christian Prochaska
7eb0b6928a test-rm_nested: fix build error with -std=gnu++20
Fixes #4892
2023-05-30 12:03:31 +02:00
Christian Prochaska
da6b384e3a test-mmio: fix build error with -std=gnu++20
Fixes #4890
2023-05-30 12:03:30 +02:00
Josef Söntgen
6355b48eee ada: ignore unknown pragmas
Triggered by the toolchain update to GCC 12 certain pragmas lead to
a build error as those are now unknown. As quick-fix add '-gnatwG',
which suppresses warnings on unrecognized pragmas.

Issue #4880.
2023-05-30 12:03:30 +02:00
Christian Helmuth
bfecea9001 vcpu_state: fix build errors with -std=gnu++20
Issue #4872
Issue #4871
Fixes #4878
2023-05-30 12:03:30 +02:00
Christian Helmuth
058990de48 pc/uart: fix build errors with -std=gnu++20
Fixes #4885
2023-05-30 12:03:30 +02:00
Christian Prochaska
b696439a67 intel_gpu_drv: fix build errors with -std=gnu++20
Fixes #4883
2023-05-30 12:03:30 +02:00
Sebastian Sumpf
e64f2eaff9 ldso: save floating point arguments on arm_v8a (GCC 12)
Apparently we need to save the floating point arguments when entering
the linker in case "-fno-tree-vectorize" is at work. Otherwise this
registers get corrupted during jump slot relocation.

Fixes #4879
2023-05-30 12:03:29 +02:00
Norman Feske
f679864c23 trace: C++20 compatibility
With the new standard, volatile variables cannot be incremented,
decremented, or modified by compound assignments (e.g., +=).

Issue #4869
2023-05-30 12:03:29 +02:00
Norman Feske
1dac048413 base: make RPC framework compatible to C++20
Avoid the use of arithmetics on enum values.

Issue #4869
2023-05-30 12:03:29 +02:00
Christian Prochaska
1e1df21a94 Remove stale Xen support
Fixes #4859
2023-05-30 12:03:29 +02:00
Sebastian Sumpf
d59a2b4b38 ldso: fix page fault at IP 0 with GCC 12 on RISC-V
Eliminate the creation of 'Genode::String's before the linker has been
self relocated, because 'Genode::String's will call 'Genode::strlen' on
construction from C-Strings, which has now become a GOT relative call,
while the GOT contains only zeros before relocation -> page fault at
IP 0.

fixes #4867
related to #4827
2023-05-30 12:03:28 +02:00
Christian Helmuth
d35e6f1aa2 Remove extra ‘;’ 2023-05-30 12:03:28 +02:00
Christian Helmuth
3fa275354d test-smp: fix build errors with GCC 12
error: 'void operator delete(void*, Genode::Deallocator&)' called on pointer returned from a mismatched allocation function [-Werror=mismatched-new-delete]

Issue #4827
Fixes #4850
2023-05-30 12:03:27 +02:00
Christian Prochaska
f18a12a592 tool chain: update version to 23.05
Issue #4827
2023-05-30 12:03:27 +02:00
Norman Feske
f119d9ee8b base: use [build_artifacts] in run scripts
The patch also removes a few legacies along the way, unifies the coding
style, and cuts back superfluous comments.

Issue #4860
2023-05-30 12:03:26 +02:00
Christian Prochaska
1742eb16b2 test-segfault: fix build error with gcc 12
Fixes #4849
2023-05-30 12:03:26 +02:00
Christian Prochaska
eab8db228b base: fix build errors with gcc 12
Fixes #4829
2023-05-08 15:55:35 +02:00
Christian Prochaska
98bf2dadb8 core: fix build errors with gcc 12
Fixes #4828
2023-05-08 15:55:34 +02:00
Christian Helmuth
e9a497abe4 depot: update recipe hashes 2023-04-26 11:58:16 +02:00
Timo Nicolai
83f78e7fe6 base: add Xml_node::for_each_attribute
Adds a function that allows iterating over an XML node's attributes
without relying on `Xml_node::Nonexistent_attribute`.

Issue #4817
2023-04-26 11:58:15 +02:00
Christian Helmuth
b5f79756b3 depot: update recipe hashes 2023-04-17 14:48:30 +02:00
Norman Feske
61926ebc07 base: introduce platform_init function
The new 'init_platform' function performs the platform-specific
component-local low-level initialization. It allows for the
differentiation between core and regular components as well as
kernel-dependent peculiarities.

This patch introduces a consistent notion of a 'Platform'. Within core,
the 'Platform' contains the kernel-specific initialization. Outside
core, the platform sets up the interplay with the parent component. In
all cases, the platform is constructed while running on the initial
stack.

Issue #4784
2023-03-15 17:05:01 +01:00
Norman Feske
441186468c base: remove env_deprecated from rpc_cap_alloc
Issue #4784
2023-03-13 15:22:00 +01:00
Christian Helmuth
73771669f1 depot: update recipe hashes 2023-03-13 14:32:54 +01:00
Norman Feske
805fae5bab Update README files
This patch removes outdated information and improves the language of
various README files.
2023-03-13 14:32:53 +01:00
Norman Feske
2c32e9ee18 base: remove util/avl_string.h
The use case is covered by util/dictionary.h now.

Fixes #4780
2023-03-13 14:32:53 +01:00
Norman Feske
c99fb2b69b core: replace use of Avl_string by Dictionary
Issue #4780
2023-03-13 14:32:53 +01:00
Norman Feske
d727d18871 base: remove format strings from API
This patch ultimatedly removes format strings from Genode's base API.
Users of the former base/snprintf.h and base/console.h headers may
use the free-standing 'format' library hosted in the ports repository.

Fixes #2064
Fixes #3869
2023-03-13 14:32:53 +01:00
Norman Feske
e9b249b709 Replace use of base/snprintf.h by format library
Issue #2064
2023-03-13 14:32:53 +01:00
Norman Feske
915adcd0dd base: remove internal use of format strings
Issue #2064
2023-03-13 14:32:38 +01:00
Norman Feske
9debad4e91 Remove format strings from connection types
Issue #2064
2023-03-13 14:32:37 +01:00
Norman Feske
fb66e733b5 base: add 'Connection' constructor accepting args
The new 'Connection' constructor accepts the session label, affinity,
and args as constructor arguments. The session arguments are passed as a
'Genode::String'. This allows for side-stepping the need for rendering a
format string passed to 'Env::session'.

Issue #2064
2023-03-13 14:32:37 +01:00
Norman Feske
2e6dd010ae core: introduce 'Core' namespace
The namespace draws a clear line between the base library and the core
component.

It is declared at the new core-local header <types.h>, which is expected
to be included by all code of the core component. It is thereby a
natural place for kernel-agnostic general types like commonly used C++
utilities.

Fixes #4777
2023-03-13 14:32:37 +01:00
Christian Helmuth
e265cf6d49 depot: update recipe hashes 2023-02-27 08:22:51 +01:00
Alexander Boettcher
1da71afbf3 hw: add Serial re-init/resume support
Issue #4669
2023-02-27 08:22:50 +01:00
Norman Feske
b044520344 Add missing includes of base/exception.h
This header used to be included implicitly by base/blocking.h, which
does no longer exist.

Issue #4768
2023-02-27 08:22:49 +01:00
Norman Feske
6d25ffc70b Remove base/lock_guard.h
For Genode API users, the 'Mutex::Guard' is the way to go.
Special lock implementations can bring their own 'Guard' utilities.

Fixes #4769
2023-02-27 08:22:49 +01:00
Norman Feske
356506a67a base: remove base/blocking.h
This patch removes the obsolete exception type 'Blocking_canceled'.

Issue #4768
2023-02-27 08:22:49 +01:00
Norman Feske
b0e52ba7d4 util/misc_math.h: remove abs function
Fixes #4766
2023-02-27 08:22:49 +01:00
Norman Feske
e09941f310 Remove base/debug.h
Fixes #4765
2023-02-27 08:22:49 +01:00
Stefan Kalkowski
c0e98f4481 base: fix conversion errors of smp timeout test
The cpu affinity index is an int no unsigned long within the interface
definition.

Ref genodelabs/genode#4344
2023-02-27 08:22:48 +01:00
Norman Feske
07e3e09652 util/string.h: add 'Const_byte_range_ptr'
The new 'Const_byte_range_ptr' type is suitable as argument type that
refers to a read-only byte buffer, e.g., the source buffer of a write
operation.
2023-02-27 08:22:48 +01:00
Stefan Kalkowski
da0dbd901c base: fix conversion error in Bitset_2::get()
Ref genodelabs/genode#4753
2023-02-27 08:22:48 +01:00
Norman Feske
c10904967b core: improve coding-style consistency 2023-02-27 08:22:47 +01:00
Sebastian Sumpf
79d389d812 base/ld: only assign .dynamic to the PT_DYNAMIC segment
Segment assignment stays valid for all sections following .dynamic,
which implies that .got and co also end up in the PT_DYNAMIC segment.
This is not intended.  Therefore, we move the .dynamic section before
bss and assign bss to the rw PT_LOAD segment only.

fixes #4750
2023-02-27 08:22:47 +01:00
Christian Helmuth
e17d104c0a mk: restore compatibility to Make 4.1
The leading newline in the _capture function confused _filecontent,
which resulted in empty port hashes.

Fixes regression introduced in 437fd21ba0
(issue #4725).
2023-02-27 08:22:45 +01:00
Alexander Boettcher
93e26cae35 grub2: add small default font
Issue #4741
2023-02-27 08:20:46 +01:00
Johannes Schlatow
4d0cb175da base-hw: use global timer on Cortex A9
genodelabs/genode#4360
2023-02-27 08:20:45 +01:00
Christian Helmuth
25eac6b9e6 depot: update recipe hashes 2023-01-24 12:07:33 +01:00
Sebastian Sumpf
437fd21ba0 mk: use _file_content instead of echo | cat
Use _file_content function to retrieve port hash instead of 'echo | cat'
construct that lead to 'Broken pipe' erros in GNU Make 4.4.

issue #4725
2023-01-24 12:07:32 +01:00
Norman Feske
be7022dadc util/dictionary.h: alphabetically sorted for_each
This patch reverses the AVL-tree criterion to let 'for_each' traverse
the elements in alphabetical sorting order.

Issue #4610
2023-01-24 12:07:31 +01:00
Christian Prochaska
0c465fbb4d trace session: fix double quota accounting
Fixes #4707.
2023-01-24 12:07:29 +01:00
Christian Helmuth
b4f6f796d6 Clear board/pc/devices
Information about PS/2 and PIT where moved to app/pci_decode in the
following commit.

  pci_decode: report devices from ACPI info

We still provide an empty <devices> node as the file itself is used by
platform agnostic run scripts.
2023-01-24 12:07:29 +01:00
Norman Feske
2a1240d1e9 base: provide generic cpu/string.h
This patch uses the formerly x86-specific cpu/string.h for all
architectures if no spec/<arch> variant exists.

Issue #4456
2023-01-24 12:07:28 +01:00
Christian Helmuth
8661936d7d base: aquire context mutex in local_submit()
Some signal-heavy scenarios (e.g., libc_integration) produced the
following warning that hinted a data race on signal data in the context
object.

  Warning: returning signal with num == 0

The cause was the use of Signal_context::local_submit() in the libc
introduced in

  424ed1b79a libc: remove Reconstructible / use local_submit in kernel

in combination with a missing context-mutex aquisition resulting in a
data race on Signal_context::_curr_signal.

Issue #3923
2023-01-24 12:07:27 +01:00
Christian Helmuth
4c5db31110 base: ld-<platform>.abi.so depends on symbol.map
This prevents errors like the following during parallel builds.

      MERGE    ld-hw.abi.so
  /usr/local/genode/tool/21.05/bin/genode-arm-ld:symbol.map:0: syntax error in VERSION script
2022-12-01 11:47:32 +01:00
Christian Helmuth
b033b30f95 depot: update recipe hashes 2022-11-29 12:32:49 +01:00
Stefan Kalkowski
9e61fb90c5 Remove legacy platform_drv, API, and platform.inc
Fix genodelabs/genode#4671
2022-11-29 12:29:57 +01:00
Alexander Boettcher
fd2a216909 base: support ACPI suspend via Pd::managing_system
Issue #4669
2022-11-18 14:45:27 +01:00
Christian Helmuth
c58d799f16 depot: update recipe hashes 2022-11-17 08:00:37 +01:00
Sebastian Sumpf
0a8d6ddba9 core: Ignore constraints on allocations if allocator is exhausted
Try to allocate within constraint area first. In case the area is exhausted,
try allocation at other memory locations.

The motivation for this is to limit DMA allocations to 4GB (since some
devices require addresses below 4GB). On some platforms there is little
physical RAM in this area (<1GB) and the constrainted area exhausts. In
case an IOMMU is present, RAM at higher locations can still be mapped
below 4GB, which is done in the platform drivers.

issue #4665
2022-11-17 08:00:37 +01:00
Alexander Boettcher
7a5eab9541 grub2: make ISO bootable on hardware
With "grub2: update to newer grub2 2.06 version" a regression slipped in
which makes the ISO not bootable on real hardware. The commit reverts to
the previous behaviour, to load the GRUB2 modules after boot later one by
one in the ISO format case.

Fixes #4647
2022-11-17 08:00:34 +01:00
Christian Helmuth
df4c4d5be2 base: check for used blocks in Allocator_avl
The check is required for alloc_addr() as the desired range may already
be backed by a used block.
2022-11-17 08:00:34 +01:00
Christian Helmuth
847266d027 depot: update recipe hashes 2022-10-12 14:31:50 +02:00
Norman Feske
a77ceb6871 base: remove Trace::Session::rule RPC function
This part of the trace-session interface was merely a placeholder.

Fixes #848
2022-10-12 12:09:35 +02:00
Stefan Kalkowski
9f9a5186e0 ps2_drv: use generic platform API
Ref genodelabs/genode#4578
2022-10-12 12:09:33 +02:00
Martin Stein
c23b74e150 base-hw: problems with timeout lib in src recipe
This commit fixes two issues with the timeout lib and the base-hw src recipe:

* Add source files of timeout lib to recipe content.
  The files weren't copied to the depot until now. However, the archive
  nonetheless built successfully because of the second issue that is described
  below.

* Get rid of the usage of the BASE_DIR variable in the timeout lib.
  The BASE_DIR variable always resolves to the repos/base directory even when
  building in a depot. That said, the use of BASE_DIR in make-files that are
  not part of the build system itself must be avoided. Instead, REP_DIR,
  REP_INC_DIR, and $(call select_from_repositories, ...) should be used.

Ref #4209
2022-10-12 11:59:08 +02:00
Norman Feske
da150dbb1c Xml_node: allow whitespace around '=' characters
Fixes #4167
2022-10-12 11:59:08 +02:00
Christian Helmuth
3f1870841c depot: update recipe hashes 2022-09-21 12:19:10 +02:00
Johannes Schlatow
f25070d441 irq_connection: add constructor with session label
When creating an Irq connection to a component (not core), e.g. a pin
driver, we typically need a to provide a session label in order to apply
a session policy and to distinguish multiple sessions from the same
component.

genodelabs/genode#4606
2022-09-21 12:19:10 +02:00
Norman Feske
3be0136901 base: add util/dictionary.h utility
The new 'Dictionary' provides an easy way to access objects using
strings as key. The 'String' received the 'operator >' to simplify the
organization of strings in an AVL tree.

The patch removes the former definition of the 'operator >' from the
platform driver because it would be ambigious now.

Fixes #4610
2022-09-19 14:00:35 +02:00
Johannes Schlatow
7d143087c9 xml_node: change with_sub_node signature
The `with_sub_node` method is renamed to `with_optional_sub_node` to
better reflect that the non-existence of a sub node with the desired type is
ignored.
At the same time, the new `with_sub_node` now takes a second functor that is
called when no sub node of the desired type exists.

genodelabs/genode#4600
2022-09-19 14:00:33 +02:00
Norman Feske
f1f0ee3a21 base: disregard ld.lib.so stub as build artifact
The ld.lib.so stub library generated by base/lib/mk/ld.mk has no
purpose at runtime. On the contrary, it must not be integrated into the
boot image because its name collides with the kernel-specific dynamic
linker.
2022-09-19 14:00:32 +02:00
Norman Feske
9aab61f5a7 mk: allow declaration of build artifacts for libs
The build system automatically announces the names of shared libraries
as build artifacts. However, in rare cases, it is required to manually
define them. In particular, the 'ld' stub library plays no role at runtime
and should not be integrated into the boot image.

This patch adds a customization hook following the same pattern as used
for target.mk files, namely the BUILD_ARTIFACTS variable. If defined,
its value is taken as the list of boot artifacts generated by the
library-description file.

Issue #4368
2022-09-19 14:00:32 +02:00
Norman Feske
c560285d88 build: support library builds via lib/<libname>
This patch adds special handling for lib/<libname> arguments to the
build system, which supersedes the former LIB=<libname> mechanism.
Whereas the old mechanism was limited to a single library, the new
convention allows multiple library arguments, similar to regular
targets. The change brings the two immediate benefits.

First, the streamlining of library and target arguments allows for the
building of libraries via the 'build' command of the run tool.

Second, it alleviates the need for pseudo target.mk files for building
shared libraries that have no direct dependencies, in particular VFS
plugins.

Since this change eases the explicit creation of shared libraries
from run scripts, we may reconsider the automatic implicit building
of shared libraries driven by targets. E.g., while developing a Qt
application, a run script could import the Qt libraries from the
depot and combine those with the developed (fresh built) target without
triggering the build of the Qt libraries in the build directory.

When issueing 'make' without arguments, all targets are built. This
patch applies this behavior to libraries as well, thereby removing the
need for the base/src/lib/target.mk pseudo target as used by the CI
tools to build all libraries.

Note that target.mk files located under src/lib/ are no longer
reachable. Therefore, all run scripts that used to trigger the
build of a shared library via a pseudo target must be adapted.
E.g., 'build lib/vfs/tap' must be replaced by 'build lib/vfs_tap'.

With this patch, the LIB=<libname> option is no longer supported.

Fixes #4599
2022-09-19 13:59:28 +02:00
Christian Helmuth
4dddc41b71 depot: update recipe hashes 2022-08-31 09:32:09 +02:00
Norman Feske
5319f36788 util/string.h: support 'int' for 'ascii_to'
This patch complements the 'long' version of the 'ascii_to' conversion
function by an 'int' version.

Fixes #4583
2022-08-17 14:28:12 +02:00
Christian Helmuth
44e2cd14a0 depot: update recipe hashes 2022-08-17 12:03:26 +02:00
Sebastian Sumpf
b5c780993c board: Rename virt_qemu to virt_qemu_<arch>
Instead of having a generic "virt_qemu" board use "virt_qemu_<arch>" in
order to have a clean distinction between boards. Current supported
boards are "virt_qemu_arm_v7a", "virt_qemu_arm_v8a", and
"virt_qemu_riscv".

issue #4034
2022-08-17 12:03:26 +02:00
Johannes Schlatow
cee0c9858c trace_buffer: add object() accessor
genodelabs/genode#4352
2022-08-17 12:03:07 +02:00
Johannes Schlatow
086f3efef2 trace: add trace_eth_packet event
genodelabs/genode#4352
2022-08-17 12:03:07 +02:00
Johannes Schlatow
80a422e590 trace: add GENODE_TRACE_CHECKPOINT macros
genodelabs/genode#4352
2022-08-17 11:54:19 +02:00
Johannes Schlatow
73dad70356 trace: add checkpoint event
genodelabs/genode#4352
2022-08-17 11:54:19 +02:00
Johannes Schlatow
735abca1b6 nic_router: avoid marginal timeout updates
The link dissolve timeout is updated for every packet, which leads to
trigger_once() RPCs that only marginally change the scheduled timeout but
significantly slow down the packet throughput.

genodelabs/genode#4555
2022-08-10 13:33:02 +02:00
Alexander Boettcher
c81b3d4757 base: add check whether stack belongs to ep
Add method to check whether a given pointer are part of the primary stack
of the rpc entrypoint.

Issue #4540
2022-08-10 13:33:01 +02:00
Alexander Boettcher
97d7d4b49d grub2: update to newer grub2 2.06 version
In UEFI case the lower RAM will not be used for internal allocation, which
should prevent overrides in the former legacy BDA (first page).

Issue #4426
2022-08-10 13:33:00 +02:00
Alexander Boettcher
88118b133a intel_fb: request copy of Intel opregion
acpica and the Intel display driver tries to use the Intel Opregion
simultaneously on Genode, which is not supported nor wanted for IO_MEM region as
which it is handled.

Attempts to remove the access to the region was not successful, since some
SSDT table contains ACPI AML code which is executed regularly and read/write
the Opregion.

The patch adds support to read in a copy of the Intel Opregion done by the
acpi_drv component. The copy was sufficient to make the Intel display driver
working to find and lookup the Intel VBT (video bios table) information to
setup all connectors on a Fujitsu U7411 docking station.

Fixes #4531
2022-08-10 13:32:57 +02:00
Sebastian Sumpf
fb7282f47a base: beautify error message if not mutex owner 2022-08-10 13:32:57 +02:00
Norman Feske
6326774056 mk: trigger CUSTOM_TARGET_DEPS from 'all' rule
Build description files that feature both an actual target and
CUSTOM_TARGET_DEPS happen to re-link the target each time whenever one
of the CUSTOM_TARGET_DEPS is phony, e.g., gems/src/app/menu_view/.
The re-linking of the actual target is of course not desired. By
triggering the creation of CUSTOM_TARGET_DEPS from 'all:' instead of
'$(TARGET)', the specified files do not implicitly become link
dependencies of the target.

Issue #3972
2022-06-01 17:37:44 +02:00
Christian Helmuth
3105fa9e0f depot: update recipe hashes 2022-05-25 12:23:04 +02:00
Johannes Schlatow
c38b71146b trace_buffer: only iterate after initialization
There is a race between the trace subject doing the buffer
initialization and the monitor trying to iterate the buffer entries. If
the monitor tries to iterate entries of an uninitialized buffer, it will
read the very first entry twice. The monitor should therefore only start
iteration when the buffer has been initialised.

genodelabs/genode#4513
2022-05-25 12:23:04 +02:00
Stefan Kalkowski
d0694b3e0b platform_drv: separate devices info from config
Fix genodelabs/genode#4491
2022-05-25 12:19:32 +02:00
Christian Helmuth
8ece236635 depot: update recipe hashes 2022-04-13 11:54:46 +02:00
Sebastian Sumpf
da1ef67064 base: Allocator_avl cleanup meta data
After reverting unused ranges during allocator destruction
'_meta_data.free_empty_blocks' may lead to more unused ranges because
meta data blocks maybe freed where the meta data for the blocks is
managed by other meta data blocks. This leads to dangling allocation
warnings which are caused by meta data. Therefore, we call
'_revert_unused_ranges' and 'free_empty_blocks' until no more ranges
can be freed.

issue #4466
2022-04-13 09:29:03 +02:00
Johannes Schlatow
410099df70 base/memset: speedup implementation
Compared to the bytewise memset, a wordwise memset (or even multi-word)
achieves a speedup of ~6.

On Zynq-7000/Cortex-A9:
317 MiB/s -> 2040 MiB/s

On base-linux x86_64:
3580 MiB/s -> 23700 MiB/s

genodelabs/genode#4456
2022-04-13 09:29:03 +02:00
Johannes Schlatow
9409f814a4 memcpy (x86): implement memcpy_cpu
By changing the bytewise copy into a wordwise copy, we get a speedup of
~3 (on base-linux x86_64).

genodelabs/genode#4456
2022-04-13 09:29:02 +02:00
Johannes Schlatow
0104a74028 memcpy (arm): cache align and use pld for speedup
Preloading a few cache lines ahead brings a significant speedup in
memcpy throughput. Note, the particular (optimal) value was empirically
determined on a Cortex-A9 (Zynq-7000) SoC @ 666Mhz. It is best combined
with L2 prefetching enabled (including double linefills and prefetch
offset 7). Yet, even without L2 prefetching this seems to be the sweet
spot.

genodelabs/genode#4456
2022-04-13 08:08:01 +02:00
Johannes Schlatow
4dcc095e5e memcpy (arm): remove unused vfp implementation
The implementation is not in use any more. Furthermore, on typical ARM
cores such as the Cortex-A9, the cached read appears to be the
bottleneck rather than instruction density. On a Zynq-7000 SoC, the vfp
implementation performed significantly worse than the standard load/store
multiple implementation with preloading.

genodelabs/genode#4456
2022-04-13 08:08:01 +02:00
Norman Feske
be0a1742ac base: distinct TRACED from ATTACHED trace subjects
This patch makes the trace-subject state as reflected to the trace
monitor more accurate.

Until now, a subject could be in UNTRACED or TRACED state. In reality,
however, there exists an intermediate state after the trace monitor
called 'trace' for the subject but before the subject locally activated
the tracing (done when passing a trace point). This intermediate state
was reflected as UNTRACED. Consequently, threads that never pass a trace
point (e.g., just waiting for I/O) would remain to appear as UNTRACED
even after enabling its tracing by the trace monitor. This is confusing.

This patch replaces the former UNTRACED and TRACED states by three
distinct states:

  UNATTACHED  prior any call of 'trace'
  ATTACHED    after a trace monitor called 'trace'
              but before the tracing is active
  TRACE       tracing is active

Fixes #4447
2022-04-13 08:07:58 +02:00
Norman Feske
f3984ba5a9 base: declare build artifact for core
This is a generalization of the recent commit "base-hw: declare build
artifact for core".
2022-04-13 08:07:58 +02:00
Norman Feske
34a3209e9b base/log.h: add GENODE_TRACE_TSC
The new macros GENODE_TRACE_TSC and GENODE_TRACE_TSC_NAMED complement
the existing GENODE_LOG_TSC and GENODE_LOG_TSC_NAMED macros to simplify
TSC measurements at a low overhead of the trace mechanism.
2022-04-13 08:07:57 +02:00
Johannes Schlatow
c763890f04 trace_buffer: partition trace buffer
Split the trace buffer into two partitions in order to prevent overwriting
of entries when the consumer is too slow. See file comment in buffer.h.

genodelabs/genode#4434
2022-03-21 13:42:16 +01:00
Johannes Schlatow
edc46d15f8 trace_buffer: revise trace buffer implementation
This commit simplifies the current implementation by overloading the
length field with a padding indicator in addition to the zero-length
head entry. This simplifies the iteration semantics as it eliminates
the need for determining whether a zero-length entries is the actual
head of the buffer or a padding at the buffer end.

genodelabs/genode#4434
2022-03-09 12:08:02 +01:00
Stefan Kalkowski
8a4cbe3cc9 io_port_session: make default ram quota explicit
Ref genodelabs/genode#4436
2022-03-02 15:04:18 +01:00