Commit Graph

516 Commits

Author SHA1 Message Date
Stefan Kalkowski 76e9645787 dde_linux: support of GSIs in new usb_host_drv 2018-09-13 15:21:11 +02:00
Martin Stein 770fc77584 dde_linux lx_emul wait: get rid of unused args 2018-09-13 15:21:11 +02:00
Alexander Boettcher 4ca8e31e00 intel_fb: enable Intel VBT lookup via ACPI
Fixes #2965
2018-09-13 14:54:21 +02:00
Stefan Kalkowski 9221f7916a dde_linux: enable QEMU support for new usb_hid_drv 2018-09-13 14:54:21 +02:00
Stefan Kalkowski 1ec2f43713 dde_linux: use correct type in lx_emul's `min`
* use a macro for `min` inside lx_emul/kernel.h
* unify the definition of the clamp function

Fix #2964
2018-09-13 14:54:20 +02:00
Alexander Boettcher dbb37607c5 usb: fix regression in setup_timer
introduced by update to 4.16.3. Fixes page faults in OHCI USB driver part.

Issue #2963
2018-09-05 11:08:25 +02:00
Norman Feske 2049498af0 depot: update recipe hashes 2018-09-05 11:04:24 +02:00
Josef Söntgen b93f15046c dde_linux: remove unused WPA code in src archive
Rather than removing the source files during the port preration, which
breaks preparing the port anew, they are now removed while creating
the src archive.

Fixes #2959.
2018-09-05 11:04:23 +02:00
Ehmry - fcbe060096 Remove legacy lwIP plugins
Now that the lwIP VFS plugin has become a first class IP stack it is
time to remove the lwIP 1.x library and the associated libc plugins.

Fix #2958
2018-09-05 11:04:22 +02:00
Norman Feske bbff6ae529 dde_linux: keep .git contrib directory
This is a follow-up commit to "dde_linux: remove unused WPA supplicant
code" that prevents the potential data loss described in #2959.
2018-09-03 16:53:30 +02:00
Christian Helmuth c2e0d0ae20 depot: update recipe hashes 2018-08-30 09:25:10 +02:00
Josef Söntgen 8c9ea49ff5 dde_linux: remove unused WPA supplicant code
Since we use the git repo by now remove all unnecessary ballast like
unused code and the git history. The will bring down the wifi_drv's
src archive to reasonable size again.
2018-08-30 09:24:46 +02:00
Stefan Kalkowski 2882bd48e6 dde_linux: USB client driver for NIC version 4.16 2018-08-30 09:24:46 +02:00
Stefan Kalkowski b32a3cd4d9 dde_linux: USB-client driver for HID version 4.16 2018-08-30 09:24:45 +02:00
Stefan Kalkowski b02f483841 dde_linux: usb host controller driver version 4.16 2018-08-30 09:24:45 +02:00
Christian Helmuth 44a8bec56a dde_linux: streamline strlcpy/strlcat implementations 2018-08-28 16:48:46 +02:00
Christian Prochaska aa909702c6 vfs_lxip: fix 'sendmsg()' result interpretation
Issue #2920
2018-08-28 16:45:24 +02:00
Josef Söntgen 6238d61f7e nic_router_uplinks.run: adapt to wifi_drv front end changes 2018-08-28 16:45:23 +02:00
Josef Söntgen 6f62f5d428 wifi: fix missing regulatory DB 2018-08-28 16:45:23 +02:00
Josef Söntgen ec9e8ecfaa wifi_drv: enable soft RFKILL and new front end
* TODO
2018-08-28 16:18:34 +02:00
Josef Söntgen 870505bcd9 wifi: update iwlwifi to 4.16.3 2018-08-28 16:18:33 +02:00
Alexander Boettcher eb62d9cc04 dde_linux: update intel_fb to 4.16.3
Fixes #2736
2018-08-28 16:18:33 +02:00
Josef Söntgen 80104f5192 usb: adapt to lx_kit/lx_emul update 2018-08-28 16:18:32 +02:00
Josef Söntgen 05179409be fec: adapt to lx_kit/lx_emul update 2018-08-28 16:18:32 +02:00
Josef Söntgen ced585fd5e lxip: adapt to lx_kit/lx_emul updates 2018-08-08 13:33:38 +02:00
Alexander Boettcher 2efc64ace7 lx_kit: adjust to 4.16.3 2018-08-08 13:33:37 +02:00
Christian Helmuth f4ea50c6ff depot: update recipe hashes 2018-08-08 10:59:04 +02:00
Ehmry - a7e5d4ef03 LxIP: propagate write errors using SYNC_ERR_INVALID
The libc sockets implementation already syncs socket control files after
writes, so sync errors will induce failures for operations such as
"connect".

