Commit Graph

226 Commits

Author SHA1 Message Date
Norman Feske 9b0eb720b0 base: remove 'Native_utcb' from public API
Fixes #1905
2016-03-17 17:02:04 +01:00
Waylon Cude 28117fee12 Added rust support
Rust relies on atomic builtins, which are not implemented in libgcc for
ARM. One is implemented in rust, which is sufficient to get the
current rust test to run.

Issue #1899
2016-03-17 17:02:04 +01:00
Norman Feske 9a3185f8ed base-linux: remove chroot support
Fixes #1903
2016-03-08 17:00:54 +01:00
Norman Feske 76db3b9c06 base: retire 'Native_config'
This commit moves the parameters of the stack area to the base-internal
header 'stack_area.h'.

Issue #1832
2016-03-08 17:00:54 +01:00
Josef Söntgen 2490e399dc ldso: check binary pointer before lookup
Check if the binary pointer is valid before attempting to lookup the
symbol. Shared objects with unresolved symbols and missing depencies,
e.g a library that references 'errno' but is not linked against libc,
will now produce an error message when they are loaded by the dynamic
linker.

Fixes #1904.
2016-03-08 17:07:36 +01:00
Emery Hemingway f46a504bb6 use Arg_string::set_arg_string to set session labels
Issue #1861
2016-03-07 16:10:32 +01:00
Emery Hemingway 723d9e7784 util/arg_string.h: set_arg_string
Convenience function to set x="y" style arguments.

Issue #1861
2016-03-07 16:10:32 +01:00
Christian Helmuth 688e86ab68 core: increase initial quota to 224K 2016-03-07 12:34:47 +01:00
Norman Feske 7f73e5e879 base: hide internals of the Thread API
This patch moves details about the stack allocation and organization
the base-internal headers. Thereby, I replaced the notion of "thread
contexts" by "stacks" as this term is much more intuitive. The fact that
we place thread-specific information at the bottom of the stack is not
worth introducing new terminology.

Issue #1832
2016-03-07 12:34:46 +01:00
Norman Feske 3473955212 base-linux/nova: unify include/rm_session/client.h
By moving the stub implementation to rm_session_client.cc, we can use
the generic base/include/rm_session/client.h for base-linux and
base-nova and merely use platform-specific implementations.

Issue #1832
2016-03-07 12:34:45 +01:00
Norman Feske 6e7f7bdad4 base: move crt0.h and elf.h to base/internal
Those headers remained unused outside the internal framework. So it is
better to remove them from the public API.

Issue #1832
2016-03-07 12:34:45 +01:00
Norman Feske 2e701f9afa base: update include guards
This patch cleans up the include guards, assisted by the
tool/fix_include_ifndef script.
2016-03-07 12:34:45 +01:00
Norman Feske e6729316ff base: uniform base-internal header structure
This patch establishes a common organization of header files
internal to the base framework. The internal headers are located at
'<repository>/src/include/base/internal/'. This structure has been
choosen to make the nature of those headers immediately clear when
included:

  #include <base/internal/lock_helper.h>

Issue #1832
2016-03-07 12:34:45 +01:00
Norman Feske be496c6dc1 base: remove kernel-specific base/sleep.h
With this patch, the platform differences reside solely in the
implementation of the base library.

Issue #1832
2016-03-07 12:34:44 +01:00
Norman Feske 62b1c55399 Integrate CAP session into PD session
This patch integrates the functionality of the former CAP session into
the PD session and unifies the approch of supplementing the generic PD
session with kernel-specific functionality. The latter is achieved by
the new 'Native_pd' interface. The kernel-specific interface can be
obtained via the Pd_session::native_pd accessor function. The
kernel-specific interfaces are named Nova_native_pd, Foc_native_pd, and
Linux_native_pd.

The latter change allowed for to deduplication of the
pd_session_component code among the various base platforms.

To retain API compatibility, we keep the 'Cap_session' and
'Cap_connection' around. But those classes have become mere wrappers
around the PD session interface.

Issue #1841
2016-03-07 12:34:44 +01:00
Norman Feske b1910cdd54 Integrate SIGNAL session into PD session
This patch removes the SIGNAL service from core and moves its
functionality to the PD session. Furthermore, it unifies the PD service
implementation and terminology across the various base platforms.

Issue #1841
2016-03-07 12:34:44 +01:00
Norman Feske 5d559a0699 Move util/volatile_object.h from os to base 2016-03-07 12:34:44 +01:00
Martin Stein ff10687a6c toolchain: report missing ports at once
Previously, ports that were needed for a scenario and that were not
prepared or outdated, triggered one assertion each during the second
build stage. The commit slots a mechanism in ahead that gathers all
these ports during the first build stage and reports them in form of a
list before the second build stage is entered.  This list can be used
directly as argument for tool/ports/prepare_port to prepare respectively
update the ports. If, however, this mechanism is not available, for
example because a target is build without the first build stage, the old
assertion still prevents the target from running into troubles with a
missing port.

