Commit Graph

2248 Commits

Author SHA1 Message Date
Christian Helmuth
00adca8c47 lx_fs: use component API
Issue #1987
2016-11-30 13:37:03 +01:00
Norman Feske
b44f0554bd Adapt high-level components to new parent API
This patch adjusts the various users of the 'Child' API to the changes
on the account of the new non-blocking parent interface. It also removes
the use of the no-longer-available 'Connection::KEEP_OPEN' feature.

With the adjustment, we took the opportunity to redesign several
components to fit the non-blocking execution model much better, in
particular the demo applications.

Issue #2120
2016-11-30 13:37:03 +01:00
Norman Feske
8bafb9d41b Adapt low-level components to new parent interface
This patch adjusts the components of the os repository as well as device
drivers to the new parent interface.

Issue #2120
2016-11-25 16:06:42 +01:00
Norman Feske
cfdbccc5c2 Remove blocking calls from root and parent RPCs
This is a redesign of the root and parent interfaces to eliminate
blocking RPC calls.

- New session representation at the parent (base/session_state.h)
- base-internal root proxy mechanism as migration path
- Redesign of base/service.h
- Removes ancient 'Connection::KEEP_OPEN' feature
- Interface change of 'Child', 'Child_policy', 'Slave', 'Slave_policy'
- New 'Slave::Connection'
- Changed child-construction procedure to be compatible with the
  non-blocking parent interface and to be easier to use
- The child's initial LOG session, its binary ROM session, and the
  linker ROM session have become part of the child's envirenment.
- Session upgrading must now be performed via 'env.upgrade' instead
  of performing a sole RPC call the parent. To make RAM upgrades
  easier, the 'Connection' provides a new 'upgrade_ram' method.

Issue #2120
2016-11-25 16:06:42 +01:00
Norman Feske
3cc2a3f085 terminal: increase stack size 2016-11-25 15:30:58 +01:00
Norman Feske
baf61df0fd base: new 'Registry' data structure
This data structure is meant as a safe alternative for a list wherever
the list is solely used to remember objects and iterate through them in
an unspecified order. One use case is the 'Service_registry'.
2016-11-25 15:30:58 +01:00
Norman Feske
513a3f1d37 base: new 'Id_space' data structure
This data structure allows the association of objects with IDs. IDs are
kept in an AVL tree. So in contrast to a bit allocator, the ID space can be
sparsely populated and does not need to be dimensioned. The lifetime of
an ID is bound to an 'Element' object, which relieves the programmer
from manually allocating/deallocating IDs for objects.

Issue #2120
2016-11-25 15:30:58 +01:00
Alexander Boettcher
58eabc756b pistachio: exclude phys ram which is unaccessible
because of 1:1 mappings, phys memory above 3G (user/kernel virtual boundary)
can't be accessed ...
2016-11-25 15:30:58 +01:00
Alexander Boettcher
a72f81472b platform_drv: use label of client for ram session 2016-11-25 15:30:58 +01:00
Alexander Boettcher
81f0cacf66 core: prefer RAM allocation in high memory
We preserve lower RAM for device drivers with physical memory
constraints. If no physical RAM constraint exists, the allocations above
3G (32-bit) or 4G (64-bit) are preferred.
2016-11-25 15:30:57 +01:00
Alexander Boettcher
57949c2bbb nova: support asynchronous delegate
Issue #2173
2016-11-25 15:30:57 +01:00
Christian Helmuth
ff5d28822c bomb: limit generations on Linux
Limit the number of generations to 4 to prevent hitting the
socket-descriptor limit on Linux. Also, all possible configuration
parameters for bomb our now customizable in the run script and the
current config is logged by bomb master.
2016-11-25 15:27:29 +01:00
Alexander Boettcher
f4a7223bbf vbox: update to 5.1.8
Issue #2059
2016-11-25 15:27:29 +01:00
Josef Söntgen
ca3be471a9 lxip: get_random_once must be called once 2016-11-25 15:27:28 +01:00
Josef Söntgen
d647b6c797 lxip: use xoroshiro128+ as random backend 2016-11-25 15:27:28 +01:00
Christian Helmuth
104775aa56 wifi: support for scans in connected state
The 'connected_scan_interval' config attribute specifies the scan
interval in seconds. The commit also removes the deprecated ram_fs
component from the test run script.
2016-11-25 15:27:28 +01:00
Josef Söntgen
9ba7b2edde vbox: improve network backend
VirtualBox mainly derives the initial link-state for its device models
from checking the <Adapter ... cable="true"/> attribute. Our backend
only propagates the current state of the Nic session if it receives a
link-state signal. This may lead to problems if a guest detects a link
up state when it is actually down and wants to use the interface. The
backend now queries the Nic session and sets the link-state accordingly
when it is constructed.

