Commit Graph

4443 Commits

Author SHA1 Message Date
Christian Helmuth
b65a50ed25 autopilot: add fpu test to list 2016-05-23 15:52:50 +02:00
Christian Helmuth
111d74744d hw_x86_64: remove aligment attribute from FPU context
We do not ensure that the Fpu::Context is 16-byte aligned and,
therefore, should not tell the compiler that we did. Otherwise, the GCC
may optimize operations regarding the addresses of members as it did for

  if ((addr_t)_fxsave_area & 0xf) ...

With the declared 16-byte alignment the condition will never become
true.
2016-05-23 15:52:50 +02:00
Christian Prochaska
638db70b94 GDB monitor: nova_x86_64 platform support
Fixes #1971
2016-05-23 15:52:49 +02:00
Christian Prochaska
ff76e69542 GDB monitor: x86_64 support
General support for the x86_64 architecture.

Fixes #1970
2016-05-23 15:52:49 +02:00
Christian Prochaska
5842b2065e GDB monitor: stability improvements
Fixes #1969
2016-05-23 15:52:49 +02:00
Christian Prochaska
2cde1d36c1 base: changes for GDB monitor
- add a new function 'binary_ready_hook_for_gdb()' in ldso. GDB can set a
  breakpoint at this function to know when ldso has loaded the binary
  into memory.
- get the thread state from the NOVA kernel immediately on 'pause()'

Fixes #1968
2016-05-23 15:52:49 +02:00
Sebastian Sumpf
30e57d4581 foc: update port revision and hash
Issue ssumpf/foc#15
2016-05-23 15:52:48 +02:00
Norman Feske
807be83b1b Remove inconsistent use of 'is_' prefix
Fixes #1963
2016-05-23 15:52:39 +02:00
Norman Feske
15141f3ca7 Remove hand-crafted Rpc_functions typedefs 2016-05-23 15:52:39 +02:00
Norman Feske
ef9a7d2230 base: remove length limit of Type_list 2016-05-23 15:52:39 +02:00
Norman Feske
a99989af40 Separation of thread operations from CPU session
This patch moves the thread operations from the 'Cpu_session'
to the 'Cpu_thread' interface.

A noteworthy semantic change is the meaning of the former
'exception_handler' function, which used to define both, the default
exception handler or a thread-specific signal handler. Now, the
'Cpu_session::exception_sigh' function defines the CPU-session-wide
default handler whereas the 'Cpu_thread::exception_sigh' function
defines the thread-specific one.

To retain the ability to create 'Child' objects without invoking a
capability, the child's initial thread must be created outside the
'Child::Process'. It is now represented by the 'Child::Initial_thread',
which is passed as argument to the 'Child' constructor.

Fixes #1939
2016-05-23 15:52:39 +02:00
Josef Söntgen
59aec6114b vfs_block: remove diagnostic warnings
These warnings are triggered by requests either using byte offsets or
reading a number of bytes that is not a multiple of the block size as
well as by components using the plugin with a different block size than
the backend block session provides.

Fixes #1964.
2016-05-23 15:52:38 +02:00
Christian Helmuth
3ba61a2ddf Move rust support to libports
Issue #1899
2016-05-23 15:52:38 +02:00
Alexander Boettcher
bb3e9300f6 nova: disable ACPI GPE events during kernel boot
Issue #1962
2016-05-23 15:52:38 +02:00
Adrian-Ken Rueegsegger
69e9929f71 hw_x86_64: Change IRTE_COUNT to designate number of IRTEs
Adjust IRTE_COUNT to specify the number of IRTEs and not the index of
the last IRTE entry. This fixes an off-by-one error in the toggle_mask()
function, where the range check for I/O APIC IRQs wrongly ignored IRQ
23.
2016-05-23 15:52:38 +02:00
Adrian-Ken Rueegsegger
61572263d7 hw_x86_64: Drop unneded Pic dummy functions 2016-05-23 15:52:38 +02:00
Norman Feske
0fae8fe9c3 hw: remove custom Cpu_connection
The custom version merely differs from the generic one with respect to
the session quota. Since we support the dynamic upgrading of sessions,
we don't need to provide the big amount (128KiB) defined by the custom
version.
2016-05-23 15:52:37 +02:00
Norman Feske
a7b3072cc2 Pass Env & as first argument to connection objects
This patch supplements each existing connection type with an new
constructor that is meant to replace the original one. The new
one takes a reference to the component's environment as argument and
thereby does not rely on the presence of the globally accessible
'env()' interface.

