Commit Graph

347 Commits

Author SHA1 Message Date
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
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
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
c99729093a base: fix race in multiple lock.unlock() calls
Fixes #2122
2016-10-21 12:39:34 +02:00
Alexander Boettcher
3449985fdf base: avoid deadlock in region_map destruction
Fixes #2115
2016-10-21 12:39:33 +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
Stefan Kalkowski
3f6e148621 base: remove obsolete _prog_img_data symbol
Fix #2099
2016-10-21 12:39:31 +02:00
Emery Hemingway
80558374f5 base: print support for Xml_node
Ref #1987
2016-10-21 12:39:29 +02:00
Norman Feske
e370e08e01 Define Genode::size_t as unsigned long
Fixes #2105
2016-10-21 12:39:29 +02:00
Alexander Boettcher
99fbb23ec5 core: use weak_ptr for Rm_faulter and Region_map
Fixes #2086
2016-09-14 11:53:04 +02:00
Stefan Kalkowski
2147c42ec6 base: unify page-fault notification for kernels
* Enable page-fault messages for regions not directly managed by core
* Unify output given when a page-fault occurs related to those regions

Fix #2082
2016-09-09 11:49:34 +02:00
Christian Helmuth
5a92c9b6eb Increase stack size of mp_server test 2016-09-09 11:48:43 +02:00
Christian Helmuth
fcf5bc9187 base: start signal-proxy thread on construction
Thanks @ssumpf for the investigation.
2016-09-09 11:48:43 +02:00
Stefan Kalkowski
e7d5b34fc5 base: String constructor for different lengths
Let the copy constructor compile for different CAPACITYs of
the String<CAPACITY> class.

Fix #2085
2016-09-09 11:48:43 +02:00
Norman Feske
fac69eff48 core: handle out-of-memory in RM service
This patch adds the missing exception handling for depleted RM session
quotas. If core runs out of session quota while creating a new region
map, it now reflects this condition as a Region_map::Out_of_metadata
exception to the RM client. Thanks to Denis Huber for reporting the
issue!
2016-08-29 17:29:37 +02:00
Christian Prochaska
d2e246d916 base: allow to set label in Log_connection
Fixes #2074
2016-08-29 17:29:36 +02:00
Norman Feske
a845bdafeb core: fix regression in sig context ownership test
This patch fixes a problem similar to issue #2065 but for the freeing of
signal contexts.
2016-08-29 17:29:33 +02:00
Norman Feske
8d1cf08b1a core: fix regression in dataspace ownership test
This patch revives our ds_ownership test from 2012, which just revealed
a regression in core where the dataspace-free operation of the RAM
service would unconditionally destroy dataspace objects from foreign
sessions. The patch fixes the bug and adds an updated version of the
test to the autopilot.

Fixes #2065
2016-08-29 17:29:33 +02:00
Alexander Boettcher
9c098752b0 core: fix memory mapping calc. for big regions
Fixes #2063
2016-08-29 17:29:32 +02:00
Norman Feske
17c79a9e23 base: avoid use of deprecated base/printf.h
Besides adapting the components to the use of base/log.h, the patch
cleans up a few base headers, i.e., it removes unused includes from
root/component.h, specifically base/heap.h and
ram_session/ram_session.h. Hence, components that relied on the implicit
inclusion of those headers have to manually include those headers now.

While adjusting the log messages, I repeatedly stumbled over the problem
that printing char * arguments is ambiguous. It is unclear whether to
print the argument as pointer or null-terminated string. To overcome
this problem, the patch introduces a new type 'Cstring' that allows the
caller to express that the argument should be handled as null-terminated
string. As a nice side effect, with this type in place, the optional len
argument of the 'String' class could be removed. Instead of supplying a
pair of (char const *, size_t), the constructor accepts a 'Cstring'.
This, in turn, clears the way let the 'String' constructor use the new
output mechanism to assemble a string from multiple arguments (and
thereby getting rid of snprintf within Genode in the near future).

To enforce the explicit resolution of the char * ambiguity, the 'char *'
overload of the 'print' function is marked as deleted.

Issue #1987
2016-08-29 17:27:10 +02:00
Christian Prochaska
a5d3aa8373 base: increase label length limit of core LOG session
Fixes #2061
2016-08-29 17:27:10 +02:00
Norman Feske
892f21fd54 base: document error-message style conventions 2016-08-29 17:27:10 +02:00
Norman Feske
26a4534a37 base: helper for hex-formatted output of ranges 2016-08-29 17:27:09 +02:00
Norman Feske
9c2f229246 base: helper for printing individual characters 2016-08-29 17:27:09 +02:00
Johannes Schlatow
acd2a40076 base: print() functions for floating point types
Fixes #2055
2016-08-29 17:23:19 +02:00
Christian Helmuth
1776babbd1 Revert "arm: prevent 64K default alignment of text segment"
This reverts commit 2127c8acf2 because the
alignment is already sanitized by commit 11c31c4432.

(discussed here 2127c8acf2)
2016-08-10 11:07:57 +02:00
Alexander Boettcher
155621767a sel4: limit mp_server.run to 1 cpu for sel4
Issue #2044
2016-08-10 11:07:55 +02:00
Alexander Boettcher
b5ff552460 base: extend core_mem_alloc free by phys_addr
required by base-sel4 to turn used page frames back to untyped memory

Issue #2044
2016-08-10 11:07:52 +02:00
Alexander Boettcher
e89b28ca1b sel4: add signal support
Fixes #1716
Issue #2044
2016-08-10 11:07:51 +02:00
Alexander Boettcher
8b505306ed core: name initial threads not just "name"
to make debugging more comfortable

Issue #2044
2016-08-10 11:07:50 +02:00
Alexander Boettcher
cb675a12d8 base: factor out irq parsing into helper header
to be used by sel4 in the next commit

