Commit Graph

4610 Commits

Author SHA1 Message Date
Johannes Schlatow
3df03fbc41 base-hw: fix SCU initialization for zynq-based boards
The old implementation cleared all other bits in the SCU control
register when enabling the SCU, which broke the kernel startup on zynq-
based boards.
By only raising the enable bit, we can keep the initial/default state
e.g. as set up by uboot.

Fixes #1953
2016-05-23 15:49:56 +02:00
Norman Feske
f6dec901bb base: remove Component::name from API
It turns out that the name function does not have much use in practice
except for naming the thread of the component's initial entrypoint. For
dynamically linked components, this thread is created by the dynamic
linker. It is named "ep" in these cases. Considering that we will
eventually turn all regular components into dynamically linked
executables, the additional information provided by the
Component::name() function remains unused. So it is better to not bother
the component developers with adding boilerplate code.
2016-05-23 15:49:56 +02:00
Waylon Cude
1e95af5bab Fixed linking and memory allocation for rust
Now rlibs are actually linked to programs. Target files have been
modified to not generate code that requires compiler-rt. Added a target
for libstd-rust, but it's very broken right now. Moved alloc_system to
the libports folder because either a memory allocator needs to be
written in rust or posix_memalign needs to be implemented. Changed
liblibc to use freebsd as the OS instead of netbsd. Added a library with
unwind dummy functions.

Rust relies on atomic builtins, which are not implemented in libgcc for
ARM. One was implemented in rust, which was sufficient to get the
current rust test to run. Rust libs were added into the group of libs
for the linker so order no longer matters. The raspberry pi now uses an
armv6 target.
2016-05-23 15:49:56 +02:00
Norman Feske
ab88599682 base: document the return value of String::length 2016-05-23 15:49:56 +02:00
Norman Feske
fd401bdf53 Thread API cleanup
This patch cleans up the thread API and comes with the following
noteworthy changes:

- Introduced Cpu_session::Weight type that replaces a formerly used
  plain integer value to prevent the accidental mix-up of
  arguments.
- The enum definition of Cpu_session::DEFAULT_WEIGHT moved to
  Cpu_session::Weight::DEFAULT_WEIGHT
- New Thread constructor that takes a 'Env &' as first argument.
  The original constructors are now marked as deprecated. For the
  common use case where the default 'Weight' and 'Affinity' are
  used, a shortcut is provided. In the long term, those two
  constructors should be the only ones to remain.
- The former 'Thread<>' class template has been renamed to
  'Thread_deprecated'.
- The former 'Thread_base' class is now called 'Thread'.
- The new 'name()' accessor returns the thread's name as 'Name'
  object as centrally defined via 'Cpu_session::Name'. It is meant to
  replace the old-fashioned 'name' method that takes a buffer and size
  as arguments.
- Adaptation of the thread test to the new API

Issue #1954
2016-05-23 15:49:55 +02:00
Norman Feske
7b73d1d823 heap: add new-fashioned constructor 2016-05-09 13:25:11 +02:00
Norman Feske
1f395ae780 base: new interface for textual output
Issue #1942
2016-05-09 13:25:01 +02:00
Norman Feske
3bceefc9cf Omit superfluous use of "CAP"/"SIGNAL" services
The functionality of the former "CAP" and "SIGNAL" services is now
provided by core's "PD" service.
2016-05-09 13:24:51 +02:00
Norman Feske
dc8690ae37 Modularize base-internal headers
Issue #1952
2016-05-09 13:24:39 +02:00
Norman Feske
40a5af42eb Clean up base-library structure
This patch moves the base library from src/base to src/lib/base,
flattens the library-internal directory structure, and moves the common
parts of the library-description files to base/lib/mk/base.inc and
base/lib/mk/base-common.inc.

Furthermore, the patch fixes a few cosmetic issues (whitespace and
comments only) that I encountered while browsing the result.

Fixes #1952
2016-05-09 13:24:11 +02:00
Emery Hemingway
52cc50174f Amend File_system session with SEEK_TAIL support
Used to read or write from the end of a file when multiple packets may
be in transit.

Supported by ram_fs, rump_fs, and vfs servers.

Fixes #1775
2016-05-09 13:10:53 +02:00
Christian Helmuth
b38c5006d8 vfs: support UNLINK_ERR_NO_ENTRY in TAR file system
We report UNLINK_ERR_NO_PERM only for files in TAR archive, otherwise
UNLINK_ERR_NO_ENTRY is returned. This permits the arbitrary layering of
file systems with support for proper ENOENT reporting, for example,
when using 'rm -f non_existent_file' that aborts if EPERM is wrongly
reported.
2016-05-09 13:10:53 +02:00
Norman Feske
b8cd56cb90 Tweak slab allocators to use whole pages
Most slab allocators in core use a sliced heap as backing store. Since
sliced-heap allocations are performed at page-granularity, it is
sensible to dimension the slab blocks to fill whole pages.
2016-05-09 13:10:53 +02:00
Norman Feske
ba0545de07 Clean up 'Sliced_heap'
This patch cleans up the implementation of the sliced heap, adds a
constructor that takes references instead of pointers, and adds the
function 'meta_data_size' to determine the meta-data overhead per block.
The latter can be used to dimension slab allocators such that slab
blocks use whole pages.
2016-05-09 13:10:53 +02:00
Norman Feske
4f69772ecc Replace 'Env' interface with modern one
The original 'Env' interface as returned by 'Genode::env()' has been
renamed to 'Env_deprecated' and moved to deprecated/env.h. The new version
of base/env.h contains the interface passed to modern components that
use the component API via base/component.h.

