Commit Graph

482 Commits

Author SHA1 Message Date
Norman Feske
b3727a9b46 Add missing override annotations
Issue #3159
2019-02-19 11:12:11 +01:00
Norman Feske
aa66b5d62f base: remove dependency from deprecated APIs
This patch adjusts the implementation of the base library and core such
that the code no longer relies on deprecated APIs except for very few
cases, mainly to keep those deprecated APIs in tact for now.

The most prominent changes are:

- Removing the use of base/printf.h

- Removing of the log backend for printf. The 'Console' with the
  format-string parser is still there along with 'snprintf.h' because
  the latter is still used at a few places, most prominently the
  'Connection' classes.

- Removing the notion of a RAM session, which does not exist in
  Genode anymore. Still the types were preserved (by typedefs to
  PD session) to keep up compatibility. But this transition should
  come to an end now.

- Slight rennovation of core's tracing service, e.g., the use of an
  Attached_dataspace as the Argument_buffer.

- Reducing the reliance on global accessors like deprecated_env() or
  core_env(). Still there is a longish way to go to eliminate all such
  calls. A useful pattern (or at least a stop-gap solution) is to
  pass the 'Env' to the individual compilation units via init functions.

- Avoiding the use of the old 'Child_policy::resolve_session_request'
  interface that returned a 'Service' instead of a 'Route'.

Issue #1987
2019-02-19 11:08:17 +01:00
Alexander Boettcher
6bb145bdd8 Remove virtualbox 4 vmm
Fixes #3141
2019-02-19 11:08:17 +01:00
Josef Söntgen
3ada4f4733 noux: increase argv buffer to 16KiB
And most importantly: use the same size everywhere.

Note, this commit also configures the stack size of noux-process threads
to 64 KiB independently of the CPU architecture. The reason is the
increased stack usage because of the additional argument space in
Execve_child_env in syscall(SYSCALL_EXECVE), which crafts a child
environment on stack for the creation of the new child.

Fixes #3145.
2019-02-12 10:33:16 +01:00
Christian Helmuth
afc95e36e1 netperf: 'times_up' mechanism based on pthread 2019-02-12 10:33:16 +01:00
Norman Feske
6b289a1423 base/core: use references instead of pointers
This patch replaces the former prominent use of pointers by references
wherever feasible. This has the following benefits:

* The contract between caller and callee becomes more obvious. When
  passing a reference, the contract says that the argument cannot be
  a null pointer. The caller is responsible to ensure that. Therefore,
  the use of reference eliminates the need to add defensive null-pointer
  checks at the callee site, which sometimes merely exist to be on the
  safe side. The bottom line is that the code becomes easier to follow.

* Reference members must be initialized via an object initializer,
  which promotes a programming style that avoids intermediate object-
  construction states. Within core, there are still a few pointers
  as member variables left though. E.g., caused by the late association
  of 'Platform_thread' objects with their 'Platform_pd' objects.

* If no pointers are present as member variables, we don't need to
  manually provide declarations of a private copy constructor and
  an assignment operator to avoid -Weffc++ errors "class ... has
  pointer data members [-Werror=effc++]".

This patch also changes a few system bindings on NOVA and Fiasco.OC,
e.g., the return value of the global 'cap_map' accessor has become a
reference. Hence, the patch touches a few places outside of core.

Fixes #3135
2019-02-12 10:33:13 +01:00
Christian Prochaska
210fbcc4c2 gdb_monitor: fix possible page fault on thread removal
Fixes #3133
2019-01-30 13:54:54 +01:00
Christian Helmuth
87c9186efd ports: enable basic clock support in tclsh 2019-01-30 13:54:53 +01:00
Norman Feske
6b94e65a95 os: avoid using deprecated APIs
Issue #1987
Issue #3125
2019-01-30 13:49:54 +01:00
Norman Feske
cb36d96569 netperf: remove mechanism to update 'times_up'
The mechanism relied on deprecated Genode APIs. To revive the mechanism,
we could use pthread_create.
2019-01-30 13:49:54 +01:00
Norman Feske
486e534df0 gdb_monitor: remove use of deprecated APIs
Issue #1987
2019-01-30 13:49:54 +01:00
Norman Feske
98a75b1a78 noux: remove use of deprecated APIs
Issue #1987
2019-01-30 13:49:54 +01:00
Norman Feske
3da6aab353 noux: enable strict warnings 2019-01-30 13:35:29 +01:00
Norman Feske
e889c58bbc noux: remove dependency from alarm library
Fixes #3123
2019-01-30 13:35:29 +01:00
Norman Feske
bf62d6b896 Move timer from os to base repository
Since the timer and timeout handling is part of the base library (the
dynamic linker), it belongs to the base repository.

