Commit Graph

6299 Commits

Author SHA1 Message Date
Martin Stein
c146a215fb base-hw: cpu scheduler without inheritance
Ref #3308
2020-02-20 12:11:21 +01:00
Martin Stein
eef7b5e168 base-hw: double list without inheritance
Ref #3308
2020-02-20 12:11:21 +01:00
Martin Stein
a753b6ce46 base-hw: fix run scripts
Ref #3308
2020-02-20 12:11:21 +01:00
Martin Stein
793e12f8f3 base-hw: no error return codes in signaling
Error return codes are used with non-const functions in the signaling modules.
This would have been impractical for the in-place translation of the module to
Ada in the context of the Spunky project. Besides, it is easy to get rid of
them and it makes the execution flow more clear.

Ref #3308
2020-02-20 12:11:21 +01:00
Martin Stein
751e6430fa base-hw: obsolete Kernel::Thread::_signal_receiver
Ref #3308
2020-02-20 12:11:21 +01:00
Martin Stein
9eb20c2be7 base-hw: no pointer arguments in signaling
Besides reducing the use of pointers in base-hw, this prepares for the in-place
translation of the signaling module to Ada in the context of the Spunky
project.

Ref #3308
2020-02-20 12:11:21 +01:00
Martin Stein
5e460394d2 base-hw: do not inherit Kernel::Object
This prevents the use of Kernel::Object as base class for the specific kernel
objects and instead makes it a member of the kernel objects. Besides
simplifying inheritance hierarchies in base-hw, this prepares for the in-place
translation of the signaling module (and others) to Ada in the context of the
Spunky project.

Ref #3308
2020-02-20 12:11:21 +01:00
Martin Stein
88043e144a base-hw: no virtual functions in signaling
Besides simplifying the execution flow in the signaling module, this prepares
for the in-place translation of the signaling module to Ada in the context of
the Spunky project.

Ref #3308
2020-02-20 12:11:21 +01:00
Martin Stein
3cc7774fe4 base-hw: Ada/SPARK-friendly Ipc_node interface
This prevents the use of C++ features in the public method interface of the
synchronous-IPC module that would be impractical for the in-place
translation of the module into Ada in the context of the Spunky project.

* Get rid of thread accessor.
* Get rid of non-const functions with return values.
* Get rid of pointer return-values.

Ref #3308
2020-02-20 12:11:21 +01:00
Martin Stein
a04243aaf4 base-hw: remove unused Ipc_node accessor methods
Ref #3308
2020-02-20 12:11:21 +01:00
Martin Stein
5a95183c3e base-hw: avoid that Ipc_node inherits
Besides simplifying inheritance hierarchies in base-hw, this prepares for the
in-place translation of the synchronous-IPC module to Ada in the context of the
Spunky project.

Ref #3308
2020-02-20 12:11:21 +01:00
Martin Stein
6a5aa18a7b base-hw: no PD code / virt methods in Ipc_node
This is a simplication of the asyncronous-IPC module of the base-hw kernel.
Besides structuring the code in a cleaner way, it prepares for the in-place
translation of the module into Ada in the context of the Spunky project.

* Get rid of virtual methods in Ipc_node.
* Move all stuff related to protection domains, capabilities, and UTCBs to
  the Thread class. this code might later be moved to a dedicated module, but
  for now it's just fine to have it done by the thread module.

Ref #3308
2020-02-20 12:11:21 +01:00
Christian Prochaska
4b3c40f35b test-tcp_bulk: increase resources
Fixes #3645
2020-02-20 12:11:21 +01:00
Stefan Kalkowski
79fba6c2ac core: add kernel-specific UTCB quota bookkeeping
Fix #859
2020-02-20 12:11:21 +01:00
Tomasz Gajewski
4f217b19a9 hw: add CPU wake up code for rpi3
Moved code waking up processors for Cortex A53 before changing privilege
level because sending events to higher privilege levels is not allowed.

Fixed enable_mmu for Cortex A53 to properly return cpu id.

Fixed starting code for secondary cores to properly initialize stacks.

Added code to wake up secondary cores on rpi3.

Ref #3573
2020-02-20 12:08:17 +01:00
Stefan Kalkowski
202333c881 hw: cortex a9 diagnostic register initialization
We cannot count on the correct initialization of the diagnostic register
of the secondary cores. But the boot core gets initialized by the bootchain,
so we can copy over those values.

Fix #3639
2020-02-20 12:08:17 +01:00
Christian Prochaska
2ce0395fd8 arora.run: fix 'focus' route
Fixes #3637
2020-02-20 12:08:17 +01:00
bbdf181828 core: add support for unlabeled LOG sessions
If the root child requests a LOG service with the label "unlabeled" then
return a LOG session that logs unprefixed messages. This allows a external
test controller to recognize log messages produced by a blessed component.
2020-02-20 12:08:17 +01:00
Norman Feske
0181c6025a menu_view: add <label min_ex=".."> attribute
This new attribute can be used to enforce a minimum width in the unit of
the size of the character 'x'. Furthermore, the patch sets the minimum
height of a label to 0 if no 'text' attribute is present. By combining
both features, the label becomes usable as a horizontal spacer.

Issue #3629
2020-02-20 12:08:17 +01:00
Norman Feske
6eff83c1eb menu_view: invisible frame
Issue #3629
2020-02-20 12:08:17 +01:00
Norman Feske
5aae0f2379 menu_view: support multiple floats within a frame
This patch refines the hover handling such that a float widget never
responds to hovering unless a child is hovered. This way, it becomes
possible to stack multiple float widgets within one frame and still
reach all child widgets.

Issue #3629
2020-02-20 12:08:17 +01:00
Norman Feske
49ae4a834f menu_view: support for displaying text selections
Similarly to the way of how a <cursor> can be defined for a <label>
widget, a selection can be expressed as follows:

  <label ...>
    <selection at="2" length="12"/>
  </label>

Issue #3607
Issue #3629
2020-02-20 12:08:17 +01:00
Norman Feske
5b650434b0 menu_view: unquote label text attribute value
This patch enables the menu view to display '"' characters supplied via
the 'text' attribute of the <label> widget.

Issue #3607
Issue #3629
2020-02-20 12:08:16 +01:00
Norman Feske
e612f7cd7d menu_view: add character position to hover report
When setting the <dialog> attribute 'hover_details' to "yes", the hover
report features the character position of a hovered label.

Issue #3607
Issue #3629
2020-02-20 12:08:16 +01:00
Norman Feske
7cc4aa2a28 menu_view: text cursor support
This patch equips the label widget with the ability to display a text
cursor, as illustrated by the following example:

  <label text="...">
    <cursor at="10"/>
  </label>

Issue #3607
Issue #3629
2020-02-20 12:08:16 +01:00
Norman Feske
60f5d0e34a gems/animated_geometry.h: increase value range
The value range supported by the 'Animated_rect' utility is constrained
to 2^11 by the used 32-bit integer type. The interpolation is performed
on fixpoint numbers with a fractional precision of 10 bits. The
non-linear interpolation as performed by the 'Lazy_value' utility
involves squaring the values. Hence, the interpolated integral values
must not exceed 2^11 (2*11 bits for the square plus 10 bit for the
fractional part require 32 bits). This range is too small for
high-resolution displays. Hence this patch replaces the 32-bit integer
type by a 64-bit integer type.

Fixes #3627
2020-02-20 12:08:16 +01:00
Norman Feske
46c5a90ba1 nitpicker_gfx: Text_painter::Font::index_at_xpos
This method is useful for finding the character under a mouse position.
2020-02-20 12:08:16 +01:00
Stefan Kalkowski
1273c573b6 wm: destroy view before newly creating it 2020-02-20 12:08:16 +01:00
Norman Feske
3a2895af19 wm: reset pointer position on leave event
The wm used to remember the last pointer position when observing a leave
event. With such a stale pointer position, the wm would eventually
wrongly create an artifical motion event when a supposedly hovered
window changes its position (during an animated move). This can lead to
the propagation of the stale pointer position to the wm client, which,
in turn, may interpret the outdated position (e.g., the menu view would
report a wrong hover state).

This patch removes the stale state by resetting the '_pointer_pos' when
observing a leave event.

