Commit Graph

320 Commits

Author SHA1 Message Date
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