Commit Graph

4302 Commits

Author SHA1 Message Date
Emery Hemingway 1779a0511b vfs: add new error codes
The codes are OPEN_ERR_NAME_TOO_LONG, OPEN_ERR_NO_SPACE, and
FTRUNCATE_ERR_NO_SPACE.

Issue #1693
2015-10-06 12:18:51 +02:00
Alexander Boettcher 286edaed68 base: detect and stop self de-structing threads
Issue #1687
2015-10-06 12:18:51 +02:00
Alexander Boettcher 3f611fe00d pthread: handle self destruction better
Defer destruction of threads which tries to self-destruct. Check an perform
cleanup of such threads during pthread_cancel and pthread_create.

Issue #1687
2015-10-06 12:18:51 +02:00
Alexander Boettcher 6f3e9c12fb vbox: support shutdown of VMM
- send exit signal to parent
- avoid assertion in vbox posix backend

Fixes #1687
2015-10-06 12:18:51 +02:00
Alexander Boettcher ae12f04354 nova: avoid deadlocks by self-destructing threads
Issue #1687
2015-10-06 12:18:50 +02:00
Alexander Boettcher 6426d4098c dde_rump: handle ENOENT error case
Related to #1687
2015-09-30 17:13:11 +02:00
Christian Prochaska fd533b0c93 qt5: key repeat support
Fixes #1692
2015-09-30 15:48:12 +02:00
Christian Prochaska 0f8fcab3bd qt5: fix use of uninitialized variable
Fixes #1677
2015-09-30 15:48:12 +02:00
Emery Hemingway d5dc25adef Noux: connect standard streams to VFS nodes
Fixes #1693
2015-09-30 15:48:12 +02:00
Norman Feske 20f961cbd8 cli_monitor, launcher: handle exiting subsystems
Until now, the CLI monitor and the laucher allowed the user to explitly
kill subsystems but both used to ignore gracefully exiting subsystems.
It was the user's job to remove the remains of those subsystems. The
patch takes the burden of manually killing exited subsystems from the
user.

Fixes #1685
2015-09-30 15:48:12 +02:00
Emery Hemingway dd13bbb1e2 part_blk: use Session_policy to determine partition
Fixes #1714
2015-09-30 15:48:12 +02:00
Josef Söntgen 2f8b3cfdaf vbox: make I/O port access less noisy
Instead of white-listing floppy controllers, certain SCSI controllers
as well as ISAPnP etc. pp. remove the diagnostics and print each access
if verbose is set.

Fixes #1726.
2015-09-30 15:48:12 +02:00
Josef Söntgen f9a64b663c vbox: replace alarm_timer thread with trigger_once
Instead of using the alarm_timer thread we use our own timer thread
that uses a kernel semaphore on Nova. On all other platforms a timer
connection and trigger_once is used.

Fixes #1727.
2015-09-30 15:48:12 +02:00
Alexander Boettcher f7ad6cf4e6 seoul: support ide disk model
Issue #1702
2015-09-30 15:48:11 +02:00
Alexander Boettcher 36947cef3a seoul: fix raw disc boot for 512B sectorsize
Fixes #1702
2015-09-30 15:48:11 +02:00
Alexander Boettcher 21e86227bc seoul: make input available via bios
Enables us to interact with GRUB bootloader during early boot.

Issue #1702
2015-09-30 15:48:11 +02:00
Alexander Boettcher 4da7e89d6b seoul: avoid assertion, adhere to original vancouver version
Issue #1702
2015-09-30 15:48:11 +02:00
Alexander Boettcher e5ea76c689 seoul: set vCPU priority below seoul threads
Issue #1702
2015-09-30 15:48:11 +02:00
Alexander Boettcher 2d15c6d990 seoul: handle a MSR to let Genode/Nova guest boot
Issue #1702
2015-09-30 15:48:11 +02:00
Alexander Boettcher ad24b25af0 nova: avoid buddy allocator assertion in kernel
Fixes #1672
2015-09-30 15:48:11 +02:00
Christian Helmuth 985c01116b nova: PIC compatible syscall_5
Addressing must be PC-relative, so adapt the approach from the other
nova_x86_32 syscall bindings (description by @ssumpf):

  Use call to push the current IP on the stack and add the distance of
  label 0 and label 1 in order to determine the return address, which
  NOVA requires in edx.