Besides moving the timer and its related infrastructure (alarm, timeout
libs, tests) to the base repository, this patch also moves the timer
from the 'drivers' subdirectory directly to 'src' and disamibuates the
timer's build locations for the various kernels. Otherwise the different
timer implementations could interfere with each other when using one
build directory with multiple kernels.

Note that this patch changes the include paths for the former os/timer,
os/alarm.h, os/duration.h, and os/timed_semaphore.h to base/.

Issue #3101
2019-01-14 12:33:57 +01:00
Norman Feske
48aed0ea46 Move Dosbox to genode-world
Fixes #3099
2019-01-07 12:43:37 +01:00
Josef Söntgen
c43723abdd ports: update lighttpd to 1.4.52
In addition enable TLS.

Fixes #3069.
2019-01-07 12:33:55 +01:00
Sebastian Sumpf
8015dbe8b7 Move OpenJDK to the Genode world repository
This reverts commit 58fb5ed722.

fixes #3060
2018-11-29 11:54:30 +01:00
7a11384177 Merge pthread into libc library
The pthread API is considered a standard feature of libc so better to
simply merge it with the libc. Pthreads are in fact already a part of
the libc in the form of weak symbols. This merger is also a prerequisite
for better integrating pthreads with the libc I/O task.

Fix #3054
2018-11-29 11:46:01 +01:00
18e855e4d5 Genode toolchain depot package
Fix #3028
2018-11-27 11:38:13 +01:00
Alexander Boettcher
5446c52c43 base: make Entrypoint placeable on specific cpu
Fixes #3008
2018-10-29 09:36:22 +01:00
Alexander Boettcher
142d503cb4 vbox5: disable assertions in recipe vbox5-nova
Issue #2984
2018-09-20 09:07:31 +02:00
Christian Prochaska
090ba0e235 arora: call main function from dedicated thread
The Arora main thread sometimes blocks on a pthread condition variable,
which prevents Genode signal processing with the current implementation.
This is especially a problem when the thread who could unblock the main
thread calls 'Libc::suspend()'.

As a workaround until the pthread locking mechanisms get adapted to the
Genode libc execution model, the Arora main function can be called from
a dedicated thread.

Fixes #2978
2018-09-13 15:21:12 +02:00
86ee1b7448 Noux: close stdio at exit
Close the stdin, stdout, and stderr I/O channels at child exit. This
serves to flush buffers at the I/O resources which might not be written
otherwise.

Ref #2919
2018-09-13 15:21:12 +02:00
fcbe060096 Remove legacy lwIP plugins
Now that the lwIP VFS plugin has become a first class IP stack it is
time to remove the lwIP 1.x library and the associated libc plugins.

Fix #2958
2018-09-05 11:04:22 +02:00
1370fa7631 Remove Noux networking support
Noux networking is not well tested and not in practical use. It also
uses a number of deprecated libraries.

Ref #2535
Fix #2955
2018-09-05 11:04:21 +02:00
Christian Prochaska
ecc4ac795a tool_chain: fix build problems on Ubuntu 18.04
Fixes #2939
2018-08-30 09:24:46 +02:00
Alexander Boettcher
0ee0844c59 vbox5: revoke VM memory during VM reset
Avoids reboot issues seen with Windows VMs.

Fixes #2946
2018-08-28 17:10:58 +02:00
Alexander Boettcher
237f6a6a62 nova: provide microcode data via platform_info
Issue #2762
2018-08-28 16:46:05 +02:00
Emery Hemingway
d9a4773194 LwIP VFS plugin
This patch reintroduces the LwIP stack to libc as a VFS plugin
implementing the socket_fs interface. Rather than use LwIP's socket
emulation layer this plugin interfaces directly to LwIP raw API and is
single threaded.

The internal TCP parameters of the stack are untuned.

Fix #2050
Fix #2335
2018-08-02 14:36:48 +02:00
Sebastian Sumpf
0ed2ef230b vbox5: fix self-programming timer in XHCI model
A timer should set itslef not pending before calling the timout handler.
This is important for timeout handler that program the timeout again.

issue #2910
2018-08-02 14:36:46 +02:00
Christian Prochaska
e3005266b6 vfs: no 'handle_io_response()' in regular VFS functions
Calling 'handle_io_response()' in a regular VFS function (in contrast to a
post-signal hook) can cause problems if the caller of the VFS function holds
a lock which prevents the io response handler from returning.

With this commit, the user of the VFS becomes responsible for unblocking
threads which might be blocking after a failed 'queue_read()', 'queue_sync()'
or 'write()' call.

