Commit Graph

5002 Commits

Author SHA1 Message Date
Norman Feske
3315294f2d Deprecate Genode::config()
Issue #1959
2017-01-13 13:06:54 +01:00
Norman Feske
3d7b92ea50 Generalize ABI mechanism to shared objects
This patch make the ABI mechanism available to shared libraries other
than Genode's dynamic linker. It thereby allows us to introduce
intermediate ABIs at the granularity of shared libraries. This is useful
for slow-moving ABIs such as the libc's interface but it will also
become handy for the package management.

To implement the feature, the build system had to be streamlined a bit.
In particular, archive dependencies and shared-lib dependencies are now
handled separately, and the global list of 'SHARED_LIBS' is no more.
Now, the variable with the same name holds the per-target list of shared
libraries used by the target.
2017-01-13 13:06:54 +01:00
Norman Feske
eb6f7e74cc libports: add libc symbols 2017-01-13 13:06:54 +01:00
Norman Feske
39e2bbc0d4 tool/abi_symbols: normalize symbol order 2017-01-13 13:06:53 +01:00
Norman Feske
9745effc53 mk: remove obsolete PRG_LIBS variable 2017-01-13 13:06:53 +01:00
Norman Feske
a360452a10 base: remove platform.mk and syscall.mk
The purpose of those libraries is now covered by the kernel-specific
syscall-<kernel> libraries.
2017-01-13 13:06:53 +01:00
Sebastian Sumpf
dfae61c76d intel_fb: Fix dynamic linking issues
Fixes #2208
2017-01-13 13:06:52 +01:00
Dr. Florian M. Grätz
b2934c7aec Fix build on Ubuntu 16.10 for x86_64
Ubuntu provides position independent shared objects for libraries, e.g.,
libsdl1.2-dev. To appropriatly link it to Genode, the linker flag
'-no-pie' has to be added to the make file.
2017-01-13 13:06:52 +01:00
Norman Feske
4da52517c1 Simpify startup of dynamically linked binaries
This patch removes the component_entry_point library, which used to
proved a hook for the libc to intercept the call of the
'Component::construct' function. The mechansim has several shortcomings
(see the discussion in the associated issue) and was complex. So we
eventually discarded the approach in favor of the explicit handling of
the startup.

A regular Genode component provides a 'Component::construct' function,
which is determined by the dynamic linker via a symbol lookup.
For the time being, the dynamic linker falls back to looking up a 'main'
function if no 'Component::construct' function could be found.

The libc provides an implementation of 'Component::construct', which
sets up the libc's task handling and finally call the function
'Libc::Component::construct' from the context of the appllication task.
This function is expected to be provided by the libc-using application.
Consequently, Genode components that use the libc have to implement the
'Libc::Component::construct' function.

The new 'posix' library provides an implementation of
'Libc::Component::construct' that calls a main function. Hence, POSIX
programs that merely use the POSIX API merely have to add 'posix' to the
'LIBS' declaration in their 'target.mk' file. Their execution starts at
'main'.

Issue #2199
2017-01-13 13:06:52 +01:00
Martin Stein
8d521036fb IPv4: fix buggy ascii_to implementations
Ref #2193
2017-01-13 13:05:47 +01:00
Martin Stein
045a30865a NIC router: read Strings also with attribute_value
Ref #2193
2017-01-13 13:05:46 +01:00
Martin Stein
83040d7d86 OpenSSL x86_64: enable NIST 64-bit optimization
On a 64-bit system, enabling the OpenSSL NIST 64-bit optimization should
result in considerable speed improvements when using curves: NIST-P224,
NIST-P256, and NIST-P521. Additionally it avoids that Tor complains
about having an OpenSSL that lacks this feature.

Ref #2193
2017-01-13 13:05:46 +01:00
Martin Stein
cd708b24db IPv4: treat 0.0.0.0/0 as valid IPv4 prefix
0.0.0.0/x is now only seen as invalid if x > 0.