The bug only showed up with "-O0" in libc.lib.so in form of a unwanted
text relocation.

Fixes #1721
2015-09-30 15:48:10 +02:00
Christian Prochaska 7fff1770e0 qt5: update run scripts
Fixes #1695
2015-09-30 12:20:41 +02:00
Christian Helmuth 08541b68f7 dde_linux: stack alignment on x86_64 in wifi/usb
platform_execute() is used to initially switch the stack of a
routine/task. While Thread_base::alloc_secondary_stack() properly aligns
the returned stack pointer the x86_64 assembler implementation did not
comply to stack frame management specified in the ABI.

The used (and most simple) stack-alignment check may pass a float to a
varargs function on x86, which requires the compiler to properly save
some XMM registers on stack.
2015-09-30 12:20:41 +02:00
Christian Helmuth 92541c49a6 netperf: don't run script on hw_wand_quad 2015-09-30 12:20:41 +02:00
Stefan Kalkowski bb4ee67357 base-linux: do not copy dataspace components
Dataspace components inherit from RPC objects which are non-copyable from now
on. Therefore, the Rom_session_component's constructor had to be modified
to not construct a dataspace component on the stack and assign it in the
following.

Ref #1704
2015-09-30 12:20:41 +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
Christian Helmuth 6616bd4593 lwip: log thread and sleep forever in assert() 2015-09-30 12:20:40 +02:00
Christian Helmuth 7e3bcb1e39 tcp_terminal: signal available bytes on partial read
If a client provides a read buffer of insufficient size for all
available data, we have two options

1) Leave it to the client to do partial reads until not further data is
   available, or

2) Signal the client that there still some bytes on a partial read.

As the second option seems more robust it's implemented in this commit.

Fixes #1705
2015-09-30 12:20:40 +02:00
Adrian-Ken Rueegsegger 8eec092851 Add support for ipxe load (nova, foc, fiasco)
This makes use of the iPXE sanboot command [1] which downloads and
boots an ISO image directly via HTTP. Therefore, your RUN_OPT needs
both

  --include image/iso   and
  --include load/ipxe

NOTE: The webserver serving the ISO image must support ranged requests,
      see [2].

[1] - http://ipxe.org/cmd/sanboot
[2] - http://forum.ipxe.org/showthread.php?tid=7295&pid=10482#pid10482
2015-09-30 12:20:40 +02:00
Adrian-Ken Rueegsegger 94afc1a340 run: support loading images via iPXE/HTTP
iPXE is an open source network boot firmware which supports booting from
a web server via HTTP [1].

The following two parameters can be used to specify the iPXE/HTTP setup:

--load-ipxe-base-dir
  This parameter specifies the base directory of the HTTP server from
  which the target machine downloads the files.

--load-ipxe-boot-dir
  The directory relative to iPXE base dir which contains the iPXE
  chainload configuration and all necessary files.

The target machine is expected to request the following iPXE
configuration via HTTP:

http://${HOST_URL}/${ipxe-boot-dir}/boot.cfg

This can be achieved by building iPXE with the following embedded
script:

  #!ipxe
  dhcp
  chain http://${HOST_URL}/${ipxe-boot-dir}/boot.cfg

See also [2] for additional information.

[1] - http://ipxe.org/
[2] - http://ipxe.org/howto/chainloading#breaking_the_loop_with_an_embedded_script