Fixes #1872
2016-03-07 12:34:43 +01:00
Reto Buerki f1d2d7251d hw_x86_64_muen: Include static ACPI report ROM
Enable the ACPI functionality in the platform_drv on hw_x86_64_muen and
provide a simple generated XML report as ROM session in order to make
the PCI configuration space available.

This is a requirement to implement support for MSI on hw_x86_64_muen.
2016-02-26 11:36:53 +01:00
Sebastian Sumpf d17134baef ldso: Support for RISC-V
issue #1880
2016-02-26 11:36:51 +01:00
Sebastian Sumpf 8c6e3c6251 riscv: create_builddir support
issue #1880
2016-02-26 11:36:50 +01:00
Sebastian Sumpf d424134073 cxx: Simplify C++ exception wrapper functions
The wrapper functions (e.g., 'Unwind_*' and friends) now have the same signature
as the original function in 'libgcc', reside in a separate C file which is
archived to cxx.lib.a. In supc++.o we prefix the wrapped functions with '_cxx_'.

This also enables support for riscv.

related to #1880
2016-02-16 14:38:02 +01:00
Sebastian Sumpf bfe5208e0e base: Align heap/slab allocation to machine word size
required by riscv

related to #1880
2016-02-16 14:38:02 +01:00
Christian Helmuth 2a698ffd5f signal: prevent submission of contexts w/o receiver
This prevents a sporadic null-pointer dereference in the nic_loopback
test, which occurred once in 100 runs. I'm not sure if there's still a
race window (we may investigate) with context dissolve.
2016-01-26 16:20:47 +01:00
Alexander Boettcher 0423369f7f base: Unbound_thread exception in rm::add_client 2016-01-26 16:20:38 +01:00
Stefan Kalkowski b0b4c3c7fa noux: consider stack alignment constraints
The interim stack in a forked noux process has to consider the architecture
dependent stack alignment constraints.

Fix #1852
2016-01-26 16:20:37 +01:00
Stefan Kalkowski 7aff1895bf hw: enable SMP for ARM Cortex A9
This commit enables multi-processing for all Cortex A9 SoCs we currently
support. Moreover, it thereby enables the L2 cache for i.MX6 that was not
enabled until now. However, the QEMU variants hw_pbxa9 and hw_zynq still
only use 1 core, because the busy cpu synchronization used when initializing
multiple Cortex A9 cores leads to horrible boot times on QEMU.

During this work the CPU initialization in general was reworked. From now
on lots of hardware specifics were put into the 'spec' specific files, some
generic hook functions and abstractions thereby were eliminated. This
results to more lean implementations for instance on non-SMP platforms,
or in the x86 case where cache maintainance is a non-issue.

Due to the fact that memory/cache coherency and SMP are closely coupled
on ARM Cortex A9 this commit combines so different aspects.

Fix #1312
Fix #1807
2016-01-26 16:20:18 +01:00
Martin Stein c58de0d80e hw_panda: driver for Cortex-A9 wakeup generator
Ref #1312
2016-01-15 16:42:12 +01:00
Stefan Kalkowski 23f9761297 base: minimize critical section in Semaphore::up
When unblocking a thread in Semaphore::up() while holding the fifo meta-data
lock, it might happen that the lock holder gets destroyed by the one it was
unblocking. This happened for instance in the pthread test in the past, where
thread destruction was synchronized via a semaphore. There is no need to hold
the lock during the unblock operation, so we should do it outside the critical
section.

Fix #1333
2015-12-10 13:16:27 +01:00
Martin Stein 492bd39619 epit timer: raise precision
Previously we used a pretty slow external clock source for the timer. This
resulted in such a low TICS_PER_MS value that the granularity wasn't
sufficient to find a setup with a precision better than 1 second error per
minute. Now we use the so-called High Frequency Reference Clock as input
with TICS_PER_MS=33333 and the timer precision is significantly < 1 second per
minute.

Fixes #1805
2015-12-10 13:16:26 +01:00
Sebastian Sumpf 41b9f6bd03 ldso: Make truly self relocatable
On Linux the linker can now be loaded at arbitrary addresses, this became
necessary for newer kernel versions. The 'linux_arm' target is not supported.

Issue #1728
2015-12-10 13:16:25 +01:00
Stefan Kalkowski d65beb970d dde_linux: KMS-based Intel framebuffer driver (II)
* enable i915 driver from Linux 3.14.5
* tested for generation 5 till 8 GPUs

The driver can be configured at run-time via the config ROM. Every
connector of the graphic card can be configured separately using the
following syntax

  <config>
    <connector name="LVDS-11" width="1280" height="800" enabled="true"/>
  </config>

Also, when enabled within the intel framebuffer driver configuration like
the following

  <config buffered="yes"/>

a simple ram dataspace is propagated to the client and the driver
itselfs copies from that buffer to the framebuffer triggered via refresh
calls. This option is useful to alleviate tearing effects.

