Commit Graph

1277 Commits

Author SHA1 Message Date
Josef Söntgen
3f3b3a100e vbox: sidestep audio subsystem
There are currently some issue with the mixing/filtering code of vbox.
So instead of using the audio subsystem to do filtering and mixing we
bypass it to get better audio qualitiy. That means that the device
model of the VM has to use the same sample rate as the Audio_out/in
sessions, however.

Issue #1647.
2015-08-21 11:00:58 +02:00
Josef Söntgen
5be5191645 vbox: enable preliminary audio support
With this commit preliminary audio support in VirtualBox is enabled.
The backend supports playback as well as recording sounds from within
a guest VM. Depending on how the guest configures the device model
the audio output may sound disorted. If the guest uses buffers that
are too small, i.e., 10 ms or less, frequent buffer underruns will
occure.

To get this low-latency one has also to increase vbox' update hz
to 200 (i.e., 5ms).

Fixes #1647.
2015-08-21 11:00:57 +02:00
Josef Söntgen
a6c5716796 os: add invalidate_all packets to Audio_out
When a stream was stopped it may still contain valid packets that
will be played automatically when the stream is started again. The
invalidate_all() method may be called after stopping the stream to
prevent this.

Issue #1647.
2015-08-21 11:00:57 +02:00
Christian Helmuth
e8c9125d9f Pseudo target for vfs_jitterentropy
Run script depending on VFS plugins (i.e., shared objects) like
vfs_jitterentropy.lib.so have to state this dependency rather the actual
binaries linked against libc. The latter introduces a library dependency
that is just not there. For example, the dependency on vfs_jitterentropy
is a result from the config node for libc which automatically loads the
plugin.
2015-08-21 11:00:57 +02:00
Christian Helmuth
32da844f01 libc: refactor socket operations 2015-08-21 11:00:57 +02:00
Christian Helmuth
47609dda40 vesa: calculation of default-mode table entries 2015-08-21 11:00:57 +02:00
Norman Feske
26524edbf4 alarm: reposition reprogrammed alarms in queue
The alarm library failed to handle the case properly where an already
scheduled alarm gets rescheduled before it triggered. Even though the
attempt to reschedule the alarm (twice insertion into alarm queue) was
detected, this condition resulted in the mere modification of the
alarm's parameters while keeping the alarm's queue position unchanged.
This, in turn, may violate the invariant that all enqueued alarm objects
are strictly ordered by their deadlines. The patch handles the case by
dequeuing the alarm object before reinserting it into the queue at the
right position.

Fixes #1646
2015-08-21 11:00:57 +02:00
Norman Feske
e410ecc995 timer test: trigger timeout-masking bug
Issue #1646
2015-08-21 10:59:46 +02:00
Josef Söntgen
4992903233 Rename audio_out_drv to audio_drv
With the introducation of the Audio_in session interface it makes
sense to rename the current available audio drivers. At the moment
only the dde_bsd audio_drv supports Audio_out as well as Audio_in.
The Linux audio_drv only supports Audio_out (there is no demand for
Audio_in support currently) but is renamed nonetheless to make it
easiert to write generic run scripts.

Issue #1644.
2015-08-21 10:59:46 +02:00
Josef Söntgen
fb761283a2 dde_bsd: add Audio_in test application
This test is a simple audio monitor that plays all recorded frames
back.

Issue #1644.
2015-08-21 10:59:46 +02:00
Josef Söntgen
8a34d21577 dde_bsd: add recording support to audio driver
The driver is now able to record audio samples. In contrast
to playback it has to be enabled explicitly by setting the
configuration attribute 'recording' to 'yes'. Playback is by
default enabled but may be disabled by setting 'playback' to
'no'. Furthermore it is now possible to configure the mixer
from the configuration. For now, the interface used by vanilla
OpenBSD is just exported.

The following snippet shows how to enable and configure recording
on an Thinkpad X220 where the headset rather than the internal
mic is used as recording source:

! <start name="audio_out_drv">
!   <resource name="RAM" quantum="8M"/>
!   <provides>
!     <service name="Audio_out"/>
!     <service name="Audio_in"/>
!   </provides>
!   <config recording="yes">
!     <mixer field="outputs.master" value="255"/>
!     <mixer field="record.adc-0:1_source" value="sel2"/>
!     <mixer field="record.adc-0:1" value="255"/>
!   </config>
! </start>

In addition to selecting the recording source the playback as
well as the recording volume are set to 255 (maximum).
Information about the available mixers and settings in general
may be obtained by setting the 'verbose' to 'yes' in the config
node.

Issue #1644.
2015-08-21 10:59:46 +02:00
Josef Söntgen
c4e2322a5d dde_bsd: ignore HDMI/DP devices (00:03:00)
Unfortunatly, there is no support for any HDMI/DP based HDA codecs in
this driver. Therefore we try to filter out known devices (normally the
PCI device on 00:03.00). This could also be done in the platform_drv's
configuration by explicitly naming the BDF but for better or worse that
will not work when using a wildcard class like HDAUDIO which is done in
generic run scripts.

Issue #1644.
2015-08-21 10:59:46 +02:00
Josef Söntgen
61f5ca1e4d os: add Audio_in session for recording audio
In line with the Audio_out session a Audio_in session is used to
record audio frames. Like in the Audio_out session shared memory
in form of the Audio_in::Stream is used to transport the frames
from the server to the client. These frames consist of single
channel (mono) samples. An Audio_in::Packet always contains a full
period of frames.

A Audio_in server captures frames and puts them into the
Audio_in::Stream. To do so the server allocates a Audio_in::Packet
from the packet queue embedded in the Audio_in::Stream. If the queue
is already full, the server will override packets and notify the
client by submitting the 'overrun' signal. The client has to cope
with this situation, e.g., by saving packets more frequently.

A client will also receive a 'progress' signal from the server when
a new Audio_in::Packet was submitted to the packet queue.

