Commit Graph

424 Commits

Author SHA1 Message Date
Christian Helmuth
b06ec370d1 Use platform-specific NIC driver in lwip test
Follow-up to "zynq: restructure nic_drv spec structure"

Issue #3179
2019-02-28 11:34:07 +01:00
Johannes Schlatow
11d8f97845 zynq: restructure nic_drv spec structure
The zynq nic_drv also depends on hw, we therefore adapted the folder
structure for clarity. Also renamed the binary to 'zynq_nic_drv' to
prevent conflicts and to allow removing the cadence_gem spec.

Issue #3179
2019-02-26 14:47:02 +01:00
Johannes Schlatow
c1caeb7e70 zynq: improve cache handling in nic_drv
Clean and invalidate caches in nic_drv before/after triggering DMA.

Issue #3179
2019-02-26 14:47:02 +01:00
Stefan Kalkowski
1ff36965f4 sd_card_drv: support for Nitrogen6 SoloX 2019-02-26 14:45:31 +01:00
Norman Feske
b24edc1633 Remove residual uses of deprecated APIs
Issue #1987, related also to issue #3163 and issue #3164.
2019-02-19 11:12:12 +01:00
Norman Feske
630cb96a54 omap4 fb_drv: remove use of deprecated API
Issue #1987
2019-02-19 11:12:12 +01:00
Norman Feske
cf70f65bec exynos5 fb_drv: remove use of deprecated API
Issue #1987
2019-02-19 11:12:12 +01:00
Norman Feske
b3727a9b46 Add missing override annotations
Issue #3159
2019-02-19 11:12:11 +01:00
Norman Feske
aa66b5d62f base: remove dependency from deprecated APIs
This patch adjusts the implementation of the base library and core such
that the code no longer relies on deprecated APIs except for very few
cases, mainly to keep those deprecated APIs in tact for now.

The most prominent changes are:

- Removing the use of base/printf.h

- Removing of the log backend for printf. The 'Console' with the
  format-string parser is still there along with 'snprintf.h' because
  the latter is still used at a few places, most prominently the
  'Connection' classes.

- Removing the notion of a RAM session, which does not exist in
  Genode anymore. Still the types were preserved (by typedefs to
  PD session) to keep up compatibility. But this transition should
  come to an end now.

- Slight rennovation of core's tracing service, e.g., the use of an
  Attached_dataspace as the Argument_buffer.

- Reducing the reliance on global accessors like deprecated_env() or
  core_env(). Still there is a longish way to go to eliminate all such
  calls. A useful pattern (or at least a stop-gap solution) is to
  pass the 'Env' to the individual compilation units via init functions.

- Avoiding the use of the old 'Child_policy::resolve_session_request'
  interface that returned a 'Service' instead of a 'Route'.

Issue #1987
2019-02-19 11:08:17 +01:00
38ab456c78 Remove pointers from Genode::Fifo interface
Replace methods of Genode::Fifo returning pointers with methods which
call lambdas with references.

Ref #3135
2019-02-19 11:08:17 +01:00
Stefan Kalkowski
161f39f7af imx6q_sabrelite: enable sd_card_drv 2019-02-19 11:08:17 +01:00
Christian Helmuth
2b1732bdec Adapt usb_drv RAM quota to 12M
All autopilot scripts use 12 or more MiB for the usb_drv and my personal
tests never succeeded with less on x86 test machines.
2019-02-12 10:33:32 +01:00
Christian Helmuth
37b2aaa051 Equalize RAM quantum in acpi_drv configs
While the managed drivers already used 4M, interactive and nic failed on
hardware with larger ACPI tables.
2019-01-30 13:54:54 +01:00
Norman Feske
6b94e65a95 os: avoid using deprecated APIs
Issue #1987
Issue #3125
2019-01-30 13:49:54 +01:00
Norman Feske
bf62d6b896 Move timer from os to base repository
Since the timer and timeout handling is part of the base library (the
dynamic linker), it belongs to the base repository.

Besides moving the timer and its related infrastructure (alarm, timeout
libs, tests) to the base repository, this patch also moves the timer
from the 'drivers' subdirectory directly to 'src' and disamibuates the
timer's build locations for the various kernels. Otherwise the different
timer implementations could interfere with each other when using one
build directory with multiple kernels.