Issue #2044
2016-08-10 11:07:50 +02:00
Alexander Boettcher
464181b01d base: refactor io_port session implementation
Split port API implementation into separate io_port_session_support.cc file,
so that base-sel4 may implement this part alternatively.

Issue #2044
2016-08-10 11:07:50 +02:00
Alexander Boettcher
027e89f91a base: catch uncaught exceptions of threads
and show some message about. On sel4 sometimes exceptions are thrown and no
message is shown, it just seems to hang. With this patch at least you get
an idea that something bad happened.

Issue #2044
2016-08-10 11:07:50 +02:00
Alexander Boettcher
5a0bc07d30 demo: make cancel_blocking working
- remove special handling from base-nova
- add to rpc_server where it actually should be applied to
- required to work for sel4 cancel_blocking

Issue #2044
2016-08-10 11:07:50 +02:00
Christian Helmuth
6726e6d7fe Increase quota of ACPI driver
Platforms with more complex ACPI configurations require more RAM in the
driver, e.g., ~160K for the test notebook on my desk.
2016-08-10 11:07:48 +02:00
Emery Hemingway
1ae0357171 base/sesson_label.h: do not prefix empty strings
Session_label prefix(a, b) shall not return ' -> b' or 'a -> '.

Issue #1787
2016-08-10 11:07:48 +02:00
Norman Feske
38a1e95979 base: add 'String::print' method
This way, we can conveniently output strings without calling the
string() method.
2016-07-15 11:38:27 +02:00
Norman Feske
2127c8acf2 arm: prevent 64K default alignment of text segment 2016-07-15 11:38:27 +02:00
Norman Feske
2cbef82b61 ldso-startup: support build from non-base repos
By always fetching the source relative to BASE_DIR, we can
include the ldso-startup.mk file from other repositories, i.e.,
API packages.
2016-07-15 11:38:27 +02:00
Norman Feske
345f22a5e7 mk: shortcircuit select_from_ports for pkg tool 2016-07-15 11:38:26 +02:00
Norman Feske
b2fddf4b99 mk: always use linker scripts from base
The linker scripts are known to reside in BASE_DIR. By using them
directly from this location instead of searching them in the
REPOSITORIES, we don't need to specify the repos/base as a repository in
order to link.
2016-07-15 11:38:26 +02:00
Norman Feske
a804802bcd Let default tools.conf cover each architecture
This patch handles x86_32 and x86_64 separately since this is the SPEC
value directly supplied to the package build tool. This way, we achieve
that a CROSS_DEV_PREFIX is defined for each supported argument.
2016-07-15 11:38:26 +02:00
Norman Feske
62d65d00e0 Remove signal-source headers from public API
Those headers implement a platform-specific mechanism. They are never
used by components directly.

This patch also cleans up a few other remaining platform-specific
artifact such as the Fiasco.OC-specific assert.h.

Issue #1993
2016-07-15 11:38:25 +02:00
Emery Hemingway
2b8c1af9e0 remove 'filename' from ROM sesion args
Conveying the ROM filename as the final label element simplifies
routing policy and session construction.

Annotations by nfeske:

This commit also changes the ROM session to use base/log.h instead of
base/printf.h, which produced build error of VirtualBox because the
vbox headers have a '#define Log', which collides with the content of
base/log.h. Hence, this commit has to take precautions to resolve this
conflict.

The commit alse refines the previous session-label change by adding a
new 'Session_label::prefix' method and removing the use of 'char const *'
from this part of the API.

Fixes #1787
2016-07-11 13:24:36 +02:00
Emery Hemingway
f8337b511b Move Session_label from os to base
Session_label constructor now takes a bare string rather than a
serialized argument buffer.
Replace all instances of previous constructor with 'label_from_args'
function.

Issue #1787
2016-07-11 13:09:24 +02:00
Norman Feske
88b358c5ef Unification of native_capability.h
This patch establishes the sole use of generic headers across all
kernels. The common 'native_capability.h' is based on the version of
base-sel4. All traditional L4 kernels and Linux use the same
implementation of the capability-lifetime management. On base-hw, NOVA,
Fiasco.OC, and seL4, custom implementations (based on their original
mechanisms) are used, with the potential to unify them further in the
future.

This change achieves binary compatibility of dynamically linked programs
across all kernels.

Furthermore, the patch introduces a Native_capability::print method,
which allows the easy output of the kernel-specific capability
representation using the base/log.h API.

Issue #1993
2016-07-11 13:07:37 +02:00
Norman Feske
d71f0a9606 Cleanup of parent-cap handling
This patch alleviates the need for a Native_capability::Dst at the API
level. The former use case of this type as argument to
Deprecated_env::reinit uses the opaque Native_capability::Raw type
instead. The 'Raw' type contains the portion of the capability that is
transferred as-is when delegating the capability (i.e., when installing
the parent capability into a new component, or when installing a new
parent capability into a new forked Noux process). This information can
be retrieved via the new Native_capability::raw method.

Furthermore, this patch moves the functions for retriving the parent
capability to base/internal/parent_cap.h, which is meant to be
implemented in platform-specific ways. It replaces the former set of
startup/internal/_main_parent_cap.h headers.

Issue #1993
2016-07-11 13:05:27 +02:00
Norman Feske
f7bdd383e2 Remove base/native_types.h headers
Issue #1993
2016-07-11 12:06:50 +02:00
Christian Prochaska
29a12ab9a2 base: add 'Thread::mystack() function
The static 'Thread::mystack()' function returns the stack boundaries of
the calling thread. It is useful when a thread uses a diffent stack than
the primary one.

Fixes #2037
2016-07-11 12:06:05 +02:00