Ref #2193
2017-01-13 13:05:46 +01:00
Alexander Boettcher
604a8860de nova: avoid assertion during cross-cpu IPC
Fixes #2198
2017-01-13 13:05:46 +01:00
Alexander Boettcher
e3ca4de4d8 os: add testcase for bomb/init on several CPUs
Test case to trigger assertion as reported in #2198.
2017-01-13 13:05:45 +01:00
Sebastian Sumpf
6e14aa4364 ldso: mark functions used during self relocation
These functions are marked as always inline through the 'SELF_RELOC' macro. This
became necessary because on riscv functions calls are performed through the
global offset table, which is not initialized at this point.

Fixes #2203
2017-01-13 13:05:45 +01:00
Christian Helmuth
f2568856dd Hide implementation details in timeout framework
Fixes #2205
2017-01-13 13:05:45 +01:00
Norman Feske
a2a51985f2 tool: add -k (kernel) argument to autopilot
This commit adds support for testing multiple kernels within the same
build directory. In addition to the existing -p arguments, the new
version expects one or more -k arguments that denote the kernels to be
used for executing the specified run scripts.

Consequently, the autopilot executes the 3-dimensional matrix of
platforms x kernels x run scripts, e.g.,

  autopilot --force -p x86_32 -k nova -k okl4 -k sel4 -k linux -r log

Issue #2190
2017-01-13 13:05:44 +01:00
Norman Feske
253097314c Add unified build directories to create_builddir
This patch makes the benefit of the recently introduced unified Genode
ABI available to developers by enabling the use of multiple kernels from
within a single build directory. The create_builddir tool has gained a
new set of kernel-agnostic platform arguments such as x86_32, or panda.
Most build targets within directories are in principle compatible with
all kernels that support the selected hardware platform. To execute a
scenario via the run tool, one has to select the kernel to use by
setting the 'KERNEL' argument in the build configuration
(etc/build.conf). Alternatively, the 'KERNEL' can be specified as
command-line argument of the Genode build system, e.g.:

  make run/log KERNEL=nova

This allows us to easily switch from one kernel to another without
rebuilding any Genode component except for the very few kernel-specific
ones.

The new version of the 'create_builddir' tool is still compatible with
the old version. The old kernel-specific build directories can still be
created. However, those variants will eventually be removed.

Note that the commit removes the 'ports-foc' repository from the
generated 'build.conf' files. As this is only meaningful for 'foc',
I did not want to include it in the list of regular repositories (as
visible in a 'x86_32' build directory). Hence, the repository must
now be manually added in order to use L4Linux.

Issue #2190
2017-01-13 13:05:44 +01:00
Norman Feske
9ea4a491d6 ld: generate symbol map from base/lib/symbols/ld
This patch removes the manually maintained symbol map from the dynamic
linker. This way, the symbol map stays in sync with the ABI and - more
importantly - no longer uses wildcards. So the symbols exported by the
dynamic linker are strictly limited by the ABI.

Issue #2190
2016-12-23 16:53:17 +01:00
Christian Prochaska
5c186cdc1d qt5: fix download link
Fixes #2202
2016-12-23 16:52:10 +01:00
Martin Stein
346ce9ae0b nic_router.run: consider usb_drv and gpio_drv
Ref #2193
2016-12-23 16:52:10 +01:00
Martin Stein
591ed80dcf NIC router: hand-over XML nodes by value
Ref #2193
2016-12-23 16:52:10 +01:00
Martin Stein
eef18e1ecd net: introduce and apply Net::Port type
Thereby fix bug in the NIC router that previously used uint8_t values for ports in
some places.

Ref #2193
2016-12-23 16:52:10 +01:00
Martin Stein
27cc0a402a NIC router: descriptive error on missing interface
Previously, if a packet should be routed to a domain that had no interface
connected, the NIC router only printed "Unroutable packet". Technically,
this was wrong as an unavailable interface doesn't mean that the routing
failed. Now it gives an error "no interface connected to domain".

Ref #2193
2016-12-23 16:52:10 +01:00
Martin Stein
524f330218 nic_router.run: do not require FOC
Because the LWIP HTTP client doesn't require FOC anymore.