Fix #2920
2018-08-02 14:36:49 +02:00
Emery Hemingway d9a4773194 LwIP VFS plugin
This patch reintroduces the LwIP stack to libc as a VFS plugin
implementing the socket_fs interface. Rather than use LwIP's socket
emulation layer this plugin interfaces directly to LwIP raw API and is
single threaded.

The internal TCP parameters of the stack are untuned.

Fix #2050
Fix #2335
2018-08-02 14:36:48 +02:00
Sebastian Sumpf 037a0d6822 usb_drv: add isochronous packet support
Commit extents USB session an driver accordingly.

issue #2910
2018-08-02 14:36:46 +02:00
Christian Prochaska b2f7a6a934 vfs_lxip: look up path in 'leaf_path()'
Fixes #2913
2018-08-02 14:36:43 +02:00
Norman Feske 953c62c04c dde_linux: removed libc_setjmp dependency
This is no longer needed since dde_linux uses the lx_kit_setjmp
library now.
2018-08-02 14:36:39 +02:00
Christian Helmuth b485caf33c depot: update recipe hashes 2018-07-03 09:40:11 +02:00
Sebastian Sumpf 10485b0d39 run: rename 'check_installed' to 'installed_command'
Also remove 'requires_installation_of', while also checking sbin
directories in 'have_installed'. The run scripts have been adjusted
accordingly.

Fixes #2853
2018-07-03 09:39:31 +02:00
Christian Prochaska 38ae718509 usb_drv: wait for keyboard LED registry in 'led_connect()'
It can happen that a keyboard gets plugged in and 'led_connect()' is
called while the keyboard LED of another keyboard is just being updated
(and the registry is locked).

Fixes #2869
2018-06-29 10:44:56 +02:00
Martin Stein 49a3a0e0d0 nic_router: multiple uplinks
Introduce the uplink tag:

! <config>
!    <uplink label="wifi"  domain="uplink">
!    <uplink label="wired" domain="wired_bridge">
!    <uplink               domain="wired_bridge">
! <config/>

For each uplink tag, the NIC router requests a NIC session with the
corresponding label or an empty label if there is no label attribute.
These NIC sessions get attached to the domain that is set in their
uplink tag as soon as the domain appears. This means their lifetime is
not bound to the domain. Uplink NIC sessions can be safely moved from
one domain to another without being closed by reconfiguring the
corresponding domain attribute.

Attention: This may render previously valid NIC router configurations
useless. A domain named "uplink" doesn't automatically request a NIC
session anymore. To fix these configurations, just add

! <uplink domain="uplink"/>

or

! <uplink label="[LABEL]" domain="uplink"/>

as direct subtag of the <config> tag.

Issue #2840
2018-06-29 10:44:53 +02:00
Christian Helmuth 246bacd9da depot: update recipe hashes 2018-06-13 13:52:12 +02:00
Christian Helmuth 91b2e023b8 vfs/lxip: make gateway config attribute optional
This enables the application in router/gateway-less network
configurations, e.g., test environments.
2018-06-12 12:11:46 +02:00
Christian Helmuth bd86efe5fe depot: update recipe hashes 2018-05-31 14:02:21 +02:00
Martin Stein 1306892fbf nic_router: fix interface update on missing domain
When updating an interface in the NIC router to a new configuration and
the domain name of the interface has not changed but the domain
disappeared, the NIC router did not detach from the old domain correctly
which led to broken remnants of interface state objects (like connection
states).

Adapt the nic_router_uplinks run script to work with the fix.
2018-05-31 12:28:15 +02:00
Martin Stein f278a3bafb nic_router_uplinks.run: test uplink re-connect
Automated test for switching the NIC-router uplink between NIC driver and Wifi
driver with DHCP and different subnets. Tests also removal and later re-
insertion of the uplink domain tag.

Issue #2815
2018-05-30 13:36:35 +02:00
Christian Helmuth aa8b725457 wifi: don't generate unused files in port 2018-05-30 13:36:25 +02:00
Ehmry - 72cb71c827 Replace SHA1 hashes of port downloads with SHA256
Now SHA256 has been shown to be an adequate replacement for SHA1, use
SHA256 for verifying all port downloads.

