Commit Graph

547 Commits

Author SHA1 Message Date
Sebastian Sumpf 309bc2083e vbox5: raise rrtimer priority
Make sure timers run at the same priority as component threads, otherwise
no timer progress can be made. See 'rtTimeNanoTSInternalRef' (timesupref.h)
and 'rtTimerLRThread' (timerlr-generic.cpp).
2019-11-22 13:33:15 +01:00
Norman Feske 573b6d3345 noux: fix condition for mtime update
This is a follow-up patch for "noux: don't update mtimes for read-only
files". It eliminates warning messages during Sculpt's prepare step when
'cp' tries to update the mtimes of the source files.
2019-11-21 16:21:19 +01:00
Norman Feske 3ac970ac1d Streamline Timestamp::INVALID values
This is a follow-up patch for issue #1784 that solves two
inconsistencies.

- The Vfs::Timestamp::INVALID matches File_system::Timestamp::INVALID
- The Noux libc plugin tests for Timestamp::INVALID instead of a
  positive value.

The patch fixes the mtime info as shown in directory listings in
Sculpt's inspect window.
2019-11-21 14:26:27 +01:00
Alexander Boettcher cb61a28362 vbox5: use with_libc when call-in into vbox code
required due to pthreads becoming/are an integral part of the libc now.
Commit avoids libc error:

Error: libc suspend() called from non-user context (0xaf5c784) - aborting

Issue #3550
2019-11-19 14:54:14 +01:00
Christian Helmuth 6410e88698 netperf: handle EPIPE / silence warnings
This is an intermediate fix to handle sends to sockets shut down by the
peer already. A final fix in the libc would add support for the
MSG_NOSIGNAL send flag, generate SIGPIPE, and return the expected EINTR.
Then this patch is no longer required.

This commit also drops the obsolete patch for missing
sysconf(_SC_NPROCESSORS_ONLN), which is now part of libc.
2019-11-19 14:54:13 +01:00
Norman Feske 1485cd9d24 noux: don't update mtimes for read-only files
The VFS server as reworked in issue #3547 responds to such an attempt
with a failure as acknowledgement, triggering the client-side error
"Error: packet operation=2 failed" at noux.
2019-11-19 14:54:13 +01:00
Sebastian Sumpf f23eab735b ports: binutils target for ARMv8
issue #3537
2019-11-19 14:45:39 +01:00
Sebastian Sumpf 112c32eb54 ports: noux-pkg/gcc_arm_64
Added ARMv8 as a native gcc target. This requires a rebuild of the tool
chain.

issue #3537
2019-11-19 14:45:39 +01:00
Josef Söntgen 60f390ddf8 noux: prevent accessing invalid leaf path in open
Fixes #3542.
2019-11-19 14:44:02 +01:00
Josef Söntgen c79ebc93a2 libc_noux: try read again on EAGAIN/EINTR
Issue #3541.
2019-11-19 14:44:02 +01:00
Josef Söntgen 55ab694d79 libc_noux: leave write loop on error
Fixes #3541.
2019-11-19 14:44:02 +01:00
Josef Söntgen ba9b612c4f libc_noux: close fd on failed O_TRUNC attempt
Fixes #3524.
2019-11-19 14:44:02 +01:00
Oleg Girko c589660182 Replace ENV make variable with MKENV.
ENV variable conflicts with Environment Modules.

Signed-off-by: Oleg Girko <ol@infoserver.lv>

Fixes #3535
2019-11-19 14:42:23 +01:00
Christian Helmuth b622a5a788 vbox: use RTThreadCreate for periodic_gip thread
This prevents the following error message.

  [init -> vbox1] Error: pthread_self() called from alien thread named 'periodic_gip'
2019-11-19 14:42:23 +01:00
Norman Feske 5ab1505d43 file system: enhanced file status info
This patch extends the 'File_system::Status',
'File_system::Directory_entry', and the related 'Vfs' types with
the following additional information:

- Distinction between continuous and transactional files (Node_type)
  (issue #3507)
- Readable, writeable, and executable attributes (Node_rwx),
  replacing the former 'mode' bits
  (issue #3030)

The types 'Node_rwx', 'Node_type' are defined twice,
once for the VFS (vfs/types.h) and once for the 'File_system'
session (file_system_session/file_system_session.h).
Similarly, there is a direct correspondance between
'Vfs::Directory_service::Dirent' and 'File_system::Directory_entry'.

This duplication of types follows the existing pattern of keeping the
VFS and file-system session independent from each other.
2019-11-19 14:23:56 +01:00
Alexander Boettcher ed73feddc5 vbox5: react on host size changes immediately
The guest may take some time to adjust nevertheless.

Fixes #3498
2019-11-19 14:23:55 +01:00
Josef Söntgen 94b63924ed noux: add time modification
... and set initial time by using RTC session.

Up to now Noux used a monotic clock whose initial start value always
was '0' (which correlates to the start of the UNIX epoch) to provide
a notion of time. In addition it is now possible to use the RTC
session to set the initial value for use cases where having a proper
real-world time matters.

To use the RTC session the 'rtc' attribute of the '<config>' node
must be set to 'yes'. Thereby the session becomes a mandatory
dependency as Noux will not start without it.

Issue #1784
2019-11-19 14:17:30 +01:00
Norman Feske bf92232698 libc: split task.cc into multiple files
This patch is the first step of re-organizing the internal structure of
the libc. The original version involved many direct calls of global
functions (often with side effects) across compilation units, which
made the control flow (e.g., the initialization sequence) hard to
follow.

The new version replaces those ad-hoc interactions with dedicated
interfaces (like suspend.h, resume.h, select.h, current_time.h). The
underlying facilities are provided by the central Libc::Kernel and
selectively propagated to the various compilation units. The latter is
done by a sequence of 'init_*' calls, which eventually will be replaced
by constructor calls.

The addition of new headers increases the chance for name clashes with
existing (public) headers. To disambiguate libc-internal header files
from public headers, this patch moves the former into a new 'internal/'
subdirectory. This makes the include directives easier to follow and the
libc's source-tree structure more tidy.

There are still a few legacies left, which cannot easily be removed
right now (e.g., because noux relies on them). However, the patch moves
those bad apples to legacy.h and legacy.cc, which highlights the
deprecation of those functions.

Issue #3497
2019-11-19 14:10:55 +01:00
Christian Prochaska ab017607a2 tool chain: TLS support
Fixes #3418
2019-09-02 16:29:33 +02:00
Norman Feske 6894ced63b libc: execve
This patch implements 'execve' in Genode's libc.

The mechanism relies on the dynamic linker's ability to replace the
loaded binary while keeping crucial libraries - in particular the libc -
intact. The state outside the libc is wiped. For this reason, all libc
internal state needed beyond the 'execve' call must be allocated on a
heap separate from the application-owned malloc heap. E.g.,
libc-internal file-descriptor objects must not be allocated or refer to
any memory object allocated from the malloc heap.

Issue #3481
2019-08-28 14:19:45 +02:00
Sebastian Sumpf 4c14af4d8a noux-pkg: enable noux packages for ARMv8
* add -fPIC
* disable 'stdbuf' for coreutils
* works for bash as well
2019-08-28 14:18:45 +02:00
Norman Feske 581785a48f Extend fork test
This patch extends the fork test with explicit checks for the cloned
content of the heap and RW segment as well as the seek position of an
open file descriptor. It adds the new libports/run/fork.run script
that exercises the fork mechanism implemented by the libc. It is based
on noux_fork.run, which tests the mechansim provided by noux. The
test program has been moved from ports to libports.

Issue #3478
2019-08-28 14:18:44 +02:00
Norman Feske ff07654560 noux: rm explicit dependency from libc_noux.lib.so
Issue #3472
2019-08-21 12:37:01 +02:00
Norman Feske 695a212877 noux: preload libc_noux.lib.so for noux processes
Issue #3472
2019-08-21 12:37:01 +02:00
Christian Prochaska 3acb509b9e vbox: add 'RTMemDupExTag()' implementation
Fixes #3473
2019-08-21 12:37:00 +02:00
Norman Feske d1da5b9e16 libc_noux: override __libc_sigaction
This is a follow-up commit to the libc update. The FreeBSD
implementation of sigset or sigaction calls the __libc_sigaction now.

The patch fixes the SIGWINCH handling for Vim when interactively
resizing the terminal window.

Fixes #3424
2019-07-09 08:58:38 +02:00
Alexander Boettcher 7ec37b2d8d vbox5: adjust to run with Fiasco.OC
- use priorities solely with nova
- handle exceptions during vCPU creation
- avoid assertion in vga_vbda
- silence compiler warnings about outdated register keyword

Issue #3111
2019-06-13 12:22:49 +02:00
Ehmry - dc8a2ec523 Remove libc_terminal
Fix #3378
2019-06-13 12:13:40 +02:00
Alexander Boettcher b3a9ad2215 vbox5: fpu support via new vm_session
Issue #3111
2019-05-29 10:20:52 +02:00
Alexander Boettcher 5673c163fb vbox5: use vm_session interface
Issue #3111
2019-05-29 10:20:52 +02:00
Alexander Boettcher 753e78d122 seoul: adjust to g++ 8.3.0
Issue #3307
2019-05-27 14:52:52 +02:00
Christian Prochaska 7fadfbbd9f Treat 'implicit fallthrough' errors as warnings
After fixing the warnings, the compiler option should be removed.

Issue #3307
2019-05-27 14:52:52 +02:00
Stefan Kalkowski fc922d263c tool_chain: add aarch64 compiler target
Ref #3260
2019-05-27 14:52:51 +02:00
Sebastian Sumpf 36f90e57f3 riscv: tool chain 19.05
issue #3273
2019-05-27 14:52:51 +02:00
Christian Prochaska f369da741d tool_chain: update GDB to version 8.2.1
Issue #3307
2019-05-27 14:52:51 +02:00
Christian Prochaska 1720d2d86d tool_chain: update GCC to version 8.3.0
Issue #3307
2019-05-27 14:46:54 +02:00
Christian Prochaska 96ed3c8db0 tool_chain: update binutils to version 2.32
Issue #3307
2019-05-27 14:46:54 +02:00
Christian Helmuth 6db43d2c19 libc_noux target depends on POSIX runtime
This prevents

  error copying "bin/libm.lib.so": no such file or directory
  error copying "bin/posix.lib.so": no such file or directory

when running "make run/noux" from an empty build directory.
2019-05-27 14:46:54 +02:00
Christian Prochaska c9b5dcafbd vbox: save FPU state in 'EPT violation' exit handler
Fixes #3359
2019-05-27 14:46:54 +02:00
Christian Prochaska f596595c98 vbox: use 'Abi::stack_align()' for exit handler stack
This ensures proper stack alignment for FPU instructions on x86_64.

Fixes #3358
2019-05-27 14:46:53 +02:00
Christian Prochaska 9923a1bf50 ports: fix 'seoul' compile errors with GCC 8.3.0
Fixes #3352
2019-05-27 14:46:53 +02:00
Ehmry - 863654d188 Libc: update port to Freebsd 12
Fix #3289
2019-05-27 14:46:53 +02:00
Christian Prochaska 05a382b1a8 ports: fix 'noux' compile error with GCC 8.3.0
Fixes #3348
2019-05-27 14:46:53 +02:00
Alexander Boettcher 70e0514a02 seoul: handle late timeouts
either
- due to poor signal performance of base platform
- due to being to less prioritized
- due to schedule overload
- due to using time sources of different physical CPUs

Issue #3111
2019-05-16 13:11:02 +02:00
Christian Prochaska 739317a83f noux: support non-blocking pipes
Needed for 'noux_gdb.run' with newer gdb versions.

Fixes #3319
2019-05-16 13:11:00 +02:00
Alexander Boettcher b3f288c035 seoul: avoid corrupted cr0 and GP on debug wrmsr
- fix bug in instruction emulator on clts - mark cr0 as changed
- don't cause GP on debug control wrmsr

Issue #3111
2019-05-16 13:11:00 +02:00
Christian Prochaska c0f03a28e9 gdb_monitor: use terminal VFS plugin
... instead of the deprecated libc terminal plugin.

Fixes #3318
2019-05-16 13:11:00 +02:00
Stefan Kalkowski c767f6ccf1 os: explicit cache policy in Nic::Session_component
To enable the use of uncached DMA buffers as RX and TX communication
buffers in between driver (service) and client, introduce a cache
attribute in the constructor of Nic::Session_component

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

Fixes #3208
2019-05-06 16:15:26 +02:00
Alexander Boettcher cc64c43758 vm_session: adjustments to work with seoul vmm
for foc, nova, sel4

Issue #3111
2019-05-06 16:15:26 +02:00