Commit Graph

1914 Commits

Author SHA1 Message Date
Christian Helmuth
c2e1013ad4 acpica: improve faked RSDP
More sane table values fix broken output on verbose.

Issue #5083
2024-02-26 08:31:03 +01:00
Christian Helmuth
980793970d acpica: detach MMIO region before re-attaching
This is a follow-up commit for the changes in #5069.

Fixes #5083
2024-02-26 08:31:03 +01:00
Christian Helmuth
30e37d90dd acpica: provide verbose config
If "verbose" is set to true in the config, AcpiOsPrintf etc. are enabled
to log to a dedicated LOG session using the Format:Console utility.

Issue #5083
2024-02-26 08:31:03 +01:00
Christian Helmuth
a6b30d58df lib/format: parse precision and lalign
Prevent errors if precision and left alignment are part of the string.
String precision is applied to limit access to the configured number of
characters but ignored for other types.

Issue #5083
2024-02-26 08:31:03 +01:00
Christian Helmuth
a5b8090e14 acpica: remove static constructor from lib
Issue #5083
2024-02-26 08:31:03 +01:00
Josef Söntgen
d9e4d32374 libdrm/lima: propagate allocation failure
Failed allocations were still denoted with a successful return value
to the caller. This situation was triggered by artificial testing and
has not been observed yet in practice. In case the 'LIMA_GEM_CREATE'
I/O control fails Mesa will dereference invalid pointers anyway.

Issue genodelabs/genode-allwinner#27.
2024-02-26 08:31:03 +01:00
Norman Feske
c4679e7af6 depot: update recipe hashes 2023-12-13 12:33:05 +01:00
Norman Feske
77b0e10e88 vfs/ram_file_system: deferred unlink
This patch changes the unlink operation of the ram fs to defer the
destruction of a file until it is no longer referenced by any VFS handle.
When unlinked, the file no longer appears in the directory. But it can
still be opened and accessed.

With this change, a parent process of a Unix-like subsystem becomes able
to pass the content of an unlinked file to a forked child process. This
mechanism is required when using the 'exec' command in Tcl scripts.

Another use case is the 'tmpfile()' function.

Fixes #3577
2023-12-13 12:33:05 +01:00
Johannes Schlatow
63dd5efa72 libc: fix post-2100 infinite-loop on 32-bit
The call of `mktime`/`timegm` with a broken down time after year 2100
led to an infinite-loop on 32bit.

genodelabs/genode#3707
2023-12-13 12:33:05 +01:00
Johannes Schlatow
c1bc9f8557 libc: use timegm instead of mktime
By using `mktime()`, which assumes local time, we render the `TZ`
environment variable ineffective. Instead, `timegm()` should be used to
set the real-time clock to UTC.

genodelabs/genode#5074
2023-12-13 12:33:05 +01:00
Norman Feske
82a9582dd7 qemu-usb: minor documentation fixes 2023-12-01 11:17:22 +01:00
Josef Söntgen
9d989b1557 fetchurl: add 'ignore_failures' option
This option is useful in cases where batching is configured and
failing to fetch a resource should not influence the over-all
result.