Ref #2767
2018-05-30 13:36:22 +02:00
Ehmry - e36ddaf659 Rename lwip library to lwip_legacy
Rename LwIP library in preparation for removal of LwIP libc plugin. The
current LwIP library will be replaced with a new version stripped of its
synchronous socket support. The next version will be incompatible with
the current, so removing 'lwip.lib.so' completely for a period makes it
easy to identify legacy users.

Fix #2797
2018-05-30 13:36:22 +02:00
Ehmry - e2661c58dc Convert static VFS library to dynamic library
Fix #2759
2018-05-30 12:26:19 +02:00
Christian Helmuth 3b7d6394d7 depot: update recipe hashes 2018-05-03 15:32:01 +02:00
Ehmry - 401ba6e7fd Manage socket_fs socket lifetime via handles
Socket_fs sockets are now created each time a 'new_socket' control file
is opened, not each time a 'new_socket' file is read. When a handle on a
'new_socket' file is closed the socket and its socket files are
destroyed. The accept control file on a listening socket reads "1" or
reads nothing to indicate a client connection is queued. Client sockets
are accepted by opening an 'accept_socket' file in the listen socket
directory. This file behaves like the aforementioned 'new_socket' file.

Ref #2707
2018-05-03 15:31:57 +02:00
Norman Feske afcad2a968 os: new Input::Event representation
This commit changes the 'Input::Event' type to be more safe and to
deliver symbolic character information along with press events.

Issue #2761
Fixes #2786
2018-05-03 15:31:25 +02:00
Christian Helmuth 47569458d4 depot: update recipe hashes 2018-04-19 12:39:20 +02:00
Ehmry - 82a683eccc VFS: construct file-systems using Vfs::Env object
Reduce the size and forward compatibility of VFS file-system
constructors by passing an object holding accessors for 'Genode::Env',
'Genode::Allocator', response handlers, and the root file-system.

Fix #2742
2018-04-19 12:38:27 +02:00
Stefan Kalkowski 2af5dbc201 dde_linux: enable more platforms for nic_drv
In addition to the i.MX6Q SoC, the Freescale network driver
works now on i.MX6SX and i.MX53 SoCs.

Ref #2749
2018-04-19 12:38:24 +02:00
Stefan Kalkowski a3171befe9 dde_linux: canceling a pending work is no error
Ref #2749
2018-04-19 12:38:24 +02:00
Christian Helmuth d54f95d497 depot: update recipe hashes 2018-04-10 13:03:26 +02:00
Norman Feske b0b92e4ee2 vfs: pass root directory to plugins
This patch enables the use of the VFS from VFS plugins by passing a
reference of the root directory to the constructors of file-system
instances. Since it changes the signature of 'Vfs::Dir_file_system',
any code that uses the VFS directly requires an adaptation.

Fixes #2701
2018-04-10 11:09:17 +02:00
Sebastian Sumpf f61c0c6309 lx_kit: Do not align DMA memory kmalloc
Aligning memory to page size will require at lead 8KB per allocation (even for 8
bytes). This should severely reduce memory requirements of all dde_linux
projects.

related to #2731
2018-04-10 11:09:17 +02:00
Sebastian Sumpf eab4c887ec usb: fix memory leaks during device disconnect
fixes #2731
2018-04-10 11:09:17 +02:00
Alexander Boettcher de82980e89 wandboard: improve memory usage of ethernet driver
Use a 8K slab entry instead of 16K slab entry, per 2K
network packet.

Issue #2665
2018-04-10 11:09:16 +02:00
Alexander Boettcher fce15b4f13 sel4: adjust network scenarios for wandboard
Issue #2665
2018-04-10 11:09:16 +02:00
Christian Helmuth b07d6eced8 depot: update recipe hashes 2018-03-29 14:59:07 +02:00
Boris Mulder 964aac599c wpa_supplicant: report auth_failures
Fixes #2668
2018-03-08 15:45:34 +01:00
Christian Helmuth 1f7b5e75bf depot: update recipe hashes 2018-03-08 12:05:10 +01:00
Christian Helmuth a8f186c7d4 depot: update recipe hashes 2018-02-28 11:05:05 +01:00
Stefan Kalkowski 9f945a782f run: enable Wandquad board for network tests
Ref #2665
2018-02-28 11:04:57 +01:00
Stefan Kalkowski d5dc234a00 dde_linux: wandboard ethernet driver
Fixes #2665
2018-02-28 11:04:56 +01:00
Ehmry - 590f51dbe1 dde_linux: Build net/ipv4/datagram.c for UDP connect
Fix #2683
2018-02-28 11:01:32 +01:00
Norman Feske 5261462d7a depot: src/vfs_lxip recipe 2018-02-28 11:01:31 +01:00
Ehmry - f177107a4f Fix string handling in Lxip
Use a utility method to copy application provided strings into control
file buffers. This fixes an potential connect error.