Note that this patch changes the include paths for the former os/timer,
os/alarm.h, os/duration.h, and os/timed_semaphore.h to base/.

Issue #3101
2019-01-14 12:33:57 +01:00
Norman Feske
2565928495 fb_sdl: support the resizing of the SDL window
Fixes #3095
2019-01-07 12:33:57 +01:00
Alexander Boettcher
9bb0e10eec os: avoid warning in platform driver
calling wrong destructor issued by clang/llvm static analyzer

Issue #3022
2019-01-07 12:25:45 +01:00
a2bdcc68c2 Throw exception for invalid packets at packet streams
Some application code is dereferencing the pointer returned by
'packet_content' at packet streams without checking that it is valid.
Throw an exception rather than return a null pointer, except for
zero-length packets, which have somewhat implicit invalid content and
that we believe to be properly handled in all current cases.

The client-side of a packet stream cannot take corrective action if the
server-side is sending packets with invalid content, but the servers
that provide packet streams should catch this exception to detect
misbehaving clients.

Ref #3059
2018-11-29 11:54:29 +01:00
Johannes Schlatow
dc0bfd7008 zynq: zero-copy implementation of nic_drv
- Packet stream buffers are directly passed to DMA.
- Also enables pause frames and checksum offloading.

Issue #3053
2018-11-29 11:46:01 +01:00
Alexander Boettcher
9ee3843f35 timer: fix conversion error in timeout handling
clang complains: comparison is always false due to limited range of data type

Issue #3022
2018-11-16 14:37:18 +01:00
Christian Helmuth
40a84e0c81 input/ps2: poll for mouse-reset results
The PS/2 driver retries to get mouse-reset results for 700 ms, sleeping
after each attempt for 10 ms. So, the driver needs a Timer session now.

Fixes #2713
2018-08-28 17:10:55 +02:00
Christian Helmuth
db376bfddb input/ps2: defer led update on pending events
Issue #2888
2018-08-28 16:48:45 +02:00
Christian Helmuth
d909715f1b input/ps2: drop fake right-shift scancodes
Seen on X250

Description from https://www.win.tue.nl/~aeb/linux/kbd/scancodes-1.html

  The ten grey keys Insert, Home, PgUp, Delete, End, PgDn, Up, Left,
  Down, Right are supposed to function regardless of the state of Shift
  and NumLock keys. But for an old AT keyboard the keypad keys would
  produce digits when Numlock was on or Shift was down. Therefore, in
  order to fool old programs, fake scancodes are sent: when LShift is
  down, and Insert is pressed, e0 aa e0 52 is sent; upon release of
  Insert e0 d2 e0 2a is sent. In other words, a fake LShift-up and fake
  LShift-down are inserted.

Fixes #2888
2018-08-28 16:48:45 +02:00
Alexander Boettcher
ed01c57677 platform_drv: add RMRR region before assign pci 2018-08-02 14:36:47 +02:00
Christian Helmuth
3161daacd7 platform_drv: use Expanding_reporter for pci report
If the number of PCI buses grows (seen with VMware player) the default
report size is exhausted quickly.
2018-06-29 10:44:56 +02:00
Christian Prochaska
d1524ba0b8 usb_block_drv: don't select alternate interface setting
Selecting an alternate interface setting, even if it is the same as the
current one, apparently makes the INQUIRY command fail with USB devices
like 'SanDisk Ultra Fit' (0781:5583) and 'Corsair Flash Voyager'
(1b1c:1a03) when the USB block driver is restarted.

Fixes #2860
2018-06-12 12:11:51 +02:00
Alexander Boettcher
5ca30b0318 platform_drv: disable PCI DMA class specific
for such classes where it should be safe and where we have seen issues.
Disabling in general bus master DMA causes on some machines hard hangs, e.g.
because the USB handover protocol was violated.