In case there is no link do not attempt to submit a packet to the packet
stream but return with an error so that upper layers can handle it.

Enable signals for network on poweron and not already during
construction. The network model may be not yet ready to process incoming
signals and data.

Fixes #2117.
2016-11-25 15:27:28 +01:00
Christian Helmuth
f75f199947 ldso: initialize ELF object before relocating
This fixes a regression on Ubuntu 16.04 (resp. Linux systems with recent
kernel versions) and address-space randomization originating from an
uninitialized relocation base of 0.
2016-11-25 15:27:28 +01:00
Norman Feske
82107bef9b base: buffer session args in 'Connection'
This patch is a preparation of the forthcoming async parent interface.
Note that this patch increases the size of connection objects.
Furthermore it adds a diagnostic message whenever a connection fails.

Issue #2166
2016-11-25 15:27:28 +01:00
Norman Feske
7fba39831a platform_drv/x86: remove device slab
Because of the session-argument buffering added to 'Connection' objects
when changing the parent interface to be non-blocking, the
'Device_component' has grown in size from 1.5 KiB to 5 KiB. The slab
allocator was configured with a block size of 4 KiB. So it does not work
with the grown 'Device_component' size.

Once the transition to the new API is completed (when we can remove the
buffering of session arguments from the 'Connection' objects), we may
revert this change.

Issue #2120
2016-11-25 15:27:27 +01:00
Norman Feske
ac1794ed7d base: add const operator * to 'Volatile_object' 2016-11-25 15:27:27 +01:00
Norman Feske
0e0f830a14 base: make Volatile_object noncopyable
Unfortunately, the volatile object does not inherit the noncopyable
attribute of the enclosed object. By making all volatile objects
noncopyable, we prevent the accidental copying of a noncopyable object
wrapped in a volatile object.
2016-11-25 15:27:27 +01:00
Norman Feske
b8e98f2355 base: forward args in Output::print
The original version copied the arguments, which does not work for the
output of complex types, in particular non-copyable objects.
2016-11-25 15:27:27 +01:00
Norman Feske
35fa67768f base: add 'Volatile_object::print' method
The method prints the message "<unconstructed>" if the object is not
available. Otherwise, it prints the encapsulated object.
2016-11-25 15:27:26 +01:00
Norman Feske
a27cbfd371 os: make report_rom/rom_module.h better reusable 2016-11-25 15:27:26 +01:00
Christian Prochaska
c0e0f2874a qt5: remove launchpad-based 'QProcess' implementation
Fixes #1631
2016-11-25 15:27:26 +01:00
Norman Feske
d477a3e76d Avoid use of Connection::KEEP_OPEN feature
This feature is not compatible with the forthcoming nonblocking parent
interface. The patch removes the use of feature in all places except for
the components of the demo repository, which will under go a redesign
anyway.

Issue #2120
Issue #2165
2016-11-25 14:06:14 +01:00
Alexander Boettcher
a085b4f536 nova: remap kernel cpu ids to genode cpu ids
to have a predictable order. First all CPU ids with hyper-thread id 0 are taken,
next the hyper-threads with 1 of all cores and so on.

Fixes #2163
2016-11-25 14:06:14 +01:00
Alexander Boettcher
8f4fbce2d6 nova: remove unused debug utility
Issue #2163
2016-11-09 17:14:53 +01:00
Stefan Kalkowski
f60cf697d2 core: simplify Rom_module and Rom_fs
* replace print_fs with Output::print equivalent
* use Avl_tree::for_each instead of own implementation
* extend constness