Fixes #3632
2020-02-20 12:08:16 +01:00
Norman Feske
0bffac6c98 nit_fader: make fading steps configurable
Fixes #3633
2020-02-20 12:08:16 +01:00
Norman Feske
c25de5dba3 backdrop: make width and height customizable 2020-02-20 12:08:16 +01:00
Norman Feske
60edfa4d77 fs_query: add directory entries to listing report
Fixes #3631
2020-02-20 12:08:16 +01:00
Norman Feske
52e582132f os/vfs.h: handle corner case in join function
When specifying "/" or "" as rel_path to the 'Directory' constructor,
the constructed directory should refer to the same directory. The
implementation of the join utility did not consider this corner case. It
occurred during the attempt to use fs_query with "/" given as path.

This patch also adds a Directory::Entry::dir accessor that returns true
if the entry is a directory.

Fixes #3630
2020-02-20 12:08:16 +01:00
Norman Feske
a888041ba4 cached_fs_rom: fix file-handle leak
Fixes #3634
2020-02-20 12:08:16 +01:00
Norman Feske
844af06782 base/buffered_output.h: flush at destruction time
By writing out all dangling characters at destruction time, the
'Buffered_output' utility can be used as a local variable rather
than a long-living object.
2020-02-20 12:08:16 +01:00
Norman Feske
7da3404bd0 pkg/noux-system: increase nit_fb quota
With this change, the window can be maximized on a full-HD screen.
2020-02-20 12:08:16 +01:00
Sid Hussmann
7676f47540 depot_deploy: support heartbeat in deploy config
Issue #3575
2020-02-20 12:08:16 +01:00
Josef Söntgen
9d7a58f6a7 dde_bsd: update audio driver to OpenBSD 6.6
Besides updating to a newer version the update adds the AC97 ICH driver
and addresses shortcomings with the OpenBSD emulation environment:

* Fix 'delay(9)' implementation - it now properly uses 'us' as unit,
  which results on faster initialization of the drivers.

* Fix LOG output that got lost during commit f23579532 and bring over
  the printf implementation from dde_linux for more structured
  printing.

* As said the driver now recognizes the AUICH devices. So far it was
  only tested with the device model in VirtualBox where it produces
  stuttering audio, investigating the cause is still ongoing.

Fixes #3641.
2020-02-20 12:08:16 +01:00
Christian Prochaska
9bd3d2aa5c qt5: use main entrypoint in QPA plugin
Fixes #3644
2020-02-20 12:08:16 +01:00
Christian Prochaska
28e782dda5 qt5: use pthread backend for QThreads
Fixes #3643
2020-02-20 12:08:16 +01:00
Christian Prochaska
597098845c libc: support pthread cleanup handlers
Fixes #3642
2020-02-20 12:08:16 +01:00
Sebastian Sumpf
8a7deae238 ahci: switch to request stream API + structural changes
- Remove dated 'Block::Driver' front end and implement
  'Block::Request_stream' front end
- Remove all dynamic memory allocations but DMA memory allocations
- Remove 'Platform_hba' and implement platform specific functions in
  'spec/<platform>/*'
- Ata and Atapi don't inherit from 'Port' any more, but are a member of
  'Port' as a protocol implementation
- Use platform driver for MMIO mappings (x86)
- Exchange stateful initialization of Ata/Atapi with a sequential
  initialization using 'wait_for_any' and 'retry' patterns
- Fix Atapi initialization by setting the byte count limit
- Set FIS receive base only when Cmd::FRE is disabled and Cmd::FR is 0
- Put everything in namespaces ('Ahci', 'Ata', or 'Atapi')
- Ata decides during read/write operations to use native-command queuing
  or normal DMA requests
- Remove port claiming logic (is now done via 'Constructibles')

fixes #3636
2020-02-20 12:08:16 +01:00
Sebastian Sumpf
73f2c7043c ahci: remove Exynos5 support
Exynos5 support has ceased on Genode

issue #3636
2020-02-10 16:00:41 +01:00
Sebastian Sumpf
de24035066 base: add 'wait_for_any' to 'Register_set'
This is the same as 'wait_for' with the difference that 'wait_for_any'
succeeds when *one* condition is met.

issue #3636
2020-02-10 16:00:40 +01:00
Norman Feske
57ea1dbdd3 depot: update recipe hashes 2020-02-10 14:29:06 +01:00
Christian Prochaska
9f73f09cec tcp bulk test: add VFS server tests
Fixes #3611
2020-02-10 14:21:48 +01:00
Martin Stein
d56b21d329 nic_router: do not change ethernet header as hub
When forwarding domain-local traffic like a hub, the NIC router shouldn't
modify packets at all.

Fixes #3625
2020-02-10 14:21:47 +01:00
Christian Helmuth
8d60bc11b5 vbox: periodic timer based on absolute timestamps
Before timestamps where calculated as durations since current wakeup
which introduces a systematical drift.
2020-02-10 14:21:47 +01:00
Christian Helmuth
604f4c666b Remove Timed_semaphore from libc incl test package
Issue #3550
2020-02-10 14:21:47 +01:00
Christian Helmuth
ff5175ec76 libc: synchronization primitives based on monitor
The libc monitor facility enables the execution of monitor jobs by the
main thread when the monitor pool was charged. In comparison to the
current suspend/resume_all mechanism the main thread iterates over all
job functions in contrast to waking up all threads to check their
conditions by themselves. Threads are only woken up if the completion
condition was met.

This commit is the result of a collaboration with Christian Prochaska.
Many thanks for your support, Christian.

Fixes #3550
2020-02-10 14:21:47 +01:00
Christian Helmuth
6aebd5dd95 libc: append serial number to pthread name
... in pthread_create()

Issue #3550
2020-02-10 14:21:47 +01:00
Christian Helmuth
3d4bed3374 libc: unify semantic of sleep functions
sleep(), usleep(), and nanosleep() now return immediately on
zero-timeout. Also, non-zero timeouts sleep at least 1 ms (the current
minimal timeout in libc), which compensates rounding errors.

Issue #3550
2020-02-10 14:21:47 +01:00
Alexander Boettcher
ee7a77643e depot_deploy: support affinity configuration
Fixes #3597
2020-02-10 14:21:47 +01:00
Alexander Boettcher
646d6c368c core: fixup cpu weight on failed thread creation
Fixes #3613
2020-02-07 14:14:20 +01:00
Alexander Boettcher
d96e14fe16 sandbox: adjust location size scaling
by incorporating session location

Issue #1412
2020-02-07 14:14:20 +01:00
Alexander Boettcher
3a9d450106 trace: avoid page fault on client calling subjects
Fixes #3608
2020-02-07 14:14:20 +01:00
Martin Stein
a73ef9fc06 app/ping: fix destination MAC on ARP replies
The ARP destination MAC was set to the Ethernet source MAC which is not
necessarily the MAC of the other ARP peer. Instead use the ARP source MAC of
the ARP request.
2020-02-04 16:12:04 +01:00
Stefan Kalkowski
3016b64fac mesa: enable ARM-64 port
Fix #3622
2020-02-04 16:10:28 +01:00
Stefan Kalkowski
22498e0b09 os: add backtrace utility for arm_64
Fix #3621
2020-02-04 16:10:22 +01:00
Stefan Kalkowski
79dff674fd gems: add connect facility to tcp_terminal
Instead of listening for new TCP/IP connections only,
the TCP terminal connects to a server when an IP address is
configured in the policy for a terminal client.

Fix #3619
2020-02-04 16:10:09 +01:00
Stefan Kalkowski
56ef7ca9e7 hw: enable ARMv8 performance counter
Fix #3618
2020-02-04 16:05:01 +01:00
Stefan Kalkowski
9db50753f1 libports: add ARMv8 support for libpng
Fix #3617
2020-02-04 16:04:54 +01:00
Stefan Kalkowski
e84e1bbf36 dde_linux: optimize refresh routine in imx8_fb_drv
Fix #3616
2020-02-04 16:03:08 +01:00
Stefan Kalkowski
fda337a1c0 os: increase throughput of blit for ARM 64-bit
Fix #3615
2020-02-04 16:01:35 +01:00
Stefan Kalkowski
f49f91da08 os: increase RAM quota for drivers in fb_bench.run
Enables fb_bench.run script for new imx8 framebuffer driver.