Ref #2193
2016-12-23 16:52:10 +01:00
Martin Stein
28153ad8ef LWIP HTTP client: do not require FOC
We don't know why this component requires FOC anymore and it seems to be fine with other
platforms at well.

Ref #2193
2016-12-23 16:52:09 +01:00
Sebastian Sumpf
ff0f1ebafc os: adapt pci test to component API
* also add pci.run

Fixes #2201
2016-12-23 16:52:09 +01:00
Alexander Boettcher
be5ae4dffa mention PIT in x86 platform_driver README
Issue #1578
2016-12-23 16:52:09 +01:00
Christian Prochaska
31e0ee2c88 gdb_monitor: increase RAM quota in run scripts
Fixes #2186
2016-12-23 16:52:09 +01:00
Alexander Boettcher
3e0aeab89e intel_fb: avoid heap warning
Fixes #2168
2016-12-23 16:52:09 +01:00
Norman Feske
1e41c2dbe9 Remove redundant boot modules from boot image
Fixes #2185
2016-12-23 16:52:09 +01:00
Christian Prochaska
f89b63ef87 qt5: qt5_drivers.inc fixes
- make start of the 'nic_drv' component depend on driver specs
- make start of the 'input_merger' component depend on the 'Input' feature

Fixes #2174
2016-12-23 16:52:09 +01:00
Christian Prochaska
2c3009b2ed qt5_avplay: show the main window earlier
The main window must be visible before avplay or a framebuffer filter
requests the framebuffer session which goes to Nitpicker, because the
parent view of the new Nitpicker view is part of the
QNitpickerPlatformWindow object, which is created when the main window
becomes visible. If this object does not exist yet, a page fault occurs.

Fixes #2187
2016-12-23 16:52:08 +01:00
Christian Prochaska
0d9e566b18 wm: fix possible deadlock
Fixes #2183
2016-12-23 16:52:08 +01:00
Emery Hemingway
088bf52be1 drivers/framebuffer/sdl: emulate a 60Hz sampling rate
Set timer signaling only if a valid signal context is registered.

Ref #2192
2016-12-23 16:52:08 +01:00
Emery Hemingway
98cb37b9e4 drivers/timer: do not submit signals for invalid contexts
Setting a timer signal handler with an invalid capability cancels
signaling and any periodic timeout.

Fix #2192
2016-12-23 16:52:08 +01:00
Norman Feske
0d295f75a1 base: apply routing policy to environment sessions
This patch changes the child-construction procedure to allow the routing
of environment sessions to arbitrary servers, not only to the parent.
In particular, it restores the ability to route the LOG session of the
child to a LOG service provided by a child of init. In principle, it
becomes possible to also route the immediate child's PD, CPU, and RAM
environment sessions in arbitrary ways, which simplifies scenarios that
intercept those sessions, e.g., the CPU sampler.

Note that the latter ability should be used with great caution because
init needs to interact with these sessions to create/destruct the child.
Normally, the sessions are provided by the parent. So init is safe at
all times. If they are routed to a child however, init will naturally
become dependent on this particular child. For the LOG session, this is
actually not a problem because even though the parent creates the LOG
session as part of the child's environment, it never interacts with the
session directly.

Fixes #2197
2016-12-23 16:52:08 +01:00
Norman Feske
c450ddcb3d Disambiguate kernel-specific file names
This patch removes possible ambiguities with respect to the naming of
kernel-dependent binaries and libraries. It also removes the use of
kernel-specific global side effects from the build system. The reach of
kernel-specific peculiarities has thereby become limited to the actual
users of the respective 'syscall-<kernel>' libraries.

Kernel-specific build artifacts are no longer generated at magic places
within the build directory (like okl4's includes, or the L4 build
directories of L4/Fiasco and Fiasco.OC, or the build directories of
various kernels). Instead, such artifacts have been largely moved to the
libcache. E.g., the former '<build-dir>/l4/' build directory for the L4
build system resides at '<build-dir>/var/libcache/syscall-foc/build/'.
This way, the location is unique to the kernel. Note that various tools
are still generated somewhat arbitrarily under '<build-dir>/tool/' as
there is no proper formalism for building host tools yet.