Ref #2535
2018-02-28 11:01:31 +01:00
Ehmry - 01800ad1a3 vfs_lxip: check that socket is ready for I/O
Check that the Linux socket structure is populated before performing
read or write operations on control files.

Fix #2679
2018-02-28 11:01:31 +01:00
Norman Feske 7bee21a4fd depot: fix firmware name in pkg/wifi/runtime 2018-02-19 20:50:48 +01:00
Norman Feske e79ce5a036 depot: update recipe hashes 2018-02-16 08:42:31 +01:00
Josef Söntgen d4576833d6 dde_linux: silence waitqueue related warnings 2018-02-16 08:42:30 +01:00
Norman Feske fc902b797e depot: runtime definitions for sculpt installation
This patch supplements 'runtime' files to several pkg archives,
which thereby become deployable by the depot_deploy tool.

Issue #2676
2018-02-15 10:22:10 +01:00
Ehmry - d82ddeeaff Add Intel Wireless-N 1000 to raw/wifi_firmware
Fix #2674
2018-02-14 20:41:07 +01:00
Norman Feske 8aa1e349fc terminal session: propagate resize events
The new 'Terminal_session::size_changed_sigh' RPC function registers a
signal handler that is triggered each time when the terminal size
changes. It enables the client to adjust itself to the new size by
subsequently calling the 'size' RPC function. Of all terminal servers,
only the graphical terminal triggers this signal.
2018-02-14 20:41:03 +01:00
Norman Feske 8d09d02b85 depot: update recipe hashes 2018-02-09 13:34:24 +01:00
Christian Helmuth bb9d15b8b9 intel_fb: prevent destruction of session singleton
Issue #2588
2018-02-09 13:34:22 +01:00
Alexander Boettcher 1f1d1af041 dde_linux: enable pci config command memory access
Issue #2620
2018-02-09 13:34:18 +01:00
Christian Helmuth 6013889028 depot: update recipe hashes 2018-01-17 12:14:44 +01:00
Martin Stein 8844c57254 net-stat: remove as it is not used and outdated
According to the creator of the net-stat lib, this lib was a mere debugging
tool that is not used anymore nor worth the work of updating the it to
modern Genode coding paradigms. Also, there exist no tests for the lib.
2018-01-17 12:14:42 +01:00
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
Christian Helmuth 553cf556af depot: update recipe hashes 2017-12-21 15:01:56 +01:00
Christian Helmuth 25ca29002e depot: update recipe hashes 2017-11-30 11:24:49 +01:00
Alexander Boettcher f68be31fa3 usb_hid.run: filter_out messages from core 2017-11-30 11:23:20 +01:00
Christian Helmuth d5518aa938 lib/vfs/lxip: support configuration of MTU
The MTU can be set via the "mtu" attribute like follows.

  <vfs> <lxip mtu="1200" dhcp="yes"/> </vfs>
2017-11-30 11:23:18 +01:00
Christian Helmuth 64c8b06377 dde_linux: fix mod_delayed_work(delay)
'delay' is a relative timeout while mod_timer() needs an absolute point
in time.
2017-11-30 11:23:17 +01:00
Christian Helmuth 73a3ef4dbe lib/vfs/lxip: stack info (nameserver etc.) in test 2017-11-30 11:23:17 +01:00
Martin Stein ea76b08f9f lib/vfs/lxip: provide nic link state in a file 2017-11-30 11:23:17 +01:00
Sebastian Sumpf 9d0518661b usb: remove warning in 'find_next_zero_bit_le'
in case no zero bit is found.
2017-11-30 11:23:13 +01:00
Sebastian Sumpf fe4f304815 usb: LED suppport 2017-11-30 11:23:11 +01:00
Josef Söntgen b3b10c1439 dde_linux: create wifi recipe 2017-11-30 11:23:07 +01:00
Martin Stein f831800ae0 test/lxip/udp_client: remove because not used
Was once introduced it for the NIC router/dump tests which do not use it
anymore.

