Commit Graph

234 Commits

Author SHA1 Message Date
Alexander Boettcher
398fa76cdb vancouver: adjust run script to use acpi+iommu 2013-02-27 17:48:58 +01:00
Norman Feske
134f54a602 noux_tool_chain_nova: Don't restrict to Fiasco.OC
Thanks to @alexab's recent work on base-nova and the NOVA kernel, the
test is expected to run successfully on NOVA too.
2013-02-25 22:14:22 +01:00
Norman Feske
ce67b73dca Update example configurations
With the change of the Timer::Session interface, all scenarios that use
the timer use core's SIGNAL service. So we need to route sessions
accordingly.

In addition to the adaptation to the changed timer, this patch removes
some stale examples that predate the run tool and are no longer used.
2013-02-19 14:45:55 +01:00
Norman Feske
fae63f4fa9 Merge base libraries into a single library
This patch simplifies the way of how Genode's base libraries are
organized. Originally, the base API was implemented in the form of many
small libraries such as 'thread', 'env', 'server', etc. Most of them
used to consist of only a small number of files. Because those libraries
are incorporated in any build, the checking of their inter-dependencies
made the build process more verbose than desired. Also, the number of
libraries and their roles (core only, non-core only, shared by both core
and non-core) were not easy to capture.

Hereby, the base libraries have been reduced to the following few
libraries:

- startup.mk contains the startup code for normal Genode processes.
  On some platform, core is able to use the library as well.
- base-common.mk contains the parts of the base library that are
  identical by core and non-core processes.
- base.mk contains the complete base API implementation for non-core
  processes

Consequently, the 'LIBS' declaration in 'target.mk' files becomes
simpler as well. In the most simple case, only the 'base' library must
be mentioned.

Fixes #18
2013-02-19 14:45:55 +01:00
Norman Feske
b1f63e3356 Turn 'platform_env.h' into a private header
This patch removes 'platform_env.h' from the public API headers because
this header was not part of the API anyway.
2013-02-14 13:23:36 +01:00
Norman Feske
4b8f991f52 vancouver: coding style 2013-02-13 15:09:23 +01:00
Alexander Boettcher
b0d23abaa7 vancouver: keep one cap_session
Cap_sessions and portals created via the sessions are nowadays freed up during
c++ object destruction. Because of that the exception portals for a vCPU thread
get be revoked as soon as the cap_session object leaves its scope.

Keep one cap_session for the whole lifetime of the vmm to avoid disappearing
exception portals.

Related to #582.
2013-02-13 15:09:23 +01:00
Markus Partheymueller
47cc2f8590 vancouver: run script for booting Linux VMs
The setup now uses nitpicker and nit_fb to display several instances of
vancouver. The guest OS binaries must be supplied in the
'<build-dir>/bin' directory manually.

Furthermore, the patch lets launchpad pass Block, Nic, and Rtc to the
parent.
2013-02-13 15:09:23 +01:00
Markus Partheymueller
3a533779e4 vancouver: RTC support 2013-02-13 15:09:23 +01:00
Markus Partheymueller
cbf4a7b0c3 vancouver: Disk support
Vancouver can now assign block devices to guests using the Block
interface. The machine has to be configured to use a specified drive,
which could be theoretically routed to different partitions or services
via policy definitions. Currently the USB driver only supports one
device. Genode's AHCI driver is untested.

If the session quota is too low, random pagefaults can occur on the
stack.

According to @Nils-TUD, it is necessary to protect the DiskCommit
messages with a lock against deadlocking with the timer. Observations
showed that this mitigates some problems with Gentoo on real hardware.
2013-02-13 15:09:23 +01:00
Markus Partheymueller
1c447d98e9 vancouver: Network support
Vancouver is now able to use the Intel 82576 device model from NUL to
give VMs access to the network via the nic_bridge service. In order to
integrate the device model, it had to be renamed to i82576 due to XML
limitations. This is done by a patch applied via the 'make prepare'
mechanism.

Although current network card models in Vancouver panic if they can't
get a MAC address, the OP_GET_MAC hostop now fails gracefully in the
case where no nic_drv or nic_bridge is available.
2013-02-13 15:09:22 +01:00
Markus Partheymueller
1ca0a66ea9 vancouver: Console support
The guest VM can now be provided with a framebuffer and keyboard input.

Mouse positioning of the guest is a problem. Because the PS2 model applies
some calculations to the movement values, it can happen that overflows mess
with the cursor.  Therefore the handling was changed and only movements of 1
and -1 are sent.  Since absolute positioning is not possible with PS2, we
have to live with this limitation until USB HID is implemented.

