Commit Graph

415 Commits

Author SHA1 Message Date
fc68e97e4a Sculpt: redirect "nic_drv" binary to "ipxe_nic_drv"
Ref #2190
Fix #3374
2019-05-29 10:20:52 +02:00
Christian Prochaska
37ff9e1e23 gems: fix 'sculpt_manager' compile errors with GCC 8.3.0
Fixes #3347
2019-05-27 14:46:52 +02:00
Norman Feske
c38c80fd43 menu_view: midway re-targeting of geometry motion
This patch fixes the corner case where an animated geometry changes its
destination mid-way while an animation is already in progress. The
'_trigger_animated_geometry' method used to back out early in this case,
which was intended as an optimization.

Fixes #3296
2019-05-06 16:15:26 +02:00
Norman Feske
3f8dfa346c sculpt_manager: remove double name attributes
The 'name' attribute was generated by both the call of 'gen_named_node'
and 'Hoverable_item::gen_button_attr'. Use only the former.
2019-05-06 16:15:26 +02:00
Martin Stein
181c78d482 timeout: use uint64_t for all plain time values
This enforces the use of unsigned 64-bit values for time in the duration type,
the timeout framework, the timer session, the userland timer-drivers, and the
alarm framework on all platforms. The commit also adapts the code that uses
these tools accross all basic repositories (base, base-*, os. gems, libports,
ports, dde_*) to use unsigned 64-bit values for time as well as far as this
does not imply profound modifications.

Fixes #3208
2019-05-06 16:15:26 +02:00
Norman Feske
e5f27b44b5 block_session: turn 'Connection' into template
As a preparatory step for introducing the new block-client API, we have
to turn the 'Block::Connection' into a class template. The template
argument will be used to tie an application-defined job type to the
block connection.

Issue #3283
2019-05-06 16:15:25 +02:00
Norman Feske
bbe3ee8dc5 block_session: server-defined payload alignment
This patch replaces the formerly fixed 2 KiB data alignment within the
packet-stream buffer by a server-defined alignment. This has two
benefits.

First, when using block servers that provide small block sizes like 512
bytes, we avoid fragmenting the packet-stream buffer, which occurs when
aligning 512-byte requests at 2 KiB boundaries. This reduces meta data
costs for the packet-stream allocator and also allows fitting more
requests into the buffer.

Second, block drivers with alignment constraints dictated by the
hardware can now pass those constraints to the client, thereby easing
the use of zero-copy DMA directly into the packet stream.

The alignment is determined by the Block::Session_client at construction
time and applied by the Block::Session_client::alloc_packet method.
Block-session clients should always use this method, not the 'alloc_packet'
method of the packet stream (tx source) directly. The latter merely
applies a default alignment of 2 KiB.

At the server side, the alignment is automatically checked by
block/component.h (old API) and block/request_stream.h (new API).

Issue #3274
2019-05-03 13:53:12 +02:00
Norman Feske
2208220c12 block session: remove Block::Session::Operations
This patch modernizes the 'Block::Session::info' interface. Instead of
using out parameters, the 'init' RPC function returns a compound 'Info'
object now. The rather complicated 'Operations' struct is replaced by
a 'writeable' attribute in the 'Info' object.

Fixes #3275
2019-05-03 13:53:12 +02:00
Norman Feske
a2743dcaeb Library for the AES-CBC en/decryption of 4K blocks
The 'aes_cbc_4k' library is simple wrapper around libsparkcrypto to
serve as a backend for storage encryption. It operates on data chunks of
4 KiB and uses AES-CBC while incorporating the block number and the
private key as salt values.
2019-04-09 12:30:35 +02:00
a635873568 VFS: Replace global response handlers with local handlers
Replace the I/O response handler that is passed to the VFS at
construction with an object that is dynamically attached to handles.
This object shall also accept read-ready notifications, and plugins are
encouraged to keep handles awaiting ready-ready notifications separate
from handles that await I/O progress.

Replace the use of handle lists in plugins with handle queues, this
makes the code easier to understand and the ordering of notifications to
the application more explicit.

These changes replace the use of the Post_signal_hook from all VFS
plugins, applications must assume that read-ready and I/O notifications
occur during I/O signal dispatch and use an Io_progress_handler at its
entrypoints to defer response until after signal dispatching.