Fix #2543
2017-11-30 11:23:03 +01:00
Martijn Verschoor 55a014acbc dde_linux wifi: firmware for Intel Wireless 3160
Fixes #2572
2017-11-30 11:23:02 +01:00
Stefan Kalkowski 83a88d46b7 dde_linux: remove timer optimization
Instead of storing whether the first item in the timeout list was already
programmed using the timer service, just program the first timeout in the
list unconditionally. In the past we lost a timeout at least when using the
usb ethernet driver on hw/arndale sporadically.
2017-11-30 11:23:01 +01:00
Christian Helmuth 491be000ca depot: update recipe hashes 2017-11-09 12:19:59 +01:00
Josef Söntgen bc6f523c8d wifi: initialize 'struct device' member properly
Normally this is done in 'platform_device_add()' but let's do it in
our 'platform_device_register_simple()' implementation.
2017-11-09 12:18:41 +01:00
Norman Feske 96351801c9 wifi_drv: implement vzalloc
This function is called by the rarely executed error handling code
(iwl_mvm_fw_error_dump) of wifi.lib.so.
2017-11-09 12:18:41 +01:00
Alexander Senier 66f3742112 dde_linux/usb: Support HTC device in RNDIS test
Fixes #2550
2017-11-09 12:18:40 +01:00
Alexander Senier 77010d6434 dde_linux/usb: Don't treat trimming SKB to current len as error
The rndis_host driver calls skb_trim with the current SKB length which
results in many "errors" logged. We shouldn't treat this condition
as an error.
2017-11-09 12:18:39 +01:00
Alexander Senier f15e8fec8f dde_linux/usb: Add RNDIS driver 2017-11-09 12:18:39 +01:00
Alexander Senier 50ec5c03c1 dde_linux/usb: Support CDC Ethernet 2017-11-09 12:18:39 +01:00
Alexander Senier 6d69f946a8 dde_linux/usb: Do not unset carrier flag in register_netdev
Linux does not do that in register_netdev() either. Some drivers set the
carrier flags on attach and never reenable it (as seen with rndis_host).
Consequently, the usbnet driver refuses to receive data as it checks the
carrier state before enqueuing new SKBs to its receive queue.

Apart from rndis_host, this change was tested with an ax88179_178a
device which worked as expected.
2017-11-09 12:18:06 +01:00
Alexander Senier aa0f13fba5 dde_linux/usb: Initialize head pointer of SKB 2017-11-09 12:18:06 +01:00
Alexander Boettcher c1493b2ed2 usb: avoid pagefault during session destruction
due to pointer to object allocated in context of the session object.

Fixes #2565
2017-11-09 12:18:05 +01:00
Christian Helmuth 30948a4b0d depot: update recipe hashes 2017-11-06 13:57:25 +01:00
Josef Söntgen 2f32308c0b wifi_drv: use task for sending frames
Until now the client called the Linux code directly through the EP
when sending ethernet frames and was not part of the driver's internal
task scheduling. This will lead to problems if the sending code needs
to grab a lock as those depend on running from within a Lx::Task.
Although this has only happend recently when using 8260 devices, this
is an issue that needs to be fix.

This commit addresses the issue by using a dedicated transmit task
in whose context the Linux code sends the ethernet frame or rather
newly allocated skb.

Fixes #2559.
2017-11-06 13:57:24 +01:00
Josef Söntgen bb95121ee5 wifi_drv: remove unnecessary debug message
AFAICT, we do the right thing by calling 'consume_skb()'.

Issue #2559.
2017-11-06 13:57:24 +01:00
Sebastian Sumpf 3409eeeb34 wifi_drv: occasionally crashes during session destruction
Drop rx-packets in case there is no client session