Fixes #1644.
2015-08-21 10:59:46 +02:00
Josef Söntgen
81599f89ea os: decrease Audio::PERIOD to lower latency
To archive lower latency the length of a period was reduced from
2048 (~46ms) to 512 (~11.6ms) samples.

It should be noted that this change probably breaks audio in Qemu on
most systems.

Issue #1644.
2015-08-21 10:59:45 +02:00
Josef Söntgen
2843a70c0e os: add missing header in Audio_out session header
Include <base/signal.h> directly in the session header to make it
self contained rather than depend on including it outside.

Issue #1644.
2015-08-21 10:59:45 +02:00
Alexander Boettcher
df662cc2f3 nova: use kernel branch with quota handling
Fixes #1601
2015-08-21 10:59:45 +02:00
Stefan Kalkowski
eafe5e81e3 core: unify and simplify paging code (Fix #1641)
For most platforms except of NOVA a distinction between pager entrypoint
and pager activation is not needed, and only exists due to historical
reasons. Moreover, the pager thread's execution path is almost identical
between most platforms excluding NOVA, HW, and Fisco.OC. Therefore,
this commit unifies the pager loop for the other platforms, and removes
the pager activation class.
2015-08-21 10:58:59 +02:00
Christian Prochaska
a574f73005 seoul: dummy 'control register access' VM exit handler
This exit handler is called by the NOVA kernel now when the VM uses PAE
with nested paging and the PDPTE registers need to get updated. With this
commit, an error message is printed if this situation occurs.

Fixes #1640
2015-08-21 10:58:59 +02:00
Christian Prochaska
4c19576d4e vbox: use multiple host CPUs
Fixes #1553
2015-08-21 10:58:59 +02:00
Christian Prochaska
824fb72694 vbox: update the PDPTE registers if needed
Fixes #1638
2015-08-21 10:58:59 +02:00
Christian Prochaska
2337dc03f4 nova: use branch supporting changing PDPTE by VMM
Fixes #1637
2015-08-21 10:58:59 +02:00
Alexander Boettcher
f87c573695 nova: increase default capability selector count
The reference count get increase to use 2 bytes, so we need the double amount
of selectors as before.

Additionally print a message if we run out of capabilities in a server. Since
our rpc framework is now clever enough to detect that for a printf we don't
need to setup a receive window, we may use a printf instead of a die call.
Eases debugging.

Issue #1601
2015-08-21 10:58:58 +02:00
Alexander Boettcher
626b0a68f3 base: increase base-control size for 32bit
It is insufficient for creating threads up to the maximum supported limit
(256 by now).

Issue #1601
2015-08-21 10:58:58 +02:00
Alexander Boettcher
9081653c96 Extend thread test
Issue #1601
2015-08-21 10:58:58 +02:00
Alexander Boettcher
c6943d494b nova: extend platform test to provoke kernel panic
Showcasing the out of memory kernel issue.

One test triggers oom during memory delegation when talking to core pager
thread. Two other test trigger oom during capability delegation in a
server/client scenario for send and reply phase separately.

Issue #1601
2015-08-21 10:58:58 +02:00
Norman Feske
1feaf75605 ram_fs: coding style, license headers
Issue #1635
2015-08-21 10:58:58 +02:00
Emery Hemingway
f996697fd5 VFS: local ram_fs instances
Move FS Node implementations from server/ram_fs to include/ram_fs.
Support embedded ram_fs instances in VFS configurations using <ram/>.
Add 'no space' handling to VFS symlink ops.

Fixes #1635
2015-08-21 10:58:40 +02:00
Christian Prochaska
9d37510d1d vbox: shared folder read/write loop fix
Stop trying to read or write if the backend function reports that 0 bytes
have been read or written.

Fixes #1563
2015-07-21 09:43:15 +02:00
Emery Hemingway
8f4f1ae89c ram_fs: treat symlinks as opaque data
Fixes #1604
2015-07-21 09:41:29 +02:00
Emery Hemingway
2f1db06deb rump_fs/fuse_fs/lx_fs/ram_fs: symlink fixup
Allow symlinks to be passed to the read and write file system utilities.

Disallow writes to symlinks with offsets in file system servers, this is
to ensure that writing the target of a symlink is an atomic operation.

Fixes #1604
2015-07-21 09:40:19 +02:00
Alexander Boettcher
4cf319a9d7 os: avoid blocking on resource request in bomb.run
that are caused by bomb clients.

Issue #1632
2015-07-21 09:36:46 +02:00
Alexander Boettcher
fe4e0702d4 base: contain chunk_size heap consumption
Increase internal chunk size of heap only if an allocation succeeded
beforehand. Otherwise the chunk size increases with every unsuccessful
invocation and a upgrade of the used ram session will be insufficient and of
no use at all.

Fixes #1632
2015-07-21 09:36:46 +02:00
Alexander Boettcher
73f9bb73cd init: don't block for resource upgrades
If some sessions run out of memory in init, resource requests will be issued
to core, which it never will satisfy. Setting some default signal handler
avoids that the default implementation will block init for ever.

Issue #1632
2015-07-21 09:36:46 +02:00
Emery Hemingway
28223e3146 noux: return exit value of init child
Fixes #1634
2015-07-21 09:34:48 +02:00
Norman Feske
7478114b23 Fix freetype download location
The originally used host went down.
2015-07-21 09:30:12 +02:00
Martin Stein
f3e76b3e9a base: use BDA header in base-nova like base-hw
Moves the Bios Data Area header from base-hw to base. Modifies the
base-nova core console that it uses the header as replacement for
the previous BDA bit logic.

Ref #1625
2015-07-21 09:30:12 +02:00
Martin Stein
c6f73d365a unmanaged singleton: allow private constructors
Introduces a class Unmanaged_singleton_constructor that can be declared as
friend to be able to call unmanaged_singleton on classes with a private
constructor. Enables the appliance of the singleton pattern.

Ref #1625
2015-07-21 09:30:12 +02:00
Martin Stein
ba18ab7225 run/cpu_quota: raise measurement precision further
Three things were done:

* Timouts are measured in an asynchronous way to be able to start counters
  after the potentially expensive RPC that starts the timeout.
* Timeouts were increased from 45 and 15 seconds to 60 and 20 seconds
  because at least on Arndale, results were not stable enough.
* Counting is done on 'unsigned long long' instead of 'unsigned' because
  with the higher timeouts, overflows occured.

Fixes #1628
2015-07-21 09:30:12 +02:00
Martin Stein
3c49113e64 timer & hw_arndale: don't use any float ops
The timer driver previously used floating point operations to translate us to
tics and vice versa. This isn't necessary as the rounding error isn't critical
for the given values but expensive which should be avoided in a code path that
must be executed pretty frequent with high priority.

Ref #1628
2015-07-21 09:30:12 +02:00
Alexander Boettcher
dddb536e25 vbox: use initFromSettings for construction VM 2015-07-21 09:30:12 +02:00
Adrian-Ken Rueegsegger
2fe0860ba7 hw_x86_64: Extend inital page tables up to 1 GiB
To avoid future issues with regards to non-existent mappings in the
initial pagetables, extend them to cover the memory range of 2 MiB up to
1 GiB.
2015-07-21 09:30:11 +02:00
Alexander Boettcher
73f7a95627 hw: use bios data area to detect com/uart ports
Fixes #1625
2015-07-21 09:30:11 +02:00
Alexander Boettcher
0b019d0508 base: move x86 uart driver from nova to base
So it can be reused by base-hw-x86 instead of re-writing it.

Fixes #1403
2015-07-21 09:30:11 +02:00
Stefan Kalkowski
0f05fa6fd4 base: resolve dead lock in weak pointer templates
This commit eliminates the mutual interlaced taking of destruction lock,
list lock and weak pointer locks that could lead to a dead-lock situation
when a lock pointer was tried to construct while a weak object is in
destruction progress.
Now, all weak pointers are invalidated and dequeued at the very
beginning of the weak object's destruction. Moreover, before a weak pointer
gets invalidated during destruction of a weak object, it gets dequeued, and
the list lock is freed again to avoid the former dead-lock.

Fix #1607
2015-07-21 09:30:04 +02:00
Emery Hemingway
64831c63c9 rump_fs: move files using 'renameat'
Fixes #1579
2015-07-21 09:29:41 +02:00
Emery Hemingway
c72c9924d3 init: prios shall not exceed the lowest prio level
Fixes #1570
2015-07-21 09:29:03 +02:00
Josef Söntgen
7e40f5f587 base: use proper Cpu_session when tracing threads
Up to now it was not possible to trace threads that use a different
Cpu_session rather than env()->cpu_session() (as done by VirtualBox).
This problem is now solved by setting the Cpu_session explicitly when
creating the event logger and attaching the trace control area when
creating the thread.

Fixes #1618.
2015-07-21 09:28:26 +02:00
Martin Stein
eaf4150c7b cpu_quota.run: support X86
The timer driver on X86 needs CPU quota with highest priority as it
frequently has to interrupt the counters to update the PIT.
On ARM this makes no difference in the test results as ARM timer
drivers, once configured, can sleep until the end of the timeouts.
On X86 we raise the error tolerance to 2% (default 1%) to compensate
the error caused by the timer.

Fixes #1621
2015-07-21 09:28:25 +02:00
Martin Stein
53e742fb02 cpu_quota.run: don't get stuck on zero counters
The test previously complained about divide-by-zero if the counters were all
zero.

Fixes #1616
2015-07-21 09:28:25 +02:00
Martin Stein
413741e58c cpu_quota.run: print all errors
Printing all errors and the goal values instead of exiting at the first
error allows for faster analysis of problems with the CPU-quota
mechanism.

Ref #1616
2015-07-21 09:28:25 +02:00
Martin Stein
5189055396 cpu_quota.run: fix bug in error detection
The test always succeeded because I forgot to set the error tolerance from
my debugging value 1 back to the correct value 0.01 before commiting the
test.

Ref #1616
2015-07-21 09:28:25 +02:00
Alexy Gallardo Segura
c14fe7e6c7 foc: Odroid-X2 basic support
Fix #1597
2015-07-21 09:28:25 +02:00
Alexander Boettcher
c42e770384 detach ds from all rm sessions before destruction
Fixes #1617
2015-07-21 09:28:24 +02:00
Martin Stein
bc8a5cbb2a hw: fix CPU-quota bug in Platform_thread
Since the HW-kern-caps commit, there was a bug in the Platform_thread
constructor. When called for a user thread, the constructor stated 0
as CPU quota at the Kernel_object instead of its quota input-paramater.

Fixes #1620
2015-07-07 19:48:08 +02:00
Christian Helmuth
af5c03edaf vfs: depend on ld library
So, users of VFS need not to state this dependency explicitly.
2015-07-07 19:48:07 +02:00
Alexander Boettcher
9506c89f88 nova: fix memory leaks / invariant TSCs
- free up kernel memory of empty slabs (if already one empty slab is in
  place)
- free up more page table entries
- handle CPUs with invariant TSCs gracefully

  Genode/Nova running on CPUs without the invariant TSC feature may seem
  to 'hang'. The referenced commit of the nova branch fixes the issue
  for some older Intel CPUs.

Fixes #1615
2015-07-07 19:48:07 +02:00
Alexander Boettcher
cb1e0711ec bomb.run: support configuration of many parameters
Adjust bomb to specify the various hard-coded parameters and set up bomb.run
this way that it manages at our test machine to succeed in the given time.

Issue #1615
2015-07-07 19:48:07 +02:00
Alexander Boettcher
4ee8919f29 nova: use 16bit for reference count of caps
Bomb and any server may generate references to capabilities exceeding 256 -
use a 16bit counter until the cap handling in Genode gets unified.

Additionally try to print a warning, instead of dying, if we get cap reference
count under or overflow.

Issue #1615
2015-07-07 19:48:07 +02:00
Christian Helmuth
b1dd5fdf1d Prevent warning in libc_noux
__INT_MAX__ equals 2147483647 which are roughly 68 years.
2015-07-07 19:48:07 +02:00
Norman Feske
0cd93c64aa ldso: add lx_environ to symbol map
This symbol must be exported to build dynamically-linked executables on
the lx_hybrid_x86 base platform.
2015-07-07 19:48:07 +02:00
Sebastian Sumpf
49ae508889 usb_drv: use heap for vmalloc allocations
Do not use slabs for allocations above 64KB, this seems to lead to memory
corruptions and the error described in issue #1613 under certain circumstances.

fixes #1613
2015-07-07 19:48:06 +02:00
Stefan Kalkowski
c951c30d8a base: extend weak pointer test (Ref #1607)
Add a test where a locked pointer shall be taken during object destruction.
Moreover, extend the run-script so it runs on different platforms with
"real" timers.
2015-07-07 19:48:06 +02:00
Josef Söntgen
e6995ecad7 sdl: sync tail pointer in SDL_Audio backend
SDL uses the Audio_out session in streaming fashion. For this reason
the audio might be played with delay of at most the queue size. To
mitigate the effect we synchronize the tail pointer to the current play
pointer when the PlayAudio() function is called by SDL for the first
time.

Fixes #1612.
2015-07-07 19:48:06 +02:00
Stefan Kalkowski
89255c3979 remove Versatile Express board (Fix #1611) 2015-07-07 19:48:06 +02:00
Norman Feske
3c0517fe1f init: use binary name as ROM label
Init used to specify the unique child name as session label when
requesting the binary image of a dynamically linked child. The actual
module name was propagated as "filename" session argument. Since we want
to move towards the sole use of the session label, which can be taken
into account for the session routing, the module name should always be
the last part of a ROM session label.
2015-07-07 19:48:06 +02:00
Norman Feske
785cac7168 decorator: consider partially transparent windows
This patch changes the window manager, the decorator, and the
floating window layouter to propagate the usage of an alpha channel from
the client application to the decorator. This way, the decorator can
paint the decoration elements behind the affected windows, which would
otherwise be skipped.
2015-07-07 19:48:06 +02:00
Norman Feske
ea16c19516 nit_fader.run: fix conditional route 2015-07-07 19:48:05 +02:00
Norman Feske
caa809e593 CPU load display application 2015-07-07 19:48:05 +02:00
Norman Feske
e45e01ee8e gems: HSV-to-RGB color-conversion function 2015-07-07 19:48:05 +02:00
Norman Feske
fd45a70acc dde_linux/wifi: enable IWL device of Lenovo x201 2015-07-07 19:48:05 +02:00
Norman Feske
8b013287ba Simple CPU-time burner application 2015-07-07 19:48:05 +02:00
Norman Feske
503263a8a2 base-nova: consider non-contiguous CPU numbers
This is a follow-up commit to the following two patches:
* base/nova: add idle threads to trace sources
* nova: support to read thread and idle time
2015-07-07 19:48:05 +02:00
Norman Feske
259b127f96 Polygon drawing and rudimentary 3D routines
This patch adds two new painters located at gems/include/polygon_gfx.
Both painters draw convex polygons with an arbirary number of points.
The shaded-polygon painter interpolates the color and alpha values
whereas the textured-polygon painter applies a texture to the polygon.
The painters are accompanied by simplistic 3D routines located at
gems/include/nano3d/ and a corresponding example (gems/run/nano3d.run).
2015-07-07 19:48:04 +02:00
Norman Feske
c74a4fbbe2 wm: decouple decorator and layouter from wm 2015-07-06 12:22:28 +02:00
Norman Feske
a3d78d3779 window layouter: let focus follow the pointer 2015-07-06 12:22:28 +02:00
Norman Feske
0cc314399c nitpicker: make redraw debug feature configurable 2015-07-06 12:22:28 +02:00
Norman Feske
d7256c60a0 window decorator: limit update rate to 50 fps 2015-07-06 12:22:27 +02:00
Norman Feske
69da1fa1ed wm/layouter: Raise window on click 2015-07-06 12:22:27 +02:00
Norman Feske
b4ebefd616 cli_monitor: read subsystem configs from VFS
This patch changes the way how CLI monitor obtains its subsystem
configurations. Originally, this information was provided via the
Genode::config mechanism. But for managing complex scenarios, the config
node becomes very complex. Hence, it is preferrable to have a distinct
file for each subsystem configuration.

The CLI monitor scans the directory '/subsystems' for files ending with
".subsystem". Each file has the same syntax as the formerly used
subsystem nodes.
2015-07-06 12:22:27 +02:00
Norman Feske
f917728ecb vfs: let rom fs update ROM when opening file 2015-07-06 12:22:27 +02:00
Sebastian Sumpf
ffaf65efa0 dde_ipxe: enable BCM57cxx cards
Add tg3 driver files and adjust Genode's ipxe code. Tested on Fiasco.OC only.

issue #1609
2015-07-06 12:22:27 +02:00
Reinier Millo Sánchez
b13b0113c8 usb: kernel-specific USB IRQ number on Raspberry Pi
The USB interrupt number on Raspberry Pi differs betwenn Fiasco.OC and
base-hw, the former uses 9 while the latter uses 17.
2015-07-06 12:22:26 +02:00
Reinier Millo Sánchez
c60d65150e base-foc: support for Raspberry Pi
Fixes #1596
2015-07-06 12:22:26 +02:00
Emery Hemingway
46b7227ef0 cxx: notify parent on abort() (in main thread)
Fixes #1605
2015-07-01 15:09:32 +02:00
Sebastian Sumpf
4f0251eb00 foc: added Exyonos4 IRQ patches
Fixes #1610
2015-07-01 14:57:43 +02:00
Christian Helmuth
49333bafc2 lxip: do not whine on kfree(0) 2015-07-01 14:46:18 +02:00
Stefan Kalkowski
de4a98c777 hw: avoid using RM session in platform thread
Fix #888
2015-07-01 14:46:18 +02:00
Stefan Kalkowski
f5d5ed9637 hw: use kernel signal API for page-fault signals
Instead of using the Genode user-level signal API to signal page-faults to
a page-fault handler, use the kernel API directly. Thereby the accounting
of signal contexts needed for each paging subject can be done easily.

Fix #956
2015-07-01 14:46:18 +02:00
Stefan Kalkowski
57e2f3affc hw: remove redundant file from signal library
The file seems to be there for historical reasons only.

Ref #956
2015-07-01 14:46:18 +02:00
Stefan Kalkowski
691df908aa core: remove Rm_member from RM session component
Rm_member does not fulfill a useful role, but makes understanding of
the RM session component more difficult.

Ref #956
2015-07-01 14:46:17 +02:00
Stefan Kalkowski
8abd70e6e7 hw: allocate core's page-tables outside of binary
Moreover, be strict when calculating the page-table requirements of
core, which is architecture specific, and declare the virtual memory
requirements of core architecture-wise.

Ref #1588
2015-07-01 14:46:17 +02:00
Stefan Kalkowski
3ee2997198 hw: remove unused declaration in core
Ref #1588
2015-07-01 14:46:17 +02:00
Stefan Kalkowski
dc36b63acb base: turn align_addr tool into constexpr
Thereby, the tool can be used to calculate static compile-time values.
Ref #1588
2015-07-01 14:46:17 +02:00
Stefan Kalkowski
b856bfdfcd base: let bit allocator use fine-grained sizes
Ref #1588
2015-07-01 14:46:17 +02:00
Stefan Kalkowski
6552d47e60 hw: eliminate missing references for consts
Fix #1606
2015-07-01 14:46:16 +02:00
Christian Helmuth
11c31c4432 Prevent silly text-segment alignment on all platforms
We set 'ld -z max-page-size' to 4KiB to prevent the linker from aligning
the text segment to any built-in default (e.g., 4MiB on x86_64 or 64KiB
on ARM). Otherwise, the padding bytes are wasted at the beginning of the
final binary.
2015-07-01 14:46:16 +02:00
Sebastian Sumpf
463c9bec17 Replace Nic driver interface by customizable component
Removed the Nic::Driver implementation. All nic servers now inherit from
Nic::Session_component. Packet stream signals are dispatched to
the 'handle_packet_stream' function within a session component. Thus, nic
servers now have direct access to the packet stream channels, making handling
more flexible.

Adjusted nic_loobpack, dde_ipxe, wifi, usb, lan9118, Linux nic, and OpenVPN to
the new interface.

Fixes #1602
2015-07-01 14:46:16 +02:00
Norman Feske
cc4febd1c2 sd_card: SDHCI quirk for 136-bit responses 2015-07-01 14:46:15 +02:00
Norman Feske
281d3ffba9 hw: free correct IRQ when closing IRQ session
The ~Irq_session_component relied on the IRQ number obtained by the
corresponding kernel IRQ object to mark the IRQ as free at the IRQ
allocator. However, since the kernel IRQ object is initialized not
before the 'sigh' function is called, the IRQ of sessions that
never called 'sigh' could not be freed correctly. This patch fixes
the problem by not relying on the kernel IRQ object for obtaining
the number in the destructor but using the '_irq_number' member
variable instead.
2015-07-01 14:46:15 +02:00
Adrian-Ken Rueegsegger
21c7fa2881 vbox: Fix VMM startup failure message
Use printf format specifier with correct size to log error code which is
if type uint32_t. Also print the error code in hex since this simplifies
lookup as the error values are also defined as hexadecimal values, see
[1].

Fixes #1600

[1] - repos/ports/src/virtualbox/include/xpcom/nsError.h
2015-07-01 14:46:15 +02:00
Stefan Kalkowski
2a351215f4 base: remove pager code from public API
Fix #1593
2015-07-01 14:46:15 +02:00
Christian Helmuth
01f22d4dc6 arora: use github archive for port
code.google.com seems to waste away slowly...
2015-06-22 14:43:41 +02:00
Christian Helmuth
340424db83 wifi: report correct bssid when connected 2015-06-22 14:43:41 +02:00
Stefan Kalkowski
cc58b11998 hw: replace page table allocator with static one
Instead of organizing page tables within slab blocks and allocating such
blocks dynamically on demand, replace the page table allocator with a
simple, static alternative. The new page table allocator is dimensioned
at compile-time. When a PD runs out of page-tables, we simply flush its
current mappings, and re-use the freed tables. The only exception is
core/kernel that should not produce any page faults. Thereby it has to
be ensured that core has enough page tables to populate it's virtual
memory.

A positive side-effect of this static approach is that the accounting
of memory used for page-tables is now possible again. In the dynamic case
there was no protocol existent that solved the problem of donating memory
to core during a page fault.

Fix #1588
2015-06-22 14:43:41 +02:00
Adrian-Ken Rueegsegger
3291ca59a3 hw_x86_64: Extend initial PTs to map 2-16 MiB
Ref #1588
2015-06-22 14:43:41 +02:00
Sebastian Sumpf
696e5cbd54 dde_ipxe: support dis-/reconnect of clients
Unregister callbacks, so rx packets will not be propated to the deleteted
'Driver' object. Initialize ipxe once in the 'Main' object, thus allowing new
session connections.

Fixes #1595
2015-06-22 14:43:40 +02:00
Sebastian Sumpf
d80c1c91be usb_drv: Remove signaling in wait_event_timeout
With the server framework this becomes unnecessary. Also when the 'platform_drv'
has a lower priority, signaling will cause a constant load that starves the
'platform_drv'.

Fixes #1594
2015-06-22 14:43:40 +02:00
Norman Feske
e143084b04 base: fix warning in RPC framework
The recent change of the TRACE session interface triggered the
following warning:

/home/no/src/genode/repos/base/include/base/ipc.h:79:4: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    *reinterpret_cast<T *>(&_sndbuf[_write_offset]) = value;
    ^
In file included from /home/no/src/genode/repos/base/src/core/include/trace/session_component.h:19:0,
                 from /home/no/src/genode/repos/base/src/core/trace_session_component.cc:15:
/home/no/src/genode/repos/base/include/base/rpc_server.h:132:42: note: ‘ret’ was declared here
     typename This_rpc_function::Ret_type ret;

The warning occurs for basic return types (like size_t), which are
indeed not initialized. The variable gets its value assigned by the
corresponding 'call_member' overload, to which the variable is passed as
reference. But the compiler apparently is not able to detect this assignment.

Declaring 'ret' with a C++11-style default initializer fixes the warning.
2015-06-22 14:43:40 +02:00
Christian Helmuth
a844743a2e hello: condition config for various base platforms 2015-06-22 14:43:40 +02:00
Norman Feske
ed88d3aa13 Rename "failsafe" test to "fault_detection"
The name "failsafe" will be used for the upcoming failsafe server
wrapper.

Issue #1592
2015-06-22 14:43:40 +02:00
Norman Feske
712875ade4 os: use the server API in server/nic_loopback
This patch also introduces a run script for testing the component.
2015-06-22 14:43:40 +02:00
Norman Feske
5d678dba9e core: throw Trace::Out_of_metadata in subjects()
While importing trace sources as trace subjects into a TRACE session,
the session quota might become depleted. The TRACE session already keeps
track of the session quota via an allocator guard but the 'subjects' RPC
function missed to handle the out-of-memory condition. This patch
reflects the error condition as an 'Out_of_metadata' exception to the
TRACE client. It also contains an extension of the trace test to
exercise the corner case.
2015-06-22 14:43:39 +02:00
Alexander Boettcher
705257cf22 cxx: show thread name in event of abort
Issue #1591
2015-06-22 14:43:39 +02:00
Alexander Boettcher
be149cc6e4 vbox: increase cpu_session quota for pthreads
Fixes #1591
2015-06-22 14:43:39 +02:00
Norman Feske
a3d287f23d decorator: update hover report on layout change
Fixes #1590
2015-06-22 14:43:39 +02:00
Norman Feske
a23ac5f569 base/nova: add idle threads to trace sources
Issue #813
2015-06-22 14:43:39 +02:00
Christian Prochaska
252a10a859 vbox: fix mouse wheel support
Fixes #1589
2015-06-22 14:43:38 +02:00
Christian Prochaska
a801976727 vbox: dynamic adaptation to screen-size changes
Fixes #1554
2015-06-22 14:43:38 +02:00
Norman Feske
b22f3c67f0 Trace-subject reporter
Issue #813
2015-06-22 14:43:38 +02:00
Norman Feske
959572968d core: provide thread exec times via TRACE service
This patch enable clients of core's TRACE service to obtain the
execution times of trace subjects (i.e., threads). The execution time is
delivered as part of the 'Subject_info' structure.

Right now, the feature is available solely on NOVA. On all other base
platforms, the returned execution times are 0.

Issue #813
2015-06-22 14:43:38 +02:00
Alexander Boettcher
fbe44f08d4 nova: support to read thread and idle time
Issue #813
2015-06-22 14:43:38 +02:00
Norman Feske
4f88fe7bd0 init: fix label buffer size
This patch bases the size of the destination buffer in
'Init::Child_policy_redirect_rom_file' on the maximum label size
instead of the filename size. Otherwise, the use of a long configfile
name (i.e., "trace_subject_reporter.config") in combination with a long
child name ("trace_subject_reporter") would result in a truncated label
string.
2015-06-22 14:43:38 +02:00
Norman Feske
4616f540df report_rom: clear stale content
When replacing a report with a smaller one, the corresponding ROM
dataspace should not contain any traces of the old report. Otherwise,
the consumer of the ROM dataspace may mistake the stale content as
meaningful information. This is particularly annoying when manually
inspecting reports. This patch overwrites the stale content with zeros.
2015-06-22 14:43:37 +02:00
Norman Feske
cc74204801 os: add Reporter::clear method 2015-06-22 14:43:37 +02:00
Norman Feske
2d8a4917a5 base: add Trace::Subject_info::state_name
Issue #813
2015-06-22 14:43:37 +02:00
Taru Karttunen
5fec78fcd6 Add nullptr error handling in part_blk, fix #1586 2015-06-22 14:43:37 +02:00
Josef Söntgen
80893dfcfc platform_drv: specific AUDIO/HDAUDIO class aliases
The alias AUDIO matches audio multimedia device while the HDAUDIO
alias matches HD audio multimedia devices.

Fixes #1581
2015-06-22 14:43:37 +02:00
Christian Prochaska
4cae6c0d12 cxx: report names of uncaught exceptions again
Fixes #1582
2015-06-22 14:43:37 +02:00
Christian Helmuth
1f62446b65 usb: effectively request all IRQ capabilities
Thanks @alex-ab for the remote help.
2015-06-22 14:43:37 +02:00
Christian Helmuth
7dd156c8b6 fuse_fs: prevent annoying warning 2015-06-22 14:43:36 +02:00
Norman Feske
68c6052485 report_rom: zero-terminate reports 2015-06-22 14:43:36 +02:00
Christian Helmuth
7897e52235 vbox_pointer: policy-based shape selection
Fixes #1557
2015-06-22 14:43:36 +02:00
Christian Helmuth
178f2c0e88 reporter: support reporting data buffers
Issue #1557
2015-06-22 14:43:36 +02:00
Emery Hemingway
cec2dd3b3f unify file system utilities to os/include/file_system
Fixes #1564
2015-06-22 14:43:36 +02:00
Alexander Boettcher
c72ea84bcd pci: fix irq re-routing discovery
The commit handles the case that a host bridge device is not at 0:0.0 located.

Issue #1547
2015-06-22 14:43:36 +02:00
Stefan Kalkowski
f78aaf2234 hw: seal capability leak (fix #1568)
Do not initially transfer UTCB dataspace and parent capability to a thread
that is no main thread.
2015-06-22 14:43:35 +02:00
Norman Feske
fcf35a0397 report_rom: add 'verbose' config attribute 2015-06-22 14:43:35 +02:00
Norman Feske
5317cca031 base/allocator.h: clarify use of delete operator
Issue #1571
2015-06-22 14:43:35 +02:00
Stefan Kalkowski
b64f23d4c3 hw: free page tables (fix #1573) 2015-06-22 14:43:35 +02:00
Stefan Kalkowski
409ac1468e core: implement core allocator's free (ref #1573) 2015-06-22 14:43:35 +02:00
Norman Feske
6f167b449c Let XML generator append a trailing newline
By appending a newline to the generated XML data, we prevent the output
from messing with the command prompt when using 'cat' on a shell.
Futhermore, when using line-buffered output, the trailing newline
ensures that the output gets gets properly flushed.
2015-06-22 14:43:35 +02:00
Norman Feske
613d208045 Fix comment 2015-06-22 14:43:34 +02:00
Alexander Boettcher
1f40d9de6a pci: convert to platform_drv
Fixes #1542
2015-06-22 14:43:34 +02:00
Alexander Boettcher
32e792dc74 libegl: remove i915 gallium support 2015-06-22 14:43:34 +02:00
Christian Helmuth
3d7b865251 dynamic_rom: fix returned condition 2015-06-22 14:43:34 +02:00
Norman Feske
4f927f651b core: handle IRQ sessions by separate entrypoint
Fixes #1572
2015-06-22 14:43:34 +02:00
Alexander Boettcher
52110b9d89 os: remove dde_kit
Issue #1565
2015-06-22 14:43:34 +02:00
Sebastian Sumpf
e1be0b3f67 wifi: remove dde_kit
Fixes #1565
2015-06-22 14:43:33 +02:00
Sebastian Sumpf
146b34bf40 lxip: remove dde_kit
issue #1565
2015-06-22 14:43:33 +02:00
Sebastian Sumpf
0a1664b892 usb_drv: remove dde_kit
issue #1565
2015-06-22 14:43:33 +02:00
Sebastian Sumpf
131758eae0 dde_linux: lx utility library
Issue #1565
2015-06-09 11:12:39 +02:00
Alexander Boettcher
1c38d4903b x86: use report_rom for acpi and pci driver
Issue #1542
2015-06-09 11:00:12 +02:00
Norman Feske
66e5796017 nitpicker: fix Domain_registry destructor
When reloading the nitpicker configuration, the destructor would get
stuck, trying to destroy the same object again and again.
2015-06-09 11:00:12 +02:00
Alexander Boettcher
852a250e03 run: fix netperf* perf measurement extraction
The result of the second run (TCP_MAERTS) gets extracted wrongly - due to the
change introduced by commit "run: always append to output buffer"
(Issue #1327). The output buffer is no longer reseted between several
run_genode_until invocation within a run script.
2015-06-09 11:00:11 +02:00
Norman Feske
ef9c745e42 ldso: add memcpy and memset to symbol.map
On ARM, the compiler generates calls to memcpy and memset. Most
dynamically linked programs use the libc, which provides these
functions. However, if a dynamically linked program does not use the
libc (e.g., noux/minimal or the new version of cli_monitor), those
symbols remain unresolved. By adding them to ldso's symbol.map, the
dynamic linker will resolve them with the functions of the cxx
library, which is part of the dynamic linker.

Issue #1561
2015-06-09 11:00:11 +02:00
Christian Helmuth
4004a3a9ca cpu_quota: pre-define variables in run script
If a regexp does not match but the variable is used later, the script
exits with an error like

  can't read "slow_quota_sp": no such variable
2015-06-09 11:00:11 +02:00
Alexander Boettcher
8ccac9a3bb pci: fix 'ALL' policy rule handling
Related to #1541.

Fixes #1559
2015-06-09 11:00:11 +02:00
Norman Feske
65837e8ae9 wifi: fix condition for non-protected connections 2015-06-09 11:00:11 +02:00
Norman Feske
167925ab76 vfs: add Vfs_handle::Guard utility
Issue #1561
2015-06-09 11:00:11 +02:00
Norman Feske
e3be65833f vfs: decouple file-system factory from libc
This patch moves the VFS file-system factory to a separate vfs library
that is independent from libc. This enables libc-less Genode programs to
easily use the VFS infrastructure.

Fixes #1561
2015-06-09 11:00:10 +02:00
Christian Prochaska
435721ea19 VESA driver: report the framebuffer width
With this patch, the VESA driver reports the framebuffer width to the
client instead of the visible width  This fixes possible distortion
if these widths differ, at the cost that content in the right-most area
might be invisible in such cases.

Issue #1264.
2015-06-09 11:00:10 +02:00
Christian Helmuth
93f0cde72f vbox: adapt to framebuffer mode on startup
This works only if guest additions are installed and those report
"graphics=yes".

Related to #1554
2015-06-09 11:00:10 +02:00
Alexander Boettcher
e1896e3b44 run: add platform_drv include for usage by scripts
Related to #765 and used for issue #1542
2015-06-09 11:00:10 +02:00
Alexander Boettcher
8cf09281c1 acpi: transfer memory quota of pci client/driver
Fixes #1550
2015-06-03 12:53:48 +02:00
Alexander Boettcher
7b6cd28dcb nova: update to r9
Fixes compiler warnings and re-enables debug commits regarding out of memory
situations.

Fixes #1551
2015-06-03 12:53:48 +02:00
Christian Prochaska
55ec357d09 vbox: store the unmodified TSC in the GIP
Fixes #1548
2015-06-03 12:53:48 +02:00
Emery Hemingway
46858cf2f6 noux: exit with child
Issue: #1408
2015-06-03 12:53:48 +02:00
Christian Helmuth
992fbb495d stdcxx: simple regression test 2015-06-03 12:53:48 +02:00
Christian Helmuth
ba0e1b782e stdcxx: re-enable _GLIBCXX_USE_C99_STDINT_TR1
The option was enabled until version 4.8 and is needed by
std::lock_guard at least.
2015-06-03 12:53:47 +02:00
Emery Hemingway
2c090119ae ram_fs: writes to files should return length
Fixes #1545
2015-05-28 11:23:18 +02:00
Adrian-Ken Rueegsegger
6b0b297351 libc_ffat: Fix compiler warning
Fixes #1546
2015-05-28 11:20:00 +02:00
Adrian-Ken Rueegsegger
965d85d52d hw_x86_64: Support for dynamic IRQ mode setting
Add a Platform::setup_irq_mode function which enables the IRQ session to
update the trigger mode and polarity of the associated IRQ according to
the session parameters. On ARM this function is a nop.

This change enables the x86_64 platform to support devices which use
arbitrary trigger modes and polarity settings, e.g. AHCI on QEMU and
real hardware.

Fixes #1528.
2015-05-28 11:17:28 +02:00
Alexander Boettcher
1592e78387 pci: handle 'class' alias correctly
Fixes #1541
2015-05-27 11:38:54 +02:00
Josef Söntgen
30a02a5d92 vbox: support unaligned MMIO read access
Fixes #1540.
2015-05-27 11:38:19 +02:00
Alexander Boettcher
6133acb179 pci: use per pci session a separate device_pd
Fixes #1539
2015-05-27 11:37:18 +02:00
Alexander Boettcher
3a021c4c29 pci: deny access to registers used by pci driver
Fixes #1532
2015-05-27 11:28:06 +02:00
Alexander Boettcher
cbc46a2276 usb: avoid allocation across non-cont. phys memory
Fixes #1530
2015-05-27 11:25:34 +02:00
Norman Feske
bf031b174a demo.run: start scout at startup
To be consistent with the documentation, we have to start scout instead
of launchpad right at the start of the default demo scenario.
2015-05-26 09:40:05 +02:00
Christian Helmuth
3384d3d23c linux: fix issue with pointer to rvalue struct member 2015-05-26 09:40:05 +02:00
Christian Prochaska
918895a4f4 vfs: increment 'seek_offset' in block file system
Fixes #1535
2015-05-26 09:40:04 +02:00
Martin Stein
8a99c08ae4 hw: always panic on removal of scheduler head
Because of helping, it is possible that a core thread that wants to
destroy another thread at the kernel is using the scheduling context of
the thread that shall be destroyed at this point in time. When building
without GENODE_RELEASE defined, this always triggers an assertion in the
kernel. But when building with GENODE_RELEASE defined, this might silently
lead to kernel-memory corruption. This commit eliminates the latter case.
Should be reverted as soon as the scheduler is able to remove its head.

Ref #1537
2015-05-26 09:40:04 +02:00
Stefan Kalkowski
28804e2bfb base: remove cap_integrity test (fix #1536) 2015-05-26 09:40:04 +02:00
Emery Hemingway
5fc8ed3e6b file system servers must not use null tx buffers
Fixes #1534
2015-05-26 09:40:04 +02:00
Stefan Kalkowski
e081554731 hw: kernel backed capabilities (Fix #1443) 2015-05-26 09:40:04 +02:00
Stefan Kalkowski
4431ab7354 hw_x86_64: fix kernel stack initialization
Fix #1533
2015-05-26 09:40:04 +02:00
Stefan Kalkowski
db5e4f70f1 hw: replace 'placement new' with 'construct_at<>'
Placement new can be misleading, as we already overload the new operator
to construct objects via pointers to allocators. To prohibit any problems here,
and to use one consistent approach, we can explicitely construct the object
with the already available 'construct_at' template function.

Ref #1443
2015-05-26 09:40:03 +02:00
Stefan Kalkowski
b8f178e647 hw: move MMU-related functions into Address_space
* Introduce a hw specific Address_space interface for protection
  domains, which combines all memory-virtualization related functionality
* Introduce a core-specific Platform_pd object that solves all the hen-egg
  problems formerly distributed in kernel and core-platform code

Ref #595
Ref #1443
2015-05-26 09:40:03 +02:00
Stefan Kalkowski
d4c55bec2a hw: implement 'Address_space' interface
Ref #595
Ref #1443
2015-05-26 09:40:03 +02:00
Stefan Kalkowski
554146d39c base: enforce ram_quota donations to be consistent
For several basic sessions that core provides default ram quota values
exist in the form of enum values. They are used e.g. by init to deduce
session costs. Unfortunately they were not used when actually establishing
the session, which lead to inconsistencies.

Ref #1443
2015-05-26 09:40:03 +02:00
Stefan Kalkowski
a93266548f base: remove unused enum from object pool
Ref #1443
2015-05-26 09:40:03 +02:00
Stefan Kalkowski
217f62b89d base: move retry template function to util header
Ref #1443
2015-05-26 09:40:03 +02:00
Stefan Kalkowski
64bfe233d7 base: make CAP session upgradeable
* Introduce 'Out_of_metadata' exception for capability allocation

Ref #1443
2015-05-26 09:40:02 +02:00
Stefan Kalkowski
73c3a81e0b base: make PD session upgradeable
Ref #1443
2015-05-26 09:40:02 +02:00
Sebastian Sumpf
2d41f13229 base-foc: update commit and hash 2015-05-26 09:40:02 +02:00
Christian Prochaska
a30e29b9c2 ports-foc: remove balloon server
Fixes #1514
2015-05-26 09:40:02 +02:00
Christian Prochaska
caa61c268b seoul: adapt port files to the updated repository
Fixes #1526
2015-05-26 09:40:02 +02:00
Norman Feske
da0ee84a7d sel4: 3rd article - porting core to seL4 2015-05-26 09:40:02 +02:00
Norman Feske
cada11b553 Add sel4_x86_32 to create_builddir tool 2015-05-26 09:40:01 +02:00
Norman Feske
66dd065163 sel4: use LOG console for non-core components 2015-05-26 09:40:01 +02:00
Norman Feske
a748dfbc5c sel4: implementation of Rm_client::unmap 2015-05-26 09:40:01 +02:00