For the framebuffer size in Vancouver the configuration value in the machine
XML node is used.  It is possible to map the corresponding memory area
directly to the guest, regardless if it is from nitpicker,
liquid_framebuffer or vesa_drv.  The guest is provided with two modes (text
mode 3 and graphics mode 0x114 (0x314 in Linux).

Pressing LWIN+END while a VM has focus resets the virtual machine. Also,
RESET and DEBUG key presses will not be forwarded to the VM anymore.
It is possible to dump a VM's state by pressing LWIN+INS keys.

The text console is able to detect idle mode, unmaps the buffer from the
guest and stops interpreting.  Upon the next pagefault in this area, it
resumes operation again.  The code uses a simple checksum mechanism instead
of a large buffer and memcmp to detect an idle text console.  False
positives don't matter very much.
2013-02-13 15:09:22 +01:00
Markus Partheymueller
2d2373a03b vancouver: Timer support
This required usleep to be added to the timer interface.
2013-02-13 15:09:22 +01:00
Markus Partheymueller
aea0a7284f vancouver: Inline module support 2013-02-12 21:51:18 +01:00
Markus Partheymueller
5c886b4962 vancouver: Nested events during EPT violation
When an EPT/NPT fault occurs during IDT vectoring, the original event must
be reinjected.  Additionally we may have to inject an IRQ window if another
event is already pending.
2013-02-12 21:51:10 +01:00
Markus Partheymueller
1434d0948a vancouver: VMX support, improved SVM portals 2013-02-12 21:50:48 +01:00
Markus Partheymueller
14307c778a Add -std=gnu++11 flag to Vancouver Makefile
Most recent upstream version need this to be build successfully.
2013-02-12 21:31:44 +01:00
Alexander Boettcher
9453d319cb base: add remove_client to rm_session
Fixes #13
2013-02-11 12:01:25 +01:00
Norman Feske
b530fddf86 noux_bash.run: Don't require usb_drv on x86 2013-01-27 18:34:45 +01:00
Christian Prochaska
49206d7cf6 Arora: disable 'not implemented' messages
This patch disables the '_sigprocmask called, not implemented' messages.

Fixes #623.
2013-01-21 11:40:38 +01:00
Christian Prochaska
36a37b9866 Arora demo: make Nitpicker plugin work
Fixes #620.
2013-01-16 16:06:02 +01:00
Christian Prochaska
a6acab6d0d Synchronize signal context destruction
With this patch, the 'Signal_receiver::dissolve()' function does not return
as long as the signal context to be dissolved is still referenced by one
or more 'Signal' objects. This is supposed to delay the destruction of the
signal context while it is still in use.

Fixes #594.
2013-01-15 15:03:21 +01:00
Christian Prochaska
f109f4b02d Noux: initialize the 'termios' structure
Fixes #614.
2013-01-15 12:09:00 +01:00
Norman Feske
73ab30c22c Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
Christian Prochaska
6fa57141ae Noux: delayed 'Child' object destruction
With this patch the destruction of Noux 'Child' objects gets delayed
further until the exit signal has been dispatched. This prevents the
self-destruction of the signal dispatcher, which is a member of the
'Child' object.

Fixes #603.
2013-01-10 21:16:37 +01:00
Norman Feske
13d4108fea Unify 'Signal_dispatcher' interfaces
Several users of the signal API used custom convenience classes to
invoke signal-handling functions on the reception of incoming signals.
The 'Signal_dispatcher' pattern turned out to be particularly useful. To
avoid the duplication of this code across the code base, this patch
adds the interface to 'base/signal.h'.

Furthermore, the patch changes the 'Signal::num()' return type from int
to unsigned because negative numbers are meaningless here.

Fixes #511
2013-01-10 21:09:14 +01:00
Norman Feske
277af91376 Omit child-name prefix in <if-args> check
When matching the 'label' session argument using '<if-args>' in a
routing table, we can omit the child name prefix because it is always
the same for all sessions originating from the child anyway. Therefore,
this patch adds a special case for matching session labels. It makes the
expression of label-specific routing more intuitive.
2013-01-10 21:09:07 +01:00
Alexander Boettcher
c2d3543e62 base: replace obj_by_* by lookup_and_lock
Add functionality to lookup an object and lock it. Additional the case is
handled that a object may be already in-destruction and the lookup will deny
returning the object.

The object_pool generalize the lookup and lock functionality of the rpc_server
and serve as base for following up patches to fix dangling pointer issues.
2013-01-10 11:13:13 +01:00
Christian Helmuth
f51ce6f5a5 prepare: Serialize preparation in Makefile
Any recursively invoked `make' command will still be run in parallel
(unless its makefile contains .NOTPARALLEL).

Related to #535.
2012-12-05 14:02:18 +01:00
Christian Prochaska
eac4b61560 Noux: increase ARGS_MAX_LEN
Fixes #533.
2012-11-29 11:56:31 +01:00
Christian Prochaska
b21c1d468d Noux tool chain run script improvements
- print status messages
- limit run script execution to the 'foc_x86_32' platform

Fixes #539.
2012-11-29 11:56:31 +01:00
Christian Prochaska
7c71a62bd8 Noux: run scripts for building Genode
This patch adds two run scripts which create a Noux environment for building
the Genode demo scenario for Fiasco.OC and NOVA.

Fixes #520.
2012-11-26 21:07:56 +01:00
Christian Prochaska
d67cb43605 Noux: increase ENV_MAX_LEN
Fixes #515.
2012-11-26 20:58:10 +01:00
Christian Prochaska
ec0b6f82a5 Noux: add tar hardlink support in 'stat()'
Fixes #481.
2012-11-26 20:58:10 +01:00
Josef Söntgen
2e6de3759c Noux: add getrlimit() dummy to libc_noux
As long as there is no proper getrlimit() support prevent programs
from using it by providing a dummy implementation.
2012-11-26 20:58:10 +01:00
Josef Söntgen
569e0a2e6c Remove unneeded PDBG() messages 2012-11-26 20:58:10 +01:00
Josef Söntgen
e82f61f938 Noux: add noux-pkg/openssh interactive run-script
Currently only ssh(1) is tested but scp(1) should also work. Noux
still misses some functionality which is needed for sshd(1).
2012-11-26 20:58:10 +01:00
Josef Söntgen
46597d3b17 Noux: add noux-pkg/openssh 2012-11-26 20:58:10 +01:00
Josef Söntgen
5c413929ef Noux: add ioctl() to Vfs
File_io_channel now includes ioctl() because pseudo devices which are
implemented as a file-system, e.g. /dev/tty, are controlled via ioctl()
requests. The method is exported to the Vfs through the Vfs_io_channel
class.
2012-11-26 20:58:09 +01:00
Josef Söntgen
c24a95b819 Noux: add random_file_system
The random file-system provides an arc4 based urandom implementation
which is needed for OpenSSL.

NOTE: the Arc4random class currently _does not collect enough_ random
bytes!
2012-11-26 20:58:09 +01:00
Josef Söntgen
7f359a5978 Noux: add stdio_file_system
This file-system provides a connection to the terminal through a device
node, e.g. /dev/tty.
2012-11-26 20:58:09 +01:00
Josef Söntgen
ebfe49ca84 Noux: use Terminal::Connection as singleton
We will reuse the terminal connection in the stdio filesystem
to implement /dev/tty. Therefor we need to access the terminal
from different locations which is simplified if it is provided
by a singleton.
2012-11-26 20:58:09 +01:00
Josef Söntgen
82eb0e9f9a Noux: add TIOCSETAF/W dummy to Terminal_io_channel 2012-11-26 20:58:09 +01:00
Josef Söntgen
59c369a608 Noux: add TIOCSETAF/W support
These ioctl() request are used to set attributes of the underlying
terminal device.
2012-11-26 20:58:09 +01:00
Martin Stein
05f5999e71 cpu_session: Access thread state by value 2012-11-23 12:20:22 +01:00
Christian Prochaska
47690b8802 Noux: make install target configurable
With this patch the make install target for Noux applications gets defined
in the 'NOUX_INSTALL_TARGET' make variable with 'install-strip' as default.

Fixes #503.
2012-11-22 09:21:53 +01:00
Josef Söntgen
3c562d042d Noux: fix resetting wrong number of fds
Since the number of the fds in the select call is not necassarily equal
to the number of fds SYSCALL_SELECT returns we have to reset the number
of fds given as argument to select().

This keeps OpenSSH from reading from a non-ready socket.

Fixes #494.
2012-11-14 16:57:13 +01:00
Josef Söntgen
a3c45412aa Noux: fix num_* return value in SYSCALL_SELECT
select_out.num_* was unecessarily set multiple times and not at all
if unblock_* was 0.

Fixes #494.
2012-11-14 16:56:58 +01:00
Christian Prochaska
d31a14fb55 ports: GCC 4.7 build fixes
Fixes #476.
2012-11-14 16:55:13 +01:00
Christian Prochaska
fb216f370b Noux: speed up tar record lookup
Currently the lookup of a specific record in a tar archive may take a long
time, because the records get searched in sequence. With this patch a tree
structure representing the directory layout gets created when loading the
tar file for speeding up record lookups.

Fixes #491.
2012-11-14 16:53:36 +01:00