Fix #3257
2019-04-09 12:30:34 +02:00
Norman Feske
aeb7e7cd7c sculpt manager: prevent double destruction
The '_currently_constructed' pointer caches the information about which
'Launched_child' is currently configured in the menu. When discarding
the runtime (e.g., when un-using a file system) at this point, this
cached pointer was not invalidated while all 'Launched_child' objects
would be freed (including the currently constructed one). On the next
attempt to construct a new child, the sculpt manager attempted to
destruct the 'Launched_child' referred by the (now outdated)
'_currently_constructed' again.

Fixes #3240
2019-04-01 19:33:51 +02:00
Alexander Boettcher
c19c5ed0a4 wm: fix destroy with invalid handle
Issue #3232
2019-04-01 19:33:49 +02:00
Norman Feske
01cff3ce84 sculpt: inform user about incomplete pkg install
This commit handles the corner case where a package could be installed
successfully but the package's runtime definition is inconsistent with
the content delivered by the package's dependencies, i.e., the <content>
of the runtime file lists ROM modules that do not exist.

With this patch, the '+' menu shows the message "installed but
incomplete" whenever a package is in such a state.

Issue #3241
2019-04-01 19:33:48 +02:00
800b4e44b1 Reduce Vfs::Vfs_handle::Context to empty struct type
The "Vfs::Vfs_handle" type should not contain any public members that
can be initialized by the VFS internally and by the application, so
remove inheritance from the "Genode::list::Element" class. The VFS
plugins must instead use lists of "Vfs::Vfs_handle" sub-classes, the
lifetime of which are always managed by the plugin.

Ref #3036
2019-04-01 19:33:47 +02:00
Norman Feske
6763ac29d9 depot_download_manager: fetchurl watchdog
If fetchurl the amount of bytes downloaded by fetchurl does not change
for 5 seconds, respawn it.
2019-03-19 11:00:01 +01:00
Norman Feske
c76f7c0c2a sculpt: allow graph to overlap the log 2019-03-18 15:56:59 +01:00
Norman Feske
806dc5de36 window layouter: improved maximize handling
It turns out that the commit "window layouter: allow floating apps to
resize" interplays badly with the interactive toggling of the maximize
state of windows. In contrast to the window geometry and stacking, which
is always updated through the rules-feedback mechanism, interactive
changes of the maximize state omitted this loop and instead took a local
shortcut. Because of this shortcut, the maximized geometry eventually
ended up as window size in the window's assign rule. So unmaximizing the
window failed to revert the geometry to its original state.

This patch removes this inconsistency. The maximize state adheres to the
official chain of commands through the rules mechanism now. The state is
now maintained internally without affecting the window's geometry and is
evaluated while generating the window layout only.

As a minor loosely related improvement, this patch prevents the
highlighting of resize handles for non-resizable windows.

Issue #3200
2019-03-18 15:56:59 +01:00
Alexander Boettcher
dc4513f965 sculpt_manager: support system state ROM 2019-03-18 15:56:59 +01:00
Norman Feske
d75c5f6722 window layouter: fix glitch after window resize
This patch improves the transition from an interactive window geometry
change (dragging a window element) to the point where the resulting
new layout rules come into effect. During this short time, no resize
request must be issued because such a resize request would be based on
stale rules.

Fixes #3227
2019-03-18 15:56:59 +01:00
Norman Feske
591e9457e6 window layouter: allow floating apps to resize
This patch gives applications the ability to control the size of their
window whenever the window is floating, not tiled or maximized. See the
comment in the code for the rationale.

Fixes #3200
2019-03-18 15:56:59 +01:00
Norman Feske
1f3f7282f3 depot_download: limit rate of update-state reports
The default rate of 100 ms keeps Sculpt too busy because the menu that
displays the percentage values is drawn completely on each update.
Limiting the rate to 1/4 seconds relieves the effect.
2019-03-18 15:56:59 +01:00
Norman Feske
1ead0ea3a7 sculpt: allow for removal of index files
By clicking on a yellow checkbox in the depot selection dialog, the
corresponding index files are removed. This way, index files can
be update by removing and downloading them again.

This patch also filters out sculpt-managed components from the graph to
avoid erratic graph-position changes while the '+' menu is open.

Fixes #3193
2019-03-18 15:56:59 +01:00
Norman Feske
cac3f3b24e gems: initial version of fs_tool
The fs_tool component performs file operations according to its
configuration. This initial version implements only the operation
<remove-file> as needed for Sculpt CE.