Fixes #2835
2018-06-12 12:11:40 +02:00
Christian Prochaska
230ed1de37 usb_block_drv: make device reset optional
Fixes #2836
2018-05-30 13:36:31 +02:00
Alexander Boettcher
e6d20aba93 base: support to attach RAM dataspaces readonly
Fixes #1633
2018-05-30 13:36:27 +02:00
Christian Prochaska
c6e4f5914e usb_block_drv: release packet after device reset
Fixes #2827
2018-05-30 13:36:20 +02:00
Christian Prochaska
68ec33b0d3 usb_block_drv: use 10-byte SCSI commands by default
Fixes #2826
2018-05-30 13:36:20 +02:00
Christian Prochaska
5ac56be748 usb_block_drv: set inquiry response length to 36 bytes
Fixes #2825
2018-05-30 13:36:20 +02:00
Christian Prochaska
cecd461f38 usb_block_drv: look up endpoints at runtime
Fixes #2824
2018-05-30 13:36:19 +02:00
Christian Prochaska
106a5f1d4d usb_block_drv: calculate block count correctly
Fixes #2823
2018-05-30 13:36:19 +02:00
Alexander Boettcher
501d82b99f platform_drv: skip assign device if iommu missing
Avoid red messages in the log on machines with no IOMMU, which recurring
confuse people.

Issue #2801
2018-05-30 13:36:18 +02:00
Christian Prochaska
2b75445ac1 usb_block_drv: keep driver instance between sessions
Fixes #2813
2018-05-30 13:36:13 +02:00
Alexander Boettcher
0de62717f9 x86: detect root bridge properly
Beforehand the root bridge was expected to be at 0:0.0.

Fixes #2801
2018-05-30 13:36:07 +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
Stefan Kalkowski
7949c194e9 gpio_drv: mask IRQ until it is acknowledged
When working with GPIO interrupts on i.MX6SX for Ethernet PHYs
it became obvious that the GPIO driver repeatedly receives interrupts
for the same event, because it acknowledges the interrupt before a
client has handled the event.

Ref #2750
2018-04-19 12:38:24 +02:00
Stefan Kalkowski
f653be1ebc gpio_drv: add support for i.MX6
Fix #2750
2018-04-19 12:38:24 +02:00
Josef Söntgen
04516a0d39 nvme_drv: add driver for NVMe storage devices
This driver component provides support for using consumer NVMe storage
devices, i.e. it omits name space managment and will always use the
first name space, on Genode. For now it defaults to a reasonable low
configuration:

  -    1 I/O queue (completion/submission tuple)
  -  128 entries in the I/O queue
  - 4096 as the only I/O transaction memory page size

Fixes #2747.
2018-04-19 12:38:22 +02:00
Josef Söntgen
372e426ec7 platform_drv: recognize PCIe NVMe controller
Issue #2747.
2018-04-10 13:56:22 +02:00
Norman Feske
23696760c3 fb_sdl: drop spurious motion events without motion
Relative motion events with a motion vector of (0,0) should not exists.
They cause jittery movements of nitpicker's pointer position. This
patch filters out such events.
2018-04-10 11:20:47 +02:00
Reto Buerki
47724c68c2 platform_drv/x86: Switch to ECAM/MMCONF
Switch port I/O based PCI config space access to memory-mapped IO.  The
base address of the PCI configuration space is acquired by mapping the
ACPI ROM and reading the first <bdf> node. An exception is thrown if the
first <bdf> node is not for PCI domain zero or if multiple <bdf> nodes
exist. This is to reduce complexity and also because multiple PCI
domains are rare.

The PCI configuration space is accessed via I/O mem dataspace which is
created in the platform_drv root and then passed on to the PCI session,
device components and finally to the actual PCI config access instances.

The memory access code is implemented in a way to make it work with Muen
subject monitor (SM) device emulation and also general x86 targets. On
Muen, the simplified device emulation code (which works also for Linux)
always returns 0xffff in EAX to indicate a non-existing device.
Therefore, EAX is enforced in the assembly templates.

Fixes #2547
2018-03-29 14:59:04 +02:00
Alexander Boettcher
80e1dce1b0 nova: abandon hypervisor_info_page ROM
replace by platform_info ROM supposed to exist on all supported
kernels.