fixes #2557
2017-11-06 13:57:21 +01:00
Emery Hemingway 6aba4871a7 lib/vfs/lxip: allow missing nameserver configuration
Ref #2535
2017-11-06 13:57:17 +01:00
Christian Helmuth ee4ee6a8ac depot: update recipe hashes 2017-10-19 13:31:18 +02:00
Sebastian Sumpf 7a359f95a3 wifi: use with libc in config update 2017-10-05 17:40:05 +02:00
Emery Hemingway 8ca63d4a6e libc: reintegrate libc_resolv library
Remove getaddrinfo and freeaddrinfo from the Libc::Plugin and get rid of
the extra libc_resolv library. Remove getaddrinfo/freeaddrinfo symbol
hiding patch for FreeBSD sources. Remove libc_resolv from Makefiles and
run scenarios.

Fix #2273
2017-10-05 17:40:04 +02:00
Christian Helmuth b3f620436c dde_linux: fix timer deletion and modification (lx_kit) 2017-10-05 17:40:03 +02:00
Christian Helmuth 7b9edcf90c lxip: fix timer deletion and modification
Linux del_timer() and mod_timer() return if the timer was pending before
the modification. Additionally, these functions are potentially called
from handler function of the timer to modify and, therefore, checking
for timeout != INVALID_TIMEOUT is not sufficient as the timeout is
indeed valid when the handler is executed.
2017-10-05 17:40:03 +02:00
Christian Helmuth 9ff82d76c0 lxip: fix timer handling and jiffies update 2017-10-05 17:40:03 +02:00
Christian Helmuth ad49fba42a Fix syntax in lxip_udp_echo run script
Thanks to Steven Harp for reporting.
2017-10-05 17:40:02 +02:00
Alexander Boettcher c66c23b7f1 intel_fb: avoid assertion on X201
Issue #2208
2017-10-05 17:40:00 +02:00
Christian Helmuth d80fadc635 intel_fb: optionally respect connector hz config 2017-10-05 17:39:59 +02:00
Christian Helmuth c63f7725be intel_fb: support forced virtual framebuffer size 2017-10-05 17:39:59 +02:00
Christian Helmuth 02d7b401fe intel_fb: initial backlight brightness of 75% 2017-10-05 17:39:59 +02:00
Norman Feske 14b5e81f1e depot: recipe for src/intel_fb_drv 2017-10-05 17:39:58 +02:00
Christian Helmuth b586b00845 Fix typo in usb_hid test script 2017-10-05 17:39:56 +02:00
Christian Helmuth 2ed904faab depot: update recipe hashes 2017-08-30 12:41:43 +02:00
Martin Stein 570b5a6920 libc_resolv/_lxip: fix undefined references...
... to Libc::Plugin::getdirentries, Libc::Plugin::mmap, and
Libc::Plugin::msync.

Ref #2490
2017-08-30 10:01:35 +02:00
Christian Helmuth 28764e2332 Increase cap quota for wifi_drv 2017-08-30 10:01:35 +02:00
Christian Helmuth ae0c9e7692 Increase cap quota for usb_drv 2017-08-30 10:00:00 +02:00
Emery Hemingway 1fce8d0d74 default ahci_drv and part_blk Block sessions to read-only
Add a "writeable" policy option to the ahci_drv and part_blk Block
servers and default from writeable to ready-only. Should a policy
permit write acesss the session request argument "writeable" may still
downgrade a session to ready-only.

Fix #2469
2017-08-28 16:49:51 +02:00
Christian Prochaska ee352abc56 run: add Xen support
When building Genode on a Linux system running in a Xen Dom0, the 'xen'
run target can run a Genode scenario in a Xen DomU.

Usage: in build/x86_*/etc/build.conf, define:

RUN_OPT = --include boot_dir/$(KERNEL) --include image/iso --include power_on/xen --include log/xen --include power_off/xen

The Xen DomU runs in HVM mode and loads Genode from an ISO image. Serial
log output is printed to the console and graphical output is shown in an
SDL window.

The Xen DomU ist managed using the 'xl' command line tool and it is
possible to add configuration options in the 'xen_args' variable in a run
script. Common options are:

- disabling the graphical output:

  append xen_args { sdl="0" }

- configuring a network device:

  append xen_args { vif=\["model=e1000,mac=02:00:00:00:01:01,bridge=xenbr0"\] }

- configuring USB input devices:

  append xen_args { usbdevice=\["mouse","keyboard"\] }

Note: the 'xl' tool requires super-user permissions and interactive
password input can be troublesome in combination with 'expect' and is not
practical for automatic tests. For this reason, the current implementation
assumes that no password input is needed when running 'sudo xl', which can
be achieved by creating a file '/etc/sudoers.d/xl' with the content
'user ALL=(root) NOPASSWD: /usr/sbin/xl'
(where 'user' is the Linux user name).

