Commit Graph

4480 Commits

Author SHA1 Message Date
Josef Söntgen
2dfbfd7173 qemu-usb: handle STALL_ERROR
Issue #1945.
2016-05-09 13:09:54 +02:00
Josef Söntgen
133c46a784 usb_drv: handle EP stall in Usb_session
Fixes #1945.
2016-05-09 13:09:54 +02:00
Alexander Boettcher
463b39fc73 xml reporter: support different start node name
Currently the report name is used implicitly as first xml node name for the
report.  This is inconvenient if one component wants to generate various xml
reports under various names (e.g. to steer consumers/clients slightly
differently) but with the same xml node tree structure.

Fixes #1940
2016-05-09 13:09:54 +02:00
Martin Stein
ab9fe9cc6c tz_vmm usb_armory: update binary URIs
The binaries were moved to the genode.org webserver as free bandwidth of the
previous Github LFS was depleted.

Fixes #1902
2016-04-25 11:12:38 +02:00
Roman Iten
1ba1980727 libc, vfs: extend rename testing
Issue #1900
2016-04-25 11:02:03 +02:00
Emery Hemingway
ccd50cc9f5 Vfs::Dir_file_system: adjust rename error priority
CROSS_FS error must not propagate before NO_PERM.
New order is OK, NO_PERM, CROSS_FS, NO_ENTRY.

Fixes #1900
2016-04-25 11:02:02 +02:00
Christian Helmuth
da0c467518 Deallocation in slab backend of ported drivers 2016-04-25 10:48:03 +02:00
Adrian-Ken Rueegsegger
cd420b05ec hw_x86_64_muen: Use Bitset template for MSI address handle
Use Bitset_2 to represent MSI address handle which renders the
Msi_handle type unnecessary.
2016-04-25 10:48:03 +02:00
Adrian-Ken Rueegsegger
f5f8011d02 dde_bsd: Switch mirror of dde_bsd.port
The previous mirror has removed OpenBSD version 5.7.
2016-04-25 10:48:03 +02:00
Christian Helmuth
9cd26c4d61 Prevent compiler warnings 2016-04-25 10:48:02 +02:00
Christian Helmuth
dd90cb3bfe trace_fs: prevent compilter warning 2016-04-25 10:48:02 +02:00
Christian Helmuth
ff4033c6b0 noux: prevent compiler warning 2016-04-25 10:48:02 +02:00
Martin Stein
cba6f5f298 base: no exit handler for libc stdout log console
We don't want Genode environment objects that register their destructor
for program exit as it is mostly unnecessary and easily produces
dangling pointers. Thus, use unmanaged_singleton instead of the static
keyword.

Fixes #1941
2016-04-25 10:48:02 +02:00
Christian Helmuth
bf5df7d88d libc: qualify Plugin_context as base class
...by defining a virtual destructor.
2016-04-25 10:48:02 +02:00
Christian Helmuth
43cf789371 vfs: report zero-length read from server 2016-04-25 10:48:02 +02:00
Christian Helmuth
642ce6ca77 lxip: correct return type in send/recv socketcall
Now, error cases are reported correctly and not as gigantic ssize_t
values on 64-bit.
2016-04-25 10:48:01 +02:00
Christian Helmuth
579f4d4991 vfs: count of written bytes in Fs_file_system 2016-04-25 10:48:01 +02:00
Christian Helmuth
7a64e0bb80 ldso: dump link map of loaded shared objects
Also log the link-map information of shared objects loaded after startup
if 'ld_verbose' is configured.
2016-04-25 10:48:01 +02:00
Martin Stein
4ef2b0ed2e hw arm: avoid shared cache lines during MP init
When bringing up the kernel on multiple cores, there is a time span
where some cores already have caches enabled and some don't. Core-local
storage that may be used during this time must be aligned at least to
the maximum line size among global caches. Otherwise, a cached core may
unintentionally prefetch data of a yet uncached core into a global
cache. This may corrupt the view of the uncached core as soon as it
enables caches. However, to determine the exact alignment for every
single ARM platform isn't sensible. Instead, we can align to the minimum
page size assuming that a cache never wants to prefetch from multiple
pages at once and thus fulfills "line size <= page size".