Fixes #2710
2018-03-08 14:24:05 +01:00
Alexander Boettcher
8e9390e964 apci_drv: ignore invalid ACPI tables 2018-03-08 12:05:10 +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
Alexander Boettcher
666f6c9ac4 ahci: enable pci config command memory access
Issue #2620
2018-02-09 13:34:18 +01:00
Alexander Boettcher
fcadbc9023 platform_drv: try enabling msi independent of gsi
value written in pci config space.

Issue #2620
2018-02-09 13:34:18 +01:00
Alexander Boettcher
336140c5f1 platform_drv: enable full access for pci bridges
Issue #2620
2018-02-09 13:34:18 +01:00
Josef Söntgen
fb1c504568 gpu: the Intel multiplexer is only for x86_64
Require x86_64 because memory/adress space limitations on x86_32
restrict the use-cases on such a platform anyway. Doing that,
we can also assume that memory adresses are always 64bit long and
do not have to handle 32bit adresses.
2018-01-17 12:14:43 +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
Martin Stein
99ddaaa9d7 timer epit: fix multi-wraps and bug in rate limit
Multi-wraps
-----------

Previously, on every new timeout, we programmed registers LR=timeout and
CMP=0. The counter than counted from LR down to 0, triggered the IRQ,
jumped back to LR, and counted down again. If one installed small
timeouts (< 1000 us), it was likely that the counter wrapped multiple
times before we were able to read it out. Initially, this was not a big
issue as the additional wraps were simply ignored and the amount of time
lost through this was not big. But when we want to do correct rate
limitation, multiple wraps cause an overflow in the additional
calculations, and this has a big effect on the resulting time value.

Thus, we now program the counter to start from ~0 and count down to 0.
We set CMP=~0-timeout so that the timer still triggers the IRQ at the right
time. The counter continues counting down after the IRQ has triggered until
we install a new timeout. We do not consider anymore that the counter wraps.
The maximum timeout is set to half the maximum counter value, so, we should
be able to install a new timeout before the counter wraps.

Rate limit for time updates
---------------------------

In the time span between two interrupts we have to remember how many ticks
we have already added to the time value. This is because at each call of
curr_time we can only see how many ticks have passed since the last call of
schedule_timeout and not since the last call of curr_time. But we want to
limit the rate of time updates in curr_time. With the member for ticks that
were already added since the last call to schedule_timeout we can then
calculate how many are yet to be added.
2017-11-30 11:23:20 +01:00
Martin Stein
adfb1a77e2 timer/epit: remove unused code
* use correct/more modern types
* get rid of old code that was for the public use of the EPIT backend
* merge Epit_base into Time_source
2017-11-30 11:23:18 +01:00
Alexander Boettcher
c9bcce57e8 timer/epit: limit timeout rate
Limit rate to 1000 per second as it raises the throughput under stress
significantly without having an effect on the tested accuracy.

Issue #2579
2017-11-30 11:23:18 +01:00
Alexander Boettcher
0a5dcc86ed platform_drv: separate acpi and system feature 2017-11-30 11:23:14 +01:00
Martin Stein
e87f63944f timeout: replace Duration operators by methods
void += (Microseconds) -> void add(Microseconds)
void += (Milliseconds) -> void add(Milliseconds)
bool < (Duration)      -> bool less_than(Duration)

Issue #2581
2017-11-30 11:23:09 +01:00
Martin Stein
5d39acd3c3 timer: clamp one-shot timeouts to avoid overflow
Issue #2579
2017-11-30 11:23:08 +01:00
Alexander Boettcher
f3dafbf5a6 nova: limit timeout rate in nova_timer_drv
Issue #2579
2017-11-30 11:23:08 +01:00
Alexander Boettcher
80778b267d timer: read PIT timer solely after interrupt
Stop gap solution until #2579 gets resolved.
2017-11-30 11:23:08 +01:00
Norman Feske
f2a5648deb ps2_drv: respond to dynamic reconfiguration 2017-11-30 11:23:07 +01:00
Emery Hemingway
de5c0603f1 platform_drv: account session capabilities with a Cap_quota_guard
The platform driver is a critical component and must not allow sessions
to deplete its own resource quotas.