Fixes #2504
2017-08-28 16:49:48 +02:00
Christian Prochaska e90d21c9ab wifi_drv: add missing 'Libc::with_libc()'
Fixes #2506
2017-08-28 16:49:45 +02:00
Christian Prochaska b0935ef9b2 VFS: nonblocking interface
The VFS library can be used in single-threaded or multi-threaded
environments and depending on that, signals are handled by the same thread
which uses the VFS library or possibly by a different thread. If a VFS
plugin needs to block to wait for a signal, there is currently no way
which works reliably in both environments.

For this reason, this commit makes the interface of the VFS library
nonblocking, similar to the File_system session interface.

The most important changes are:

- Directories are created and opened with the 'opendir()' function and the
  directory entries are read with the recently introduced 'queue_read()'
  and 'complete_read()' functions.

- Symbolic links are created and opened with the 'openlink()' function and
  the link target is read with the 'queue_read()' and 'complete_read()'
  functions and written with the 'write()' function.

- The 'write()' function does not wait for signals anymore. This can have
  the effect that data written by a VFS library user has not been
  processed by a file system server yet when the library user asks for the
  size of the file or closes it (both done with RPC functions at the file
  system server). For this reason, a user of the VFS library should
  request synchronization before calling 'stat()' or 'close()'. To make
  sure that a file system server has processed all write request packets
  which a client submitted before the synchronization request,
  synchronization is now requested at the file system server with a
  synchronization packet instead of an RPC function. Because of this
  change, the synchronization interface of the VFS library is now split
  into 'queue_sync()' and 'complete_sync()' functions.

Fixes #2399
2017-08-28 16:49:38 +02:00
Martin Stein 47dc708887 usb rpi: get rid of local hardware timer
We used a hardware timer locally in the RPI USB driver because a timer
connection was not precise enough to fullfill the host controllers
requirements.

With the modern timer connection interface, however, reading out time at
a connection is microseconds precise and we can remove the local timer.
But we cannot use the same timer connection for doing legacy-interface
stuff like usleep (currently used in LX kit) and modern-interface stuff
like curr_time. Thus, we open two connections for now.

Ref #2400
2017-08-23 14:08:37 +02:00
Christian Helmuth 8b073f46df depot: update recipe hashes 2017-08-18 10:25:28 +02:00
Alexander Boettcher 6f8cc92ce0 run: disable some scripts in autopilot mode
because of the limit hardware features of our x86 32bit test hardware
2017-08-18 10:24:48 +02:00
Sebastian Sumpf 5adda2d934 usb: add asynchronous interface release
This became necessary, since URBs may still be pending upon interface
release.

Fixes #2466
2017-08-17 11:04:22 +02:00
Christian Helmuth 31cffe52a6 usb_terminal: remove obsolete vendor/product enums 2017-08-17 11:04:20 +02:00
Norman Feske 50a1b84308 usb_drv: wait for first valid config
This patch defers the initialization of the USB driver until its
configuration is valid.
2017-08-17 10:59:44 +02:00
Norman Feske 0d1be4abe2 depot: update recipe hashes 2017-06-29 12:00:04 +02:00
Christian Helmuth 892ede515f depot: update recipe hashes 2017-05-31 16:18:01 +02:00
Christian Helmuth 8bd0efced6 Remove obsolete RAM/CAP services from run scripts
Adapted launchpad and also the rm_fault and resource_request tests.