The original constructors are marked as deprecated. Once we have
completely abolished the use of the global 'env()', we will remove them.

Fixes #1960
2016-05-23 15:52:37 +02:00
Norman Feske
3361651e9e base: remove dependency from deprecated config lib
Issue #1959
2016-05-23 15:52:37 +02:00
Norman Feske
f19b269360 window layouter: use Attached_rom_dataspace::xml
Issue #1959
2016-05-23 15:52:37 +02:00
Norman Feske
8da737acfd base: add Attached_rom_dataspace::xml method
Issue #1959
2016-05-23 15:52:36 +02:00
Norman Feske
e0c0794f33 base: supplement comment of Xml_node constructor 2016-05-23 15:52:36 +02:00
Norman Feske
8d797105b3 Move Attach_*dataspace utils from os to base
Fixes #1958
2016-05-23 15:52:36 +02:00
Christian Helmuth
16914bddc8 Implement affinity test as component
This enables the use of the current Thread API to set thread affinity on
construction.
2016-05-23 15:52:36 +02:00
Norman Feske
cb232891bf Fix noux.run on base-linux
The recent move of the initial three region maps into the PD session
breaks the noux.run test on Linux because the address spaces are locally
managed on this platform but the generic code of Noux still tries to
execute the regular procedure of creating the virtualized PD session for
a new Noux process. This patch handles a corner case that occurs on
Linux but no other platform. It enables the successful creation of the
virtualized PD session so that the test runs to completion. Still noux
on Linux remains to be limited to non-forking programs.

Issue #1938
2016-05-23 15:52:36 +02:00
Alexander Boettcher
dccad4c526 nova: kernel support for more than 4096 processes
Fixes #1951
2016-05-23 15:52:36 +02:00
Alexander Boettcher
77c4510787 nova: support dropping caps just locally
without revocation of all subsequent delegations.

Fixes #1950
2016-05-23 15:52:36 +02:00
Emery Hemingway
0ac1d1774d lib/libc_noux: check for invalid system call buffers
Issue #1931
2016-05-23 15:52:35 +02:00
Christian Prochaska
ea726a1f48 libc: pipe plugin
A libc plugin which implements pipes using a ring buffer.

Fixes #1947
2016-05-23 15:52:35 +02:00
Johannes Schlatow
f81867f208 base-hw: refactor core.mk and core.inc files
All core.inc files now use $BASE_HW_DIR instead of $REP_DIR. The former
is defined by the core.mk file. This allows including core.inc files
from other repositories (e.g. genode-world) for additional platform
support.

Fixes #1955
2016-05-23 15:52:35 +02:00
Johannes Schlatow
27a73b89f0 net: write accessors for Ipv4_packet
Also adds header-checksum calculation function.

Fixes #1915
2016-05-23 15:52:34 +02:00
Johannes Schlatow
bed870ead4 net: fix header_length field in Ipv4_packet
Replace size_t by uint8_t in accessors for the IPv4 header fields
'version' and 'header_length' - uint8_t is the smallest integral type
for 4 bit of information. Note, as the _internet header length_ field is
defined to reflect the number of 32-bit words the header occupies, we
also stick to the specification with our accessor.

Issue #1915
2016-05-23 15:49:57 +02:00
Christian Helmuth
abed38e8ac net: transform packet data accessor into template
Supports stronger typing of raw accesses and const correctness.

Issue #1915
2016-05-23 15:49:56 +02:00
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