Fix #2576
2017-11-30 11:23:04 +01:00
Alexander Boettcher
9672329772 fb_boot_drv: evaluate fb pitch
Fixes #2555
2017-11-24 09:02:04 +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
Alexander Boettcher
03ae78173b platform_drv: free up dataspaces on session close
Fixes #2564
2017-11-09 12:18:05 +01:00
Norman Feske
a0a7d5d165 ps2_drv: drive mode indicator LEDs
The new feature is demonstrated by the input.run script. It uses a
dynamic ROM service to toggle the keyboard LEDs at different intervals.

Fixes #2546
2017-11-06 13:57:20 +01:00
Christian Helmuth
73f1fa9a1f ahci: log vendor/device IDs as hex 2017-11-06 13:57:19 +01:00
Christian Helmuth
28004bc9e6 timer: limit rate of handling timeouts
Ensure that the timer does not handle timeouts again within 1000
microseconds after the last handling of timeouts. This makes denial of
service attacks harder. This commit does not limit the rate of timeout
signals handled inside the timer but it causes the timer to do it less
often. If a client continuously installs a very small timeout at the
timer it still causes a signal to be submitted to the timer each time
and some extra CPU time to be spent in the internal handling method. But
only every 1000 microseconds this internal handling causes user timeouts
to trigger.

If we would want to limit also the call of the internal handling method
to ensure that CPU time is spent beside the RPCs only every 1000
microseconds, things would get more complex. For instance, on NOVA
Time_source::schedule_timeout(0) must be called each time a new timeout
gets installed and becomes head of the scheduling queue. We cannot
simply overwrite the already running timeout with the new one.

Ref #2490
2017-10-05 17:40:05 +02:00
Alexander Boettcher
1cc09ac786 platform_drv: transfer of quota to device_pd
Issue #2507
2017-10-05 17:40:00 +02:00
Sebastian Sumpf
ff800af820 ahci: make port enumeration independent from port count
fixes #2522
2017-10-05 17:40:00 +02:00
Martin Stein
4fa0cb5c29 timer pit: handle and display bad latency
If the PIT timer driver gets activated too slow (e.g. because of a bad priority
configuration), it might miss counter wraps and would than produce sudden time
jumps. The driver now detects this problem dynamically, warns about it and
adapts the affected values to avoid time jumps.

Ref #2400
2017-10-05 17:39:55 +02:00
Josef Söntgen
198019edca os: add Gpu driver for Intel Gen8 HD graphics
This commit introduces a experimental 3D driver for Intel Gen8 HD
graphics devices as well as the corresponding Gpu session.

Fixes #2507.
2017-08-30 09:59:57 +02:00
Alexander Boettcher
830f6934f9 base: add support to unconstrain virtual space
Issue #2507.
2017-08-30 09:59:57 +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
Martin Stein
d9073a1848 timer/util: generic TIMER_MIN_TICKS_PER_MS
Ref #2400
2017-08-28 16:49:50 +02:00
Martin Stein
399e1586be timer: generic timer_ticks_to_us implementation
There are hardware timers whose frequency can't be expressed as
ticks-per-microsecond integer-value because only a ticks-per-millisecond
integer-value is precise enough. We don't want to use expensive
floating-point values here but nonetheless want to translate from ticks
to time with microseconds precision. Thus, we split the input in two and
translate both parts separately. This way, we can raise precision by
shifting the values to their optimal bit position. Afterwards, the results
are shifted back and merged together again.

As this algorithm is not so trivial anymore and used by at least three
timer drivers (base-hw/x86_64, base-hw/cortex_a9, timer/pit), move it to a
generic header to avoid redundancy.

Ref #2400
2017-08-28 16:49:49 +02:00
Martin Stein
652187b25e timer pit: fix precision reduction to milliseconds
Due to the simplicity of the algorithm that translated from timer ticks
to time, we lost microseconds precision although the timer allows for it.

