Commit Graph

126 Commits

Author SHA1 Message Date
Norman Feske
366bba0227 Exclude higher-level repos from strict warnings
This is a follow-up commit to "Increase default warning level", which
overrides Genode's new default warning level for targets contained in
higher-level repositories. By explicitly whitelisting all those targets,
we can selectively adjust them to the new strictness over time - by
looking out for 'CC_CXX_WARN_STRICT' in the target description files.

Issue #465
2018-01-17 12:14:36 +01:00
Norman Feske
eba9c15746 Follow practices suggested by "Effective C++"
The patch adjust the code of the base, base-<kernel>, and os repository.
To adapt existing components to fix violations of the best practices
suggested by "Effective C++" as reported by the -Weffc++ compiler
argument. The changes follow the patterns outlined below:

* A class with virtual functions can no longer publicly inherit base
  classed without a vtable. The inherited object may either be moved
  to a member variable, or inherited privately. The latter would be
  used for classes that inherit 'List::Element' or 'Avl_node'. In order
  to enable the 'List' and 'Avl_tree' to access the meta data, the
  'List' must become a friend.

* Instead of adding a virtual destructor to abstract base classes,
  we inherit the new 'Interface' class, which contains a virtual
  destructor. This way, single-line abstract base classes can stay
  as compact as they are now. The 'Interface' utility resides in
  base/include/util/interface.h.

* With the new warnings enabled, all member variables must be explicitly
  initialized. Basic types may be initialized with '='. All other types
  are initialized with braces '{ ... }' or as class initializers. If
  basic types and non-basic types appear in a row, it is nice to only
  use the brace syntax (also for basic types) and align the braces.

* If a class contains pointers as members, it must now also provide a
  copy constructor and assignment operator. In the most cases, one
  would make them private, effectively disallowing the objects to be
  copied. Unfortunately, this warning cannot be fixed be inheriting
  our existing 'Noncopyable' class (the compiler fails to detect that
  the inheriting class cannot be copied and still gives the error).
  For now, we have to manually add declarations for both the copy
  constructor and assignment operator as private class members. Those
  declarations should be prepended with a comment like this:

        /*
         * Noncopyable
         */
        Thread(Thread const &);
        Thread &operator = (Thread const &);

  In the future, we should revisit these places and try to replace
  the pointers with references. In the presence of at least one
  reference member, the compiler would no longer implicitly generate
  a copy constructor. So we could remove the manual declaration.

Issue #465
2018-01-17 12:14:35 +01:00
Josef Söntgen
93e42bf5b9 driver_manager: increase intel_fb_drv CAP quota 2017-12-21 15:01:49 +01:00
Norman Feske
a52541de18 depot: move versions to subdirectory
This patch changes the depot layout such that each archive is
represented as a directory that contains the versions of the archive as
subdirectories.

Issue #2610
2017-12-21 15:01:45 +01:00
Alexander Boettcher
0b09cc8cf6 driver_manager: improve fb-driver selection
This is a follup-up commit for "driver_manager: add fb_boot_drv
support". It refines the heuristics for selecting the most suitable
framebuffer driver be prevent boot_fb_drv from being preferred over
the VESA driver when running in Qemu.
2017-11-30 11:23:13 +01:00
Norman Feske
c05ab9c310 drivers_managed-pc: propagate keyboard LEDs
This patch supplements the drivers subsystem with the ability to
propagate the global capslock and numlock states to PS/2 and USB HID
keyboards.
2017-11-30 11:23:12 +01:00
Emery Hemingway
0b60b8954b app/backdrop: use 'with_libc'
Fix #2577
2017-11-30 11:23:04 +01:00
Stefan Kalkowski
593fe2a571 driver_manager: hand out USB serial sessions too 2017-11-09 12:18:42 +01:00
Alexander Boettcher
aec97b7da0 driver_manager: add fb_boot_drv support 2017-11-09 12:18:41 +01:00
Norman Feske
2b632760b6 driver manager: increase RAM quota for usb_drv
Without this patch, usb_drv would issue a resource request when
assigning a USB device to a VM in the sculpt scenario.

Furthermore, the patch adjusts the intel_fb quota to enable it on
devices where the driver allocates the framebuffer in many 4K pieces.
2017-11-09 12:18:41 +01:00
Norman Feske
6bfd4f4276 gems: driver-manager subsystem for PC platforms
This is a drivers subsystem that starts the most fundamental
(framebuffer, input, block) device drivers dynamically, depending on the
runtime-detected devices. The discovered block devices are reported
as a "block_devices" report.
2017-10-05 17:40:00 +02:00
Norman Feske
e99f2d0595 window layouter: fix initial window positioning
This patch fixes the positioning of windows according to configured
policies. Thanks to Alexander Senier for reporting the issue!
2017-10-05 17:39:54 +02:00
Norman Feske
063413ca1f menu_view: animate geometric changes 2017-08-28 16:49:41 +02:00
Norman Feske
bb52181bc5 menu_view: fix frame dropping after sleep
When idle, menu_view de-schedules timer events to save processing time.
Once reactivated by a dialog update, it computes the passed time and
applies the result to the animator. However, the animation was most likely
started by the update not during the sleep. So the passed time must not
be applied to the animation in this case. Otherwise, many animation steps
are computed at once within a single visible frame.