Issue #3222
Issue #3193
2019-03-18 15:56:58 +01:00
Norman Feske
4264de05f9 sculpt: avoid duplicated diagnostic messages
Related to #3190
2019-03-18 15:56:25 +01:00
Norman Feske
6528f50bfc sculpt: NIC ready only with IP other than 0.0.0.0
This patch refines the criterion of when the networking is considered as
ready to use. Until now, any IP reported by the NIC router was taken as
an indicator for connectivity. But as the NIC router reports an IP
0.0.0.0/32 when no network cable is plugged at the uplink, the condition
was too loose.
2019-03-18 15:56:25 +01:00
Norman Feske
94e2a64f60 Sculpt: defer config dialog until pkg is complete
Fixes #3189
2019-03-18 15:56:25 +01:00
Norman Feske
00eb100114 sculpt: gracefully handle missing depot-user info
This patch improves the error handling of depot-download manager for the
case where a download is requested but the corresponding software
provider information is absent from the depot. Without this patch, the
update mechanism would get stuck in the failed depot-query step and
won't attempt to perform subsequent download jobs.

Fixes #3224
2019-03-18 15:56:24 +01:00
Norman Feske
41575ad60d sculpt: update menu when folding condition changed
The storage dialog is folded when activating the runtime view (e.g., by
clicking on the Genode Logo). This should happen immediately as response
of the mouse click.
2019-03-18 15:56:24 +01:00
Norman Feske
122c404883 menu view: cleanly separate update, layout phases
This patch improves the separation of the update and layout phases to
avoid superfluous geometry animations of its child widgets. Prior this
patch, 'Widget::geometry' was called in both phases, potentially
triggering geometry animations with intermediate values at the update
phase.

Related to issue #3221
2019-03-18 15:56:24 +01:00
Norman Feske
ba5de21db4 menu view: fade dependency changes
This patch applies fading when the visibility of dependencies changes.

Issue #3221
2019-03-18 15:56:24 +01:00
Norman Feske
905da4b0cc menu_view: fade between button styles
The button widget already supported an animated transition between
hovered and unhovered states. This patch generalizes the mechanism to
allow animated transitions between arbitrary button states, including
style changes.

This way, the fade-out of non-TCB components in Sculpt CE happens not
abruptly but smooth.

Fixes #3221
2019-03-18 15:56:24 +01:00
Norman Feske
b00e1f4e4b menu view: position widgets initially at (0, 0)
The default 'Rect' constructor constructs an invalid rectangle where the
p1 coordinates are lower than the p2 coordinates. In particular, p1 is
set to (1, 1). The 'Widget' implementation uses the points individually
as input into the 'Animated_rect' mechanism. This way, widgets end up
being positioned at (1, 1) initially and are moved to (0, 0) once the
first layout update is applied. By explicitly initializing the
'_geometry' to (0x0+0+0), we avoid this initial artifact.
2019-03-18 15:56:24 +01:00
Norman Feske
669aed0ac0 sculpt: don't reset hover on click on '+' menu
When entering/leaving sub menus of Sculpt's '+' menu, some parts of the
menu sometimes remain unchanged, in particular the back button.
Originally, a click would reset the hovering on clicks in the
expectation that any click would eventually result in a completely new
situation where the old hovering information does not make sense and
would only (potentially) confuse the menu. But this was apparently
overzealous. With the patch a once hovered back button stays hovered
even when actitivated and the back button of the upper-level menu
happens to stay under the current pointer position.

Issue #3209
2019-03-18 15:56:23 +01:00
Norman Feske
014e800e8a menu view: immediate hover update on dialog change
This patch improves the hover handling in situations where the dialog
changes under the pointer. Previously, hover changes were reported
as response to user input only, which failed to cover this case. This
became a problem with Sculpt CE's '+' menu, which changes on the fly
when entering/leaving sub menus.

The patch also cleanly separates the hover handling from the focus
handling. Originally, the hovering was reset when the menu view got
unfocused. In situations like Sculpt's '+' menu where the menu view
receives a transient focus only while clicked and gets unfocused on the
button-release event (aka clack), each clack would invalidate the hover
information until a new input event comes in.

Finally, the patch introduces the clear distinction between situations
where the entire dialog is hovered or not. Previously, this state was
somehow implicitly kept by issuing an invalid hover report whenever a
leave event was observed.