Fixes #1708
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
Stefan Kalkowski 53eb666ed0 hw: invalidate all caps of a thread in destruction
Fix #1682
2015-09-30 12:20:39 +02:00
Christian Prochaska 3bf050ed30 qt5: use signal handler for input processing
Fixes #1707
2015-09-30 12:20:39 +02:00
Emery Hemingway 45bcb7f48f Override libc access in Noux plugin
Fixes #1706
2015-09-30 12:20:39 +02:00
Stefan Kalkowski 37bae7bc1f hw: simplify IPC node's state model (fix #1691)
Merge the Ipc_node class' state PREPARE_AND_AWAIT_REPLY and AWAIT_REPLY,
as well as PREPARE_REPLY ans INACTIVE into one.
2015-09-30 12:20:39 +02:00
Emery Hemingway 5d434944eb libc: support access() in plugins
Fixes #1703
2015-09-30 12:20:38 +02:00
Alexander Boettcher 9b21c88bc6 base: handle unsupported printf commands better
The commit consumes the argument of a unsupported printf command.

Without the commit - a subsequent command uses the argument of the preceding
command, which may cause memory corruption or page faults for sequences using
string commands, e.g.

Genode::printf("%#x %s\n", 0x20, "Test");

'#' is not supported by Genode::printf. In this scenario a pagefault at
address 0x20 is caused.

Fixes #1701
2015-09-30 12:20:38 +02:00
Christian Prochaska 5309bda8b6 libc_lwip: 'fcntl()' fix
The 'O_NONBLOCK' flag has different numerical values in lwip and in the
libc, which prevented the correct setting of nonblocking socket mode.

Fixes #1699
2015-09-30 12:20:38 +02:00
Alexy Gallardo Segura de87ecfc62 foc_odroid_x2: basic configuration for gpio pins
Fixes #1669
2015-09-30 12:20:38 +02:00
Alexy Gallardo Segura 49b3d520a9 exynos: generalize Exynos5 fb_drv for Exynos4/5
Fixes #1678
2015-09-30 12:20:37 +02:00
Christian Helmuth 24b1f269be Remove Packet_ref from File_system::Packet_descriptor
The intention of Packet_ref was to allow clients to place opaque
references into the packet descriptor itself, which could be observed on
packet completion. Currently no component in our sources uses this
feature and beyond that it is questionable if it should be used at all:
If the server tampers with the ref the client may easily be confused
into observing an incorrect or invalid context. It seems better to
remove the opaque context from the descriptor and leave the actual
implementation to the client and its needs.
2015-09-30 12:20:37 +02:00
Christian Helmuth 9212fc0dc6 noux: adapt run scripts to platform_drv.inc reqs 2015-09-30 12:20:37 +02:00
Christian Helmuth 50164336af linux: explicitly add well-known include paths
Unfortunately, the 'gcc -dumpmachine' magic does not suffice on all
Linux distros, so we just add the well-known paths for i386-linux-gnu
and x86_64-linux-gnu.

Fixes #1694
2015-09-30 12:20:37 +02:00
Norman Feske 0f052357ef init: propagate exit conditions of children
This patch extends the configuration concept of init with an additional
sub node for the <start> node:

<start name="noux">
  <exit propagate="yes"/>
  ...
</start>

If the 'propagate' attribute is set to "yes", the exit of the respective
child will appear to init's parent as the exit of the entire init
subsystem.

Fixes #1686
2015-09-30 12:20:36 +02:00
Emery Hemingway 686f53a5c3 fs_log: merge option, increase message buffer
Maximum amount of in-transit packets is TX_QUEUE_SIZE*2 + 1

Issue #1538
2015-09-30 12:20:36 +02:00
Emery Hemingway ce1e6c16fb fs_log: new log file server using native FS sessions
Fixes #1538
2015-09-30 12:20:36 +02:00
Emery Hemingway 7ce19216f4 VFS: symlink file system
add symlinks to a VFS tree with <symlink name="..." target="..."/>

Issue #1648
Fixes #1653
2015-09-30 12:20:36 +02:00
Emery Hemingway 4a5b7be4e7 TAR VFS: dereference hard links when opening files
Fixes #1636
Issue #1653
2015-09-30 12:20:35 +02:00
Stefan Kalkowski 8c168d7943 hw: use weak pointer when resolving a page-fault
Fix #1674
2015-09-30 12:20:35 +02:00