As the result of this work, it has become possible to use a joint Genode
build directory that is usable with all kernels of a given hardware
platform. E.g., on x86_32, one can now seamlessly switch between linux,
nova, sel4, okl4, fiasco, foc, and pistachio without rebuilding any
components except for core, the kernel, the dynamic linker, and the timer
driver. At the current stage, such a build directory must still be
created manually. A change of the 'create_builddir' tool will follow to
make this feature easily available.

This patch also simplifies various 'run/boot_dir' plugins by removing
the option for an externally hosted kernel. This option remained unused
for many years now.

Issue #2190
2016-12-23 16:51:32 +01:00
Norman Feske
3865ee7ccc foc: move base/thread_state.h to include/foc/
The header is foc-specific. It used to shadow the generic one provided
by the base repository, which contradicts with the kernel-agnostic
Genode API. Hence, it had to be moved to a foc-specific location.
2016-12-23 16:51:12 +01:00
Norman Feske
44df8db771 Disambiguate names of timer drivers
Issue #2190
2016-12-23 16:50:33 +01:00
Norman Feske
f54c85e045 Genode application binary interface (ABI)
This patch decouples the kernel-specific implementation of the dynamic
linker from its kernel-agnostic binary interface. The name of the
kernel-specific dynamic linker binary now corresponds to the kernel,
e.g., 'ld-linux.lib.so' or 'ld-nova.lib.so'. Applications are no longer
linked directly against a concrete instance of the dynamic linker but
against a shallow stub called 'ld.lib.so'. This stub contains nothing
but the symbols provided by the dynamic linker. It thereby represents
the Genode ABI.

At system-integration time, the kernel-specific run/boot_dir back ends
integrate the matching the kernel-specific variant of the dynamic linker
as 'ld.lib.so' into the boot image.

The ABI symbol file for the dynamic linker is located at
'base/lib/symbols/ld'. It contains the joint ABI of all supported
architectures. The new utility 'tool/abi_symbols' eases the creation of
such an ABI symbol file for a given shared library. Its result should be
manually inspected and edited as needed.

The patch removes the 'syscall' library from 'base_libs.mk' to avoid
polluting the kernel-agnostic ABI with kernel-specific interfaces.

Issue #2190
Issue #2195
2016-12-23 16:50:28 +01:00
Alexander Boettcher
9b397b0321 vbox: adjust vbox_pointer policy to be working
vbox_pointer parses for 'label' and has no understanding of 'label_prefix'
2016-12-14 11:22:30 +01:00
Alexander Boettcher
e4a1904456 core: fix deadlock in region_map destruction
Introduced by:

commit 99fbb23ec5
Author: Alexander Boettcher <alexander.boettcher@genode-labs.com>
Date:   Fri Sep 9 17:49:34 2016 +0200

    core: use weak_ptr for Rm_faulter and Region_map

    Issue #2086
2016-12-14 11:22:30 +01:00
Alexander Boettcher
d8f2610e9c bomb: drop sleep_forever and signal_receiver 2016-12-14 11:22:29 +01:00
Alexander Boettcher
f613cd2aa9 nova: remove native_cpu interface
Issue #2173
2016-12-14 11:22:29 +01:00
Alexander Boettcher
e93ef168a1 nova: use async. map for thread/pd bootstrap
Fixes #2173
2016-12-14 11:22:29 +01:00
Christian Prochaska
5a72738def qoost: call 'select_from_ports' in qoost.mk
'select_from_ports' must be called to detect a missing port.

Fixes #2189
2016-12-14 11:22:28 +01:00
Norman Feske
dda054aa27 os: fix null termination in fb connection 2016-12-14 11:22:28 +01:00
Norman Feske
4475ac10d6 noux: reduce stack usage
By not placing the sysio buffer (16 KiB) on the stack, we can call
'noux_syscall' from the initial thread. This is needed to issue fork
from the suspend callback, which is executed by the initial thread.
2016-12-14 11:22:28 +01:00