Commit Graph

4610 Commits

Author SHA1 Message Date
Christian Prochaska 84ee970e9b run: look for platform boot string at beginning of line
When running the same kernel in a VM as on the host system and the
kernel boot message from the VM appears on the log output, the run tool
assumes that the host machine has rebooted unexpectedly. With this
commit, an unexpected reboot is assumed only if the kernel boot message
appears at the beginning of a line. On base-hw, we enforce a line feed
at the beginning of the boot message as the SPIKE emulator log starts
with the first message of the kernel lacking a line feed.

Fixes #2041
2016-08-10 11:07:48 +02:00
Christian Helmuth 747137c201 Increase stack size of alarm schedulers 2016-08-10 11:07:47 +02:00
Christian Helmuth f14024eb52 linux: print warning for unusually small stacks
Thread stacks with less than 4K usable space are insufficient for our
implementation of Linux exception signal handling. If such a unusually
small stack overflows the SIGSEGV handler will not be able to print the
diagnostic message leaving no hint of the cause of the stuck process.
2016-08-10 11:07:47 +02:00
Christian Helmuth 887b6233b1 lwip: remove unused alarm-scheduler implementation 2016-08-10 11:07:47 +02:00
Christian Helmuth 4eb58730c0 linux: fix raw-string output in PRAW() 2016-08-10 11:07:47 +02:00
Emery Hemingway e410be69a7 server/fs_rom: adjust to component API
- Use component API.
- Use signal handlers.
- Log ROM file path at error.
- Add Output printing support to os/path.h utility.

Fixes #2042
2016-08-10 11:07:47 +02:00
Emery Hemingway 7547820af6 server/rump_fs: local symlink target termination
Clients may write symlink targets with or without null-termination.

Fixes #2043
2016-08-10 11:07:46 +02:00
Emery Hemingway f92be575ae nit_fb: change to component API
Issue #1987
2016-08-10 11:07:46 +02:00
Christian Helmuth e95d7a8fa2 report_rom: fix warning message
Fix #2036
2016-07-20 13:51:27 +02:00
Norman Feske 11c5bf28c9 nitpicker: change to component API
Issue #1987
2016-07-15 11:38:28 +02:00
Norman Feske b85fdd828a dynamic_rom: change to component API
Issue #1987
2016-07-15 11:38:28 +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 c090bf7fce mk: always consider spec files in repos/base 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 a025ff9237 build.mk: don't search target.mk files w/o src dir
Let the build system skip the search for target.mk files in repositories
that don't have a src/ directory.
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 a15a86b024 Build-system support for building a single library
This patch equips the build system with the feature of building an
individual library with its dependencies by specifying the library
as 'LIB' argument. E.g., 'make LIB=libc' builds the libc.
2016-07-15 11:38:25 +02:00
Norman Feske a9e9d9e499 libc: clean up import-libc.mk
This patch changes the import-libc.mk file to make it reusable for the
packaged API of the libc.
2016-07-15 11:38:25 +02:00
Ben Larson a4f73ab1ad os: let fs clients install custom signal handlers
This patch adds the methods 'sigh_ack_avail()' and
'sigh_ready_to_submit()', which are needed to build asynchronously
operating file-system clients.

Fixes #2023
2016-07-15 11:38:25 +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 0efd5a3078 server/report_rom: componentize
* Check report RAM donation and buffer size.
* Use explicit config ROM attachment.
* Pass Env to session connections.
* Replace logging macros.

Issue #2036
2016-07-15 11:38:24 +02:00
Norman Feske 02e50ce5d7 Pistachio: limit max threads per PD to 128
This change avoids cap ref-count overflows when creating many threads
as done by the thread test.
2016-07-12 15:44:43 +02:00
Norman Feske 57ec61fb4b base-linux: omit stack-area init for lx_hybrid
Fixes #2030
2016-07-11 13:31:37 +02:00
Emery Hemingway d0e7cc35fa Adjust run scripts for loss of ROM filename argument
Issue #1787
2016-07-11 13:31:36 +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
Adrian-Ken Rueegsegger d6ba00089b vbox: Increase stack size of periodic_gip thread
Otherwise a pagefault is triggered on hw_x86_64_muen.
2016-07-11 12:06:50 +02:00
Norman Feske 030301d046 gdb_monitor: remove superfluous check
The check for preparation of gdb is now done by the ports mechanism.
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
Christian Prochaska bea48b636e lwip: avoid failed assertion on nonblocking connect()
When calling 'connect()' in nonblocking mode and the connection has been
established, don't call 'tcp_connect()' again, which would trigger an
assertion with the message 'tcp_connect: can only connect from state
CLOSED'.