Fixes #2896
2018-08-02 14:36:43 +02:00
Norman Feske
6045277cca noux: fix compile warning 2018-08-02 14:36:38 +02:00
Norman Feske
4b46abf813 base: rm first-class support for static binaries
This patch removes the detection of statically linked executables from
the base framework. It thereby fixes the corner cases encountered with
Sculpt when obtaining the binaries of the runtime from the depot_rom
service that is hosted within the runtime.

Statically linked binaries and hybrid Linux/Genode (lx_hybrid) binaries
can still be started by relabeling the ROM-session route of "ld.lib.so"
to the binary name, pretending that the binary is the dynamic linker.
This can be achieved via init's label rewriting mechanism:

  <route>
    <service name="ROM" unscoped_label="ld.lib.so">
      <parent label="test-platform"/> </service>
  </route>

However, as this is quite cryptic and would need to be applied for all
lx_hybrid components, the patch adds a shortcut to init's configuration.
One can simply add the 'ld="no"' attribute to the <start> node of the
corresponding component:

  <start name="test-platform" ld="no"/>

Fixes #2866
2018-08-02 14:36:38 +02:00
Christian Prochaska
32d41388e2 pthread: 'pthread_join()' improvements
Make pthread_join() work in more situations and support passing the thread
return value.

Fixes #2892
2018-08-02 14:36:34 +02:00
Norman Feske
170507a85c bash: support home and end keys
This commit contains a patch of bash's built-in default escape sequences
to match the 'screen' terminal as used by Genode's terminal component.

Fixes #2705
2018-07-03 10:44:55 +02:00
Christian Prochaska
182d1d339b vbox5: print error messages in 'VirtualBoxBase::handleUnexpectedExceptions()'
Fixes #2879
2018-07-03 09:39:31 +02:00
Josef Söntgen
74dcc7a3d5 libc: use socket fs for DNS information
The libc will now use the file given by the 'nameserver_file' attribute
to get the DNS nameserver address instead of reading '/etc/resolv.conf'.
It defaults to '/socket/nameserver' which is the common location when
using the lxip VFS plugin. As a constraint the libc will read the first
line and expects the nameserver address without any keywords in front of
it.

Fixes #2861.
2018-06-29 10:44:55 +02:00
Norman Feske
7791937e84 init: reduce report latency for resource requests
In contrast to most information of init's state reports, which can be
monitored at a relatively low rate (like 2 seconds in Sculpt's runtime),
resource requests call for an immediate response by the consumer of the
report. Otherwise the requesting child stays unnecessarily blocked until
the next rate-limited state report is due. This patch adds a fast lane
for such low-latency state updates to init.
2018-06-12 12:11:38 +02:00
Alexander Boettcher
2755772478 vbox5: update to 5.1.38
Issue #2847
2018-05-31 17:12:44 +02:00
Alexander Boettcher
e087d6ad19 vbox5: quirk microcode patch attempts by guests
Fixes #2847
2018-05-31 17:12:25 +02:00
Norman Feske
f390543550 e2fsprogs: disarm mount-point checks
On Noux, these checks are not needed because there is no notion of mount
points.
2018-05-30 13:36:29 +02:00
Norman Feske
ad40e71fdf e2fsprogs-minimal: add resize2fs 2018-05-30 13:36:28 +02:00
Alexander Boettcher
e6d20aba93 base: support to attach RAM dataspaces readonly
Fixes #1633
2018-05-30 13:36:27 +02:00
Norman Feske
44a6e51114 noux: respond to terminal-close event 2018-05-30 13:36:23 +02:00
e36ddaf659 Rename lwip library to lwip_legacy
Rename LwIP library in preparation for removal of LwIP libc plugin. The
current LwIP library will be replaced with a new version stripped of its
synchronous socket support. The next version will be incompatible with
the current, so removing 'lwip.lib.so' completely for a period makes it
easy to identify legacy users.

Fix #2797
2018-05-30 13:36:22 +02:00
Christian Prochaska
f4cfa0ca43 vbox5: remove 'force_ioapic' code
Fixes #2806
2018-05-30 13:36:15 +02:00
Sebastian Sumpf
58fb5ed722 jdk: OpenJDK for Genode
OpenJDK version 9 for Genode, contains the interpreter version of the
HotSpot virtual machine.

fixes #2791
2018-05-30 13:36:07 +02:00
Sebastian Sumpf
df3e4edd76 vbox: adjust to 'pthread_attr' removal in pthread
issue #2791
2018-05-30 13:36:05 +02:00
Christian Prochaska
f347cb90f1 depot: qt5 recipes
Fixes #2792
2018-05-30 12:26:19 +02:00