Fixes #1937
2016-04-25 10:48:01 +02:00
Martin Stein
9508f397a2 ldso: use get_page_size_log2 instead of "12"
Ref #1941
2016-04-25 10:48:01 +02:00
Martin Stein
d5d891a227 libports: raise stack size of libc apps
Triggered by cc1plus in noux_tool_chain_auto on hw_arndale that caused
an overflow on its 64K stack.

Ref #1941
2016-04-25 10:48:01 +02:00
Martin Stein
a96130f20b base: get rid of alloc align default value
When using the Allocator interface, one can't tell which alignment
resulting allocations fulfill. However, at least on ARM, given the
architectural alignment requirements of ARM memory accesses, one wants
memory allocations (what allocators are for in most cases) to be word
aligned automatically. Previously, at least the AVL allocator simply
called alloc_aligned without defining align in its alloc implementation.
This led to unaligned access faults (the default was 0) when using the
AVL allocator as Allocator (as done in the metadata management of a SLAB
of an AVL that uses the AVL as backing store). To avoid such pitfalls
in the future, we force users of alloc_aligned to always specify align
(why use alloc_aligned without align anyway).

Ref #1941
2016-04-25 10:48:01 +02:00
Christian Prochaska
cdf57b60f9 noux: keep cap of last pager 2016-04-25 10:48:00 +02:00
Norman Feske
df272c90ec noux: keep caps of secondary threads 2016-04-25 10:48:00 +02:00
Martin Stein
e6061a794f hw: word-width sensitive kernel-stack size
Ref #1937
2016-04-25 10:48:00 +02:00
Johannes Schlatow
5b12034531 hw_zynq: refactor specs
This is a generalisation approach of the hw_zynq target. As the boards
typically use UART1 instead of UART0 (used by qemu), we have to
distinguish between those. Moreover, in general hw_zynq does not imply
zynq_qemu anymore, so that the support of particular boards can be
placed in third-party or community repositories (e.g. Genode world).

Fixes #1926
2016-04-25 10:48:00 +02:00
Norman Feske
05e09a6116 Improve warning message 2016-04-25 10:48:00 +02:00
Johannes Schlatow
0709340788 Component writing a ROM into a file-system session
Fixes #1917
2016-04-25 10:47:59 +02:00
Norman Feske
f186587cab Unify ipc_msgbuf.h across base platforms
Besides unifying the Msgbuf_base classes across all platforms, this
patch merges the Ipc_marshaller functionality into Msgbuf_base, which
leads to several further simplifications. For example, this patch
eventually moves the Native_connection_state and removes all state
from the former Ipc_server to the actual server loop, which not only
makes the flow of control and information much more obvious, but is
also more flexible. I.e., on NOVA, we don't even have the notion of
reply-and-wait. Now, we are no longer forced to pretend otherwise.

Issue #1832
2016-04-25 10:47:59 +02:00
Norman Feske
0c299c5e08 base: separate native CPU from CPU session
This patch unifies the CPU session interface across all platforms. The
former differences are moved to respective "native-CPU" interfaces.

NOVA is not covered by the patch and still relies on a custom version of
the core-internal 'cpu_session_component.h'. However, this will soon be
removed once the ongoing rework of pause/single-step on NOVA is
completed.

Fixes #1922
2016-04-25 10:47:57 +02:00
Norman Feske
e9dec93f4b base: optimized slab allocator
This patch changes the organization of the slab blocks within the slab
allocator. Originally, blocks were kept in a list sorted by the number
of free entries. However, it turned out that the maintenance of this
invariant involves a lot of overhead in the presence of a large number
of blocks. The new implementation manages blocks within a ring in no
particular order and maintains a pointer to the block where the next
allocation is attempted. This alleviates the need for sorting blocks
when allocating and deallocating.

