Commit Graph

1516 Commits

Author SHA1 Message Date
Christian Helmuth
6e9843bd05 test-libc_fifo_pipe: more cap quota required for sel4/x86_64
Issue #4030
2021-03-12 12:01:37 +01:00
Norman Feske
ba567f4ba8 Avoid double slashes in select_from_repositories
Issue #4019
2021-03-12 12:01:37 +01:00
Christian Helmuth
0afd3db894 depot: update recipe hashes 2021-02-25 11:24:23 +01:00
Christian Prochaska
dd92ab126b libc: test TLS support in pthread test
Fixes #4023
2021-02-23 12:19:25 +01:00
Norman Feske
64165d829e depot: update recipe hashes 2021-02-23 12:07:18 +01:00
Christian Prochaska
59459e60e7 libc: pthread TLS optimizations
Fixes #4024
2021-02-23 12:07:17 +01:00
Sid Hussmann
3ff0efd627 vfs/pipe: add fifo feature to pipe plugin
The vfs pipe plugin can now be used as named pipe which anables data
transfer via file handles from one component to another. E.g. if one
would like to send data from component A to stdin of a libc component B,
one can do so by simply writing to that fifo file.

Issue #3583
2021-02-23 12:07:16 +01:00
Sebastian Sumpf
b6d20b4742 autopilot: disable run script not supported by riscv
- libc and nic driver are currently not available on RISC-V

issue #4021
2021-02-23 12:07:16 +01:00
Christian Helmuth
954f03257d Update curl to version 7.70.0
Issue #3773
2021-02-23 12:07:16 +01:00
Pirmin Duss
190b4784c5 openssl: do not depend on ARM CPU probing
With this commit libcrypto does not use ARM NEON extension as long as
SPECS includes "neon". arm_v7a does declare "neon" per default while
arm_v8a does.

Issue #3773
2021-02-23 12:07:16 +01:00
Christian Helmuth
f23e302475 Update OpenSSL to version 1.1.1i
Note, OpenSSL now comes as one combined depot archive *openssl* that
replaces the former *libssl* and *libcrypto* archives. The libraries are
still separate binaries for compatibility with legacy software.

Issue #3773
2021-02-23 12:07:16 +01:00
Martin Stein
f9c258a372 lwip_lx.run: typo in doc
Ref #3961
2021-02-23 12:02:45 +01:00
Josef Söntgen
1b77cb3832 qemu-usb: add ring-buffer for ISOCH OUT transfers
Be more in line with the original host implementation in Qemu and
buffer transfers. Having transfers in-flight helps to smoothen playback
in case other components utilize the CPU.

Issue #4018.
2021-02-23 12:02:44 +01:00
Josef Söntgen
19d9409a34 qemu-usb: adapt ISOCH IN handling for audio
Linux as well as Windows guests want queue to a varying number of
transfers, where each transfer only covers one transaction (iso frame).
The best results were obtained by following that behaviour rather
than queuing multiple iso frames per requests (like is done with OUT
transfers).

The number of requests queued is increased to 32 while the number of
packets per reques is decreased to 1.

Issue #4018.
2021-02-23 12:02:44 +01:00
Josef Söntgen
9918a8f88d qemu-usb: update port to 5.2.0
The contrib code is updated from 2.4.1 to version 5.2.0 and the used
device-model is changed to QEMU xHCI. Due to this change older guests
OSes, namely Windows 7, that relied on the NEC xHCI device-model will
not work anymore.

The 'Qemu::Controller' interface was extended by an 'info' method, which
returns the vendor and product ID. This allows for removing the
hard-coded values in the VirtualBox glue code.

Issue #4018.
2021-02-23 12:02:44 +01:00
Josef Söntgen
b51ae104c2 qemu-usb: use bounce buffer to access DMA memory
The former implemention assumed that the guest physical memory is
mapped continously. This, however, is not true. Writing larger
files to an USB stick with a Windows 10 guest would therefore lead
to data corruption.

The current implementation uses a bounce buffer to copy the data
to and from the guest physical memory and leaves dealing with the
memory mappings entirely up to the VMM.

Fixes #4017.
2021-02-23 12:02:44 +01:00
Norman Feske
a99f6a81b6 libc: clone 'environ' pointer value after fork
The 'environ' pointer is a global variable that must be considered as
part of the application state. It must be copied from the parent to the
child process during fork. Otherwise, a child returning from fork is
unable to access environment variables before invoking execve. The
actual environment variables and their values are already captured
because they reside at the application heap, which is cloned from the
parent. So the copied 'environ' pointer refers to valid data.

Fixes #4015
2021-02-23 12:02:44 +01:00
Alexander Boettcher
696d8f030f libgmp: avoid undefined gmpn_*_2 symbols (x86_64)
__gmpn_addmul_2
__gmpn_mul_2