Furthermore, the patch adjusts the REDRAW_PERIOD to 2, which is a better
value for geometric movements as opposed to mere color-blending effects
where the frame rate does not matter so much.

It also refines the nitpicker-buffer relocation in a way that extends
the buffer but does not shrink it. This lowers the interaction with
nitpicker in situations where the dialog size changes a lot.
2017-08-28 16:49:41 +02:00
Norman Feske
cdebd0a994 menu_view: depgraph widget
The new <depgraph> widget arranges child widgets in the form of a
dependency graph.
2017-08-28 16:49:41 +02:00
Norman Feske
f073c51b49 menu_view: support labels with no background
By applying the text output to the alpha buffer in addition to the pixel
buffer, labels can now appear without the need for an underlying frame
or button.
2017-08-28 16:49:40 +02:00
Norman Feske
4ca493b762 menu_view: use list_model_from_xml.h 2017-08-28 16:49:40 +02:00
Norman Feske
c601052c8c menu_view: generalized data-model-update utility
The utility simplifies the synchronization of a list-based data model
from an XML structure.
2017-08-28 16:49:40 +02:00
Norman Feske
13e9f6728d menu_view: split implementation into several files 2017-08-28 16:49:40 +02:00
Norman Feske
80324d9f54 menu_view: handle disppearing child widgets 2017-08-28 16:49:40 +02:00
Norman Feske
569741faf2 menu_view: add '<float>' widget
The new widget allows one to align a child widget within a larger parent
widget by specifying the boolean attributes 'north', 'south', 'east',
and 'west'. If none is specified, the child is centered. If opposite
attributes are specified, the child is stretched.
2017-08-28 16:49:40 +02:00
Norman Feske
8312950e2f gems: app/depot_query 2017-08-28 16:49:38 +02:00
Norman Feske
a9eb25f07f gems: fix cap quotas of launcher.run scenario
The launcher.run scenario was last updated mid-may of the recently
developed cap-quota accounting (before all cap types were covered).
Hence, the quotas used in the scenario are too low. This patch adjusts
the values such that the scenario can be started on NOVA on Qemu. It
also fixes a warning about a deprecated way of configuring the
report_rom component.