Ref #3615
2020-02-04 15:59:33 +01:00
Christian Helmuth
90535a1401 depot: update recipe hashes 2020-02-04 15:51:10 +01:00
Christian Helmuth
43719b5fd1 libc: fix returned timeout-left value
If the suspend method for the main thread detects that the suspend
condition is false it must return the passed timeout value (not always
0). Otherwise, the caller may incorrectly assume the timeout expired.
2020-02-04 15:51:10 +01:00
Christian Helmuth
1e578f1a50 Log key count in input test 2020-02-04 15:51:10 +01:00
Alexander Boettcher
a036d2373a x86/ps2: disable devices during commands
Especially the initial reset ended up with an unusable keyboard in rare
cases before. This commit disables keyboard and mouse handling of i8042
during command sequences according to a note from

  https://www.win.tue.nl/~aeb/linux/kbd/scancodes-12.html
2020-02-04 15:51:10 +01:00
Alexander Boettcher
7b964fa700 base: add affinity space info to platform info
Issue #3599
2020-02-04 15:51:10 +01:00
Alexander Boettcher
72f5f9d133 sculpt_manager: apply affinity-space to runtime
Issue #3599
2020-02-04 15:51:10 +01:00
Christian Prochaska
186a6bc080 test-tcp_bulk_lxip: increase timeout value
Fixes #3609
2020-02-04 15:51:10 +01:00
Norman Feske
567d9f7910 Xml_node::Unquoted utility for attribute values
The new utility can be used to revert quoted XML attribute values.
Such quoting is needed whenever an attribute value can contain '"'
characters. E.g., in the menu_view's <label text="..."> widget.

Issue #1757
2020-02-04 15:51:10 +01:00
Norman Feske
d70cf314d8 Never throw in 'Attached_rom_dataspace::size'
If the ROM service returned in invalid dataspace, reflect this condition
via a size of zero instead of triggering an exception of type
'Reconstructible<Attached_dataspace>::Deref_unconstructed_object'.

Issue #3606
2020-02-04 15:51:10 +01:00
Norman Feske
c6445da654 vfs: watch support for <rom> file system
Fixes #3606
2020-02-04 15:51:10 +01:00
Norman Feske
96cde52838 vfs: make <rom> fs robust against invalid ROMs
An invalid ROM dataspace can occur, for example, when requesting a ROM
from the report_rom service before the first report was posted. Such a
<rom> node can still be useful if it's dynamic. E.g., it can be watched.
Hence, the corner case of an invalid ROM dataspace should be gracefully
handled instead of causing an abort.

Issue #3606
2020-02-04 15:51:09 +01:00
Norman Feske
c67a0d3dd8 os/dynamic_rom_session.h: support Xml_generator
This patch adds a special variant of a 'Content_producer' called
'Xml_producer', which allows the direct use of an 'Xml_generator'
for generating the ROM-module content.
2020-02-04 15:51:09 +01:00
Norman Feske
78c0e5f6b6 New sandbox library extracted from init component
This patch extracts the child-management functionality from the init
component into a new library called "sandbox". The library API is
located at 'os/include/os/sandbox.h'.

The sandbox API allows for the interaction of the component with the
sandboxed children by providing locally implemented services. This
mechanism is illustrated by the new test at os/src/test/sandbox.

Issue #3601
2020-02-04 15:51:09 +01:00
Norman Feske
f82e7df0ba os/buffered_xml.h: support for generating XML
This patch extends the 'Buffered_xml' utility with a new constructor
that fills the buffer with the output of an 'Xml_generator'. It thereby
presents an easy way to generate XML to be consumed locally.

The patch also add a deprecation mark to the original 'xml' accessor
because copying 'Xml_node' objects (here as return value) is dangerous.
The new 'with_xml_node' method should instead be used to access the XML
content stored in the buffer.

Fixes #3602
2020-02-04 15:51:09 +01:00
Norman Feske
640a001ab6 util/xml_node.h: avoid internal use of exceptions
The XML parser used to rely in C++ exceptions while parsing, which is an
artifact from the initial implementation. This patch reworks the code such
that exceptions are avoided in the common cases.

Fixes #3605
2020-02-04 15:51:09 +01:00
Alexander Boettcher
c5c5f8754c test-init: add test to check for affinity warning
Issue #1412
2020-02-04 15:51:09 +01:00
Alexander Boettcher
5be3bf4f26 init: warn about missing affinity-space
if affinity is set by children

Issue #1412
2020-02-04 15:51:09 +01:00
Alexander Boettcher
d132fc0a73 init: scale affinity location
Issue #1412
2020-02-04 15:51:09 +01:00
Christian Helmuth
285a33c97d dde_linux: add missing white space in log message 2020-02-04 15:51:09 +01:00
Alexander Boettcher
f09ac23144 base: Timestamp type on arm_64 is 64bit 2020-02-04 15:51:09 +01:00
Alexander Boettcher
734752d6b5 base-nova: show size of framebuffer correctly 2020-02-04 15:51:09 +01:00
Christian Prochaska
4fc6c4ff5c test-tcp_bulk_lwip: increase timeout value
Fixes #3604
2020-02-04 15:51:09 +01:00
Christian Prochaska
746d373362 vfs_lxip: classify 'data' file as continuous
Fixes #3603
2020-02-04 15:51:09 +01:00
Alexander Boettcher
2256f5fb4b dde_linux: add dma_wmb/rmb barriers for arm_v6 2020-02-04 15:51:09 +01:00
Christian Prochaska
d8e2c95597 vfs server: ensure retry for stalled session
Fixes #3600
2020-02-04 15:51:09 +01:00
Alexander Boettcher
6506240642 dde_linux: add dma_wmb/rmb barriers for arm_v7
and remove re-defined dma_wmb in fec driver
2020-02-04 15:51:09 +01:00
Sebastian Sumpf
bd284347da libports: fix undefined reference for gmp on arm_v8
* enable native 'invert_limb' implemenation
* disable native 'udiv_qrnnd' implemenation

fixes #3598
2020-02-04 15:51:08 +01:00
Sebastian Sumpf
3813f9772a libports: add '__gmpn_invert_limb' for arm_v7
Implementation was missing.

issue #3598
2020-02-04 15:51:08 +01:00
Sebastian Sumpf
1902d1a06b hw: do not map boot modules in bootstrap
This commit safes virtual address space.
2020-02-04 15:51:08 +01:00
Josef Söntgen
7ecabb25eb ssh_terminal: address ambigouity of return values
Replace return values with appropiate bool and document two-staged
publickey authentication. This fixes a bug where wrong authentication
attempts are not properly denied.

Issue #3590.
2020-02-04 15:51:08 +01:00
Alexander Boettcher
5b633a83df core: dissolve thread object on failed creation
Fixes #3596
2020-02-04 15:51:08 +01:00
Norman Feske
beb8bf498c base-hw: add explicit array-bounds check
This patch rules out out-of-bounds array accesses without inspecting the
caller. It is not a bug fix but adds clarity.
2020-02-04 15:51:08 +01:00
Norman Feske
de764d8490 base-hw/muen: add explicit array-bounds check 2020-02-04 15:51:08 +01:00
Norman Feske
5635c1318c base-hw: explicit bounds check in store_apic_id
Avoid relying on the caller regarding the CPU index argument to ease the
reasoning about the code.
2020-02-04 15:51:08 +01:00
Norman Feske
01713c74f9 base-foc: explicit array-index bounds check
Adding an explicit check clarifies at the first glance that the array
bounds are respected without needing knowledge about MAX_CAPS_PER_MSG
and L4_UTCB_GENERIC_DATA_SIZE (used for dimensioning 'mr').
2020-02-04 15:51:08 +01:00
Norman Feske
9ec66f0594 allocator_avl: simplify structure
This patch changes the code of '_alloc_two_blocks_metadata' to not
leak the result of a partial allocation in the out parameters of
the method. This eases the reasoning about the absence of a
use-atfer-free problem (there was none).
2020-02-04 15:51:08 +01:00
Norman Feske
6947bddd3f base: avoid use of memcpy 2020-02-04 15:51:08 +01:00
Norman Feske
37ec636018 test/smp: add missing destruct call 2020-02-04 15:51:08 +01:00
Norman Feske
9bba6613e7 base/affinity.h: simplify member initialization
This is just a minor style improvement.
2020-02-04 15:51:08 +01:00
Christian Prochaska
d4f246517c depot: recipe for drivers_interactive-imx8q_evk
Fixes #3595
2020-02-04 15:51:08 +01:00
Stefan Kalkowski
5bfebe7a3f depot: recipe for usb_hid_drv
Fixes #3594
2020-02-04 15:47:27 +01:00
Stefan Kalkowski
3df67362b4 depot: recipe for usb_host_drv
Fixes #3593
2020-02-04 15:47:27 +01:00
Christian Prochaska
f1042e7fb1 depot: recipe for imx8_fb_drv
Fixes #3592
2020-02-04 15:47:27 +01:00
Christian Prochaska
b29112efdf dde_linux: framebuffer driver for i.MX8 EVK
Fixes #3591
2020-02-04 15:47:27 +01:00
Stefan Kalkowski
fe899eecc7 base-linux: fix configurable host toolchain
With the '-x' argument of the 'g++' tool the language gets specified,
therefore it has to be 'c++' furthermore, not CUSTOM_HOST_CXX. Moreover,
when import-lx_hybrid.mk gets evaluated first, global.mk is not included
yet, therefore we cannot eagerly evaluate the CXX_LINK_OPT_NO_PIE variable.