Fixes #4001
2021-02-23 12:02:42 +01:00
Norman Feske
8cc2662aac Remove support for the Muen separation kernel
Fixes #3995
Fixes #3994
2021-02-23 11:55:44 +01:00
Christian Helmuth
14db22c77c nic_router.run: disable test 2 UDP
Issue #3992 is still pending but has low priority, so disable the test
to reduce the noise and increase the chance to spot independent
regressions.
2021-02-23 11:53:42 +01:00
Martin Stein
691be92046 Don't use the NIC server mode of NIC drivers
Issue #3961
2021-02-23 11:53:41 +01:00
Norman Feske
a981fb864c depot: update recipe hashes 2021-01-25 14:00:43 +01:00
Piotr Tworek
384cf14bee libc: Remove unused variables from Libc::Kernel.
The _dispatch_pending_io_signals and _original_suspended_callback member
variables are not used anywhere in the code. This prompts clang to produce
a warning message about it. Remove both variables to fix it.

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
80318b9ae0 libc: Add semicolons after [[fallthrough]]
GCC doesn't care, but clang complains if [[fallthrough]] is not followed
by a semicolon. Existing Genode code is also not consitent in this regard.
This patch adds the extra semicolons since it works in both GCC and
clang.

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
71abfb3b4f libc: Mark Libc::Vfs_plugin class as final.
The class has final destructor, but is not itself final. This prompts
clang to produce the following warning message:

class with destructor marked 'final' cannot be inherited from [-Wfinal-dtor-non-final-class]
                ~Vfs_plugin() final { }
                              ^
vfs_plugin.h:39:13: note: mark 'Libc::Vfs_plugin' as 'final' to silence this warning

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
395a9b5bf5 libc: Remove unused print function from select.cc.
This static inline function is not used anywhere. GCC does not care,
but clang warns about this. Remove the function to allow the code to
compile cleanly with both clang and GCC.

Issue #3985
2021-01-25 14:00:42 +01:00
Piotr Tworek
53081ac6b3 libc: Dont't use local_addr in try/catch block.
The code in Libc::Cloned_malloc_heap_range initializes its local_addr
member variable by calling Region_map::attach_at. This function can
throw Region_conflict exception. The handler for this exception uses the
local_addr to produce an error message. Such error log is IHMO
useless, or even incorrect since the value of local_addr is undefined
in such case.

Its also worth noting that clang 12 produces the following warning for
this code:
  "cannot refer to a non-static member from the handler of a constructor
   function try block"

Issue #3985
2021-01-25 14:00:42 +01:00
Alexander Boettcher
9d239957bc libc: update seek state on opening O_APPEND fds
If a fd is opened in append mode and just is to be used (so never written by
the parent component) for the to be forked child, the seek state was not
pointing to the end of the file.  The wrong seek value then was used in
File_descriptor_allocator::generate_info().

Issue #3991
2021-01-25 13:58:10 +01:00
Alexander Boettcher
5fa91c573b libc: update O_APPEND fds on joined child
The fds in O_APPEND state may have changed by the child. The local seek
state needs to be valid/current for the next to be forked child, which seek
state is set by File_descriptor_allocator::generate_info().