Issue genodelabs/genodians.org#32.
2023-12-01 10:43:45 +01:00
Christian Helmuth
8baf19022c depot: update recipe hashes 2023-11-30 15:11:36 +01:00
Norman Feske
1e166c7236 Supplement the build of shared libs where needed
This is a follow-up commit to the adaptation of the run scripts to the
consistent use of [build_artifacts] (issue #4860).

The missing build of libm remained undetected until the recent removal
of implicit shared-library builds (issue #5061).
2023-11-28 14:44:29 +01:00
Norman Feske
b27bd256dd libports: use [build_artifacts] in qt5 run scripts
Issue #4860
2023-11-28 14:44:29 +01:00
Norman Feske
db72301eb0 nic_router.run: use [build_artifacts]
Issue #4860
2023-11-28 14:44:28 +01:00
Stefan Kalkowski
e3881163c4 libc-net: eliminate annoying warning in sendmsg
Fix genodelabs/genode#5052
2023-11-28 14:24:26 +01:00
Sebastian Sumpf
3264a22c1e socket fs: simplify AF_UNSPEC
Remove separate context state for AF_UNSPEC.

issue #5031
2023-11-28 14:24:25 +01:00
Sebastian Sumpf
c7956aa41b socket_fs/vfs_lxip: errno 65 is EHOSTUNREACH
Return "no route to host" on errno 65 which is EHOSTUNREACH in legacy
dde_linux, return EHOSTUNREACH accordingly in libc's socket fs.

issue #5031
2023-11-28 14:24:25 +01:00
Benjamin Lamowski
a482bb8a89 libc: silence sysconf(_SC_GETPW_R_SIZE_MAX) warning
Currently, running ripgrep on Genode emits
"Warning: sysconf(71) not implemented".

Return -1 without setting errno, which is a valid return value according
to getpwnam(3) and silence the warning.

Fixes #5043
2023-11-28 14:24:24 +01:00
Christian Prochaska
b41df1fb7a mk: create separate debug info files
Commit also adapts Qt5 libraries.

Issue #5015
2023-11-28 14:24:24 +01:00
Christian Prochaska
9aa0de24af libc: implement '_spinlock()' and '_spinunlock()'
FreeBSD libc code uses only a single spinlock instance and, thus there
is no obvious reason why it would need to be implemented as an actual
spinlock. _spinlock() and _spinunlock() functions are implemented with a
static pthread mutex.

Issue #725
2023-11-28 14:24:23 +01:00
Christian Prochaska
94bbdbb71d libc: add ___pthread_cleanup_push/pop_imp aliases
Issue #725
2023-11-28 14:24:23 +01:00
Christian Prochaska
ebea6fb23f libc: use threaded mode
Issue #725
2023-11-28 14:24:23 +01:00
Alice Domage
6402182815 sntp_client: add DNS lookup option
This commit adds a new configuration option, `dst_addr` to the
'sntp_client' that accepts either an IP address or a DNS hostname. If a
DNS hostname is provided, the 'sntp_client' will resolve the IP address
before each SNTP request. The 'dst_ip' configuration option is
deprecated but kept for compatibility until 'dst_addr' is fully adopted.

xsd/net_types.xsd: add Net_address type
sntp_dummy_rtc: adjust configuration to use pool.ntp.org

Fixes genodelabs/genode#5003
2023-11-28 14:24:23 +01:00
Christian Helmuth
b634549722 depot: update recipe hashes 2023-10-25 14:01:40 +02:00
Alexander Boettcher
26be862e08 acpica: suppress pci related output during startup
Issue #4643
2023-10-25 08:58:53 +02:00
Johannes Schlatow
19ec0b2dd4 depot: add compat-libc to pkg/goa
Fixes genodelabs/genode#5030
2023-10-25 08:58:53 +02:00
Sebastian Sumpf
5261fe626d libc: support connect(..AF_UNSPEC..) on UDP sockets
A 'connect' with AF_UNSPEC dissolves address association in order to
re-connect to another address.

Issue #5031
2023-10-25 08:58:53 +02:00
Josef Söntgen
cf43e0c3da libdrm/lima: always map BO with ID 1 2023-10-25 08:58:53 +02:00
Sebastian Sumpf
d49700f562 stdcxx: add another 'std::basic_ios' flavor 2023-10-25 08:58:53 +02:00
Alexander Boettcher
ab91750869 acpica: add option to select GPE usage
Mitigates the ACPI IRQ storm of T490s.

Issue #4643
2023-10-25 08:58:52 +02:00
Christian Helmuth
07c4b92335 depot: update recipe hashes 2023-10-04 13:22:08 +02:00
Alexander Boettcher
916bd88e5e base: extend PD session by system_control_cap
Per Affinity::Location a system control cap can be requested. The capability
provides an RPC interface to request and set Cpu_state, as provided by the
former Pd::managing_system(Cpu_state) method. Invocation of those system
control capabilities then *can* (see below) be executed on the desired CPU
as described by Affinity::Location.

The system control cap will be invalid for kernels that don't support
system_control/managing_system functionality at all.

The system control cap will be ever by the same, e.g. ignoring the
Affinity::Location parameter, if the used kernel doesn't support or doesn't
require the feature to execute the system control per CPU.

The commit is a preparation step to add guarded and selective x86 MSR
access per CPU.

Fixes #5009
2023-10-04 13:22:07 +02:00
Christian Prochaska
abc3c5f0df libc: stat: classify transactional files as character devices
Fixes #4981
2023-10-04 13:22:06 +02:00
Alexander Boettcher
264160797d qemu-usb/webcam: cache large allocation of libyuv 2023-10-04 13:22:06 +02:00
Alexander Boettcher
0d868515a5 libyuv: add support to overwrite default allocator
Internally libyuv uses malloc & free for short time dynamic memory
allocation during image transformation. The converted images are
such large, that the Libc allocator will create and destroy new Genode
dataspace per image.  In time sensitive code paths, the overhead can be
noticeable by the caller of the image transformation.
The patch adds the option to register callbacks in the libyuv library to
implement the image allocation by users of the library. They may implement
caching strategies to avoid the overhead, e.g. as seen with qemu-usb and
the webcam model.
2023-10-04 13:22:06 +02:00
Alexander Boettcher
63c5ec7390 qemu-usb: reduce overhead of capturing one picture
from 3 USB packet to 1 packet per picture. Set the maximal supported
payload to the size of one picture + the size of the required protocol
header.
2023-10-04 13:22:06 +02:00
Alexander Boettcher
385b37dca7 qemu-usb/webcam: close session after timeout
and not before. On Windows guest with more than 1 vCPU, the packets
seem to arrive and/or seem to be handled too late in the Webcam model.
An intermediate state, to due the late packet, has been used to decide to
close the Capture session too early.
2023-10-04 13:22:06 +02:00
Christian Helmuth
a7a7c56ad6 libc: silence "Warning: missing sysctl for [0][3]
The warning results from sysctlnametomib() that uses an undocumented
FreeBSD kernel interface we do not support.

Fixes #4673
2023-10-04 13:22:05 +02:00
Christian Helmuth
15d1beca1b Fix use-after-free warnings in test-libc 2023-10-04 13:22:05 +02:00
Benjamin Lamowski
37a6669e71 libc: add support for FreeBSDs KERN_ARND sysctl
Provide FreeBSDs KERN_ARND systemctl by calling getentropy().

To use it, configure an RNG via the `rng` libc runtime parameter.

Ref #4997
2023-09-29 12:21:04 +02:00
Benjamin Lamowski
aa5751b7fc libc: add more dummies for the Rust libc crate
Add dummies for pthread_set_name_np(),
posix_spawn_file_actions_addchdir_np() and
cpuset_getaffinity().

Ref #4997
2023-09-29 12:21:04 +02:00
Benjamin Lamowski
159c3d0606 compat_libc: add versioned symbols for lstat and readdir_r
Ref #4997
2023-09-29 12:21:04 +02:00
Sebastian Sumpf
2bb901e1e3 rpi: disable run scripts that use 'drivers_nic_rpi'
The 'drivers_nic_rpi' packet uses the 'usb_net_drv' which is currently not
supported by the virt_linux version.
2023-09-29 12:17:45 +02:00
Norman Feske
3ebb715c5c libports: use [build_artifacts] in run scripts
...except for the run scripts related to Qt and the NIC router.

Issue #4860
2023-09-29 12:17:45 +02:00
Christian Helmuth
41adf8d196 jitterentropy: clear memory in jent_zalloc() 2023-09-29 12:15:05 +02:00
Christian Helmuth
134a785fe0 depot: update recipe hashes 2023-08-24 11:01:40 +02:00
Benjamin Lamowski
9f7e47368f libports: transform compat-libc into a static library
Dynamically loading the `compat-libc` breaks `fork(2)` on Genode.

Switch `compat-libc` to a special api package that provides a source
file for statically linking the library, analogous to the `blit`
package. This also requires a quirk in Goa but should prevent breaking
`fork()` and removes the runtime and archive dependencies for Rust
packages using `compat-libc`.

Ref genodelabs/goa#61
2023-08-23 13:46:37 +02:00
Sebastian Sumpf
0a85964f91 libports: add 'compat-libc'
Implement FBSD_1.0 versions of libc functions ('stat', 'fstat'). The
functions are versioned with @FBSD_1.0, and therefore, will not clash
with libc during linking. However, to be called by our dynamic linker,
the library must be before libc in the NEEDED section of the binary
using it. This requires the lib to be in front of libc in the LIBS
variable. The library currently will call libc 'stat' and 'fstat' by
looking up the symbols via 'dlsym'.

Ref genodelabs/goa#61
2023-08-23 13:46:37 +02:00