Ref #2400
2017-08-28 16:49:49 +02:00
Johannes Kliemann
c509cabdba os: fix fb_boot_drv framebuffer padding
Fixes #2486
2017-08-28 16:49:45 +02:00
Martin Stein
8750e373a0 timer session: add elapsed_us method
As timer sessions are not expected to be microseconds precise (because
of RPC latency and scheduling), the session interface provided only a
method 'elapsed_ms' although the back end of this method in the timer
driver works with microseconds.

However, in some cases it makes sense to have a method 'elapsed_us'. The
values it returns might be milliseconds away from the "real" time but it
allows you to work with delays smaller than a millisecond without
getting a zero delta value.

This commit is motivated by the need for fast bursts of calibration
steps for the time interpolation in the new timer connection.

Ref #2400
2017-08-23 14:08:36 +02:00
Alexander Boettcher
69e71147ef platform_drv: replace nova specific device_pd
by using generic Pd_session::map instead for eager memory mappings of DMA
memory.

Issue #2209
2017-08-18 10:24:47 +02:00
Alexander Boettcher
782b457476 wand_quad: re-enable i.MX6 EPIT user level timer
Issue #2451
2017-08-17 11:04:21 +02:00
Christian Helmuth
145011b420 sd_card_drv: prevent deprecated warnings 2017-08-17 11:04:18 +02:00
Alexander Boettcher
24875c0ea8 platform_drv: add report about available pci devices
Issue #1359
2017-08-17 10:59:44 +02:00
Martin Stein
8d2ee6d040 timer okl4: remove deprecated const_cast
Ref #2400
2017-06-29 12:00:00 +02:00
Christian Helmuth
82af06a42a sd_card: enable wand_quad/imx6 again 2017-06-29 11:59:58 +02:00
Christian Helmuth
ad824cea11 sd_card: cleanup driver library structure
Now both, the sd_card_drv and sd_card_bench use LIBS=sd_card_drv.
2017-06-29 11:59:58 +02:00
Johannes Kliemann
1205607e78 os: add framebuffer based on platform_info of core
Issue #2242
2017-06-29 11:59:51 +02:00
Alexander Boettcher
04b2919a1a acpi_drv: use platform_info for rsdt/xsdt lookup
Issue #2242
2017-06-29 11:59:50 +02:00
Christian Helmuth
c16288bcde timer/foc: use current KIP-clock API
This prevents L4_DEPRECATED warnings.
2017-06-19 12:35:55 +02:00
Alexander Boettcher
0523736ce4 acpi: limit device scope paths
Fixes #2371
2017-06-08 11:32:39 +02:00
Stefan Kalkowski
632ef28463 os: removal of deprecated os/config.h (fix #2431) 2017-05-31 13:16:22 +02:00
Christian Helmuth
febfb3bfe6 Fix source file location in RPi GPIO driver
The explicit relative location of the file instructed both target builds
to generate ../main.o which gloriously fails with parallel builds. The
produced range of error messages was astonishing ranging from "file
truncated" to "TLS reference in ../main.o mismatches non-TLS reference
in ../main.o".
2017-05-31 13:16:21 +02:00
Christian Helmuth
b37f411c3f ahci: optionally report discovered devices
Issue #2417
2017-05-31 13:16:20 +02:00
Norman Feske
0167d5af50 Integrate core's RAM service into the PD service
Fixes #2407
2017-05-31 13:16:14 +02:00
Alexander Boettcher
420b66a1f0 platform_drv: remove usage of ram_connection
This commit removes support for limitation of RAM allocations from the
platform_drv. A subsequent commit adds this feature to init.

Issue #2398
Issue #2407
2017-05-31 13:16:13 +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
Stefan Kalkowski
9b350e7706 os: move private declarations to driver target
Ref #2403
2017-05-31 13:16:09 +02:00
Emery Hemingway
eaeb77a867 drivers/nic/linux: replace Thread_deprecated
Ref #1987
2017-05-31 13:16:09 +02:00
Stefan Kalkowski
10e2e223cd foc: remove obsolete features (ref #2405)
Removes the following Fiasco.OC specific features:
* GDB extensions for Fiasco.OC
* i.MX53 support for Fiasco.OC
* Kernel debugger terminal driver
* Obsolete interface Native_pd
* Obsolete function of interface Native_cpu
2017-05-31 13:16:08 +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