Issue #3466
2020-02-04 15:47:27 +01:00
Norman Feske
c2a2ec121f libc-net/resolv: silence warning in 3rd-party code 2020-02-04 15:47:27 +01:00
Norman Feske
e1e1fa23b7 zlib: fix compile warning
This patch includes 'unistd.h' to avoid warnings about the implicit
declaration of the functions ‘read’, 'close', and 'write.
2020-02-04 15:47:27 +01:00
Norman Feske
aee8d35dc4 libcrypto: suppress warning about unused value 2020-02-04 15:47:27 +01:00
Christian Helmuth
4bbbf5d2e3 dde_linux: reduce compiler warnings 2020-02-04 15:47:27 +01:00
Norman Feske
ba7e832c5d ssh_terminal: fix compile warning
server.h:51:12: warning: ‘int write_avail_cb(socket_t, int, void*)’
                declared ‘static’ but never defined [-Wunused-function]

This patch fixes the warning by moving the user of 'write_avail_cb' to
the compliation unit that defines it.
2020-01-03 14:44:31 +01:00
Norman Feske
bbfc092a31 core: avoid use of C array as buffer in Log_root 2020-01-03 14:44:15 +01:00
Norman Feske
de52cf1cdd core: check return value of map.metadata
Even though the call of map.metadata is known to always return a valid
pointer (because the meta data is assigned in the code just above),
better add an explicit nullptr check.
2020-01-03 14:44:15 +01:00
Norman Feske
783c05fd6c uart/exynos: be explicit about unused return value 2020-01-03 14:44:15 +01:00
Norman Feske
6ae98e2e6d base: mark Parent::Close_result with [[nodiscard]] 2020-01-03 14:44:15 +01:00
Norman Feske
ffc099eb54 cxx: add nullptr check in calloc
Even though malloc via the cxx_heap never fails, the implementation of
calloc should better not rely on this assumption.
2020-01-03 14:44:15 +01:00
Christian Helmuth
9321067b68 Remove unused/redundant longlong.h
This was used by an ancient libgmp port - longlong.h is now part of the
GMP sources.
2020-01-03 14:21:41 +01:00
Christian Prochaska
0eaa1f7a08 lx_kit: support enable/disable IRQ and pass IRQ number to handler
Fixes #3589
2020-01-02 15:53:46 +01:00
Christian Helmuth
18f90ca1e3 nova: request stack pointer on page fault
The SP value is part of the Page_fault_info object but was not requested
from the kernel on portal creation.
2020-01-02 15:30:28 +01:00
Christian Helmuth
9a35743df6 Mark packet-stream descriptor head/tail as volatile
`volatile` effectively prevents instruction reordering by the compiler
and fixes an issue with -O3 compiled components.

Note, this commit does not address further arguments regarding memory
barriers and volatile voiced in issue #693.

Issue #693
2019-12-20 14:34:22 +01:00
Christian Helmuth
8d63a3c1f3 Increase timeout of RTC test
It takes its time on sel4 and Qemu.
2019-12-20 14:28:18 +01:00
Alexander Boettcher
1ac33caa90 nova: handle rpc_entrypoint destruction better
Fixes #1921
2019-12-20 11:31:39 +01:00
Alexander Boettcher
1c361bf545 base: add test to destruct entrypoint
Issue #1921
2019-12-20 11:31:27 +01:00
Alexander Boettcher
a41dd48986 nova: avoid invalid capability counting overhead
- handle it the same way as done for other kernels

Fixes #3579
2019-12-20 11:29:21 +01:00
Christian Helmuth
b931b67cba depot: update recipe hashes 2019-12-19 17:01:43 +01:00
Christian Helmuth
24435e9ca1 Run TCP bulk tests on all Qemu platforms
This explicitly includes ARM32/64.
2019-12-19 17:01:43 +01:00
Alexander Boettcher
e54ff599ca base-hw: trace execution time of core threads
Fixes #3572
2019-12-19 17:01:43 +01:00
Sebastian Sumpf
04969b6be0 base-hw: add trace execution time support
This enables the 'top' program on base-hw for debugging issue #3247 on
rpi.

Fixes #3572
2019-12-19 17:01:42 +01:00
Christian Helmuth
1ddf1dbc25 Use ram-block in libc vfs tests on Rpi3 2019-12-19 17:01:42 +01:00
Christian Helmuth
8699f5592f wifi: run wpa_main in pthread 2019-12-19 17:01:42 +01:00
Norman Feske
73d089da36 Quota tweaks for base-sel4 2019-12-19 17:01:42 +01:00
Christian Prochaska
c8cd09e72c qt5: don't build qt5_jscore and qt5_webcore for arm_v8a
Fixes #3585
2019-12-19 17:01:42 +01:00
Christian Prochaska
be1ef01f10 stdcxx: add symbols needed by dosbox
Fixes #3588
2019-12-19 17:01:42 +01:00
Alexander Boettcher
0a1bc1f4b7 nova: add requesting time of killed SCs
Fixes #3587
2019-12-19 17:01:42 +01:00
Alexander Boettcher
bcb7f45201 core: avoid dangling ptr in cpu thread component
if exception is triggered during construction of a thread
2019-12-19 17:01:42 +01:00
Alexander Boettcher
33db0e0d4d base: add uboot for imx8 as port
that contains scripts to download and build uboot

Fixes #3584
2019-12-19 17:01:42 +01:00
Christian Helmuth
504539ad1e vfs/lwip: notify I/O progress on sent packets
Incoming ACK packets for sent data packets may be the only unblocker for
suspended write/send loops. This patch informs VFS users about I/O of
VFS handle on successfully sent packets.
2019-12-19 17:01:42 +01:00
Christian Prochaska
a62fce8dc5 sd_card_drv: i.MX8 support
Fixes #3580
2019-12-19 17:01:42 +01:00
Christian Prochaska
81a78cf1d0 usb_host_drv: fix 'matches->compatible' string access
Fixes #3582
2019-12-19 17:01:42 +01:00
Christian Helmuth
283135c9cd test-libc_getenv: allow unrelated content in log pattern 2019-12-19 17:01:42 +01:00
Sebastian Sumpf
22d4d5c1c1 ldso: update link map during respawn
move binary to front of link map after respawn. This is required by GDB
in order to load symbol files correctly.

issue #3481
2019-12-19 17:01:42 +01:00
Sebastian Sumpf
9c372c36c1 libc: thread local errno support
Store errno in pthread objects, return member upon call to '__error()'.
This became necessary in order to make errno thread-safe.

Note, any call to libc code from a non-pthread (beside the first
entrypoint) is not supported.

issue #3568
2019-12-19 17:01:42 +01:00
Sebastian Sumpf
9767c4db0e vfs_lwip/lwip: Lwip::lock for concurrent access
This is required in case the send and receive of IP packets is
performed by multiple thread because lwip is not thread safe.