The  driver distributes all available connectors of the graphic card and
their supported resolutions via a report. It looks like follows

  <connectors>
    <connector name="LVDS-11" connected="1">
      <mode width="1280" height="800" hz="60"/>
      ...
    </connector>
    ...
  </connectors>

The driver distributes the report only if this is stated within its
configuration, like the following

  <config>
    <report connectors="yes"/>
  </config>

Fix #1764
2015-11-29 18:17:07 +01:00
Alexander Boettcher e49a5ee19f base: make reference ram cap part of child policy
Issue #1539
2015-11-27 12:18:54 +01:00
Sebastian Sumpf 0c3dfbad65 base-hw: use signal context list for pending signals
'block_for_signal' and 'pending_signal' now set pending flag in signal context
in order to determine pending signal. The context list is also used by the
'Signal_receiver' during destruction.

Fixes #1738
2015-11-27 12:18:50 +01:00
Alexander Boettcher c7df65e1da base: invalidate thread cap if task creation fails
Issue #1778
2015-11-18 12:22:09 +01:00
Alexander Boettcher 3789a75ed6 base: support ascii_to for uint64_t
Issue #1764
2015-11-18 12:22:07 +01:00
Christian Helmuth a0d92fcdb8 platform_drv: increase RAM config for -O0 builds 2015-11-18 12:22:05 +01:00
Norman Feske 82991ba378 base: fix warning in console.cc 2015-11-04 13:49:01 +01:00
Alexander Boettcher f42f946f3b base: support parsing multiboot for phys. memory
Issue #1741
2015-11-04 14:09:27 +01:00
Alexander Boettcher 7ea5884ffc base: use mmio framework for multiboot handling
Issue #1741
2015-11-04 14:09:26 +01:00
Norman Feske 96d021b9d4 base: char const * comparison operators for String 2015-11-03 17:04:16 +01:00
Alexander Boettcher f9fbe34644 base: avoid detaching not attached trace_control 2015-10-28 15:06:23 +01:00
Alexander Boettcher c4f8af2665 hw_zynq: limit cpu count to 1 in mp_server.run
qemu says:

Number of SMP cpus requested (2), exceeds max cpus supported by machine `xilinx-zynq-a9' (1)
2015-10-28 15:06:22 +01:00
Sebastian Sumpf 2b429ee84c base: Dispatch server signal in entry point
Currently, when a signal arrives in the main thread, the signal dispatcher is
retrieved and called from the main thread, the dispatcher uses a proxy object
that in turn sends an RPC to the entry point. This becomes a problem when the
entry point destroys the dispatcher object, before the dispatch function has
been called by the main thread. Therefore, the main thread should simply send an
RPC to the entry point upon signal arrival and the dispatching should be handled
solely by the entry point.

Issue #1738
2015-10-28 15:06:22 +01:00
Alexander Boettcher 2e62543fdb nova: use remote revoke
Fixes #1733
2015-10-09 16:38:48 +02:00
Emery Hemingway df0bbe0b0e ascii_to() utility for boolean values
Also, Genode::Arg was adapted to use the new utility for boolean tokens
and strings.

Issue #1648
2015-10-09 16:35:30 +02:00
Alexander Boettcher 286edaed68 base: detect and stop self de-structing threads
Issue #1687
2015-10-06 12:18:51 +02:00
Stefan Kalkowski c1492da15b base: do not lock interleaved in object pool
Holding the object pool's lock while trying to obtain an object's lock
can leave to dead-lock situations, when more than one thread tries to
access multiple objects at once (e.g.: when transfer_quota gets called
simultanously by the init and entrypoint thread in core). To circumvent
holding the object pool lock too long, but access object pointers safely
on the other hand, this commit updates the object pool implementation
to use weak pointers during the object retrieval.

Fix #1704
2015-09-30 12:20:41 +02:00
Stefan Kalkowski b585583ec7 core: do not destroy in object pool's apply scope
Destroying an object within the scope of a lambda/functor executed
in the object pool's apply function leads potentially to memory corruption.
Within the scope the corresponding object is locked and unlocked when
leaving the scope. Therefore, it is illegal to free the object's memory meanwhile.
This commit eliminates several places in core that destroyed wrongly in
the object pool's scope.

Fix #1713
2015-09-30 12:20:40 +02:00
Stefan Kalkowski ccb968ff7d safeguard the synchronized allocator template
* Move the Synced_interface from os -> base
* Align the naming of "synchronized" helpers to "Synced_*"
* Move Synced_range_allocator to core's private headers
* Remove the raw() and lock() members from Synced_allocator and
  Synced_range_allocator, and re-use the Synced_interface for them
* Make core's Mapped_mem_allocator a friend class of Synced_range_allocator
  to enable the needed "unsafe" access of its physical and virtual allocators

Fix #1697
2015-09-30 12:20:39 +02:00