Ref #2159
2016-11-08 15:45:21 +01:00
Stefan Kalkowski
e1ec39e476 base: replace dump utilities in Allocator_avl
Replace 'dump()' debug utilities within Allocator_avl with Output::print
equivalents, and use the new Avl_tree::for_each utility to simplify
the implementation.

Ref #2159
2016-11-08 15:44:55 +01:00
Stefan Kalkowski
1542d92165 base: iterator for AVL tree (fix #2159) 2016-11-08 15:43:53 +01:00
Alexander Boettcher
800de566e2 intel_fb: update mode list for different displays
Fixes #2152
2016-11-08 15:35:42 +01:00
Alexander Boettcher
30780a1127 sel4: adjust nic_drv quota in noux_net_netcat 2016-11-08 15:26:34 +01:00
Josef Söntgen
a3e11a60c0 dde_linux: cleanup module param handling
Instead of using a somewhat incomplete module_param_named() macro,
which will influence other drivers, patch the driver that requires
this treatment.

Fixes #2169
Fixes #2155
2016-11-08 15:26:34 +01:00
Emery Hemingway
da68dcc63d drivers/audio: log sessions requests
Fix #2156
2016-11-08 15:26:34 +01:00
Alexander Boettcher
94fd5ad3b0 nova: make kernel memory configurable
via the Genode build system. Avoids the need to maintain contrib patches on
nova.

Fixes #2162
2016-11-08 15:26:34 +01:00
Alexander Boettcher
74c0b22066 nova: fix sc kernel assertions
Fixes #2161
2016-11-08 15:26:33 +01:00
Emery Hemingway
eff90d759f remove global namespacing from internal base headers
Making the Genode namespace global can cause name collisions on
base-linux.

Fix #2158
2016-11-08 15:26:33 +01:00
Norman Feske
6dd695f788 update report_rom configs to fix warning
Several run scripts still used the outdated '<rom>' sub node in the
report_rom configuration.
2016-11-08 15:26:33 +01:00
Norman Feske
f577c451ef increase stack size of signal-proxy thread
This fixes the warning "small stack of 3996 bytes [...] may break Linux
signal handling" on 32-bit base-linux.
2016-11-08 15:26:33 +01:00
Emery Hemingway
eee0489a05 server/mixer: transition to new base API
Ref #1987
2016-11-08 15:26:33 +01:00
Norman Feske
02233b64fb device_pd: use component API
Issue #1987
2016-11-08 15:26:32 +01:00
Norman Feske
784e728727 Clean ldso from using deprecated APIs
Issue #1987
2016-11-08 15:26:32 +01:00
Norman Feske
20faa8b84e base: 'String' constructor overload for literals
This overload covers the common case for initializing a string from a
literal without employing the 'Output' mechanism. This way, such
strings can by constructed without calling virtual functions, which in
turn makes the 'String' usable for the 'init_rtld' phase of the dynamic
linker.
2016-11-08 15:26:31 +01:00
Christian Helmuth
23c2c7c5a8 Use plain http for preparing e2fsprogs port
The gnutls version in Ubuntu 14.04 does not support the current settings
of the git.kernel.org TLS/HTTPS access.
2016-11-08 15:26:31 +01:00
Emery Hemingway
bae4ce5360 lib/vfs: deduplicate symlink and single_file
Issue #1891
2016-11-08 15:26:31 +01:00
Emery Hemingway
ddf3716cff vfs: pass Env and allocator when creating file-systems
Fix #1891
2016-11-08 15:26:31 +01:00
Emery Hemingway
beebd394fc lib/vfs: seperate implemention and API headers
Issue #1891
2016-11-08 15:26:30 +01:00
Alexander Boettcher
33ce649e85 audio: dissolve signal of Audio_in/out destruction
Fixes #2149
2016-11-08 15:26:30 +01:00
Norman Feske
b9280678fb base-linux: fix race in region_map_mmap
This patch fixes a race condition triggered by the thread test running
on Linux inside VirtualBox. The 'test_stack_alloc' sporadically produced
one of two errors: A segfault in the 'Thread::deinit_platform_thread' on
the attempt to access the 'native_thread' of the to-be-destructed thread
(this data structure is located on the thread's stack). Or, an error
message about a region conflict within the stack area.

The problem was that two instances of 'Region_map_mmap' issued a
sequence of munmap and mmap each. Even though each instance locked the
attach/detach operations, the lock was held per instance. In a situation
where two instances performed attach/detach operations in parallel, the
syscall sequences could interfere with each other.

In the test scenario, the two region-map instances are the test's
address space and the stack area. When creating a thread, the thread's
trace-control dataspace is attached at an arbitrary place (picked by
the Linux kernel) within the address space whereas the stack is attached
at the stack area. The problem is the following sequence:

Thread A wants to destruct a thread:
1. Remove stack from stack area
   (issue unmap syscall)
2. Preserve virtual address range that was occupied from the stack
   so that Linux won't use it
   (issue mmap syscall)

Thread B wants to construct a thread:
1. Request trace-control dataspace from CPU session
2. Attach trace-control dataspace to address space at a location
   picked by the Linux kernel
   (issue mmap syscall)

The problem occurs when thread B's second step is executed in between
the steps 1 and 2 of thread A and the Linux kernel picks the
just-unmapped address as the location for the new trace-control mapping.
Now, the trace control dataspace is mapped at the virtual address that
was designated for the stack of the to-be-created thread, and the
attempt to map the real stack fails.

The patch fixes the problem by replacing the former region-map-local
locks by a component-global lock.

Furthermore, it cleans up core's implementation of the support function
for the region-map-mmap implementation, eliminating the temporary
unlocking of the region-map lock during RPC.
2016-11-08 15:26:30 +01:00
Alexander Boettcher
466bec038f part_blk: free memory on session close
the dataspace used for the packetstream

Fixes #2148
2016-11-08 15:26:30 +01:00
Norman Feske
afed9cfd95 base: let string accept multiple arguments
Issue #2064
2016-11-08 15:26:30 +01:00
Alexander Boettcher
0d4f48ca0b vbox: add auto run script booting multiple VMs
Prepared for internal test machine, which has 8 logical cores.

6 Win7 64bit VMs are started, each having 2 vCPUs, using the same image and
different overlays. Changes to the VM are written to the overlays of ram_fs
and dropped after the test.

lCPU 0  : Genode base system and drivers
lCPU 1-2: VM1 2 vCPUs
lCPU 2-3: VM2 "
lCPU 3-4: VM3 "
lCPU 4-5: VM4 "
lCPU 5-6: VM5 "
lCPU 6-7: VM6 "

Fixes #2143
2016-11-08 15:26:29 +01:00
Alexander Boettcher
878abc7edb run: support multiple VMs in vbox* run scripts
Issue #2143
2016-11-08 15:26:29 +01:00
Alexander Boettcher
844174918b nit_fb: get to front if nit_fb got input focus
Issue #2143
2016-11-08 15:26:29 +01:00
Alexander Boettcher
61e1cf76c2 intel_fb: fix framebuffer freeup
drm_framebuffer_remove takes care of references to CRTC pointers before
freeing up framebuffer object. Directly calling the destroy function may cause
dangling CRTC pointers pointing inside the framebuffer object.

Fixes #2140
2016-11-08 15:26:29 +01:00
Christian Prochaska
9d84541e6f libports: add pcsc-lite library
Fixes #2145
2016-11-08 15:26:29 +01:00
Christian Prochaska
9ed69d8b47 libports: add CCID library
Fixes #2144
2016-11-08 15:26:28 +01:00
Christian Prochaska
55d709a175 libports: add libusb
Fixes #2142
2016-11-08 15:26:28 +01:00
Stefan Kalkowski
7e1692d997 core: unify handling of boot modules
Instead of solving the problem to deliver ROM modules to core while booting
differently for the several kernels (multi-boot, elfweaver, core re-linking),
this commit unifies the approaches. It always builds core as a library, and
after all binaries are built from a run-script, the run-tool will link an
ELF image out of the core-library and all boot modules. Thereby, core can
access its ROM modules directly.

This approach now works for all kernels except Linux.

With this solution, there is no [build_dir]/bin/core binary available anymore.
For debugging purposes you will find a core binary without boot modules, but
with debug symbols under [run_dir].core.

Fix #2095
2016-11-08 15:26:27 +01:00
Christian Prochaska
340a18007c pthread: implement pthread_mutex_trylock()
Fixes #2141
2016-11-08 15:26:27 +01:00
Norman Feske
9572ff9413 base: remove original PDBG from base/printf.h
This macro is superseded by base/debug.h.

Issue #2125
2016-11-08 15:26:27 +01:00
Emery Hemingway
ef5f36bf4e Redefine PDBG to use new log output function
PDBG is redefined in base/debug.h, an aide to development which is not
to be included in release code.

Fix #2125
2016-10-21 12:45:44 +02:00
Josef Söntgen
dee56aeafa usb_drv: add missing device pointer checks
The usb_drv must always check the device pointer in all session facing.
methods. A errorneous client can otherwise trigger a page-fault in the
driver.

Fixes #2133.
2016-10-21 12:39:37 +02:00
Christian Prochaska
82e228a715 usb_drv: raw session fixes
- use the correct memory free functions on errors
- report packet submit errors
- rename 'Usb::Packet_descriptor::transfer.timeout' as
 'Usb::Packet_descriptor::transfer.polling_interval'

Fixes #2135
2016-10-21 12:39:37 +02:00
Christian Prochaska
44d4bf7a1b libc_pipe: ignore some flags in 'fcntl()'
Ignore file access mode and file creation flags for the F_SETFL command.

Fixes #2136
2016-10-21 12:39:37 +02:00
Stefan Kalkowski
964239aa7a audio_mixer: use bool for mute XML report parsing
Fix #2123
2016-10-21 12:39:36 +02:00
Stefan Kalkowski
2a2e5c2df4 base-*: remove usage of printf
base generic code:
  * Remove unused verbosity code from mmio framework
  * Remove escape sequence end heuristic from LOG
  * replace Core_console with Core_log (no format specifiers)
  * move test/printf to test/log
  * remove `printf()` tests from the log test
  * check for exact match of the log test output
base-fiasco:
  * remove unused Fiasco::print_l4_threadid function
base-nova:
  * remove unused hexdump utility from core
base-hw:
  * remove unused Kernel::Thread::_print_* debug utilities
  * always print resource summary of core during startup
  * remove Kernel::Ipc_node::pd_label (not used anymore)
base*:
  * Turn `printf`,`PWRN`, etc. calls into their log equivalents

Ref #1987
Fix #2119
2016-10-21 12:39:36 +02:00
Alexander Boettcher
e864e84c5a run: add vm running directly from block partition
Fixes #2130
2016-10-21 12:39:36 +02:00
Christian Prochaska
d9c6f46fe5 vbox: automated USB device pass-through test
Fixes #2129
2016-10-21 12:39:35 +02:00
Christian Prochaska
b41b001003 qemu-usb: handle null pointer in 'free()'
Fixes #2128
2016-10-21 12:39:35 +02:00
Sebastian Sumpf
c2e7727f46 usb: add range check to UTF-16 string copy 2016-10-21 12:39:35 +02:00
Alexander Boettcher
4b148d896a nova: fix oom handling in kernel
Fixes #2126
2016-10-21 12:39:35 +02:00
Stefan Kalkowski
891bad8d54 dde_linux: use SSL secured, unified downloads
Fix #2127
2016-10-21 12:39:35 +02:00
Josef Söntgen
44bcf6bbf0 wifi_drv: add config knob to disable 11n mode
The 11n mode can forcefully be disabled by setting the 'disable_11n'
attribute to 'true'. This is workaround for certain 6200 ABG cards
that apparently do not support this mode.

Fixes #2124.
2016-10-21 12:39:35 +02:00
Josef Söntgen
620d5e3ba4 dde_linux: provide module_param_named macro
Implementing this macro provides easy access to module parameters from
outside the contrib code, i.e. the driver frontend. For now it will be
solely used by the wifi_drv.

Issue #2124.
2016-10-21 12:39:34 +02:00
Alexander Boettcher
9d49749a49 vbox: poke timer emt thread from time to time
Fixes #2110
2016-10-21 12:39:34 +02:00
Alexander Boettcher
c99729093a base: fix race in multiple lock.unlock() calls
Fixes #2122
2016-10-21 12:39:34 +02:00
Josef Söntgen
9013ca5364 libports: remove old lwIP foc_panda tracing tests
These tests were used for examine lwIP on foc_panda a few years back
but serve no particular purpose as of now.

Issue #2121.
2016-10-21 12:39:34 +02:00
Josef Söntgen
6be193cf80 Increase nic_drv RAM quantum
This change is needed to satisfy the increased memory usage of the
dde_ipxe nic_drv.

Issue #2121.
2016-10-21 12:39:34 +02:00
Josef Söntgen
3f0dfe7956 dde_ipxe: increase Slab backend alloc to 2 MiB
Fixes #2121.
2016-10-21 12:39:34 +02:00
Alexander Boettcher
a0c9915cee vbox: remove debug messages
stay more silent

Issue #2110
2016-10-21 12:39:33 +02:00
Alexander Boettcher
a5ff866ef7 vbox: map SUPSemEvent* to RTSemEvent*
and drop usage of Genode::Semaphore.

Issue #2110
2016-10-21 12:39:33 +02:00
Alexander Boettcher
07b994c8bd vbox: alloc memory of RTMem*Alloc within 2G window
Fixes #2116
2016-10-21 12:39:33 +02:00
Alexander Boettcher
3449985fdf base: avoid deadlock in region_map destruction
Fixes #2115
2016-10-21 12:39:33 +02:00
Christian Prochaska
e2ae01f870 usb_drv: fix policy parsing
Fixes #2112
2016-10-21 12:39:32 +02:00
Christian Prochaska
3a1f852318 base: don't use the 'size' argument in 'Heap::free()'
The Heap reports that 'free()' does not rely on a valid 'size' argument,
so it should not use it.

Fixes #2113
2016-10-21 12:39:32 +02:00
Alexander Boettcher
ce2139a533 vbox: add tm 4s patch
Issue #2110
2016-10-21 12:39:31 +02:00
Alexander Boettcher
08185e962f vbox: better lapic tpr support
Fixes #2110
2016-10-21 12:39:31 +02:00
Alexander Boettcher
a8495a0dfe vbox: use emt thread names
- eases debugging on smp setups

Issue #2110
2016-10-21 12:39:31 +02:00
Alexander Boettcher
14ef7a5312 vbox: support timeouts for GVMM_SCHED_HALT
Issue #2110
2016-10-21 12:39:31 +02:00
Roman Iten
dfce939ac8 dde_linux: fix log output of screen resolution
Fixes #2114
2016-10-21 12:39:31 +02:00
Stefan Kalkowski
7841058320 hw: only use x86_64 specifier instead of x86
Fix #2109
2016-10-21 12:39:31 +02:00
Stefan Kalkowski
3f6e148621 base: remove obsolete _prog_img_data symbol
Fix #2099
2016-10-21 12:39:31 +02:00
Josef Söntgen
3c8d31f8fb net: fix mac_from_string
The MAC tokens are given in hex so treat them as such.

Fixes #2107.
2016-10-21 12:39:30 +02:00
Stefan Kalkowski
0cbfef7bf1 os: increase init's slack RAM quota (fix #2103) 2016-10-21 12:39:30 +02:00
Alexander Boettcher
3bd361dfa5 nova: setup exception portals correctly
Fixes #2111
2016-10-21 12:39:30 +02:00
Alexander Boettcher
d989046604 vbox4: bring up all vCPUs
broken since latest upgrade to virtualbox 4.3.*

Issue #2090
2016-10-21 12:39:30 +02:00
Alexander Boettcher
a7d04eefab vbox5: fix build for vbox
Issue #2081
2016-10-21 12:39:30 +02:00