Fixes #2039
2016-07-11 12:06:04 +02:00
Josef Söntgen 1d9f10e3b6 iso9660: fix reading of large directory entries
This commit makes it possible to read directory entries that span
more than one sector.

Fixes #2038.
2016-07-11 12:06:04 +02:00
Josef Söntgen cad4d4f970 ahci: check DHRS bit during initialization
This is necessary for the AHCI device model in VirtualBox.

Fixes #2035.
2016-07-11 12:04:53 +02:00
Josef Söntgen c25c4e3411 ram_blk: transition to the new base API
In addition to modernizing the component now also supports using
empty RAM dataspace as backing store.

For example to use an ISO file the component has to be configured
as follows:

! <config file="image.iso" block_size="2048"/>

To use a empty RAM dataspace that is 256MiB large and has a block
size of 4KiB the configuration looks like this:

! <config size="256M" block_size="4096"/>

Either 'size' or 'file' has to specified. If both are declared the
'file' attribute is soley evaluated.

Issue #1987.

Fixes #2031.
2016-07-11 12:04:52 +02:00
Josef Söntgen a5dd3fa1e9 ahci: make policy checking more fail-safe
Handle cases where no policy is given and/or no policy matches.

Fixes #2033.
2016-07-11 12:04:52 +02:00
Norman Feske 11a4e7888d noux_net_netcat.run: increase usb_drv quota
Use quota large enough so that the USB driver does not attempt to
request further memory. On the Raspberry Pi, init has no slack memory
to respond to such a request.
2016-07-06 13:02:59 +02:00
Alexander Boettcher 0efd89f12b hw_zynq: disable noux_net_netcat test
because of missing uart_drv
2016-07-06 13:02:59 +02:00
Emery Hemingway e09752a26f noux: pass correct paths for stdio to Vfs_io_channel
Pass both paths, absolute path to the mount point and the relative path
from the mount point to the file, along with an open handle rather than
just an absolute path. Otherwise, fstat fails if the addressed file is
implemented by another VFS plugin.

Fixes #1789
2016-07-06 13:02:59 +02:00
Alexander Boettcher 5f371c9a3d noux: increase stack size
not sufficient for 32bit noux_tool_chain_auto anymore

Issue #2025
2016-07-06 13:02:58 +02:00
Reto Buerki f241b6e496 Update Muen port to revision c73734d
Issue #2016
2016-07-06 13:02:58 +02:00
Adrian-Ken Rueegsegger 4c5694184c Enable 32-bit Virtualbox scenarios for hw_x86_64_muen
* Announce VM service
 * Disable USB uhci and ehci as only xhci is supported on hw_x86_64_muen

Issue #2016
2016-07-06 13:02:58 +02:00
Reto Buerki 63591160df vbox: Factor out memory config check
Move Genode/vbox memory configuration check to separate
genode_check_memory_config() function and call it in platform-specific
setup machine hook of accloff/nova.

The rationale for this change is to omit the check on Muen since the
guest memory is separate and not allocated from base-hw memory.

Issue #2016
2016-07-06 13:02:57 +02:00
Reto Buerki 68bab6a411 hw_x86_64_muen: Use timed events for guest preemption
Write tick count of next kernel timer to the guest timed events page if
present. This causes the guest VM to be preempted at the requested tick
count and ensures that the guest VM can not monopolize the CPU if no
traps occur.

The base-hw kernel expects a configured switch-event from the guest VM
to base-hw with ID 30 and target vector 32 to be present in the system
policy.

Issue #2016
2016-07-06 13:02:57 +02:00
Reto Buerki 7d00763861 hw_x86_64_muen: Use timed events to implement timer
Switch kernel timer driver to timed event interface. The base-hw kernel
expects a configured self-event with ID 31 and target vector 32 to be
present in the system policy.

ssue #2016
2016-07-06 13:02:57 +02:00
Adrian-Ken Rueegsegger 6d28ea1c5c vbox: Add platform-specific setup machine hook
Add call to genode_setup_machine prior to machine registration in
frontend machine setup code. This enables platform-specific adjustments
to the machine instance.

The new function is used on hw_x86_64_muen to clamp the processor count
to 1 as multiple virtual CPUs are not supported on this platform.

Issue #2016
2016-07-06 13:02:56 +02:00