Fixes #1908
2016-04-25 10:47:56 +02:00
Norman Feske
fbc35cb796 base: hide slab implementation details from API
Issue #1908
2016-04-25 10:47:56 +02:00
Norman Feske
db5969e6cc Stress test for the slab allocator
Issue #1908
2016-04-25 10:47:55 +02:00
Norman Feske
7cf40a0971 allocator_avl: hand back meta data when destructed
This patch ensures that the 'Allocator_avl' releases all memory obtained
from the meta-data allocator at destruction time. If allocations are
still dangling, it produces a warning, hinting at possible memory leaks.
Finally, it properly reverts all 'add_range' operations.
2016-04-25 10:47:55 +02:00
Norman Feske
ed37c2ecff core: use copy of region metadata in detach
This patch fixes a use-after-free problem raised by the recent ability of
the slab allocator to dynamically release empty slab blocks. The
Rm_session_component::detach function used to rely on the assumption
that the region metadata co-located with the allocator metadata of the
'_map' would stay intact even after a 'free' if the region.
2016-04-25 10:47:55 +02:00
Norman Feske
329ab80d1d libc: never destruct the file-descriptor allocator
This patch prevents the destruction of the fd allocator when the program
exists. Otherwise, the meta data for file descriptors that were not
manually closed would vanish, which may cause problems in subsequent
destructors.
2016-04-25 10:47:55 +02:00
Norman Feske
8971bb25ce heap: release ds pool meta data when destructed
This patch makes sure that the dataspace pool is flushed before
destructing the heap-local allocator-avl instance. With the original
destruction order, the allocator would still contain dangling
allocations on the account of the dataspace pool when destructed. In
practice, this caused no problem because the underlying backing store is
eventually freed on the destruction of the pool. But it triggers a
runtime warning of the allocator since it has become more strict with
regard to dangling allocations.
2016-04-25 10:47:55 +02:00
Norman Feske
357dbdd64b sel4: allocate vm-space meta data statically
This patch removes the dynamically growing slab allocator from the
page-table registry. This has two benefits. First, we alleviate the
corner cases where the slab allocator needed to extend its backing store
while establishing a core-local memory mapping, thereby triggering a
nested core-local mapping. Without this corner case, no reentrant lock
is needed any longer. Second, it removes the dependency from the overly
large old API of the slab allocator. So we can tighten the slab
interface.
2016-04-25 10:47:54 +02:00
Emery Hemingway
1d301e9c14 lib/vfs: consistent device and inode enumeration
Issue #1751
2016-04-25 10:47:54 +02:00
Emery Hemingway
b8e52189d5 lib/vfs: new permissions errors
New errors STAT_ERR_NO_PERM, DIRENT_ERR_NO_PERM, and READLINK_NO_PERM to
distinguish lookup errors from permissions or other errors.

Issue #1751
2016-04-25 10:47:54 +02:00
Emery Hemingway
14ca140135 lib/vfs: fix disappearing <dir><dir/></dir>
Issue #1751
2016-04-25 10:47:53 +02:00
Emery Hemingway
4a58154e07 server/vfs: refactor for client isolation
VFS handles are allocated from per-session heaps.

Fixes #1751
2016-04-25 10:47:53 +02:00
Emery Hemingway
d1dc5a9071 utility to retrieve aligned sizes from arg strings
Issue #1751
2016-04-25 10:47:52 +02:00
Emery Hemingway
e22cd98a4f File_system::Connection: session upgrading
Upgrade the File_system session RAM quota when an Out_of_metadata
exception is caught.

Issue #1751
Issue #1909
2016-04-25 10:47:52 +02:00
Emery Hemingway
cb952d2087 obscure File_system::Out_of_node_handles exception
Replace the Out_of_node_handles exception with Out_of_metadata.
Clients need to know when the server is out of internal resources,
but not why.

Cleanup and sort the errors at file_system_session.h.
Remove 'Size_limit_reached exception' from File_system, which was
internal to ram_fs.

Issue #1751
Fixes #1909
2016-04-25 10:47:52 +02:00
Emery Hemingway
58632ab8b5 lib/vfs: improve memory safety at ram file system
Reference count files to prevent dangling handles.
Catch out-of-memory conditions and throw NO_SPACE.

Issue #1751
2016-04-11 12:56:54 +02:00
Emery Hemingway
82a7799638 lib/vfs: pass handle allocator to open(...)
Opening a VFS handle previously involved allocating from the global heap
at each VFS file system. By amending open with an allocator argument,
dynamic allocation can be partitioned.

A new close method is used to deallocate open handles.

Issue #1751
Issue #1891
2016-04-11 12:56:54 +02:00
Christian Helmuth
98b9a24357 builddir: genode world in optional repositories 2016-04-11 12:25:56 +02:00
Timo Wischer
3e1fa54c61 sd_card: generalise RPi sd card driver
This enables to reuse the driver for zynq (and other platforms) in the
future.

Fixes #1925
2016-04-11 12:12:23 +02:00
Timo Wischer
036f3b5702 sd_card: add card version information to interface
Issue #1925
2016-04-11 12:06:08 +02:00