Thanks to Jörg-Christian Böhme for reporting!
2017-08-17 11:04:23 +02:00
Emery Hemingway
32d16c1792 app/launcher: <configfile name="..."/> support
Fix #2404
2017-05-31 17:50:28 +02:00
Christian Prochaska
99937a6267 qt5: update to version 5.8.0
Fixes #2424
2017-05-31 13:16:23 +02:00
Stefan Kalkowski
632ef28463 os: removal of deprecated os/config.h (fix #2431) 2017-05-31 13:16:22 +02:00
Christian Prochaska
a507928cde qt5: fix deprecated warnings
Fixes #2427
2017-05-31 13:16:19 +02:00
Norman Feske
0167d5af50 Integrate core's RAM service into the PD service
Fixes #2407
2017-05-31 13:16:14 +02:00
Norman Feske
4d442bca30 Streamline exception types
This patch reduces the number of exception types by facilitating
globally defined exceptions for common usage patterns shared by most
services. In particular, RPC functions that demand a session-resource
upgrade not longer reflect this condition via a session-specific
exception but via the 'Out_of_ram' or 'Out_of_caps' types.

Furthermore, the 'Parent::Service_denied', 'Parent::Unavailable',
'Root::Invalid_args', 'Root::Unavailable', 'Service::Invalid_args',
'Service::Unavailable', and 'Local_service::Factory::Denied' types have
been replaced by the single 'Service_denied' exception type defined in
'session/session.h'.

This consolidation eases the error handling (there are fewer exceptions
to handle), alleviates the need to convert exceptions along the
session-creation call chain, and avoids possible aliasing problems
(catching the wrong type with the same name but living in a different
scope).
2017-05-31 13:16:07 +02:00
Norman Feske
1f4f119b1e Capability quota accounting and trading
This patch mirrors the accounting and trading scheme that Genode employs
for physical memory to the accounting of capability allocations.

Capability quotas must now be explicitly assigned to subsystems by
specifying a 'caps=<amount>' attribute to init's start nodes.
Analogously to RAM quotas, cap quotas can be traded between clients and
servers as part of the session protocol. The capability budget of each
component is maintained by the component's corresponding PD session at
core.

At the current stage, the accounting is applied to RPC capabilities,
signal-context capabilities, and dataspace capabilities. Capabilities
that are dynamically allocated via core's CPU and TRACE service are not
yet covered. Also, the capabilities allocated by resource multiplexers
outside of core (like nitpicker) must be accounted by the respective
servers, which is not covered yet.

If a component runs out of capabilities, core's PD service prints a
warning to the log. To observe the consumption of capabilities per
component in detail, the PD service is equipped with a diagnostic
mode, which can be enabled via the 'diag' attribute in the target
node of init's routing rules. E.g., the following route enables the
diagnostic mode for the PD session of the "timer" component:

  <default-route>
    <service name="PD" unscoped_label="timer">
      <parent diag="yes"/>
    </service>
    ...
  </default-route>

For subsystems based on a sub-init instance, init can be configured
to report the capability-quota information of its subsystems by
adding the attribute 'child_caps="yes"' to init's '<report>'
config node. Init's own capability quota can be reported by adding
the attribute 'init_caps="yes"'.

Fixes #2398
2017-05-31 13:16:06 +02:00
Norman Feske
3670f7735d base: use 'Quota_transfer::Account' for 'Service'
This patch makes use of the new 'Quota_transfer::Account' by the service
types in base/service.h and uses 'Quota_transfer' objects in
base/child.cc and init/server.cc.

Furthermore, it decouples the notion of an 'Async_service' from
'Child_service'. Init's 'Routed_service' is no longer a 'Child_service'
but is based on the new 'Async_service' instead.

With this patch in place, quota transfers do no longer implicitly use
'Ram_session_client' objects. So transfers can in principle originate
from component-local 'Ram_session_component' objects, e.g., as used by
noux. Therefore, this patch removes a strumbling block for turning noux
into a single threaded component in the future.

Issue #2398
2017-05-31 13:16:06 +02:00
Norman Feske
58f44d39c5 base: use 'Ram_quota' in 'Ram_session' args
This patch replaces the former use of size_t with the use of the
'Ram_quota' type to improve type safety (in particular to avoid
accidentally mixing up RAM quotas with cap quotas).

Issue #2398
2017-05-31 13:16:04 +02:00
Norman Feske
93b78573bd Remove superfluous 'cxx' from LIBS in target.mk 2017-05-02 15:28:53 +02:00
Christian Helmuth
88db3c0df7 Fix some deprecated warnings
Issue #1987
2017-03-24 16:20:03 +01:00
Martin Stein
9b8fcb5fd0 nano3d: get rid of env() calls
Issue #1987
2017-02-28 13:00:42 +01:00
Norman Feske
29b8d609c9 Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
Josef Söntgen
e266e3cf1d floating_window_layouter: remove deprecated env()
Issue #2280.
2017-02-28 12:59:21 +01:00
Norman Feske
e17811fb7a cli_monitor: API transition
Issue #1987
2017-02-28 12:59:20 +01:00
Norman Feske
19868de69a launcher: API transition (deprecated warnings)
Issue #1987
2017-02-27 15:37:49 +01:00
Emery Hemingway
48150a706b update Reporter constructors
The Reporter utility needs a reference to the environment at
construction to establish Report connections.

Ref #1987
Fix #2232
2017-02-07 19:20:29 +01:00
Norman Feske
f8349b5bc7 os/slave.h: Remove use of global allocator
This patch eliminates the need for a global allocator by passing the
parent-service registry as argument to the 'Slave::Policy' constructor.

Fixes #2269
2017-02-07 11:12:28 +01:00
Norman Feske
cd3a5852d6 Warn about the use of deprecated headers
This commit enables compile-time warnings displayed whenever a deprecated
API header is included, and adjusts the existing #include directives
accordingly.

Issue #1987
2017-01-31 12:01:18 +01:00
Norman Feske
eb869ab2dc backdrop: API transition (fix deprecated warnings)
Issue #1987
2017-01-31 12:01:13 +01:00
Norman Feske
645cd88a8b gems/menu_view: adaptation to new libc/vfs config
Issue #2217
2017-01-23 16:46:04 +01:00
Norman Feske
703d68c7c1 themed_decorator: API transition
Issue #1987
2017-01-13 13:07:16 +01:00
Norman Feske
7180851b2f menu_view: API transition
Issue #1987
2017-01-13 13:07:16 +01:00
Norman Feske
81862a41e1 decorator: API transition
Issue #1987
2017-01-13 13:07:16 +01:00
Emery Hemingway
745eb89237 lib/component: pass extended Libc::Env
Libc::Env is the Genode::Env interface extended to cover access
to the XML content of the 'config' ROM and a VFS instance. This
deduplicates the burden of components to attain and manage
these resources.

Fix #2217
Ref #1987
2017-01-13 13:07:01 +01:00
Norman Feske
e91170a49c app/cli_monitor: API transition
Besides updating CLI monitor to the new API, the patch removes
Fiasco.OC-specific extensions that remained unused for a long time.

Ref #1987
2017-01-13 13:07:00 +01:00
Emery Hemingway
2b7fcf5cae app/floating_window_layouter: API transition
Ref #1987
2017-01-13 13:06:58 +01:00