Commit Graph

3002 Commits

Author SHA1 Message Date
Norman Feske 962c853e67 hw: rename bootstrap.o to bootstrap-hw.o
In order to deliver base-hw as a binary archive, we need to install the
bootstap.o file to bin/. Since bin/ is a global name space shared by all
kernels, this patch renames the object file to bootstap-hw.o and thereby
clarifies the association of the file with base-hw.
2017-05-31 13:15:56 +02:00
Christian Helmuth f59a5ef258 foc, fiasco: ensure build fails if port build fails 2017-05-31 13:15:55 +02:00
Norman Feske cd5a03758f base: fix bool retval check in heap
Thanks to gcc 6.3 for reporting!
2017-05-31 13:15:55 +02:00
Norman Feske 11aadd4ce8 base: fix gcc-6.3 warning (check null ref)
The check that triggers the warning was solely in place for diagnostic
purposes. We can remove it.
2017-05-31 13:15:55 +02:00
Alexander Boettcher 1220a06c3b platform_drv: avoid gcc 6 warnings 2017-05-31 13:15:55 +02:00
Alexander Boettcher d8f60a8ea1 vbox: increase initial static memory buffer
due to changes in #1987 pthread/malloc the initial allocations are done
via malloc
2017-05-31 13:15:55 +02:00
Alexander Boettcher f52eec5af7 intel_fb: avoid deprecated warnings
Issue #1987
2017-05-31 13:15:55 +02:00
Alexander Boettcher de20d9010b liquid_framebuffer: avoid narrow warning
Issue #1987
2017-05-31 13:15:54 +02:00
Alexander Boettcher 480c42d424 pthread: fix deprecated warnings
Issue #1987
2017-05-31 13:15:54 +02:00
Norman Feske 7729398105 ps2_drv: reset mouse at startup
This patch replaces the set-defaults command by a reset command, which
is needed to use the Lenovo x250 trackpoint. (original patch by
Christian Prochaska)
2017-05-31 13:15:54 +02:00
Norman Feske 61551e4d76 pistachio,fiasco: don't rely on BASE_DIR for vpath
This patch corresponds to the patch "okl4: don't rely on BASE_DIR for
vpath", addressing the L4/Fiasco and L4ka::Pistachio kernels.
2017-05-31 13:15:54 +02:00
Norman Feske 50c53a23eb foc,fiasco: symlink kernel files to bin/ 2017-05-31 13:15:54 +02:00
Christian Helmuth 7680d20686 Re-enable usb_block test 2017-05-31 13:15:54 +02:00
Christian Helmuth df81d7a374 demo: adapt to GCC 6
Issue #2372
2017-05-31 13:15:54 +02:00
Christian Helmuth 6b2d8a740d dde_linux: explicitly build C89 with GNU extensions
Issue #2372
2017-05-31 13:15:53 +02:00
Alexander Boettcher 6513d0ce0f nova: build fixes with GCC 6 of kernel
Fixes #2379
Fixes #2380
2017-05-31 13:15:53 +02:00
Christian Helmuth 9af8e27d31 foc: fix port build with GCC 6
Fixes #2390
2017-05-31 13:15:53 +02:00
Stefan Kalkowski b9549e58d0 hw: cleanup core code (Ref #2394) 2017-05-31 13:15:53 +02:00
Alexander Boettcher bc2ef2b1b2 seoul: avoid gcc6 warnings 2017-05-31 13:15:53 +02:00
Alexander Boettcher 7005e54de2 nova: fix syscall bindings with GCC 6
Fixes #2377
2017-05-31 13:15:52 +02:00
Norman Feske 8e7aa54493 base: drop session states of vanished clients
For asynchronously provided sessions, the parent has to maintain the
session state as long as the server hasn't explicitly responded to a
close request. For this reason, the lifetime of such session states is
bound to the server, not the client.

When the server responds to a close request, the session state gets
freed. The 'session_response' implementation does not immediately
destroy the session state but delegates the destruction to a client-side
callback, which thereby also notifies the client. However, the code did
not consider the case where the client has completely vanished at
session-response time. In this case, we need to drop the session state
immediately.

Fixes #2391
2017-05-31 13:15:52 +02:00
Stefan Kalkowski 76bc2b9e89 hw: remove core internal header directories
Fix #2393
2017-05-31 13:15:52 +02:00
Christian Helmuth 117a533828 rom_filter: fix compilation with GCC 6
Issue #2372
2017-05-31 13:15:52 +02:00
Stefan Kalkowski 67ba7b89a7 hw: separate bootstrap and core strictly
* Introduce Hw namespace and library files under src/lib/hw
* Introduce Bootstrap namespace
* Move all initialization logic into Bootstrap namespace

Ref #2388
2017-05-31 13:15:52 +02:00
Christian Prochaska 52411c9017 terminal: add support for 'ESC[m' sequence
Fixes #2392
2017-05-31 13:15:51 +02:00
Christian Prochaska 739acd8b41 qt5: fix build errors with GCC 6
Fixes #2389
2017-05-31 13:15:51 +02:00
Christian Prochaska d0a53781b9 gdb: fix compile error with GCC 6
Fixes #2387
2017-05-31 13:15:51 +02:00
Christian Prochaska d1bd39cebb openssh: add '--without-stackprotect' configure option
The configure ckeck for the stack protection feature succeeds with GCC 6,
even though the required runtime functions are missing.

Issue #2386
2017-05-31 13:15:51 +02:00
Christian Prochaska e317eca9a5 fuse_ext2: build with '-std=gnu89'
GCC 6 defaults to '-std=gnu11' for the C language, which has different
semantics for inline functions and triggers build errors.

Fixes #2385
2017-05-31 13:15:51 +02:00
Martin Stein 64fb2865b0 nic_router: fix compile error "flexible array ..."
Fixes #2384
2017-05-31 13:15:51 +02:00
Christian Prochaska 742293ab87 Genode::Fifo_element: workaround for compiling with GCC 6
Issue #2383
2017-05-31 13:15:51 +02:00
Christian Prochaska 767d86e6dc base-hw: workaround for compiling with GCC 6
Issue #2382
2017-05-31 13:15:50 +02:00
Christian Prochaska f90a4a85e0 base-nova: workaround for compiling with GCC 6
Issue #2378
2017-05-31 13:15:50 +02:00
Christian Prochaska bf83c07923 Genode::retry(): fix compile error with GCC 6
Fixes #2376
2017-05-31 13:15:50 +02:00
Christian Prochaska d23dd0cdb4 init: workaround for GCC 6 compile errors
Issue #2374
2017-05-31 13:15:50 +02:00
Christian Prochaska 78a9cbf82d Trace::Logger: workaround for compiling with GCC 6
Issue #2375
2017-05-31 13:15:50 +02:00
Christian Prochaska 661a3100b1 stdcxx: update to version 6.3.0
Issue #2372
2017-05-31 13:15:50 +02:00
Christian Prochaska 58f2088d3e gcc: update to version 6.3.0
Issue #2372
2017-05-31 13:15:49 +02:00
Christian Prochaska 9f9271783e binutils: update to version 2.28
Fixes #2401
Issue #2372
2017-05-31 13:15:49 +02:00
Norman Feske 0e06042f81 base/mk: include sub specs from BASE_DIR
Originally, the spec files for less specific SPEC values were include
via the 'select_from_repositories' function. This implies that BASE_DIR
must always be present in the list of 'REPOSITORIES'. Otherwise the
spec files won't be found. By explicitly including sub specs from
'$(BASE_DIR)/mk', we lift this restriction.
2017-05-02 15:29:04 +02:00
Norman Feske 8aebfd9b26 libc: enhance quirk for building libc-gen on ARM
This patch enables the building of the libc from a source archive
for ARM.
2017-05-02 15:29:04 +02:00
Norman Feske ed64a9233e okl4: don't rely on BASE_DIR for vpath
This patch is required to build the OKL4 version of core from a source
archive. It avoids fetching source codes from BASE_DIR, and moves the
vpath wildcard for %.cc after all specific vpath definitins, in
particular those that are x86-specific. Without the latter change, core
would always end up using the generic version of 'platform_services.cc',
omitting the IO_PORT service from core.
2017-05-02 15:29:03 +02:00
Norman Feske e2fb49ae39 core: avoid using BASE_DIR in vpath
When building core from a source archive, we don't want to incorporate
any source codes from BASE_DIR.
2017-05-02 15:29:03 +02:00
Norman Feske ece67ca174 pistachio: symlink kernel files to bin/
This enables us to pick all relevant parts for assembling a binary
archive for the kernel from bin/.
2017-05-02 15:29:03 +02:00
Alexander Boettcher e3e41e5ca0 ahci: avoid deprecated warnings
Issue #1987
2017-05-02 15:29:03 +02:00
Christian Helmuth c475edccfc dde_linux: use internal setjmp/longjmp only 2017-05-02 15:29:03 +02:00
Norman Feske 8f27babf16 mk: strip binaries at <build-dir>/bin/
The <build-dir>/bin/ directory used to contain symbolic links to the
unstripped build results. However, since the upcoming depot tool
extracts the content of binary archives from bin/, the resulting
archives would contain overly large unstripped binaries, which is
undesired. On the other hand, always stripping the build results is not
a good option either because we rely of symbol information during
debugging.

This patch changes the installation of build results such that a new
'debug/' directory is populated besides the existing 'bin/' directory.
The debug directory contains symbolic links to the unstripped build
results whereas the bin directory contains stripped binaries that are
palatable for packaging (depot tool) and for assembling boot images (run
tool).
2017-05-02 15:29:03 +02:00
Christian Helmuth f9bb88cd2e Disable scan-code translation in PS/2 on ARM PL050
This enables to run the driver on recent Qemu versions.
2017-05-02 15:29:02 +02:00
Christian Helmuth 67f22a6c90 Fix key count in input test 2017-05-02 15:29:02 +02:00
Norman Feske 8c4a2a48ca core: install core-<kernel>.o at bin/
By installing the core object to bin/, we follow the same convention as
for regular binaries. This, in turn, enables us to ship core in a
regular binary archive. The patch also adjusts the run tool to pick up
the core object from bin/ for the final linking stage.
2017-05-02 15:29:02 +02:00
Norman Feske 60cda87b5c init.run: add missing build of report_rom 2017-05-02 15:29:02 +02:00
Norman Feske 7200ab2935 usb_drv: disambiguate header scan locations
When creating a source archive for the USB driver, both the contrib and
Genode-specific source codes are merged into a single directory
structure. In this case, the original way of determining the Linux
source code to scan for #include directives would apply the scanning to
Genode-specific source codes too. This patch tightens the search
criterion such that only Linux source codes are processed.
2017-05-02 15:29:02 +02:00
Norman Feske 075c32409a usb_drv: Add missing definition of __aligned macro
This macro is implicitly pulled in by libc-setjmp (via the libc's
cdefs.h). However, apparently not all sources include <setjmp.h>.
Unfortunately, for sources that do, this change produces a
double-definition warning. We should fix it by removing the dependency
from the libc's setjmp.
2017-05-02 15:29:02 +02:00
Christian Helmuth e49bb4943e Deprecate policy constructor with implicit config
because it uses the deprecated config library.

Issue #1987
2017-05-02 15:29:02 +02:00
Emery Hemingway dde11de008 Unify client policy across File_system servers
File_system servers shall deny clients not matching a defined policy.
Servers shall also apply session root offset policy followed by a client
offset.

Fix #2365
2017-05-02 15:28:57 +02:00
Alexander Boettcher 2668a55688 usb_drv: fix various nullpointer in raw binding
during reset of a VM, usb device ejected before hand:

ded! amount=27941, size=4096, consumed=24576
Warning: could not allocate metadata
[init -> nit_fb1] using xywh=(0,0,2560,1440)
[init -> usb_drv] dev_info: new SuperSpeed USB device number 2 using xhci_hcd
[init -> vbox1] Attach USB device 0002:0002 (vendor=951, product=16a5)
Warning: Quota exceeded! amount=36133, size=4096, consumed=32768
Warning: could not allocate metadata
[init -> nit_fb1] using xywh=(0,0,2560,1440)
[init -> vbox1] EMT-0    VMMDev: Guest Additions capability report: (0x5 -> 0x5) seamless: yes, hostWindowMapping: no, graphics: yes
[init -> vbox1] EMT-0    VMMDev: Guest Additions capability report: (0x5 -> 0x0) seamless: no, hostWindowMapping: no, graphics: no
[init -> vbox1] EMT-0    VMMDev: Guest Additions capability report: (0x0 -> 0x0) seamless: no, hostWindowMapping: no, graphics: no
[init -> vbox1] EMT-1    VMMDev: Guest Additions capability report: (0x0 -> 0x0) seamless: no, hostWindowMapping: no, graphics: no
Warning: Quota exceeded! amount=44325, size=4096, consumed=40960
Warning: could not allocate metadata
[init -> vbox1] fb resize : [0] 2560x1440 -> 1024x768
no RM attachment (READ pf_addr=0x4 pf_ip=0x105367e from pager_object: pd='init -> usb_drv' thread='ep')
page fault, pd='init -> usb_drv' thread='ep' cpu=0 ip=0x105367e address=0x4 stack pointer=0xa07fef18 qualifiers=0x4 irUwp reason=1

Seen during #2338
2017-05-02 15:28:55 +02:00
Christian Helmuth f96b5b89f2 Fix more deprecated warnings
Issue #1987
2017-05-02 15:28:55 +02:00
Norman Feske 44e5f1c2d4 ABIs for libm, libpng, zlib 2017-05-02 15:28:54 +02:00
Norman Feske 539d976a9a init: fix routing to child with multiple services
Init's service forwarding functionality did not take the service type
into account when forwarding a session request. If a server provides
multiple services, e.g. fb_sdl that provides both "Input" and
"Framebuffer", the type of the forwarded session request did not always
correspond to the actually requested type.
2017-05-02 15:28:54 +02:00
Norman Feske da294cb02a mk: obtain 'genode.ld' always form BASE_DIR
This way, the base repository does not need to be present in the
'REPOSITORIES' list when building static executables.
2017-05-02 15:28:54 +02:00
Alexander Boettcher 1c79ba4182 slab: detect corrupted slab and invalid frees
and report about that.

Fixes #2350
2017-05-02 15:28:54 +02:00
Adrian-Ken Rueegsegger 80f704ae0e muen: Update Muen build target.mk 2017-05-02 15:28:54 +02:00
Adrian-Ken Rueegsegger c600484d68 hw/doc: Update Muen tutorial 2017-05-02 15:28:53 +02:00
Adrian-Ken Rueegsegger 1e090f1f6b Update Muen port
Fixes #2356
2017-05-02 15:28:53 +02:00
Norman Feske 93b78573bd Remove superfluous 'cxx' from LIBS in target.mk 2017-05-02 15:28:53 +02:00
Edgard Schmidt e933c7b4d8 Cleanup Call_return encapsulation in call()
~emove the second Call_return encapsulation from the already
encapsulated return type of Capability::call.

Fixes #2180
2017-05-02 15:28:52 +02:00
Alexander Senier e61a5b0d05 base-hw: Fix PML4 size and constants
The size of the whole table and table entries were exchanged for PML4,
leading to out-of-bound accesses for addesses >= 2^39. Some constants
were lacking type suffixes causing integer overflows.

Added assertions to catch out-of-bound accesses early on.

Fixes #2210
Fixes #2211
2017-05-02 15:28:52 +02:00
Christian Prochaska a62f09e87e libc: add 'Libc::Component::stack_size()' to the ABI symbol file
Fixes #2354
2017-05-02 15:28:52 +02:00
Prashanth Mundkur f3c8233e7f Fix a socket leak when it is closed remotely
Fixes #2346
2017-05-02 15:28:52 +02:00
Emery Hemingway 0d488925ee server/rom_filter: generate top-level attributes
Conditionally inject attributes on the output XML node with
``<attribute name="..." value="..."``

Fix #2348
2017-05-02 15:28:48 +02:00
Martin Stein 05655a9d88 hw cortex-a9 timer: raise translation precision
If we do the tics-to-us translation with one division and multiplication
over the whole argument, like before, we loose microseconds granularity
although the timer frequency allows for such granularity. Thus, we treat
the most significant half and the least significant half of the tics
value separate. Each half is shifted to the best bit position for the
translation, then translated, and then shifted back.

Ref #2347
2017-04-11 15:34:16 +02:00
Norman Feske 0b30cf0ab6 mk: omit the creation of .lib.so files for ABIs
Furthermore, the patch alleviates the need for providing a library
description file if the library is present in the form of an ABI-symbols
file only.
2017-04-11 15:34:16 +02:00
Norman Feske 6d82dd14d6 mk: access linker scripts via BASE_DIR
The use of 'select_from_repositories' for locating the linker script for
dynamically-linked executables only works if 'BASE_DIR' appears in the
list of 'REPOSITORIES'. This is the case when using the build system in
the traditional way but it is not desired when building binary archives
of individual components.
2017-04-11 15:34:16 +02:00
Alexander Boettcher 35adce3955 run: adjust vbox multiple VM run test
Wrongly renamed during "vbox5: enable SMP setups"

Related to #2338
2017-04-11 15:34:15 +02:00
Christian Helmuth d18f976b15 nitpicker: strictly type command processing 2017-03-27 12:35:23 +02:00
Christian Prochaska 8903179537 tool_chain: use port mechanism
Fixes #2340
2017-03-27 12:35:10 +02:00
Christian Prochaska 6b3c79f674 qt5: fix 'qt5_qpluginwidget' test
Fixes #2349
2017-03-27 12:35:10 +02:00
Norman Feske 9bceec4394 Fix backdrop handing in wm.run and nano3d.run
This patch adjusts the run script in two ways:

It removes the reliance on init's formerly built-in resource-request
handling by increasing the RAM quota for the backdrop instances. Since
commit "init: explicit response to resource requests", init no longer
hands out slack memory automatically.

Second, it makes sure that the backdrop appears under the precise label
"backdrop" at nitpicker by facilitating init's label-rewriting feature.
Without explicitly setting the label to "backdrop", nitpicker observes
the label "backdrop -> backdrop" (the first part comes from init, the
second part comes from the nitpicker-session argument specified by
backdrop itself). However, the client is only considered as default
background if labeled as "backdrop" (see nitpicker's '_create_session')
implementation.

Issue #2352
2017-03-24 17:54:01 +01:00
Norman Feske f6386c6ce1 Add missing parent routes to hello tutorial
Thanks Martijn Verschoor for reporting!
2017-03-24 16:20:05 +01:00
Christian Helmuth 92a339befd rump_fs: handle errors on mkdir correctly 2017-03-24 16:20:05 +01:00
Sebastian Sumpf 7ff2927edb rump: sync every 2s not every 10s
fixes issue #2345
2017-03-24 16:20:04 +01:00
Sebastian Sumpf 2cb767de2d rump: implement BIO_SYNC correctly
Send to storage and sync caches

issue #2345
2017-03-24 16:20:04 +01:00
Christian Helmuth c60edb5636 libc: use flex explicitly for port preparation 2017-03-24 16:20:04 +01:00
Christian Helmuth b35df4578b Check Registered base class provides virtual destructor
The base class of Registered must provide a virtual destructor to enable
safe deletion with just a base class pointer. This requirement can be
lifted by using Registered_no_delete in places where the deletion
property is not needed.

Fixes #2331
2017-03-24 16:20:04 +01:00
Christian Helmuth 139525b6c9 cpu_sampler: support -fno-omit-frame-poiner builds 2017-03-24 16:20:04 +01:00
Christian Helmuth cb43e04691 ldso: defer execution of static constructors
Ldso now does not automatically execute static constructors of the
binary and shared libraries the binary depends on. If static
construction is required (e.g., if a shared library with constructor is
used or a compilation unit contains global statics) the component needs
to execute the constructors explicitly in Component::construct() via
Genode::Env::exec_static_constructors().

In the case of libc components this is done by the libc startup code
(i.e., the Component::construct() implementation in the libc).

The loading of shared objects at runtime is not affected by this change
and constructors of those objects are executed immediately.

Fixes #2332
2017-03-24 16:20:04 +01:00
Christian Helmuth 67ac0dde6e libc: checks for initialization and user context
We check if the libc (kernel singleton, config) was initialized and also
if suspend() is called from the valid user context.

Issue #2332
2017-03-24 16:20:03 +01:00
Christian Helmuth 88db3c0df7 Fix some deprecated warnings
Issue #1987
2017-03-24 16:20:03 +01:00
Christian Helmuth 707f66e9a5 ahci: remove disk image after test 2017-03-24 16:20:02 +01:00
Christian Helmuth a2ad5c06ab Adjust run-script RAM quotas to actual demands
With the current implementation resource requests are not automically
satisfied with slack quota by init. Therefore, this commit adapts RAM
quotas of autopilot scenarios to the actual demands.
2017-03-24 16:20:02 +01:00
Christian Helmuth 09e535b238 netperf: replace FORCE_QEMU by check for autopilot
Now, the script prevents the execution of the test if its started by the
autopilot on Qemu but permits manual runs without taking further
precautions.
2017-03-24 16:20:01 +01:00
Christian Helmuth 19703e6617 Remove deprecated Attached_mmio constructor 2017-03-24 16:20:01 +01:00
Christian Helmuth d3884c67ad sd_card: remove disk image after test 2017-03-24 16:20:01 +01:00
Alexander Boettcher 3758cb056d acpica: increase memory quota for platform session
Fixes #2343
2017-03-24 16:20:01 +01:00
Alexander Boettcher d8a151ef7d acpica: fix iomem handling code
Issue already encountered during #2242.

Fixes #2344
2017-03-24 16:20:01 +01:00
Philipp Kerling 15a607f307 Fix toolchain gcc compilation with newer host gcc
An inline attribute mismatch in the gcc-4.9.2 source causes its
compilation to fail on modern gcc versions (verified with gcc 6.3.1,
but probably since gcc 5)
The patch is courtesy of the gcc-patches mailing list:
https://gcc.gnu.org/ml/gcc-patches/2015-08/msg00375.html

Fixes #2341
2017-03-24 16:20:01 +01:00
Christian Helmuth 770c7548d8 acpica: fix service routing in run scenario 2017-03-24 16:20:00 +01:00
Christian Helmuth e65802eb68 vbox: adjust RAM quota of vbox_pointer 2017-03-24 16:20:00 +01:00
Christian Helmuth 9fb175e236 fb_bench: adjust RAM quota for large frame buffers 2017-03-24 16:20:00 +01:00
Norman Feske 8d68d3d8ac Adapt resource-request test to changes of init
The test used to rely on init's formerly built-in policy of answering
resource requests with slack memory, if available. Since init no longer
responds to resource requests in an autonomous way, we use a dynamically
configured sub-init instance as runtime for the test. This instance, in
turn, is monitored and controlled such that resource requests are
result in quota upgrades. The monitoring component is implemented in
the same test-resource_request program as the test. Both roles are
distinguished by the "role" config attribute.

This is a follow-up to "init: explicit response to resource requests".
2017-03-24 16:20:00 +01:00
Norman Feske 8ab8e65fb5 input_filter.run: avoid runtime resource request
This is a follow-up to "init: explicit response to resource requests".
2017-03-24 16:20:00 +01:00
Alexander Boettcher a19662abc7 vbox5: update to 5.1.18
Issue #2338
2017-03-24 16:20:00 +01:00
Alexander Boettcher e4aea2efeb vbox5: enable SMP setups
We use the use old IOAPIC implementation, which works for us much better than
the new one.

Issue #2338
2017-03-24 16:19:59 +01:00
Alexander Boettcher c782966aea vbox5: track memory allocation by VMM
- avoids memory leakage, especially during VM re-starts

Issue #2338
2017-03-24 16:19:59 +01:00
Alexander Boettcher 4f8a497bbf vbox5: update to 5.1.14
- use more upstream hm code
- add call to memory check as done in vbox4
- add in principle all vbox devices and drivers
- avoid null pointer during VM startup (patch reported to vbox-devel list)
- avoid endless loop in usb root hub

Issue #2338
2017-03-24 16:19:59 +01:00
Alexander Boettcher 572609b30a vbox5: add win10 run scenario
Issue #2338
2017-03-24 16:19:58 +01:00
Alexander Boettcher 5ebd8ae02e vbox5: unified build dir adjustments
Issue #2338
2017-03-24 16:19:58 +01:00
Norman Feske 48d1141917 core: improve formatting of allocator dumps
This patch uses the 'Hex_range' and 'Number_of_bytes' utilities to make
the formatted output of 'Allocator_avl_base' better readable.
2017-03-24 16:19:58 +01:00
Norman Feske d56374e4b9 base: handle 0 in Number_of_bytes::print
This patch avoids printing the number 0 as "0G".
2017-03-24 16:19:58 +01:00
Norman Feske 7813c3be8f init.run: tweak timings for Qemu 2017-03-24 16:19:58 +01:00
Norman Feske 892043ed76 init: trigger report update on version change
If the version attribute of init's <config> is changes, trigger the
generation of a new state report that includes the information of the
new version.
2017-03-24 16:19:58 +01:00
Alexander Boettcher a5c70244bf vbox4/5: fix tr TSS_BUSY_FLAG handling
Fixes #2337
2017-03-24 16:19:58 +01:00
Norman Feske f6c494497b os: remove stale xev_track.h header
This is a follow-up commit to "Remove app/xvfb and lib/xev_track".

Issue #1987
2017-03-24 16:19:57 +01:00
Norman Feske 1fde4d638c init: service forwarding
This patch equips init with the ability to act as a server that forwards
session requests to its children. Session requests can be routed
depending of the requested service type and the session label
originating from init's parent.

The feature is configured by one or multiple <service> nodes hosted in
init's <config> node. The routing policy is selected by via the regular
server-side policy-selection mechanism, for example:

<config>
  ...
  <service name="LOG">
    <policy label="noux">
      <child name="terminal_log" label="important"/>
    </policy>
    <default-policy> <child name="nitlog"/> </default-policy>
  </service>
  ...
</config>

Each policy node must have a <child> sub node, which denotes name of the
server with the 'name' attribute. The optional 'label' attribute defines
the session label presented to the server, analogous to how the
rewriting of session labels works in session routes. If not specified,
the client-provided label is presented to the server as is.

Fixes #2247
2017-03-24 16:19:57 +01:00
Norman Feske 1489791d5e init: explicit response to resource requests
This patch removes the formerly built-in policy of responding to
resource requests with handing out slack quota. Instead, resource
requests have to be answered by an update of the init configuration with
adjusted quota values.

Note that this patch may break run scripts that depend on init's
original policy. Those run scripts may be adjusted by increasing the
quota for the components that use to inflate their RAM usage during
runtime such that the specified quota suffices for the entire lifetime
of the component.
2017-03-24 16:19:57 +01:00
Norman Feske d227db4574 base: destruction order of binary/linker ROMs
This patch destructs the environment sessions for the binary and the
dynamic linker along with the other environment sessions to avoid a
warning about reverting quota that occurs when attempting to close
these sessions too late.
2017-03-24 16:19:57 +01:00
Norman Feske 29c4ed45cc init: use Prio_levels type instead of basic type 2017-03-24 16:19:57 +01:00
Norman Feske 06943f413d init: respond to RAM-quota changes in config
This patch improves init's dynamic reconfigurability with respect to
adjustments of the RAM quota assigned to the children.

If the RAM quota is decreased, init withdraws as much quota from the
child's RAM session as possible. If the child's RAM session does not
have enough available quota, a resource-yield request is issued to
the child. Cooparative children may respond to such a request by
releasing memory.

If the RAM quota is increased, the child's RAM session is upgraded.
If the configuration exceeds init's available RAM, init re-attempts
the upgrade whenever new slack memory becomes available (e.g., by
disappearing other children).
2017-03-24 16:19:57 +01:00
Norman Feske b3e5357cf1 Adaptation to init refactoring
Since init no longer provides public headers, we have to adjust the
existing users of this headers. The 'init/child_config.h' is used only
by GDB monitor. So the patch moves the header there as an interim fix.
The 'init/child_policy.h' is still used by a few components, so we have
to keep a trimmed-down version of it for now.
2017-03-24 16:19:56 +01:00
Norman Feske 1cf830497a init: refactoring into multiple files
This patch splits the implementation of init into several headers to
make the implementation easier to digest and to maintain.
2017-03-24 16:19:56 +01:00
Norman Feske 9dca1503a8 init: apply changes of <provides> nodes
This patch enables init to apply changes of any server's <provides>
declarations in a differential way. Servers can in principle be extended
by new services without re-starting them. Of course, changes of the
<provides> declarations may affect clients or would-be clients as this
information is taken into account for the session routing.
2017-03-24 16:19:56 +01:00
Norman Feske 0202048eb6 base: gracefully handle invalid env session routes
This patch addresses the corner cases where an environment session
could not be routed, i.e., if an environment LOG log session is
routed to a non-existing child.
2017-03-24 16:19:56 +01:00
Norman Feske 8d4fb288d9 init: add version attribute to start nodes
The optional 'version' attribute allows for the forced restart of a
child with an otherwise unmodified start node. The specified value is
also reflected in the state report.
2017-03-24 16:19:56 +01:00
Norman Feske fcf25c22d1 init: respond to binary-name changes
This patch covers the resolution of the ROM route for child binaries
via the generic label-rewriting mechanics. Now, the <binary> node has
become merely sytactic sugar for a route like the following:

<start name="test"/>
  <route>
    <service name="ROM" unscoped_label="test">
      <parent label="test-binary-name"/> </service>
      ...
  </route>
  ...
</start>

A change of the binary name has an effect on the child's ROM route to
the binary and thereby implicitly triggers a child restart due to the
existing re-validation of the routing.
2017-03-24 16:19:55 +01:00
Norman Feske 48174ab974 base: pass separate label to Local_connection
This patch extends the constructor of 'Local_connection' with an
optional 'label' argument, which was previously passed implicitly as
part of the 'args' argument. Keeping the label separate from 'args'
enables us to distinguish the client-specified label from a label that
resulted from a server-side label as it is used when rewriting a label
of an environment session (i.e., the binary name) in init's routing
policy. In principle, this patch eliminates the need for init's
explicite handling of the binary name via the '<binary>' node, or
at least allows us to simplity the binary-node handling.
2017-03-24 16:19:55 +01:00
Norman Feske 39e409f756 os: sanity check in Reporter::Xml_generator
With this check in place, one can safely construct an 'Xml_generator'
even if the report is disabled. This relieves the user of the reporter
from the need to distinguish enabled from disabled reports.
2017-03-24 16:19:55 +01:00
Emery Hemingway 50ee91e738 libc: poll listening sockets during select
Open the accept file at the listen call and poll for read henceforce.

Fix #2319
2017-03-24 16:19:55 +01:00
Emery Hemingway 7ef8c81607 libc: socket fcntl flags inheritence
Set O_NONBLOCK on sockets from the fcntl syscall and propagate this flag
to socket_fs control files and sockets returned from accept.

Fix #2318
2017-03-24 16:19:55 +01:00
Josef Söntgen 031337f039 trace_fs: remove os/server.h usage
Issue #2310.
2017-03-24 16:19:55 +01:00
Josef Söntgen 806e0a8029 udp_client: remove os/config.h usage
Issue #2310.
2017-03-24 16:19:54 +01:00
Josef Söntgen 46463562f6 udp_echo: remove os/config.h usage
Issue #2310.
2017-03-24 16:19:54 +01:00
Josef Söntgen 3d0bde2147 test/iso: remove env deprecated warning
Issue #2310.
2017-03-24 16:19:54 +01:00
Josef Söntgen f48baa1cf7 test/audio_in: remove env deprecated warning
Issue #2310.
2017-03-24 16:19:54 +01:00
Josef Söntgen fcd39f9bb2 usb_terminal: remove env deprecated warning
Issue #2310.
2017-03-24 16:19:54 +01:00
Josef Söntgen a26b4e6bd4 nic_bridge: remove os/server.h usage
Issue #2310.
2017-03-24 16:19:54 +01:00
Josef Söntgen a1b24a0a72 libports: remove deprecated from libc_block
Issue #2310.
2017-03-24 16:19:54 +01:00
Josef Söntgen a34fb617a7 ffat: remove deprecated env usage
Issue #2310.
2017-03-24 16:19:53 +01:00
Martin Stein 078f28238f os: fix some more deprecated warnings
Ref #1987
2017-03-15 14:04:56 +01:00
Christian Prochaska 3ac3236a28 Noux: 'empty' ROM service for initial ROMs
The initial ROMs (program and linker) are already attached to the region
map of a forked process and don't need to be obtained again from an
external ROM service when the 'Child' class asks for them. For the program
image, the local Noux ROM service already returned an invalid dataspace
capability, but not for the linker.

Instead of adding another 'magic' ROM name for the local ROM service,
this commit implements an 'empty' ROM service, which returns an
invalid dataspace for the initial ROMs.

Fixes #2272
2017-03-15 13:20:12 +01:00
Christian Prochaska 2ac845281d virtualbox: require x86 platform
Fixes #2326
2017-03-15 13:13:24 +01:00
Christian Prochaska a1f195f7c0 dosbox: require x86 platform
Fixes #2327
2017-03-15 13:13:23 +01:00
Alexander Boettcher 3b977d4cf3 acpi: avoid warning about dangling allocations
like

Warning: XX dangling allocations at allocator destruction time

Fixes #2330
2017-03-15 13:12:48 +01:00
Christian Prochaska 137305d58a libc: add 'max_align_t' type
Fixes #2334
2017-03-15 13:12:26 +01:00
Alexander Boettcher 637a54aeb5 nova: fix irq handling for qemu 2.7 and newer
Fixes #2336
2017-03-15 12:33:49 +01:00
Roman Iten 3f29e7c675 run/qt5: move to '<config> <vfs/>'
Fixes #2328
2017-03-15 12:32:28 +01:00
Alexander Boettcher 391339a4bb base: handle race in Genode::Registry class
The race may happen when element objects get destructed by another thread then
the thread handling the for_each loop. In this case it may happen that the
object is already destructed (left the ~Element destructor) but the thread
handling the loop touches the invalid memory afterwards (the Element lock).

detected during issue #2299

Fixes #2320
2017-03-15 12:32:28 +01:00
Christian Prochaska 6d6474ba0e qt5: improve port check
Fixes #2324
2017-03-15 12:32:28 +01:00
Christian Prochaska 637c418c96 virtualbox: improve port check
Fixes #2325
2017-03-15 12:32:28 +01:00
Christian Prochaska 25bda02981 lighttpd: improve port check
Fixes #2323
2017-03-15 12:32:28 +01:00
Christian Prochaska 01e9bec5b0 Arora: fix port check
Fixes #2321
2017-03-15 12:32:28 +01:00
Christian Prochaska 79fc33aca8 libav: improve port check
Fixes #2322
2017-03-15 12:32:27 +01:00
Alexander Boettcher 517c098632 dde_rump: rumpuser_cv_timedwait: fix timeout calc
Code orginated from pthread implementation, so adjust it also for dde_rump.

Related to #2311
2017-03-15 12:32:27 +01:00
Christian Helmuth 8ca6009c09 fb_bench: disable autopilot run on linux 2017-03-15 12:32:27 +01:00
Emery Hemingway 10ed7b38d4 libc: initialize the environ pointer before Libc::construct
Setting the global environ pointer to NULL prevents getenv surprises
when using libc without the POSIX wrapper.

Fix #2312
2017-03-15 12:32:27 +01:00
Norman Feske ec007c0f27 input_filter.run: stabilize key-repeat test
Under certain timing conditions, the test would end up flushing the
input from the input filter in a nested way, which ultimately resulted
in lost input events of the outer nesting level. This patch eliminates
this corner case and thereby stabilizes the key-repeat test.
2017-03-15 12:32:27 +01:00
Christian Helmuth b9834bc388 Rename Linux audio driver to linux_audio_drv
Related to #2190
Fixes #2278
2017-03-15 12:32:27 +01:00
Christian Helmuth 43e7cc56a3 Rename Linux NIC driver to linux_nic_drv
Related to #2190
Issue #2278
2017-03-15 12:32:27 +01:00
Josef Söntgen bf96c7f16e platform/x86: fix quota for local ram session
Transfer quota to the session local RAM session to react to the
Quota_exceeded exception properly.

The platform driver keeps a session local RAM session for each of its
clients that is used to allocate DMA memory. A client needs to transfer
some of its quota to the platform driver, which in return transfers this
quota to the session local RAM session. As it happens allocating memory
from a RAM session involves book keeping and in this case, where the
available quota in the session did not suffice and the request was only
a few KiB, the platform driver handled the exception wrongly and did not
transfer the quota.

This problem did not surface up to now because all drivers allocate DMA
memory in larger chunks and the book keeping overhead was of no
consequence as the initial quota transfer probably covered the overhead.

Fixes #2316.
2017-03-15 12:32:27 +01:00
Martin Stein 35cc020e9c os/server: nic_dump
A tiny bump-in-the-wire tool for dumping NIC packet information.

Ref #2314
2017-03-15 12:32:26 +01:00
Sebastian Sumpf 995017b60c base-foc: update hash for panda timer update
Changed timer frequence to PandaBoard A6 in Fiasco.OC

issue #2308
2017-03-15 12:32:26 +01:00
Sebastian Sumpf c1f4dad811 base-pistachio: use PIT in Genode timer
on x86_32

issue #2308
2017-03-15 12:32:26 +01:00
Alexander Boettcher 261edf59a9 pthread_cond_timedwait: fix timeout calculation
Due to rounding in the timeout calculation it may happen that the timeout
stored in ms becomes 0, but actually some time (us or ns) are left to wait.
With threads on various priorities (vbox) this may end up in endless loops.

Fixes #2311
2017-03-15 12:32:26 +01:00
Stefan Kalkowski 7a4f4f1adc noux_tool_chain: increase ram_fs quota
The file space demand for the object files when compiling core has grown.
Therefore, the ram_fs component runs out of memory and requests additional
memory from init. On OKL4, where the physical memory is limited by the
elfweaver bootstrap tool, there is no more slack memory after the donation
of 1G to noux.
2017-03-15 12:32:26 +01:00
Stefan Kalkowski 45cab8fed6 hw: destroy active scheduling context (fix #1537)
* In addition fixes routes of the cpu_scheduler.run test
2017-03-15 12:32:25 +01:00
Stefan Kalkowski 4a30c13c2d os: synchronize thread destruction of trace test
* Increase test-thread count to trigger quota exceeding on all platforms
* Synchronize test-thread destruction, otherwise an half-destructed thread
  object can lead to an error message of the thread to be destructed,
  which causes a deadlock, when the destructed thread still holds the log lock
* Limit SMP settings for QEMU to x86 (Ref #2307)
2017-03-15 12:32:25 +01:00
Alexander Boettcher beb5169ee9 signal test: fix destruction of nested test
The signal_1/2/3 objects (which are threads) are in destruction, but still
signals are send to them. When the signal arrive and the memory for the
signal_1/2/3 object is already invalid we operate on stale memory and all
the locking infrastructure of the Thread don't work anymore.

Be more robust, explicitly wait for the termination of the thread.

Issue #2284
2017-03-15 12:32:25 +01:00
Stefan Kalkowski f1b632af68 affinity.run: do not test non-SMP platforms 2017-03-15 12:32:25 +01:00
Martin Stein 9834f0cf1e cpu_quota.run: raise test timeout
Previously it worked on Panda only because the timer driver was too
fast.

Ref #2308
2017-03-15 12:32:25 +01:00
Alexander Boettcher 451c08ac01 os: app showing top style CPU utilization via LOG
Fixes #2307
2017-03-15 12:32:25 +01:00
Alexander Boettcher 0a1839e3e2 vbox: ever set hint about host graphic resolution
Otherwise it may happend that the Guest tries to set the last stored
resolution from another run, which maybe is too large.

Up to now, everthing is fine, beside the fact that output changes are not
visible - which is odd and one things the VM came not up.

Issue #2306
2017-03-15 12:32:25 +01:00
Alexander Boettcher e99eed3c8e vbox: show guest additions version
to detect easiler that something may be wrong. The guest addition version
should match the version we have ported.

Issue #2306
2017-03-15 12:32:24 +01:00
Alexander Boettcher af3c238ce1 vbox: avoid null access in input handling
that happened during early bootup.

The signal about input events may arrive before keyboard and mouse is set
(due wait_and_dispatch_one_signal called from a started pthread and ep still
 not done with the initialisation)

Issue #2306
2017-03-15 12:32:24 +01:00
Martin Stein 34d1b60f52 bootstrap hw: add missing base/registry.cc
Ref #2196
2017-03-15 12:32:24 +01:00
Martin Stein 0bb752674f panda: fix timer speed
Previously we had configured the timer for the Panda ES with 700 MHz
CPU clock. But the Panda A6 that we use as reference now runs with
800 MHz.

Fixes #2308
2017-03-15 12:32:24 +01:00
Norman Feske 245cfd8571 input_filter.run: omit char-repeat test on Qemu
Apparently, the character-repeat test is too timing-sensitive to run
reliably on Qemu.
2017-03-15 12:32:24 +01:00
Martin Stein e744c76bf2 mmio: make base address member private
Ref #2196
2017-03-15 12:32:24 +01:00
Martin Stein c5cb6cb410 base-hw mbi: do not copy Mmap MMIO objects 2017-03-15 12:32:24 +01:00
Martin Stein 5366c8cf7e ahci: do not copy port MMIO objects
Ref #2196
2017-03-15 12:32:23 +01:00
Martin Stein ecbb7534b9 register set: make noncopyable
If a register set gets copied, the '_plain_access' of the copy references
the plain access object of the original object.

Ref #2196
2017-03-15 12:32:23 +01:00
Alexander Boettcher bed28dfe49 base: extend cxa guards to support threads on various priorities
Fixes #2299
2017-03-15 12:32:23 +01:00
Alexander Boettcher 16e6533a0a base: extend thread test to test cxa guards
with various priorities.

Showcases issue #2299
2017-03-15 12:24:45 +01:00
Alexander Boettcher 1d36ecc13f libc: fix config parsing in vfs_plugin
The Xml_node contains already only the libc sub_node.

Issue #2306

Broken due to commit:

 libc: remove global config accessor

 Issue #2280.
2017-03-15 12:24:44 +01:00
Martin Stein b05b5616c8 x86 cpu_quota: lower error tolerance
Previously, on X86, the timer driver used the PIT with a maximum timeout
of 54 ms.  Thus, the driver frequently interrupted the counters with
highest priority to update the timer. This is why we needed a higher
error tolerance as for ARM where the driver, once configured, can sleep
for the whole test timeout. Now, we use the kernel timer and the problem
seems to be exits no longer.

Ref #2304
2017-03-15 12:24:44 +01:00
Martin Stein 574a1bd198 test/cpu_quota: tolerate errors in session quota
Previously we pre-calculated the translation errors for the session
quota to make a discret check in the test. But since the order, in which
init childs get their CPU quota isn't always the same anymore (we should
have never made assumptions about that) the translation errors differ
from trial to trial. However, the errors are below 0.01% of the super
period. We now tolerate them in the run script.

Ref #2304
2017-03-15 12:24:44 +01:00
Christian Prochaska f79bcbd72a base-foc: add string separators in assertion messages
Fixes #2305
2017-03-15 12:24:44 +01:00
Christian Helmuth 6bc3bc5881 libc: use proper fd sets in select-handler select 2017-03-15 12:24:44 +01:00
Christian Helmuth ca57afd67e terminal_crosslink: prevent deprecated warning 2017-03-15 12:24:43 +01:00
Martin Stein a558afbed5 rpi sd_card: move to new Mmio::wait_for
Ref #2196
2017-03-15 12:24:43 +01:00
Martin Stein 31f4c0640a omap4 sd_card: move to new Mmio::wait_for
Ref #2196
2017-03-15 12:24:43 +01:00
Martin Stein a42e53728d imx sd_card: move to new Mmio::wait_for 2017-03-15 12:24:43 +01:00
Martin Stein acf762ec9f exynos5 fb_driver: use new Mmio::wait_for
Ref #2196
2017-03-15 12:24:43 +01:00
Martin Stein 7d4674b728 rpi platform driver: use new Mmio::wait_for
Ref #2196
2017-03-15 12:24:43 +01:00
Martin Stein 442c24420d mmio: separate MMIO access and register logic
By separating the plain MMIO access implementation from the generic bit
and offset logic of registers, we can now use the latter also with other
types of register access like I2C. The register and MMIO front-ends have
not changed due to the separation.

Ref #2196
2017-03-15 12:24:42 +01:00
Alexander Boettcher 25ac3cdd86 base: handle twice Lock::lock calls correctly
to avoid loosing threads in the applicants list if lock owner calls 'twice'
Lock::lock().

Fixes #2300
2017-03-15 12:24:42 +01:00
Alexander Boettcher 8102b78d22 base: extend thread test to test locks
Showcase issue #2300
2017-03-15 12:24:42 +01:00
Christian Prochaska ca2871e2e4 nova: use 'Native_cpu' component for thread initialization
Pass the thread type and exception base to core with a 'Native_cpu'
component instead of enhancing the 'Thread_state' class.

Fixes #2298
2017-03-15 12:24:42 +01:00
Stefan Kalkowski fbdfbc2476 bomb: remove redundant Rpc_entrypoint in Child
Fixes #2302
2017-03-15 12:24:41 +01:00
Stefan Kalkowski 96eb82574a hw: fix race in core's pager code (fix #2301)
* Acknowledge receive of page-fault signal with ack_signal,
  but restart thread execution separately
* use kill_signal_context when disolving a pager_object to prevent race
* Remove bureaucracy in form of Thread_event and Signal_ack_handler
* remove dead code in riscv, namely Thread_base definition
* translation_table_insertions function for ARM drops out,
  which was overcautious
2017-03-15 12:24:41 +01:00
Christian Helmuth 40f319e9e9 Terminate if pure virtual function is called
Fixes #2229
2017-03-15 12:24:41 +01:00
Martin Stein dc415669aa signal test: add stressful nested test
Ref #2284
2017-03-15 12:24:40 +01:00