Issue #3991
2021-01-25 13:58:10 +01:00
Martin Stein
f45aa85e9f nic_router.run: fix redundant IPv4 subnets 2021-01-25 13:58:10 +01:00
Norman Feske
0a478dac7f pdf_view: tweaks for showing 16:10 slides
- Shave off two pixels on right, which are rendered white for no reason.
- Adjust resolution to make the slides fit vertically by default.
2021-01-25 13:58:10 +01:00
Stefan Kalkowski
bdd923406f base: remove SPEC variables of boards (fix #3971)
* Remove SPEC declarations from mk/spec
* Remove all board-specific REQUIRE declaratiions left
* Replace [have_spec <board>] run-script declarations with have_board where necessary
* Remove addition of BOARD variable to SPECS in toplevel Makefile
* Move board-specific directories in base-hw out of specs
2021-01-25 13:58:09 +01:00
Martin Stein
1d2649b49a nic_router: act as "Uplink" server
Let the NIC router provide an Uplink service besides the Nic service that it
already provided. Requests for an Uplink session towards the NIC router are
assigned to Domains using the same <policy> configuration tags that are used in
order to assign Nic session requests. The MAC addresses of Uplink session
components are _NOT_ considered during the allocation of MAC addresses for NIC
session components at the same Domain. The task of avoiding MAC address clashes
between Uplink session components and Nic session components is therefore left
to the integrator. Apart from that, Uplink session components are treated by
the NIC router like any other interface.

Ref #3961
2021-01-25 13:57:43 +01:00
Alexander Boettcher
0a5741f076 acpica.run: add acpi_hid evaluation support
Evaluate acpi_hid report in acpi_event

Showcase feature in acpica.run for FUJITSU FUJ02E3 and KEY_FN_F4.
2021-01-25 12:51:53 +01:00
Alexander Boettcher
1147f35972 acpica: add limited support for FUJ02E3 ACPI dev
The keys, mute, touchpad toggle (Fn-F4) and rfkill may be reported by some
Fujitsu machines via the ACPI FUJ02E3 ACPI device. With this commit limited
support to detect the 3 keys are added and will be reported as Genode report.
2021-01-25 12:50:55 +01:00
Christian Prochaska
0428e5e8b9 qt5: improve quickcontrols2 module support
Fixes #3968
2020-12-18 09:11:25 +01:00
Christian Helmuth
1bef11accf depot: update recipe hashes 2020-12-18 09:10:52 +01:00
Norman Feske
a0fb944721 Propagate session diag flag to core
This commit restores the diag feature for selecting diagnostic output of
services provided by core. This feature became unavailable with commit
"base: remove dependency from deprecated APIs", which hard-wired the
diag flag for core services to false.

To control this feature, three possible policies can be expressed in a
routing target of init's configuration:

* Forcing silence by specifying 'diag="no"'
* Enabling diagnostics by specifying 'diag="yes"'
* Forwarding the preference of the client by omitting the 'diag'
  attribute

Fixes #3962
2020-12-09 14:02:11 +01:00
Sebastian Sumpf
537472e9af libports: ffi for ARM_64
Required by 'glib'

issue #3822
2020-12-09 14:02:10 +01:00
Martin Stein
bad8caee3f nic_router: support multiple DHCP option 6 entries
* The NIC router now considers, memorizes, and, if configured, reports
  multiple DHCP option 6 entries from DHCP replies that it received as DHCP
  client
* A DHCP server at the NIC router can now be configured statically with
  multiple DNS server addresses to propagate
* The 'dns_server_from' attribute of the DHCP server of the NIC router now
  supports the forwarding of multiple DNS server addresses
* The automated run/nic_router_dhcp test tests all the above mentioned new
  functionality and reconfiguring it at runtime. The test was added to the
  autopilot.
* All run scripts were adapted to fit the new NIC router configuration
  interface

Fixes #3952
2020-12-09 14:02:10 +01:00
Emery Hemingway
306466fc60 libc: always set argv and envp to valid arrays
The arrays passed to main(…) must always be valid null-terminated arrays.

Fix #3955
2020-12-09 14:02:10 +01:00
Christian Helmuth
f2e0c164c2 depot: update recipe hashes 2020-11-27 09:21:06 +01:00
Christian Prochaska
e22e2540ee qt5: add Qt5Xml library
Fixes #3959
2020-11-27 09:19:09 +01:00
Stefan Kalkowski
0cbd1d1b7c os: adjust sd_card_drv to use platform API
Fix #3956
2020-11-27 09:19:09 +01:00
Martin Stein
955afd8837 ada runtime: support image of enums
Ref #3937
2020-11-27 09:19:09 +01:00
Alexander Boettcher
774b1f4277 base: remove Thread_deprecated
Fixes #3954
2020-11-27 09:19:08 +01:00
Josef Söntgen
51a50ece60 libc: guard select call in socket_fs with monitor
Issue #3682.
2020-11-27 09:19:08 +01:00
Christian Prochaska
e5f442f2d3 qt5: use integrated virtual keyboard in example application
Fixes #3949
2020-11-27 09:19:08 +01:00
Christian Prochaska
764ab3be20 qt5: use libc 'posix_memalign()' in qtwebengine
Fixes #3916
2020-11-23 12:03:00 +01:00
Emery Hemingway
d16a1bd922 vfs_lwip: log warning when blocking application
Log a warning when the lwIP VFS plugin queues a read while waiting
for an interface to become ready. By comparision the Lxip plugin
has the same behavior but a more verbose initialization process.

Fix #3920
2020-11-23 12:03:00 +01:00
Alexander Boettcher
d9cde328cb acpi: support amd iommu detection
Issue #3928
2020-11-23 12:03:00 +01:00
Christian Helmuth
a8d3cd9b15 libc: open socket files early on socket creation
This prevents later file-descriptor shortage when opening files on
demand, which can't be reflected to the application in a sane manner.

The real fix is to open socket files not on libc level but on VFS level
only effectively consume one libc file descriptor for one socket.
2020-11-23 12:02:58 +01:00
Christian Helmuth
5dfca79bcc libc: use pthread mutex in getifaddrs() 2020-11-23 12:02:58 +01:00
Christian Helmuth
c93f3a1136 libusb: establish/terminate USB session
Now, the USB connection is established on backend initialization and
terminated on backend exit triggered by high-level libusb code.

Thanks to Peter for the patch.
2020-11-23 12:02:57 +01:00
Christian Helmuth
e339dd542c Prevent warning in test-pthread 2020-11-23 12:02:57 +01:00
Christian Helmuth
3d23c8c419 libports: update curl download location 2020-11-23 12:02:57 +01:00
Christian Prochaska
dff3bac441 libc: submit monitor execution signals locally
Issue #3924
2020-11-23 12:02:55 +01:00
Josef Söntgen
f754e2a7d7 stdcxx: add symbols needed by testsuite
Fixes #3921
2020-10-23 15:12:06 +02:00
Josef Söntgen
1dd1bfe692 stdcxx: add new/delete aligned variants (C++17)
Issue #3921
2020-10-23 15:08:40 +02:00
Josef Söntgen
a74b572e1f stdcxx: force symlinks to allow for re-preparing
Issue #3921
2020-10-23 14:59:56 +02:00
Josef Söntgen
a24911296a stdcxx: adapt header files for testsuite
Issue #3921
2020-10-23 14:59:49 +02:00
Josef Söntgen
563cc07cb0 libports: posix src archive implements posix API
Issue #3921
2020-10-23 14:58:27 +02:00
Josef Söntgen
59f562f627 libc: add symbols needed by testsuite
Issue #3921
2020-10-23 14:58:04 +02:00
Christian Helmuth
5be1c793a5 depot: update recipe hashes 2020-10-23 14:16:38 +02:00
Emery Hemingway
b4076e762c libc: log a message and exit for raise(...)
Fix #3919
2020-10-21 09:14:55 +02:00
Christian Prochaska
405955eaef libc: implement 'posix_memalign()'
Fixes #3915
2020-10-15 15:41:55 +02:00
Christian Prochaska
9cd38a6846 libc: rwlock cleanup
Issue #3912
2020-10-13 14:38:43 +02:00
Christian Prochaska
bf4afefaa1 libc: use semaphore in rwlock implementation
Fixes #3912
2020-10-13 08:21:04 +02:00
Christian Helmuth
f09b0dc224 Improve synchronization in lwip.run
The lynx HTTP GET test was started before the HTTP server was up and
therefore failed on Qemu/PBXA9.

Issue #3874
2020-10-09 16:13:14 +02:00
Christian Prochaska
658030ef49 qt5: update port for qtwebengine improvements
- unlink shared memory files
- lower maximum number of socket pool sockets to reduce chance of file
  descriptor exhaustion
- fix a build dependency which caused sporadic parallel build errors

Fixes #3910
2020-10-09 13:51:26 +02:00
Christian Prochaska
4e8bfed5b1 libc: duplicate the file descriptor on shared 'mmap()' mappings
Fixes #3909
2020-10-09 13:50:35 +02:00
Christian Prochaska
5c47fa0d41 libc: reduce file descriptor lookup exceptions in 'select()'
Fixes #3908
2020-10-09 13:48:23 +02:00
Christian Prochaska
058f2e687c libc: make 'mmap()' address alignment configurable
With this commit, the alignment of anonymous 'mmap()' allocations can be
configured like this:

<config>
  <libc>
    <mmap align_log2="21"/>
  </libc>
</config>

Fixes #3907
2020-10-09 13:47:33 +02:00
Josef Söntgen
7d21335ac9 vfs/oss: VFS plugin for Audio_out access via files
This plugin gives access to the Audio_out session by roughly
implementing a OSS pseudo-device. It merely wrapps the session and does
not provide any resampling or re-coding.

Fixes #3891.
2020-10-09 13:44:27 +02:00
Josef Söntgen
3d2b0cab93 libc: implement SNDCTL I/O control handling
In the same vein as the terminal and block I/O controls, the sound
controls are implemented via poperty files and match the OSS
API ([1] features a nice overview while [2] is v3 and [3] gives
in-depth information on the current v4.x API we eventually might want
to implement).

  [1] https://wiki.freebsd.org/RyanBeasley/ioctlref/
  [2] http://www.opensound.com/pguide/oss.pdf
  [3] http://manuals.opensound.com/developer/

The controls currently implemented are the ones used by the cmus OSS
output plugin, which was the driving factor behind the implementation.
It uses the obsolete (v3) API and does not check if the requested
parameter was actually set, which should be done according to the
official OSS documentation.

At the moment it is not possible to set or rather change any
parameters. In case the requested setting differs from the parameters
of the underlying Audio_out session - in contrast to the suggestion in
the OSS manual - we do not silently adjust the parameters returned
to the callee but outright fail the I/O control operation.

The following list contains all currently handled I/O controls.

  * SNDCTL_DSP_CHANNELS sets the number of channels. We return the
    available channels here and return ENOTSUP if it differs from
    the requested number of channels.

  * SNDCTL_DSP_GETOSPACE returns amount of playback data that can
    be written without blocking. For now it amounts the space left
    in the Audio_out packet-stream.

  * SNDCTL_DSP_POST forces playback to start. We do nothing and return
    success.

  * SNDCTL_DSP_RESET is supposed to reset the device when it is
    active before any parameters are changed. We do nothing and return
    success.

  * SNDCTL_DSP_SAMPLESIZE sets the sample size. We return the
    sample size of the underlying Audio_out session and return ENOTSUP
    if it differs from the requested number of channels.

  * SNDCTL_DSP_SETFRAGMENT sets the buffer size hint. We ignore the
    hint and return success.

  * SNDCTL_DSP_SPEED sets the samplerate. For now, we always return
    the rate of the underlying Audio_out session and return ENOTSUP
    if it differs from the requested one.

This commit serves as a starting point for further implementing the
OSS API by exploring more users, e.g. as VirtualBox/Qt5/SDL2 audio
backend or a more sophisticated progam like sndiod.

Issue #3891.
2020-10-09 13:44:14 +02:00
Christian Helmuth
91f8281618 depot: update recipe hashes 2020-10-09 13:35:57 +02:00
Christian Prochaska
0e01729d77 libc: handle file descriptor allocation errors
Fixes #3906
2020-10-09 13:35:57 +02:00
Piotr Tworek
fe0ad0addb tool: Consolidate qemu nic setup.
Right now the same code dealing with nic setup on qemu is duplicated
in many different run scripts. It makes it unnecesarily complex to
change the existing config or add support for new nic types. Lets move
all this common code to qemu.inc.

Ref #3825
2020-10-09 13:35:57 +02:00
Christian Helmuth
abefca500b libc: fix deadlock in pthread_cond_timedwait/signal()
The deadlock occured with three concurrently running threads: two
waiters calling pthread_cond_timedwait() and one signaller calling
pthread_cond_signal().

If waiter W1 hits its timeout, the signaller may have called
pthread_cond_signal(), detected this waiter and posted the internal
'signal_sem' concurrently. Then, the signaller waits for 'handshake_sem'
to ensure the waiter got woken up.

Waiter W1 can't consume the 'signal_sem' post by
'sem_wait(&c->signal_sem)' because another waiter W2 may have consumed
the post already above in sem_wait/timedwait(). Waiting for a post on
'signal_sem' would block the waiter W1 in perfect deadlock with
signaller on 'handshake_sem'. As W1 also owns 'counter_mutex' in this
situation, waiter W2 would block when trying to aquire 'counter_mutex'
and can't resolve the situation.

So, W1 does nothing in this case and we accept the spurious wakeup on
next pthread_cond_wait/timedwait().
2020-10-09 13:35:56 +02:00
Martin Stein
7feea78991 timeout: rework timeout framework
* get rid of alarm abstraction
* get rid of Timeout::Time type
* get rid of pointer arguments
* get rid of _discard_timeout indirection
* get rid of 65th bit in stored time values
* get rid of Timeout_scheduler interface
* get rid of uninitialized deadlines
* get rid of default arguments
* get rid of Timeout::_periodic
* get rid of Timeout::Raw
* use list abstraction
* only one interface for timeout handlers
* rework locking scheme to be smp safe
* move all method definitions to CC file
* name mutexes more accurate
* fix when & how to set time-source timeout
* fix deadlocks

Fixes #3884
2020-10-09 13:35:56 +02:00
Christian Helmuth
26011a7151 libc: update status for component select handlers
In case of contexts blocked in select() the monitor updates the
file-descriptor status, but if the entrypoint is just blocked for the
select handler, the status must be updated explicitly on
dispatch_select().
2020-10-09 13:35:56 +02:00
Alexander Boettcher
e5fe9c6fc7 qemu-usb: catch exception on already gone devices
Fixes #3893
2020-10-09 13:35:55 +02:00
Josef Söntgen
f53df495db libc: provide 'sys/soundcard.h' header file
Issue #3891.
2020-10-09 13:33:35 +02:00
Josef Söntgen
f3268cade6 libc: split ioctl method
Use one ioctl method for each type of I/O control because by now the
general method will become increasingly long.

Fixes #3890.
2020-10-09 13:33:35 +02:00
Josef Söntgen
27d4cb871f libc: use property files for block ioctl
Like already done for terminal I/O controls use collect the information
by reading property files instead of using the old VFS ioctl interface.

Fixes #3888.
2020-10-09 13:33:35 +02:00
Josef Söntgen
2312ad35dd libc: match ioctl request type to contrib type
There is a type mismatch as in the FreeBSD contrib code the type of the
request is 'unsigned long'. So far, only I/O controls where the request
falls into the signed range where used and this was not a problem.

Some of the SNDCTL requests, however, have the bit set.

Fixes #3887.
2020-10-09 13:33:35 +02:00
Christian Prochaska
85a84f5042 qt5: generate enter events related to popup menus
Fixes #3894
2020-09-18 15:23:45 +02:00
Christian Helmuth
f6337a6446 depot: update recipe hashes 2020-09-18 14:04:56 +02:00
Norman Feske
e0d9a04f67 libc: resolve circular dependency in fork
This patch is a follow-up for the commit "libc: use monitor for fork".
It removes the use of the monitor mechanism from the
'Local_clone_service::close' RPC function because the fork_ep must stay
responsive for the destruction and creation of 'Child' objects.

Issue #3874
2020-09-18 14:04:56 +02:00
Christian Helmuth
c59c266afc depot: update recipe hashes 2020-09-17 14:23:14 +02:00
Christian Helmuth
2eb8c5e21a net: move ascii_to() into Net namespace
The combination of Net::Mac_address and
Genode::ascii_to(Net::Mac_address) required shaky quirks in several
places because GCC is not able to resolve the ascii_to overload if
base/xml_node.h was included to early. The current solution moves the
several ascii_to overloads "closer" to the Net types by putting them
into the Net namespace, where GCC reliably picks them up.

Hence, co-locating the ascii_to() utility with the overload type in the
same scope/namespace is good practice.

This patch removes the now obsolete <nic/xml_node.h> header file.
2020-09-17 10:13:22 +02:00
Christian Prochaska
e0ca250232 libc: support detached pthreads
Fixes #3880
2020-09-17 10:13:20 +02:00
Christian Helmuth
75ba52a52b libc: remove mutex parameter from monitor
Issue #3874
2020-09-17 10:13:20 +02:00
Christian Helmuth
a0a112ffe7 libc: use monitor for fork
Issue #3874
2020-09-17 10:13:20 +02:00
Christian Helmuth
a891b3832c libc: use monitor for pthread join/cancel
Issue #3874
2020-09-17 10:13:20 +02:00
Christian Helmuth
d6f89b285d libc: use monitor for sleep()
Issue #3874
2020-09-17 10:13:20 +02:00
Norman Feske
e9a3f0f095 libc: use monitor for select
This patch simplifies the control flow within the libc kernel by
facilitating the monitor mechanism for the implementation of 'select'.

Issue #3874
2020-09-17 10:13:20 +02:00
Christian Helmuth
52a6cf1412 libc: support creat() 2020-09-09 16:57:34 +02:00
Christian Helmuth
0605180a61 libc: remove legacy kernel functions 2020-09-09 16:57:34 +02:00
Christian Helmuth
ab953a534c libc: remove residues of noux fork support 2020-09-09 16:57:34 +02:00
Christian Helmuth
c649307720 depot: update recipe hashes 2020-08-28 08:29:12 +02:00
Christian Helmuth
bf0f3b65b4 Replace remaining 'constrain_phys' by 'managing_system' 2020-08-28 08:28:13 +02:00
Christian Prochaska
ace172ebf3 qt5: prerequisites for qtwebengine support
Fixes #3867
2020-08-28 08:28:13 +02:00
Norman Feske
7d0cb9620b depot: update recipe hashes 2020-08-25 11:50:41 +02:00
Stefan Kalkowski
06edc0d52b base: extend PD session with managing_system call
Introduce the managing_system privilege for components like the
platform_driver to allow it to call system management functionality
that is reserved by kernel or special firmware, e.g., ARM Trusted Firmware.

The former RAM resource configuration attribute `constrain_phys`,
which enabled to constrain the region of physical RAM to be used,
gets replaced by the new, broader managing_system configuration
attribute of a `start` node. It gets enforced by the sandbox library.

Ref #3816
2020-08-25 11:50:11 +02:00
Christian Prochaska
af6d2a8c54 stdcxx: add abi symbols needed by qtwebengine
Fixes #3862
2020-08-25 11:50:11 +02:00
Josef Söntgen
157f4b1270 pthread: implement condattr setclock
Normally CLOCK_REALTIME is used. However libraries, like glib, want to
use CLOCK_MONOTONIC. To make those users happy add setting the clock.

Note, the pthread_cond implementation uses the POSIX semaphore API
internally that does not have means to set the clock. For this reason,
the private 'sem_set_clock' function is introduced.

Fixes #3846.
2020-08-25 11:50:11 +02:00
Martin Stein
66ff18a53e libc: support pthread mutex type "Adaptive NP"
The initial motivation for enabling support for this pthread mutex type was
that it is required by the Glib test in genode/world.

Fixes #3817
2020-08-25 11:50:11 +02:00
Christian Prochaska
9ec2a19cc0 libc: add wrapper function for 'Genode::cache_coherent()'
Fixes #3858
2020-08-25 11:50:11 +02:00
Christian Prochaska
9bc6b8be5a libc: handle 'MAP_SHARED' flag in 'mmap()'
Fixes #3857
2020-08-25 11:50:11 +02:00
Christian Prochaska
dd8777093d libc: don't treat 'mmap()' address hint w/o MAP_FIXED flag as error
Fixes #3855
2020-08-25 11:50:10 +02:00
Christian Prochaska
2f55ffdf20 libc: zero-initialize anonymous memory from 'mmap()'
Fixes #3854
2020-08-25 11:50:10 +02:00
Norman Feske
e8e14ad1bf test-libc_execve: adjust timeout for pistachio 2020-08-25 11:50:10 +02:00
Martin Stein
e544464354 libsparkcrypto: src recipe, contrib alis, mk fixes
* add libsparkcrypto source-recipe
* provide ALI files through a new repository by mstein and add the repo
  download to the libsparcrypto port-file
* remove dependencies to non-existent contrib ADB files from the library make
  files

Fixes: #3852
2020-08-25 11:50:10 +02:00
Norman Feske
556a5c8086 libc: clean up 'clock_gettime' handling
This patch untangles the dependency of VFS operations that need RTC
information from the 'clock_gettime' libc function that must never be
called from the libc kernel context.

- The 'Rtc' class uses the VFS directly for reading the rtc file instead
  of relying on libc functions.

- The 'Rtc' instance has become part of the 'Kernel' instead of
  being construced as a side effect of the first call of
  'clock_gettime'.

- Changed 'Rtc::read' to return a timespec value, which has a higher
  precision than the formerly used time_t value.

- The 'Rtc::read' returns a value with the relative 'current_time'
  already applied. The former handling of subsequent rtc-value
  updates has been rewritten to become more logical.

- The 'Vfs_plugin' no longer calls 'clock_gettime' but the new
  kernel-level 'Current_real_time' interface.

Issue #2635
2020-08-25 11:50:10 +02:00
Norman Feske
852ab79359 Move atexit handling from base lib to libc
This patch untangles the interplay of the base library and the libc
during the exit handling.

- The CXA ABI for the atexit handling is now provided by the libc.
  For plain Genode components without libc dependency, __cxa_atexit
  is a no-op, which is consistent with Genode's notion of components.

- The 'abort' implementation of the base library no longer calls
  'genode_exit' but merely 'sleep_forever'. This way, the cxx library
  no longer depends on a 'genode_exit' implementation.

- The libc provides 'atexit' support by storing metadata on the
  libc kernel's heap now, thereby eliminating the former bounded
  maximum number of atexit handlers.

- Shared-library dtors are no longer called via the atexit mechanism
  by explicitly by the dynamic linker. This slightly changes the
  call order of destructors (adjustment of the ldso test). Functions
  marked as destructors are called after the atexit handlers now.

- The libc executes atexit handlers in the application context,
  which supports the I/O operations in those handles, in particular
  the closing of file descriptors.

Fixes #3851
2020-08-25 11:50:09 +02:00
Christian Prochaska
66063e5137 qt5_component: support arguments and environment from config
Fixes #3049
2020-08-25 11:50:09 +02:00
Josef Söntgen
81ae4599ae libsparkcypto: api recipe
For the time being, we put all spec and body files into the recipe although
there might be a (so far to us unknown) way to have only the API relevant files
in it.

Fixes #3849
2020-08-25 11:50:09 +02:00
Martin Stein
82090d2ea1 libsparkcrypto: mark some units pure
* switch to a libsparkcrypto fork of m-stein
* switch to a libsparkcrypto state that makes some units pure that are used by
  the consistent block encrypter, in order that the latter can become
  completely pure

Ref #3849
2020-08-25 11:50:09 +02:00
Martin Stein
2e3b11b354 ada-runtime: add s-expint.ad*
* switch to fork of the Ada runtime provided by m-stein
* switch to a Ada-runtime state that provides the Exp_Int package (exponential
  function on integers)
* adapt spark lib, symbols, and recipes to incorporate the Exp_Int package

Fixes #3848
2020-08-25 11:50:09 +02:00
Martin Stein
f3eaeb08ef ada/spark: all warnings, warn strict, style checks
* enable all common warnings through default value of CC_ADA_WARN
* treat warnings like errors through default value of CC_ADA_WARN_STRICT
* enable almost all style checks through default value of CC_ADA_WARN_STRICT
* style fixes for aes_cbc_4k
* disable strict warnings and style checks for libsparkcrypto and spark lib

Ref #3848
2020-08-25 11:50:09 +02:00
Norman Feske
fcb21732e0 Move drivers/input/spec/ps2 to drivers/ps2
This simplifies the directory structure.

Issue #2190
2020-08-25 11:50:09 +02:00
Norman Feske
2e22498e5a nitpicker: no framebuffer and input by default
This patch prevents nitpicker from requesting a framebuffer and input
session by default because the regular use of nitpicker relies on the
capture-session and event-session interfaces by now.

For supporting the nested use of nitpicker via the gui_fb component, it
is still possible to enable the traditional behavior by explicitely
setting the 'request_input' and 'request_framebuffer' config attributes
to "yes".

Issue #3812
2020-08-25 11:50:09 +02:00
Norman Feske
974118acec Turn PS/2 driver into event-session client
Issue #3845
2020-08-25 11:49:45 +02:00
Christian Prochaska
08ef528577 stdcxx: enable thread features
Issue #2442
2020-08-25 11:49:45 +02:00
Christian Helmuth
36b6ebc030 libc: process VFS operations in monitor
Fixes #2635
2020-08-25 11:49:44 +02:00
Christian Helmuth
a89d61acf2 base: call Io_progress_handler only in signal RPC
This remove the call to Io_progress_handler::handle_io_progress() from
wait_and_dispatch_one_io_signal() to prevent unexpected nesting
I/O-progress handling in case of custom dispatch loops (e.g., in libc).
The original intention of Io_progress_handler was to inform the
entrypoint just before blocking in the entrypoint loop.

Issue #2635
2020-08-25 11:49:44 +02:00
Norman Feske
9e42a9ac7e Replace server/acpi_input with app/acpi_event
Fixes #3827
2020-08-25 11:49:44 +02:00
Norman Feske
9662d89cfb Replace input filter with event filter
This commit applies the transition from the "Input" session to the "Event"
session to the event-filtering mechansim. The functionality of the
input_filter is now provided by the event_filter. The event filter
requests only one "Event" session as destination for the filter result,
which is usually routed to the nitpicker GUI server. It provides an
"Event" service to which any number of event sources can connect.

The configuration of the filter chain remains almost the same. Only the
declaration of the <input> nodes is no longer needed. Instead, the
configuration must specify <policy> nodes, which define the mapping of
"Event" clients (event sources) to the inputs used in the filter chain.

The patch adjusts all uses of the nitpicker GUI server accordingly such
that the event filter reports events to nitpicker's event service
instead of having nitpicker request an "Input" session. This dissolves
the dependency of nitpicker from input drivers.

Issue #3827
2020-08-25 11:49:43 +02:00
Christian Helmuth
9453287a6b libc: move current working directory into kernel 2020-08-25 11:49:43 +02:00
Christian Helmuth
40e936911f libc: remove unused member from Errno 2020-08-25 11:49:43 +02:00
Christian Helmuth
d9121e50c3 libc: translate file-descriptor exhaustion into EMFILE
Fixes #3841
2020-08-25 11:49:43 +02:00
Alexander Boettcher
bed531b604 libc: initialize tv struct in pselect
Fixes #3839
2020-08-25 11:49:42 +02:00
Christian Helmuth
257b3b6775 libc: cleanup monitor implementation
- Explicit types for function and monitor execution results
- Remove pending flag and mutex (pending flag was moved to kernel)
2020-08-25 11:49:42 +02:00
Christian Prochaska
c6b17be744 vfs/lwip: clear the packet queue in '~Udp_socket_dir()'
Fixes #3836
2020-08-25 11:49:42 +02:00
Christian Helmuth
d266f44ef3 libc: free resources on socket creation failure
Issue #3766
2020-08-25 11:49:42 +02:00
Christian Helmuth
5a2ac73b69 vfs/lwip: prevent pbuf leakage on ENOTCONN
Issue #3766
2020-08-25 11:49:42 +02:00
Christian Helmuth
7996fc45f3 vfs/lwip: signal ENOTCONN via EOF on remote file
Issue #3766
2020-08-25 11:49:42 +02:00
Alexander Boettcher
a03a37b1d9 vfs/lwip: avoid leaking of pbuf objects
Issue #3766
2020-08-25 11:42:37 +02:00
Christian Helmuth
76ac94f4f2 vfs/lwip: fix pbuf slab-block size
Issue #3766
2020-08-25 11:42:37 +02:00
Christian Prochaska
377dadd461 libc_getaddrinfo.run: fix run script
Fixes #3832
2020-08-25 11:42:36 +02:00
Christian Prochaska
353baa9251 libc: add pthread alias functions with underscore
The libc calls pthread functions with underscore internally.

Issue #725
2020-08-25 11:42:36 +02:00
Christian Helmuth
de7d4a5523 Replace libc_pipe plugin by VFS pipe plugin 2020-07-30 08:49:24 +02:00
Christian Helmuth
e44ffa02c9 libc: remove redundant dummies (fstatat, stat) 2020-07-30 08:49:23 +02:00
Norman Feske
de795b1a6e depot: update recipe hashes 2020-07-13 11:33:53 +02:00
Norman Feske
c81af531a3 Turn framebuffer drivers into capture clients
This patch replaces the use of the "Framebuffer" session interface by
the new "Capture" session interface in all framebuffer drivers. Thanks
to this change, those drivers have become mere clients of the nitpicker
GUI server now, and are no longer critical for the liveliness of the GUI
server.

The patch touches the following areas:

- The actual driver components. The new versions of all drivers have
  been tested on the respective hardware. Generally, the drivers
  have become simpler.

- The drivers_interactive packages for various boards. The drivers
  subsystem no longer provides a "Framebuffer" service but needs a
  valid route to the "Capture" service provided by nitpicker.

- The driver manager of Sculpt OS.

- This patch changes the role of the test-framebuffer component from a
  framebuffer client to a capture server so that drivers (capture clients)
  can be directly connected to the test component without the nitpicker
  server.

- Framebuffer driver no longer support the unbuffered mode.

- The fb_bench.run script is no longer very meaningful because it
  interplays solely with nitpicker, not with the driver directly.

- All run scripts for graphical scenarios and the related depot
  archives got adapted to the change.

Fixes #3813
2020-07-13 11:33:15 +02:00
Josef Söntgen
49e907e5f6 libc: remove trailing slash in lstat and stat
Fixes #3814.
2020-07-13 11:33:13 +02:00
Alexander Boettcher
c943e26913 lib/drm: use Blockade
Fixes #3801
2020-07-06 14:43:04 +02:00
Alexander Boettcher
7d1fd0b0a3 lwip: use Mutex
Issue #3801
2020-07-06 14:43:04 +02:00
Alexander Boettcher
6d653b3c0f qemu-usb: use Mutex
Issue #3801
2020-07-06 14:43:04 +02:00