Issue #1832
2016-05-09 13:10:52 +02:00
Norman Feske
7274ca997d Remove Genode::Process from API
This patch makes the former 'Process' class private to the 'Child'
class and changes the constructor of the 'Child' in a way that
principally enables the implementation of single-threaded runtime
environments that virtualize the CPU, PD, and RAM services. The
new interfaces has become free from side effects. I.e., instead
of implicitly using Genode::env()->rm_session(), it takes the reference
to the local region map as argument. Also, the handling of the dynamic
linker via global variables is gone. Now, the linker binary must be
provided as constructor argument.

Fixes #1949
2016-05-09 13:10:52 +02:00
Norman Feske
b49e588c1c Assign threads to PD at its creation time
This patch replaces the former 'Pd_session::bind_thread' function by a
PD-capability argument of the 'Cpu_session::create_thread' function, and
removes the ancient thread-start protocol via 'Rm_session::add_client' and
'Cpu_session::set_pager'. Threads are now bound to PDs at their creation
time and implicitly paged according to the address space of the PD.

Note the API change:

This patch changes the signature of the 'Child' and 'Process' constructors.
There is a new 'address_space' argument, which represents the region map
representing the child's address space. It is supplied separately to the
PD session capability (which principally can be invoked to obtain the
PD's address space) to allow the population of the address space
without relying on an 'Pd_session::address_space' RPC call.
Furthermore, a new (optional) env_pd argument allows the explicit
overriding of the PD capability handed out to the child as part of its
environment. It can be used to intercept the interaction of the child
with its PD session at core. This is used by Noux.

Issue #1938
2016-05-09 13:10:52 +02:00
Norman Feske
2bc8a0f76a Move XML util from os to base repository
Since the dynamic linker depends on the XML utils and we plan to replace
the ancient 'Arg_string' with XML, it is time to move the 'Xml_node' and
'Xml_generator' to base/include.
2016-05-09 13:10:52 +02:00
Norman Feske
73b463cdbb Signal_handler: remove num argument from handler
We will eventually remove the delivery of the number of occurred signals
to the recipient. There haven't been any convincing use cases for this
feature. In the contrary, it actually led to wrong design choices in the
past where the rate of signals carried information (such as the progress
of time) that should better be obtained via an explicit RPC call.

The old 'Signal_rpc_member' template retains the old interface for now.
But the new 'Signal_handler' omits the 'unsigned' argument from the
handler function.
2016-05-09 13:10:52 +02:00
Christian Helmuth
861508ad68 Always recreate library archives
GNU ar only uses a flat module (object) name space but supports multiple
instances of objects with the same name. As we use subdirectories with
source file names that may clash (e.g., signal/common.cc and
server/common.cc in the base library) some of our static library
archives have multiple object instances. This is not an issue on archive
creation but works not as expected when updating archives. To avoid
updates of library archives we delete the files before calling GNU ar.
2016-05-09 13:10:52 +02:00
Emery Hemingway
549f77eafe Catch exceptions when creating VFS
Catch exceptions at File_system_factory::create.
Print error message in Dir_file_system.

Fixes #1786
2016-05-09 13:10:51 +02:00
Emery Hemingway
4aafa882d8 XML node type and attribute name string accessors
Issue #1786
2016-05-09 13:10:51 +02:00
Christian Helmuth
d891016632 lwip: prevent warnings
Thanks to Menno Valkema for the patch.
2016-05-09 13:10:51 +02:00
Norman Feske
511acad507 Consolidate RM service into PD session
This patch integrates three region maps into each PD session to
reduce the session overhead and to simplify the PD creation procedure.
Please refer to the issue cited below for an elaborative discussion.

Note the API change:

With this patch, the semantics of core's RM service have changed. Now,
the service is merely a tool for creating and destroying managed
dataspaces, which are rarely needed. Regular components no longer need a
RM session. For this reason, the corresponding argument for the
'Process' and 'Child' constructors has been removed.

The former interface of the 'Rm_session' is not named 'Region_map'. As a
minor refinement, the 'Fault_type' enum values are now part of the
'Region_map::State' struct.

Issue #1938
2016-05-09 13:10:51 +02:00
Norman Feske
e20bbe7002 base: remove integer return codes from PD-session
The return code of assign_parent remained unused. So this patch
removes it.

The bind_thread function fails only due to platform-specific limitations
such as the exhaustion of ID name spaces, which cannot be sensibly
handled by the PD-session client. If occurred, such conditions used to
be reflected by integer return codes that were used for diagnostic
messages only. The patch removes the return codes and leaves the
diagnostic output to core.

Fixes #1842
2016-05-09 13:09:56 +02:00
Emery Hemingway
93b82c14ac libc: read sysctl info from /.sysctl/...
Fixes #1931
2016-05-09 13:09:56 +02:00
Martin Stein
19b3824bfb libav: update to version 11.6
Enables also the use of the avresample library.

Fixes #1910
2016-05-09 13:09:55 +02:00
Martin Stein
7c1235ff34 avplay.run: Remove mixer server
The mixer is not directly necessary for the avplay demo. But it implies
additional maintenance work. E.g., in the current state, it complains about
the missing Report server and mutes audio output by default.

Ref #1910
2016-05-09 13:09:55 +02:00
Alexander Boettcher
1fc707d9dc nova: fix copy-paste bug in oom code
Fixes #1944
2016-05-09 13:09:54 +02:00
Josef Söntgen
3195311b53 usb_drv: fix nullptr access in EP stop cmd
Issue #1945.
2016-05-09 13:09:54 +02:00
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