issue #3568
2019-12-19 17:01:42 +01:00
Alexander Boettcher
9812799b24 seoul: reduce CPU load in graphic mode
- Stop refreshing if all CPUs go to sleep, also in text mode.
- Any input resets update rate to 100Hz in graphic mode, which gets
  decreased step by step down to 25Hz if no input is available (looking video
  without input by user).

Fixes #3576
2019-12-19 17:01:42 +01:00
Alexander Boettcher
d385749ead seoul: make vmm memory configurable
- document Genode specific configuration option
2019-12-19 17:01:42 +01:00
Christian Helmuth
23ed5d3936 base-linux: configurable host toolchain
This commit uses CUSTOM_HOST_CC/CUSTOM_HOST_CXX instead of hardcoded
commands and introduces HOST_DEV_PREFIX.

Original patch by Roman Iten and Pirmin Duss.

Issue #3466
2019-12-19 17:01:42 +01:00
Christian Helmuth
cebc963396 Cleanup linux_rtc_drv and lx_fs target.mk
Original patch by Roman Iten and Pirmin Duss.

Issue #3466
2019-12-19 17:01:42 +01:00
Norman Feske
0c8ec41c21 vfs/pipe: let num_dirent return 0
This prevents the original value ~0UL from messing up the output
of 'ls -l /dev'.

Issue #3578
2019-12-19 17:01:42 +01:00
Norman Feske
9f7b8c1a17 vfs/log: allow output redirection via '> /dev/log'
Issue #3578
2019-12-19 17:01:42 +01:00
Norman Feske
cd92b32622 libc: close all open FDs on exit
This is important to issue sync requests for written-to files.

As the closing must be performed by an atexit handler, it happens at a
time _after_ libc plugins are destructed. Consequently an FD allocated
by such a plugin results in a close error, which in turn, does not
destruct the FD. We ultimatedly end up in an infinte loop of
re-attempting the close. For this reason, the patch changes 'close' to
be robust against this special case.

This is generally not a problem because libc plugins are phased out.
However, at present, the libc_noux plugin is still important. With the
changed 'close' in place, there occurred an error message "Error: close:
close not implemented" at the exit of each noux program. This patch
removes the error printing from the libc plugin mechansim to avoid this
noise. The error messages are not important anyway because the
deprecation of the libc plugin interface.

Issue #3578
2019-12-19 17:00:48 +01:00
Norman Feske
5853a68904 libc: silence calls of getpeername w/o socket fs
The getpeername function is provided only by the socket fs.
In the case where the socket fs is not configured, return an appropriate
errno instead probing for a libc plugin (there is none).

Issue #3578
2019-12-19 17:00:48 +01:00
Norman Feske
ae64830bd5 libc: silence get(e)gid, get(e)uid, getppid
These dummies spam the log when running bash + make, like in the
genodians.org scenario.

Issue #3578
2019-12-19 17:00:48 +01:00
Norman Feske
e8878eee8a ldso: increase initial heap block
This is needed to enable the fork of 'make' in the genodians.org
scenario on NOVA.

Issue #3578
2019-12-19 17:00:48 +01:00
Norman Feske
3897ddea03 cxx: don't rely on global ctors
This patch removes the global variable 'blocker', which was expected to
be constructed via the global ctors. This mechanism, however, is not
used for the base library, which resulted in the use of an unconstructed
object. Specifically, the spinlock of the 'Lock' of the 'Registry'
defaulted to the LOCKED state (value 0), which eventually would lead to
a deadlock in the contention case of the cxa guard.

I could observe this deadlock once on during the component startup on
base-linux during the construction of the 'startup_lock'.

This patch fixes the problem by explicitly initializing the registry
of blockers via an init function.

Issue #2299
Issue #3578
2019-12-19 17:00:48 +01:00
Norman Feske
6858270517 base: disarm atexit handling for signal thread
The signal thread is not supposed to be destructed in any scenario other
than the noux fork mechanism (where no signals occur).

Issue #3578
2019-12-19 17:00:48 +01:00
Norman Feske
4e57b6eceb core: fix destruction of dependent CPU sessions
Issue #3578
2019-12-19 17:00:48 +01:00
Norman Feske
298f317f44 core: remove quota-related diagnostic messages
Issue #3578
2019-12-19 17:00:48 +01:00
Norman Feske
5820ad8309 fiasco: silence ipc_send error messages
These diagnostic messages spam the log but can occur during the regular
component-destruction procedure.

Issue #3578
2019-12-19 17:00:48 +01:00
Norman Feske
b7fbe65ff2 libc: fork/execve improvements
- Close FDs marked with the close-on-execve flag
  (needed for 'make', which sets the flag for the pipe-in
  FD of forked children)
- Update binary name on execve to use as ROM for subsequent fork
- Enable vfork as an alias for fork (needed by make)
- Purge line buffers for output streams during execve because they
  may be allocated at the allocation heap, which does not survive
  the execve call.
- Consider short-lived processes that may exit while the parent still
  blocks in the fork call.

With these changes, the website generator of genodians.org works without
the need for the Noux runtime.

Issue #3578
2019-12-19 17:00:47 +01:00
Norman Feske
d1cf216384 libc: propagate pipe config to child processes
Issue #3578
2019-12-19 17:00:47 +01:00
Alexander Boettcher
3011dc5876 sculpt: add vbox5 generic package as option
Fixes #3574
2019-12-19 17:00:47 +01:00
Alexander Boettcher
6e99f00f5c usb_hid_raw: enable imx8q_evk for nightly testing
Issue #3571
2019-12-19 17:00:47 +01:00
Alexander Boettcher
beb1e084a6 base: add imx8 evk usb driver to platform config
Issue #3571
2019-12-19 17:00:47 +01:00
Alexander Boettcher
e34b443c29 usb: add imx8q_evk support to usb_host
Issue #3571
2019-12-19 17:00:47 +01:00
Alexander Boettcher
6b17bb647e dde_linux: add barriers to readl/writel
Issue #3571
2019-12-19 17:00:47 +01:00
Christian Helmuth
4299b85cdb base-linux: support invalid dataspace for RM client
This restores behavior introduced in

  commit cb232891bf
  Author: Norman Feske <norman.feske@genode-labs.com>
  Date:   Tue May 10 11:55:25 2016 +0200

    Fix noux.run on base-linux

but removed by issue #2829.

Related to issue #1938
2019-12-19 17:00:47 +01:00
Sebastian Sumpf
6dae147785 libc: limit fd id allocations to FD_SETSIZE
fd > FD_SETSIZE cannot use 'select' or 'poll' within our libc.
Therefore, we added a bit allocator in order to allocate fd < FD_SETSIZE
(1024).

fixes #3568
2019-12-19 17:00:47 +01:00
Sebastian Sumpf
e4255e4c8b vfs/lxip: wait for i/o progress on connect
Since connect is asynchronous, add a waiter during connect

issue #3568
2019-12-19 17:00:47 +01:00
Christian Helmuth
161274f785 pistachio: check for 'ed' tool on port prepare
Some debian systems seems to come without 'ed' in the base installation.
The tool is needed when building the pistachio kernel.
2019-12-19 17:00:47 +01:00
Roman Iten
6145cdcf37 run: close connection to spawned processes on kill
From the man page of expect:

> Both expect and interact will detect when the current process exits
> and implicitly do a close.  But if you kill the process by, say, "exec
> kill  $pid",  you  will need to explicitly call close.

Fixes #3569
2019-12-19 17:00:47 +01:00
a3e43aca87 Clang: undeclared identifier __UINT64_C
Issue #3564
2019-12-19 16:59:03 +01:00
Norman Feske
6b6915e304 ttf_font: fix artifacts with large font sizes
This patch is a follow-up fix for "ttf_font: prevent out-of-bounds
access", which produced sporadic single-pixel artifacts with large font
sizes, e.g., with the monospaced font set to 24px in Sculpt.

The artifacts occurred only for some horizontal sub-pixel positions, in
combination with the font cache, and after the rendering of '>'
characters. They were ultimately caused by the missed clearning of the
first pixel of a glyph where x0 is 1 (e.g., the character 'd'). In this
case, a pixel from the previously evicted cache entry (the '>') shined
through. The patch fixes the problem by clearing the glyph starting from
the first, not the x0's, pixel.

Fixes #3567
2019-12-19 16:59:03 +01:00
7f57de1b74 VFS/terminal: fix clang warning
Variable-sized object may not be initialized.

