Commit Graph

2194 Commits

Author SHA1 Message Date
Piotr Tworek
b4d294f62e os: Drop unused Net::Arp_cache::_init member.
Not used anywhere in the code. Clang 11 complains about this.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
052f678225 os: Add missing override keyword.
The _device_specific_features() implements part of the Virtio_device
interface. Decorate it with override keyword to make this clear and
also satisfy clang which produces warning regarding this.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
3fdf323e6e os: Drop unused Net::Dhcp_client::_alloc member.
Not used for anything so technically a dead code. Clang 11 complains
about this.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
05c36d67ce os: Fix clang constant warning in Port_allocator.
Clang 11 produces the following warning when building port_allocator.cc:

port_allocator.cc:27:21: error: result of comparison of constant 65536 with
expression of type 'const Genode::uint16_t' (aka 'const unsigned short') is
always true [-Werror,-Wtautological-constant-out-of-range-compare]
               (port.value <  (unsigned)(Port_allocator::FIRST +

Basically the code compares Port::value (uint16_t) against a constant
65536 which is larger than UINT16_MAX (65535). This comparison will always
be true.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
ffc2a2f306 os: Disambiguate File_system in ram_file_system.h.
According to clang there are two symbols which File_system can refer to:
1. namespace File_system from ram_fs/chunk.h.
2. Vfs::File_system class from  vfs/file_system.h.
Make it clear we refer to the File_system namespace in this case.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
fc089a1673 nic_dump: Remove unused Net::Interface::_alloc
This private member variable is not used anywhere in the code. This
breaks builds using clang instead of GCC. Drop the variable.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
428de89f9a nic_dump: Disambiguate "Interface" in component.cc.
Clang 12 complains that Interface can both refer to Genode::Interface
and Net::Interface in this case. Explicitly state the code refers to
the latter.

Issue #3984
2021-01-25 13:58:11 +01:00
Piotr Tworek
30429a5228 nic_flood: Drop Dhcp_client::_alloc member.
This private member variable is not used anywhere in the code. This
breaks builds using clang instead of GCC. Drop it.

Issue #3984
2021-01-25 13:58:11 +01:00
Norman Feske
84443d6548 os: div_zero trace policy
This trace policy can be used as a fault-injection mechanism.
Once installed, the next time the traced thread passes a trace point
(e.g., RPC call, RPC request, ...), the policy produces a divide-by-zero
exception.
2021-01-25 13:58:10 +01:00
Stefan Kalkowski
bdd923406f base: remove SPEC variables of boards (fix #3971)
* Remove SPEC declarations from mk/spec
* Remove all board-specific REQUIRE declaratiions left
* Replace [have_spec <board>] run-script declarations with have_board where necessary
* Remove addition of BOARD variable to SPECS in toplevel Makefile
* Move board-specific directories in base-hw out of specs
2021-01-25 13:58:09 +01:00
Stefan Kalkowski
5a123e37c9 run: introduce have_board helper function
The new helper function returns a boolean value analoque to 'have_spec' if the
BOARD variable corresponds to the given value. It shall replace [have_spec <board>]
declarations in run-scripts.

Ref #3971
2021-01-25 13:58:09 +01:00
Martin Stein
f6d195a9de nic drivers: provide optional Uplink-client mode
In order to perform a smooth transition from NIC drivers that act only as NIC
session clients to NIC drivers that act only as Uplink session clients, this
commit introduces an intermediate state in which all NIC drivers support both
modes. That said, a NIC drivers mode is now statically determined through a new
optional 'mode' attribute in the drivers <config> tag that can be set to either
'nic_server' (default value) or 'uplink_client'. Reconfiguring this attribute
at a driver doesn't have any effects. Whithout this attribute being set, all
NIC drivers will behave the same as they did before the commit. When set to
'uplink_client', however, instead of providing a Nic service, they request
an Uplink session whenever their network interface becomes "UP" and close the
session whenever their network interface becomes "DOWN".

Ref #3961
2021-01-25 13:58:09 +01:00
Martin Stein
1d2649b49a nic_router: act as "Uplink" server
Let the NIC router provide an Uplink service besides the Nic service that it
already provided. Requests for an Uplink session towards the NIC router are
assigned to Domains using the same <policy> configuration tags that are used in
order to assign Nic session requests. The MAC addresses of Uplink session
components are _NOT_ considered during the allocation of MAC addresses for NIC
session components at the same Domain. The task of avoiding MAC address clashes
between Uplink session components and Nic session components is therefore left
to the integrator. Apart from that, Uplink session components are treated by
the NIC router like any other interface.

Ref #3961
2021-01-25 13:57:43 +01:00
Martin Stein
cf72d1aac3 os: introduce new "Uplink" session
Adds new Uplink session interface, the corresponding client side (Client,
Connection), and the corresponding API archives. An Uplink session is almost
the same as a NIC session with the difference that the roles of the end points
are swapped. An Uplink client is the one that provides a network interface
(for instance, a NIC driver) whereas an Uplink server is the one that uses
that network interface (for instance, a networking stack).

Therefore, in contrast to the NIC session, MAC address and link state come from
the Uplink client. The link state is reflected through the lifetime of an
Uplink session: The client requests the session only when the link state is
"UP" and closes it whenever the link state becomes "DOWN" again. The MAC
address is transmitted from the Uplink client to the Uplink server as an
argument of the session request.

Ref #3961
2021-01-25 13:48:09 +01:00
Martin Stein
9222463565 run/ping: support running manually on Linux
* Adds documentation how to prepare and finalize a Linux for running the
  scenario ontop of it
* Adds consideration of env variable 'ON_LINUX_WITH_DST_IP' that, if set,
  adapts the run script to running on Linux with the given ping destination IP

Ref #3961
2021-01-25 13:48:09 +01:00
Alexander Boettcher
14d8627186 platform_drv: avoid using Register in Bdf type
Issue #3963
2021-01-25 13:48:09 +01:00
Alexander Boettcher
b185f3fac1 platform_drv: add support to power PCI devices
- depending on available PCI power cap power off and on
- save and restore PCI bars if required
- reset PCI devices after power on if supported

Fixes #3963
2021-01-25 13:48:09 +01:00
Alexander Boettcher
5f7fe7498f platform_drv: add mmio delayer support
required after power on and function level reset

Issue #3963
2021-01-25 13:48:08 +01:00
Alexander Boettcher
c89864c830 platform_drv: add typesafe PCI config access
using Register_set && Register. It is derived from Genode::Mmio, however uses
as backend the Config_access implementation which is still used widely in
the platform driver.

Issue #3963
2021-01-25 12:51:54 +01:00
Alexander Boettcher
59fafac4d6 platform_drv: increase readability
by adding convenience functions to make code easier readable

Issue #3963
2021-01-25 12:51:54 +01:00
Alexander Boettcher
ebf7f8f599 platform_drv: introduce structured PCI BDF type
Replace explicit usage of bus, device, function arguments to methods or
variables all over the code by a single data type. It eases the reading of and
shorten the code.

Issue #3963
2021-01-25 12:51:54 +01:00
Norman Feske
72801975cd nitpicker: defer hover changed while dragging
When holding at least one key or button, the hovering should never
change. In the previous version, this invariant was not enforced,
but the symptoms for eventual inconsistencies were masked by two
checkes: one when generating the hover report, and one when submitting
the leave event. This patch enforces the invariant by suppressing any
change of 'User_state::_hovered' while in dragged state.

Fixes #3973
2021-01-25 12:50:54 +01:00
Alexander Boettcher
0359ee6a76 sandbox: fix position scaling in affinity filter
During position scaling use the location width/height which is the permitted
dimension within the child space, instead of using the whole possible
child space. (Fixup for "init: scale affinity location" Issue #1412)

Thanks to the report by Peter.
2020-12-18 09:11:25 +01:00
Christian Helmuth
1bef11accf depot: update recipe hashes 2020-12-18 09:10:52 +01:00
Martin Stein
a124f5b88d nic_router: support and show-case disabling arp at a domain
* Introduce 'use_arp' configuration flag at the NIC router in order to disable
  requesting IP-to-MAC address resolutions via ARP for domains.
* Add automated run/nic_router_disable_arp test to the autopilot that tests
  the effect of the new flag
* Document the new flag and the new test in the NIC router README

Fixes #3935
2020-12-09 14:02:11 +01:00
Norman Feske
a0fb944721 Propagate session diag flag to core
This commit restores the diag feature for selecting diagnostic output of
services provided by core. This feature became unavailable with commit
"base: remove dependency from deprecated APIs", which hard-wired the
diag flag for core services to false.

To control this feature, three possible policies can be expressed in a
routing target of init's configuration:

* Forcing silence by specifying 'diag="no"'
* Enabling diagnostics by specifying 'diag="yes"'
* Forwarding the preference of the client by omitting the 'diag'
  attribute

Fixes #3962
2020-12-09 14:02:11 +01:00
Sebastian Sumpf
36eeab6df2 dde_linux: usb support extra data and zero config
- Vendor devices add addtional data to the config descriptor, read and
  added to the usb session
- allow '0' configuration within the usb session

issue #3822
2020-12-09 14:02:11 +01:00
Martin Stein
bad8caee3f nic_router: support multiple DHCP option 6 entries
* The NIC router now considers, memorizes, and, if configured, reports
  multiple DHCP option 6 entries from DHCP replies that it received as DHCP
  client
* A DHCP server at the NIC router can now be configured statically with
  multiple DNS server addresses to propagate
* The 'dns_server_from' attribute of the DHCP server of the NIC router now
  supports the forwarding of multiple DNS server addresses
* The automated run/nic_router_dhcp test tests all the above mentioned new
  functionality and reconfiguring it at runtime. The test was added to the
  autopilot.
* All run scripts were adapted to fit the new NIC router configuration
  interface

Fixes #3952
2020-12-09 14:02:10 +01:00
Martin Stein
063e4bd072 remove remnants of 'virtualbox_nic_router' test
Ref #3952
2020-12-09 14:02:10 +01:00
Martin Stein
e14b58a82c net/dhcp.h: more specific include guards
Ref #3952
2020-12-09 14:02:10 +01:00
Martin Stein
8d8edaea5d nic_router: fix link state on dhcp server reconfig
When reconfiguring the NIC router modifies the information that DHCP clients
received through a DHCP server of the NIC router, the link state of the
correspodning interface has to do a "down-up" sequence. This provides a signal
to the DHCP clients to redo DHCP, receive the new information and update
accordingly.

Fixes #3931
2020-12-09 14:02:10 +01:00
Martin Stein
b0327d0544 nic_router: preserve session link state until read
See the NIC router README paragraph "Behavior regarding the NIC-session link
state" for further information.

Ref #3931
2020-12-09 14:01:42 +01:00
Martin Stein
a7b878cbb5 nic_router: allow for config values of 0 seconds
Ref #3931
2020-12-09 14:01:42 +01:00
Martin Stein
7ac6f93838 nic_router: clean up init of configuration members
Ref #3931
2020-12-09 14:01:42 +01:00
Christian Helmuth
f2e0c164c2 depot: update recipe hashes 2020-11-27 09:21:06 +01:00
Stefan Kalkowski
b907629341 sculpt: add basic support for i.MX8 Quad EVK
* Introduce CPU quota for driver subsytem (needed by sd_card_drv)
* Introduce CPU quota for runtime subsytem and nic_drv (needed by fec_nic_drv)
* Increase CAP quota for inspect terminal slightly
* Add sculpt packages for imx8q_evk

Fix #3958
2020-11-27 09:19:09 +01:00
Alexander Boettcher
ffdd49f9ce platform_drv: free ever non PCI devices on close
Fixes #3957
2020-11-27 09:19:09 +01:00
Stefan Kalkowski
0cbd1d1b7c os: adjust sd_card_drv to use platform API
Fix #3956
2020-11-27 09:19:09 +01:00
Stefan Kalkowski
f4ac642f64 platform_drv: reset pointer when releasing device
Ref #3956
2020-11-27 09:19:09 +01:00
Alexander Boettcher
aa7f5bc95f os: add cpu balancer component
Issue #3843
2020-11-27 09:19:08 +01:00
Alexander Boettcher
6872fdb0de cpu_burner: utilize all assigned CPUs
Issue #3843
2020-11-27 09:19:08 +01:00
Piotr Tworek
48220dfd9b os: Add missing {} around sub-object initializers.
Clang complains when a sub-object is initialized without {}.

Issue #3950
2020-11-27 09:19:08 +01:00
Piotr Tworek
cc7de65c9e nitpicker: Remove unused hover_reported variables
Fix for unused private member variable warning reported by clang.

Issue #3950
2020-11-27 09:19:08 +01:00
Alexander Boettcher
d9cde328cb acpi: support amd iommu detection
Issue #3928
2020-11-23 12:03:00 +01:00
Alexander Boettcher
95c2e5beb3 run: extend pci test to show more information
Add some more vendors and classcode decoding. Additionally, walk PCI cap
space of each device and decode some of the types.

Issue #3928
2020-11-23 12:03:00 +01:00
Josef Söntgen
54d36a7d1b mixer: apply config on new sessions
Updating the config and using its settings instead of only reporting
the new session allows to apply stored channel settings immediately.

In case of Sculpt this is useful when an existing launcher already
contains a valid config that sets the volume levels appropiately or
the 'recall_fs' is used.

Fixes #3930.
2020-11-23 12:02:59 +01:00
Martin Stein
9b164d20fd vfs directory service: name enum Open_mode
Fixes #3936
2020-11-23 12:02:59 +01:00
Piotr Tworek
db17d51ff1 os: Drop unused _tree member in Root_clock_divider
Its not used anywhere in the code. Clang produces warning due to this.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
736b000c19 os: Drop ununsed Main::_id_id variable in ping
The variable is not used anywhere in the code. This produces warning
when building with clang.

Issue #3938
2020-11-23 12:02:59 +01:00
Piotr Tworek
187b8ece27 os: Drop ununsed Virtdev_rom::Root::_env member
Set but not accessed from anywhare. This triggers compilation warning
when building the code with clang.

Issue #3938
2020-11-23 12:02:59 +01:00