Issue #3209
2019-03-18 15:56:23 +01:00
Norman Feske
a61c5b6be3 wm: move virtual pointer pos on window movement
When a window is moved, the virtual pointer position must be updated,
taking the changed input coordinate into account. This patch propagates
such changes via absolute motion events to the client.

Without this patch, Sculpt CE's '+' menu wouldn't update the hovered
item correctly when entering/leaving sub menus (which happen to trigger
the repositioning of the menu on screen).

Issue #3209
2019-03-18 15:56:23 +01:00
Norman Feske
bd09783438 sculpt: dim non-TCB when selecting a component 2019-03-18 15:56:22 +01:00
Norman Feske
ef0a3f5be1 menu_view: hidden dependencies in <depgraph>
When specifying the attribute 'dep_visible="false"' for a primary
dependency or the attribute 'visible="false"' for a secondary
dependency, the dependency is used for the layout calculation but not
displayed in the graph.
2019-03-18 15:56:22 +01:00
Norman Feske
653f653c67 menu_view: style for unimportant frame and button 2019-03-18 15:56:22 +01:00
Norman Feske
ac37991b34 sculpt: minor graph improvements
- Omit showing routes to uninteresting ROMs obtained from the parent,
  i.e., the binaries requested by the sculpt-managed subsystems.
- Change the routes for the inspect subsystem such that the inspect-noux
  instance is anchored at the config node (critical!) and the nit_fb
  instance anchored at the used GUI.
2019-03-18 15:56:22 +01:00
Norman Feske
6ee7049736 sculpt: add whitespace around parent resources 2019-03-18 15:56:22 +01:00
Norman Feske
c41fbe9ea5 sculpt: don't mark in-construction pkgs as present
This patch excludes the current "Construction" from the list of
"present" components in the runtime. Without the patch, a missing "wm"
would go unmissing once when the routing dialog of a new wm instance
appears. Now an already present window layouter that had a broken route
would prematurely re-appear in the config, which should not happen
because the new wm does not exist yet.
2019-03-04 10:53:37 +01:00
Norman Feske
00ac29e53d Sculpt: avoid superfluous vertical space w/o info
When a <pkg> node of an index lacks an 'info' attribute, omit the
corresponding fields in the pkg dialog to avoid blank vertical space.
2019-03-01 19:27:40 +01:00
Norman Feske
434783da4d Sculpt: replace '_' by whitespace in GUI
Fixes #3190
2019-03-01 19:27:23 +01:00
Norman Feske
06d68e87ba sculpt: list all depot users in selection menu
Fixes #3188
2019-03-01 16:45:24 +01:00
Norman Feske
d6030a16b3 sculpt: tweaks for the component graph
- Hide depot_rom and dynamic_depot_rom
- Reset selection when removing the selected component
2019-02-28 11:34:08 +01:00
Norman Feske
3840ea9537 sculpt: anchor nic_drv, wifi_drv to hardware node 2019-02-28 11:34:08 +01:00
Christian Prochaska
2c253edda9 wm: forward 'buffer_size' argument of shape report session
Fixes #3186
2019-02-28 11:34:08 +01:00
Norman Feske
c0b93190d0 sculpt: browse depot index files in '+' menu
This commit turns the '+' menu into a tool for the following tasks:

- Selecting and downloading of depot index files
- Browsing of the hierarchical depot index files
- Installation of packages found in the index files
- Interactive routing configuration of a selected package
- Deployment of configured component
2019-02-28 11:34:07 +01:00
Norman Feske
b7f5aae64a sculpt: don't constrain '+' menu to avail space
Sculpt used to restrict the size of leitzentrale windows to the screen
area that is not obstructed by the menu and log. This is useful for the
runtime view and the inspect window. However, the menu should be allowed
to use the entire screen because it overlays the other content.

Before this patch, the menu wouldn't be displayed completely on small
resolutions (e.g., 1024x768 when using the VESA driver) because the log
at the bottom of the screen imposed the size constraint on the menu.
With the patch, the menu is able to overlay the log window.
2019-02-28 11:34:07 +01:00
Norman Feske
2163ce25f6 sculpt: show TCB dependencies of selection
This patch enhances the runtime view such that not only immediate
dependencies but also all transitive dependencies of the selected
component are displayed. This way, the graph nicely reveals the
trusted computing base of the selection.
2019-02-28 11:34:07 +01:00