Issue #3564
2019-12-19 16:59:03 +01:00
648382db74 Align after template expansion
Clang Cannot align template structs. Also, cannot cast void* to addr_t
in constexpr function.

Issue #3564
2019-12-19 16:59:03 +01:00
2c510bb7f9 Remove unused lamba capture to fix clang warning
Issue #3564
2019-12-19 16:59:03 +01:00
23710dff5e Remove dead code
Issue #3564
2019-12-19 16:59:03 +01:00
ff0436357b nic_stress: keep signal-context cap by value
Fixes clang warning about binding reference to stack allocated
parameter.

Issue #3564
2019-12-19 16:59:03 +01:00
091e5157aa vfs server: fix File_system namespace warnings
Issue #3564
2019-12-19 16:59:03 +01:00
Alexander Boettcher
c1e181a407 vbox: handle invalid dataspace exception
Fixes #3566
2019-12-19 16:59:03 +01:00
Stefan Kalkowski
8f71c90ca8 dde_rump: backport aarch64 (Fix #3565) 2019-12-19 16:59:03 +01:00
Norman Feske
f85ec313de os/vfs.h: handle zero-sized files
The 'File_content' class failed to consider zero-sized files.

Fixes #3557
2019-12-19 16:59:03 +01:00
Norman Feske
2aa6471608 test/depot_query: add test for zero-sized archives
This test covers the situation where depot_query evaluates depot content
that is incompletely extracted. In particular, if the 'archives' file
already exists but has a size of zero, depot_query would produce a
page fault. This situation can be manually provoked by deliberately
creating a zero-sized archives file for any otherwise correct pkg.

This patch also fixes the success indicator of the test. It wrongly
matched an early line of the log output.

Issue #3557
2019-12-19 16:59:02 +01:00
Stefan Kalkowski
9814fc5447 libports: enable arm_64 libssl, libcrypto variant
Fix #3563
2019-12-19 16:59:02 +01:00
Martin Stein
3655ea77a3 depot_autopilot: rework log matching
* The log history of a test is stored as a whole for the lifetime of the test.
* Matching of the log history against log patterns is done correctly now
  (previously, a pattern like "AAB" on an input like "AAAB" wouldn't have
  triggered).
* Use memcmp, memcpy, memmove instead of the former character-wise operations.
* Sanitizing of log input and log patterns now works more generic through the
  new Filter class for all replacements/removals.
* Sanitizing is done as soon as a string is available and remains for the
  lifetime of the test.
* Sanitizing doesn't interfer with the matching algorithm.
* Decomposing into small clearly named functions.

Ref #3555
2019-12-19 16:59:02 +01:00
Johannes Kliemann
93639532f0 base-linux: core session support (IO_PORT, IO_MEM, IRQ) 2019-12-19 16:59:02 +01:00
Christian Helmuth
11ef8e1ff2 depot: update recipe hashes 2019-11-28 09:06:39 +01:00
Christian Helmuth
1deab4a67f Disable noux_tool_chain_auto on foc/imx7d_sabre
The bootstrapper always fails with

  fatal: could not find free RAM region for modules

in this scenario.
2019-11-28 09:06:27 +01:00
Christian Helmuth
f23c70e068 sculpt_manager: use Codepoint::valid() 2019-11-28 09:06:26 +01:00
Alexander Boettcher
f7c818d303 vbox5: add recipe of kernel independent version 2019-11-25 16:02:40 +01:00
Stefan Kalkowski
7996cf06ab os: remove jitterentropy from fs_packet test
Fixes #3562
2019-11-25 15:44:57 +01:00
Stefan Kalkowski
4800bcf5a0 hw: correct the i.MX6 Sabrelite timer settings
Fix #3561
2019-11-25 15:43:59 +01:00
Christian Prochaska
4c74f4792c ahci_drv: set 'Cmd::St' to 1 before writing 'Sact' register
Issue #3058
2019-11-25 14:15:57 +01:00
Christian Prochaska
57d080d4f8 hw: use correct type on IRQ kernel object destruction
Fixes #3560
2019-11-25 14:15:39 +01:00
Alexander Boettcher
2778debc29 ram_fs: close open nodes on session close
Fixes #3559
2019-11-22 15:59:13 +01:00
Martin Stein
7182c10c90 test/nic_stress: test bad session args
Fixes #3525
2019-11-22 14:16:24 +01:00
Christian Prochaska
7309bcf4b5 gdb_monitor: add platform checks in run scripts
Fixes #3558
2019-11-22 14:12:06 +01:00
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
6e098a9d17 ram_fs: apply session policy to write / mtime ops
This patch extends the distinction between read-only and writeable
sessions to packet-stream operations for WRITE and WRITE_TIMESTAMP.
2019-11-21 16:21:19 +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
077fa355ce pkg/wm: increase RAM quota
This patch avoids a warning during the wm startup in Sculpt.
2019-11-21 15:13:20 +01:00
Norman Feske
e76ce05844 sculpt manager: ignore empty deploy configs
When copying config/managed/deploy to config/deploy, the latter may
temporarily result in an empty configuration. Such an intermediate
state should be ignored to keep the currently running scenario in tact
instead of restarting it.
2019-11-21 15:07:51 +01:00
Norman Feske
4622ddb46f nitpicker: add version attribute in clicked report
This patch addresses a corner case where the nitpicker focus is not
solely defined by mouse clicks or (exclusively) by a window manager, but
by a policy component that takes mouse clicks and other policy (e.g.,
a lock screen) into account. It ensures that each click that follows a
focus change (however initiated) results in a new "clicked" report even
when the report looks the same. To allow the policy component to
uniquely distiguish subsequent reports, the report features a new
'version' attribute.

Fixes #3493
2019-11-21 14:31:52 +01:00
Stefan Kalkowski
972e1893c9 os: introduce vmm component for ARMv8
Fix #3553
2019-11-21 14:29:36 +01:00
Stefan Kalkowski
af29dcf557 hw: introduce virtualization support for ARMv8
Ref #3553
2019-11-21 14:29:36 +01:00
Stefan Kalkowski
f82714f341 vm_session: return vcpu id when creating vcpu
Ref #3553
2019-11-21 14:29:36 +01:00
Stefan Kalkowski
02d68fdb97 hw: move arm virtualization to generic place
Ref #3553
2019-11-21 14:29:36 +01:00
Stefan Kalkowski
065b9fdb46 base-hw: extend syscalls to five arguments
Ref #3553
2019-11-21 14:29:36 +01:00
Stefan Kalkowski
18dbd75860 base: explictly target entrypoint in timer session
Fix #3548
2019-11-21 14:29:36 +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
Norman Feske
3aaed7188f ram_fs: tie writeable bit to session policy
Related to issue #3507
2019-11-21 14:26:01 +01:00
Norman Feske
ee64e29e77 vfs server: tie writeable bit to session policy
This patch let the VFS server reflect the session policy via the
writeable bit in directory entries instead of merely forwarding the bit
from the respective VFS plugin. This way, all files originating from a
read-only file-system session automatically appear in directory listings
as read-only files.

Related to issue #3507
2019-11-21 14:25:43 +01:00
Norman Feske
cfba429c15 vfs/rump: offer all files as read-writeable
The distinction between read-only and read-writeable is the
responsibility of the front end, i.e., the vfs server.
2019-11-21 14:25:05 +01:00
Josef Söntgen
25aa25c6a0
wifi_drv: enable loading of 9000 series FW
Tested with a 'Intel(R) Wireless-AC 9462' device.

Fixes #3556.
2019-11-20 12:56:10 +01:00
Josef Söntgen
2afc02051c
sculpt_manager: increase Rom_name size
The current value of 32 is too short for accessing the
iwlwifi 9000 ucode ROM.

Issue #3556.
2019-11-20 12:56:03 +01:00
Christian Helmuth
ce1b813105 depot: update recipe hashes (vbox, sculpt) 2019-11-19 16:08:19 +01:00
Christian Helmuth
7ed1d7f11d depot: update recipe hashes 2019-11-19 14:54:14 +01:00
Norman Feske
6ccd65bd8e sculpt_manager: invoke mkfs.ext2 with -F
The block-vfs plugin is no longer a special file. So we have to
explicitly discharge the sanity check of the mkfs tool.

Issue #3507
2019-11-19 14:54:14 +01:00
Norman Feske
18b621c2fe sculpt: version 19.11 2019-11-19 14:54:14 +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
Norman Feske
4d7d208940 test-libc_vfs_fs_chained: fix XML validity error
This problem was spotted by the test.run script.
2019-11-19 14:54:14 +01:00
Sebastian Sumpf
f7509a5b78 libports: libc: extract file name from path in dlopen
'dlopen' causes the ldso to open ROM connections, right now we only
support single file names for these ROM not paths. Therefore, we extract
the file name from path within libc's 'dlopen'

fixes #3551
2019-11-19 14:54:14 +01:00
Christian Helmuth
a54c04d247 libc: return EPIPE on send to shut down sockets
This intermediate fix still lacks the generation of SIGPIPE and return
of EINTR if the MSG_NOSIGNAL flag is not set in the call to send().
2019-11-19 14:54:14 +01:00
Christian Helmuth
e70c04ef86 lwip: shut down TCP sockets return WRITE_ERR_IO on write 2019-11-19 14:54:13 +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
Christian Helmuth
a3cb9d9897 lwip: prevent pointer-compare compilation warnings 2019-11-19 14:54:13 +01:00
Alexander Boettcher
b2a7ac2996 depot_deploy: support cpu quota configuration
the same as the ram and cap quota
2019-11-19 14:54:13 +01:00
Norman Feske
5f350adb57 vfs/lxip: don't misinterpret EINPROGRESS as error 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
Norman Feske
65d72fb07a drivers/gpu/intel: upgrade platform session on demand 2019-11-19 14:54:13 +01:00
Norman Feske
4871c7bba0 drivers/gpu/intel: reflect insuff. quota to client
This patch prevents the driver from translating Insufficient_ram_quota
and Insufficient_cap_quota exceptions to Service_denied exceptions at
session-creation time. This enables the client to respond to such a
condition by retrying the session creation with increased session quota.
2019-11-19 14:54:13 +01:00
Norman Feske
97e2968986 pkg/test-tcp_bulk_lwip: remove lwip.lib.so
The lwip library is not shared object.

This change is needed to execute the test with the test.run script.
2019-11-19 14:54:13 +01:00
Norman Feske
eb9a9bf23d bash.run: support using pipes 2019-11-19 14:54:13 +01:00
c51b4b5742 New VFS plugin for emulating POSIX pipes
Add a new plugin for creating pipes between pairs of VFS handles. It is
intended to replace the libc_pipe plugin, one of the last remaining libc
plugins.

In contrast to the libc_pipe plugin, this plugin defers cross-handle
notification until I/O signal handling rather than block and unblock
readers using a semaphore. This is a performance regression in the case
of multiple threads blocking on a pipe, but shall be an intermediate
mechanism pending renovations within the libc VFS and threading layers.
As a side effect, threads blocked on a pipe might not be resumed until
the main thread suspends and dispatches I/O signals.

The "test-libc_pipe" test has been adjusted to use the VFS pipe plugin
and tests both local pipes and pipes hosted remotely in the VFS server.

Merge adaptations (such as EOF handling, adjustment to VFS/libc
interface changes) by Norman Feske.

Fix #2303
2019-11-19 14:54:13 +01:00
Norman Feske
9b7915facb vfs server: redesigned internal control flow
This patch reworks the VFS server to become easier to understand.

- The packet-stream handling is hidden from the node types.

- Introduced the notion of a "job" as an abstraction from the raw packet
  stream.

- The processing of requests is split into three phases:
  (1) accepting new jobs,
  (2) the execution of jobs, and
  (3) the delivery of acknowledgements.

- There is no longer a global fifo of pending nodes. Instead, each
  session has a fifo of "active" nodes, which are nodes that wait
  for the completion of jobs.

- The Io_node type no longer uses virtual functions as hooks for
  the derrived classes. Instead, it provides a number of utility
  functions.

- The control flow of the 'Io_progress_handler' is now the same as
  for the session-local packet-stream handler.

- Removed dependency from 'file_system/node.h', which is a relic
  from the ram_fs.

While reworking the code, the following semantic changes were made
additionally.

- The handling of SEEK_TAIL no longer overwrites the file content at the
  end of the file.

- Removed diagnostic message at session-creation time.

- Write loop for continuous files

Issue #3547
Issue #2303
2019-11-19 14:54:13 +01:00
Norman Feske
f0de187bbb libc: increase default quota of forked processes
This patch reduces the debug noise for the prominent case of executing
bash with coreutils. Without it, the forked process will always ask for
more RAM immediately when starting up.
2019-11-19 14:54:13 +01:00
Norman Feske
539110c0b1 base: make 'Fifo::Element::enqueued' const
Issue #3547
2019-11-19 14:54:13 +01:00
Norman Feske
d7b1a89087 file-system session: use same dirent size as VFS
This change allows for the conversion of directory entries in place
(i.e., in the VFS server) and anticipates the potential future merge of
both types into one.

Issue #3547
2019-11-19 14:54:13 +01:00
Christian Helmuth
c50252fb35 libc: suspend/resume in pthread mutex lock/unlock
Issue #3550
2019-11-19 14:54:13 +01:00
Christian Helmuth
54002e6e6b test-pthread: refactor and cleanup test cases
Issue #3550
2019-11-19 14:54:13 +01:00
Sebastian Sumpf
16994d637b libports: update gcov port
removes bogus include from generated file libgcc_tm.h

issue #3537
2019-11-19 14:54:12 +01:00
Martin Stein
b541a0d448 smbios.h: move to os/include/smbios
Fixes #3489
2019-11-19 14:54:12 +01:00
Norman Feske
d4e0d2f578 libc: defer clone ack after FD initialization
Issue #3478
Issue #2303
2019-11-19 14:54:12 +01:00
Norman Feske
fab2fc874f libc: write loop for continuous files
This patch improves the libc's write operation to iterate on partial
writes to continuous files until the original write count is reached.
The split of large write operations into small partial writes as
dictated by the VFS infrastructure (e.g., constained by I/O buffer
sizes) becomes invisible to the libc-using application.

Issue #3507
Issue #2303
2019-11-19 14:54:04 +01:00
Sebastian Sumpf
54643d6878 base: add entry to .dynanmic section in genode_dyn.ld
Make sure that at least entry is present in the .dynamic section, so the
PT_DYNAMIC segment points to something valid in case there are no
dynamic symbols.

issue #3537
2019-11-19 14:45:40 +01:00
Sebastian Sumpf
2653fad0c4 ports: noux_tool_chain_auto for ARMv8
issue #3537
2019-11-19 14:45:40 +01:00
Sebastian Sumpf
b752d22a77 libports: checkout ARMv8 version of gcov
issue #3537
2019-11-19 14:45:39 +01:00
Sebastian Sumpf
ad12b42d1c gems: depot autopilot enable gcov for ARMv8
issue #3537
2019-11-19 14:45:39 +01:00
Sebastian Sumpf
c845a2d943 libprots: libgcov ARMv8 support
issue #3537
2019-11-19 14:45:39 +01:00
Sebastian Sumpf
b7e06a0b5b recipe: gmp for ARMv8
issue #3537
2019-11-19 14:45:39 +01:00
Sebastian Sumpf
417dd59b22 libports: gcov for ARMv8
issue #3537
2019-11-19 14:45:39 +01:00
Sebastian Sumpf
3024720656 ports: update make to version 4.2.1
Required for ARMv8 support

issue #3537
2019-11-19 14:45:39 +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
Sebastian Sumpf
3103ce1fa8 libports: update mpc to 1.1.0
issue #3537
2019-11-19 14:45:39 +01:00
Sebastian Sumpf
db18fc42fe libports: update mpfr to 4.0.2
issue #3537
2019-11-19 14:45:39 +01:00
Sebastian Sumpf
d28fe9e938 libports: enable gmp 6.1.2 for ARMv8
issue #3537
2019-11-19 14:45:39 +01:00
Sebastian Sumpf
31a035a907 libports: update gmp from 4.3.2 to 6.1.2
issue #3537
2019-11-19 14:45:39 +01:00
Norman Feske
91412c6c52 libc: trigger SIGCHLD for when forked child exits 2019-11-19 14:45:39 +01:00
Norman Feske
068324536c libc: eliminate atexit handler for 'Rtc'
We never want to destruct the 'Rtc' because other atexit handlers may
depend on it (e.g., for updating modification times when closing files).
2019-11-19 14:45:38 +01:00
Norman Feske
bb6eb0f6ea libc: local signal delivery via 'kill'
This patch adds the ability to call 'kill' with the own PID to trigger
the execution of the handler of the specified POSIX signal. This is used
by 'bash', e.g., when cancelling the input of a command via control-c.

Related to issue #3546
2019-11-19 14:45:38 +01:00
Norman Feske
c1012e6a45 libc: translate terminal user interrupts to SIGINT
Issue #3546
2019-11-19 14:45:38 +01:00
Norman Feske
23d21d77e9 vfs/terminal: detect user interrupts (control-c)
This patch equips the VFS terminal file system with the ability to
detect user interrupts in the incoming data stream, and propagate this
information via the new pseudo file '.terminal/interrupts'. Each time,
the user presses control-c in the terminal, the value stored in this
pseudo file is increased. Thereby, a VFS client can watch this file to
get notified about the occurrences of user interrupts.

Fixes #3546
2019-11-19 14:45:38 +01:00
Norman Feske
8c44b17e86 libc: shebang handling for execve
Fixes #3545
2019-11-19 14:45:38 +01:00
Norman Feske
636e0f6444 libc: cancel select when POSIX signal occurs
With this patch, Vim running via the 'bash.run' script becomes able to
adopt itself to changed window dimensions.

Issue #3544
2019-11-19 14:45:36 +01:00
Josef Söntgen
fafa409cf9 block_tester: use dynamic shared scratch buffer
The scratch buffer is now allocated from the heap and is shared
between the test as they are executed in a serial fashion. This
change saves memory as the test are constructed at start-up.

Fixes #3539.
2019-11-19 14:44:02 +01:00
Josef Söntgen
dbecceec09 expanding_reporter: configure initial buffer size
Fixes #3543.
2019-11-19 14:44:02 +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
f5c5479faa ram_block: use Number_of_bytes to parse block size
Using this helper rather than parsing as size_t directly allows use to
use size suffixes, e.g. K, M, G.

Fixes #3540.
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
Norman Feske
7b0771659e libc: trigger SIGWINCH by watching .terminal/info
Issue #3544
2019-11-19 14:43:43 +01:00
Norman Feske
e9762ee25f vfs: 'Rtc_file_system::close' for watch handle
The default implementation of this method throws an exception.
2019-11-19 14:42:23 +01:00
Norman Feske
7549189f88 vfs: watch support for Readonly_value_file_system
This patch adds support for watch notifications for the
'Readonly_value_file_system', which is often used by VFS plugins to
implement pseudo files. It thereby enables VFS clients to respond to
VFS-plugin events (think of terminal resize) dynamically.

Fixes #3523
2019-11-19 14:42:23 +01:00
Oleg Girko
a5bc031cca genode_org: Fix download URL.
As genode.org site is now protected by TLS and unencrypted site
is redirected to enctypted one, download URL should be modified
to reflect this change.

Without this change, wget downloads just index.html file.

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

Fixes #3538
2019-11-19 14:42:23 +01:00
Oleg Girko
5cd684997a sntp_client: No need to always limit this scenario to x86.
It runs pretty well on Raspberry Pi, for example.

Leaving this scenario limited to x86 for autopilot runs only.

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

Fixes #3536
2019-11-19 14:42:23 +01:00
Christian Helmuth
93d3a0848a Remove unused libm/posix.lib.so from lwip_lx.run
Prevents integration failures like follows if the libraries were not
built already in the build directory.

  Missing boot modules: libm.lib.so posix.lib.so
  Makefile:323: recipe for target 'run/lwip_lx' failed
2019-11-19 14:42:23 +01:00
Christian Helmuth
cd5e906bd0 imx: do not convert LF to CRLF in UART driver
This is done on higher level already.
2019-11-19 14:42:23 +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
Stefan Kalkowski
8a8aa85726 hw: initialize iomux, ccm and gpc for i.MX8 EVK
Fix #3534
2019-11-19 14:42:23 +01:00
Stefan Kalkowski
105b2c9b7a hw: fix gicv3 implementation of clear/set regs
In addition use uniformly enums for interupt count in register declarations.

Fix #3532
2019-11-19 14:42:23 +01:00
Stefan Kalkowski
f6435d91fc hw: turn Kernel_object into Genode::Constructible
Fix #3531
2019-11-19 14:42:23 +01:00
Stefan Kalkowski
3e3fb63863 hw: enable Genode::raw for bootstrap
Ref #3531
2019-11-19 14:42:23 +01:00
Oleg Girko
4007cee852 Fix MAC address printing in dde_linux USB net drivers.
Passing array of unsigned chars to Genode::log() function
makes it converted to void pointer, resulting in printing its address.

Wrapping this array into Genode::Cstring solves this problem
and makes it being printed properly as zero-terminaled string.

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

Fixes #3530
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
Christian Helmuth
ec9e40695d vbox: use PIIX3 instead of ICH9 in VM config
Prevents #3533
2019-11-19 14:42:23 +01:00
Martin Stein
0ad0153626 nic_router: fix broken uplink label on re-config
Uplink labels were stored in the uplink objects as reference. As uplink objects
may be re-used on re-configuration to avoid unnecessary closing and re-opening
of NIC sessions, the label reference could get invalid as the object that
stored the label content didn't get re-used. Thus, the label is now copied to
the uplink object.

Fixes #3529
2019-11-19 14:42:23 +01:00
Martin Stein
cd37bff514 nic_router: do not report while re-configuring
Fixes #3528
2019-11-19 14:42:23 +01:00
Martin Stein
27c2a66bbd nic_router: report link state
This adds two new boolean attributes to the <report> tag of the NIC router
configuration 'link_state' and 'link_state_triggers'. The former decides
whether to report the link state of each NIC interface (downlink, uplinks) at
the NIC router. The other decides whether to trigger reporting each time the
link state of an interface changes.

Fixes #3527
2019-11-19 14:42:23 +01:00
Martin Stein
58247737fd nic_router: free MAC on session-creation exception
If a MAC address was once allocated for a downlink and during the further
creation of the downlink an exception caused the creation to be aborted, the
NIC router didn't free the MAC address again.

Ref #3525
2019-11-19 14:42:23 +01:00
Martin Stein
ebcca179ed nic_router: fix 'catch' paths in session creation
The handling of exceptions during session creation implies freeing and
detaching the RAM DS behind the session env and session component. But this
was done using the session env located in the same RAM DS, which must
lead to problems. Now, the session env from the RAM DS is copied to the stack
and the operations are done on this temporary instance instead.

Ref #3525
2019-11-19 14:42:22 +01:00
Martin Stein
60d37f690c packet_stream_*: fix missing dissolve on exception
When the construction of a member of Packet_stream_*::Rpc_object after
the _cap member threw an exception, the object was not dissolved from
the entrypoint although the Rpc_object vanished at this point. This was
because the call to 'manage()' happened in the initializer list (for the
_cap member instantiation). The destruction of the _cap member then did
not dissolve the object.

This first fix moves the call to 'manage()' into the constructor body
after the instantiation of all other members. A more sophisticated fix
would use some kind of 'Managed_object' life-time guard that manages an
object on construction and dissolves on destruction.

Ref #3525
2019-11-19 14:42:22 +01:00
Martin Stein
0ed5655086 nic_router: do DHCP when re-config to dynamic IP
When re-configuring a domain from using a static IP config to using a dynamic
IP config, attached interfaces didn't react with doing DHCP discover. This bug
is fixed now and the nic_router_flood test was adapted in a way that it tests
the described behavior.

Fix #3518
2019-11-19 14:42:22 +01:00
Stefan Kalkowski
87a6368ba1 hw: implement multi-processor support for rpi3
Fix #3522
2019-11-19 14:42:22 +01:00
Stefan Kalkowski
1cbd77c806 hw: implement multi-processor support for i.MX8
Fix #3520
2019-11-19 14:42:22 +01:00
Stefan Kalkowski
e3f82b09d7 hw: instantiate pic object per cpu
Ref #3520
2019-11-19 14:42:22 +01:00