Issue #2407
2017-05-31 13:16:22 +02:00
Stefan Kalkowski 632ef28463 os: removal of deprecated os/config.h (fix #2431) 2017-05-31 13:16:22 +02:00
Christian Helmuth a431657851 lxip: correct msghdr initialization 2017-05-31 13:16:21 +02:00
Stefan Kalkowski 0fb672b493 run: use default Qemu memory size for x86
Fix #2428
2017-05-31 13:16:19 +02:00
Emery Hemingway c1edfa5d46 lib/vfs/lxip: return READ_QUEUED from read_queued and complete_read
Ref #2406
2017-05-31 13:16:17 +02:00
Christian Helmuth d0bc389e93 vfs_lxip: correctly initialize iov on remote-file read 2017-05-31 13:16:16 +02:00
Josef Söntgen 5b6735e1c9 lxip: fix iovec iter operations 2017-05-31 13:16:15 +02:00
Martin Stein c70fed29f7 os/timer: interpolate time via timestamps
Previously, the Genode::Timer::curr_time always used the
Timer_session::elapsed_ms RPC as back end.  Now, Genode::Timer reads
this remote time only in a periodic fashion independently from the calls
to Genode::Timer::curr_time. If now one calls Genode::Timer::curr_time,
the function takes the last read remote time value and adapts it using
the timestamp difference since the remote-time read. The conversion
factor from timestamps to time is estimated on every remote-time read
using the last read remote-time value and the timestamp difference since
the last remote time read.

This commit also re-works the timeout test. The test now has two stages.
In the first stage, it tests fast polling of the
Genode::Timer::curr_time. This stage checks the error between locally
interpolated and timer-driver time as well as wether the locally
interpolated time is monotone and sufficiently homogeneous. In the
second stage several periodic and one-shot timeouts are scheduled at
once. This stage checks if the timeouts trigger sufficiently precise.

This commit adds the new Kernel::time syscall to base-hw. The syscall is
solely used by the Genode::Timer on base-hw as substitute for the
timestamp. This is because on ARM, the timestamp function uses the ARM
performance counter that stops counting when the WFI (wait for
interrupt) instruction is active. This instruction, however is used by
the base-hw idle contexts that get active when no user thread needs to
be scheduled.  Thus, the ARM performance counter is not a good choice for
time interpolation and we use the kernel internal time instead.

With this commit, the timeout library becomes a basic library. That means
that it is linked against the LDSO which then provides it to the program it
serves. Furthermore, you can't use the timeout library anymore without the
LDSO because through the kernel-dependent LDSO make-files we can achieve a
kernel-dependent timeout implementation.

This commit introduces a structured Duration type that shall successively
replace the use of Microseconds, Milliseconds, and integer types for duration
values.

Open issues:

* The timeout test fails on Raspberry PI because of precision errors in the
  first stage. However, this does not render the framework unusable in general
  on the RPI but merely is an issue when speaking of microseconds precision.

* If we run on ARM with another Kernel than HW the timestamp speed may
  continuously vary from almost 0 up to CPU speed. The Timer, however,
  only uses interpolation if the timestamp speed remained stable (12.5%
  tolerance) for at least 3 observation periods. Currently, one period is
  100ms, so its 300ms. As long as this is not the case,
  Timer_session::elapsed_ms is called instead.

  Anyway, it might happen that the CPU load was stable for some time so
  interpolation becomes active and now the timestamp speed drops. In the
  worst case, we would now have 100ms of slowed down time. The bad thing
  about it would be, that this also affects the timeout of the period.
  Thus, it might "freeze" the local time for more than 100ms.

  On the other hand, if the timestamp speed suddenly raises after some
  stable time, interpolated time can get too fast. This would shorten the
  period but nonetheless may result in drifting away into the far future.
  Now we would have the problem that we can't deliver the real time
  anymore until it has caught up because the output of Timer::curr_time
  shall be monotone. So, effectively local time might "freeze" again for
  more than 100ms.

  It would be a solution to not use the Trace::timestamp on ARM w/o HW but
  a function whose return value causes the Timer to never use
  interpolation because of its stability policy.

Fixes #2400
2017-05-31 13:16:11 +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 773e08976d Assign cap quotas in run scripts and recipes
Issue #2398
2017-05-31 13:16:06 +02:00
Norman Feske 6609aafb05 Replace Quota_exceeded by Insufficient_ram_quota
This patch replaces the 'Parent::Quota_exceeded',
'Service::Quota_exceeded', and 'Root::Quota_exceeded' exceptions
by the single 'Insufficient_ram_quota' exception type.

Furthermore, the 'Parent' interface distinguished now between
'Out_of_ram' (the child's RAM is exhausted) from
'Insufficient_ram_quota' (the child's RAM donation does not suffice to
establish the session).

This eliminates ambiguities and removes the need to convert exception
types along the path of the session creation.

Issue #2398
2017-05-31 13:16:05 +02:00
Christian Helmuth e9b42a127b dde_linux: download libnl from github.com/thom311
The old download location is very shaky resp. currently unavailable and
also other projects (e.g., Gentoo and Linux From Scratch) use this
location. Note, the archive hash does _not_ change.
2017-05-31 13:16:02 +02:00