Commit Graph

30 Commits

Author SHA1 Message Date
Christian Helmuth 92171e9b86 Fiasco.OC: Reduce capability-allocator size
The old variant provided 8K capability slots to all processes on core,
which increased binaries by 180 KB for the static allocator. I reduced it
to 4K capabilities stay under 100 KB overhead for the allocator.

Anyway, pci_drv and pl11x_drv need more RAM quota now: 2M for pl11x_drv
and 1M for pci_drv.
2012-02-28 10:54:42 +01:00
Christian Prochaska 77a7207b42 Update the GDB monitor test documentation
The interactive GDB monitor test has changed recently. This patch updates
the documentation accordingly.

Fixes #126.
2012-02-26 13:52:20 +01:00
Norman Feske a9152ff412 Handle lifetime of dynamic allocations in Noux 2012-02-26 13:34:48 +01:00
Christian Prochaska e085828725 Qt4 cleanup
- Remove example application source code files which also exist in contrib
- Outsource commonly used parts from target.mk files
- Store the current Qt version only in one place
- Add run scripts for the example applications

Fixes #127.
2012-02-24 23:46:10 +01:00
Norman Feske 780507f42b Implementation of wait4 syscall
The 'noux_bash.run' script has become able to present the user with an
interactive bash shell for executing various coreutils programs. It is
still pretty limited, i.e., the environment is not correctly passed to
child processes and pipes are not supported. But bash and coreutils are
operational.
2012-02-24 23:43:35 +01:00
Norman Feske 7e7d290008 Fixed missing counter increment in assign operator 2012-02-24 23:32:08 +01:00
Norman Feske 18d0b316d4 Add wait4 syscall to Noux, just blocking for now 2012-02-24 15:19:38 +01:00
Norman Feske 7c98268901 Noux cleanup and source documentation
This patch decomposes the former 'child.h' into several header files,
unifies the naming of classes, and adds source-code documentation.
2012-02-23 10:42:12 +01:00
Norman Feske cbd4830977 Propagate new parent cap to forked process
This patch removes the hardcoded parent cap for the new child by
introducing a facility called 'poke' similar to copy-to-user. This
change makes the fork mechanism kernel-agnostic. The 'noux_fork'
test works on L4/Fiasco, OKL4, NOVA, Fiasco.OC, and L4ka::Pistachio.
Linux is not supported yet.
2012-02-23 10:42:11 +01:00
Norman Feske da5b0ff316 Remove unneeded libm from boot modules 2012-02-23 10:42:11 +01:00
Norman Feske fe2addf5b0 Noux: first functional version of fork
The resource virtualization layer has been extended to support sub RM
sessions because this feature is used by the dynamic linker. Currently,
the address space of the forking process is copied eagerly. However,
different dataspace types are treated differently. For example, only RAM
dataspaces are copied but no ROM dataspaces.

At the libc side, a setjmp/longjmp-based trampoline mechanism is used to
implement the continuation of the main thread inside the new process.
This procedure is also responsible for re-establishing the relationship
to the new process' parent as well as its Noux session.

This version is still in flux and has many rough edges. It is tied to
OKL4 for now.
2012-02-23 10:42:11 +01:00
Norman Feske 869c6e1df2 Noux: dim naming noise using the Genode namespace
Because 'Noux::Child' implements several abstract Genode interfaces, the
'Genode::' prefix became almost ubiquitous, making the code harder to
read. By importing the 'Genode' namespace into the 'Noux' namespace,
this patch remedies this inconvenience.
2012-02-22 15:56:45 +01:00
Norman Feske 5aaf04915c Intercept CPU session of Noux::Child
To implement fork semantics, we need to customize the bootstrapping of
the newly created process, in particular the startup of the main thread.
The CPU session interface provides a suitable hook. By virtualizing the
CPU connection of the process to core, we can defer (and parametrize)
the startup of the main thread. Furthermore, this enables us to detect
illegal attempts by the Noux process to create threads in addition to
the main thread.
2012-02-22 15:56:45 +01:00
Norman Feske 652a4afd51 Intercept RAM and RM of Noux processes
By letting Noux processes talk to service implementations local to the
Noux server, we can track RAM allocations and RM operations. This is
needed as a prerequisite to implement fork.
2012-02-22 15:56:45 +01:00
Norman Feske 15f0879402 Noux: skeleton for getpid and fork 2012-02-22 15:56:45 +01:00
Norman Feske b6b05a032b Simple fork test and run script
Currently the test is failing because fork is not yet implemented.
2012-02-22 15:56:45 +01:00
Julian Stecklina a6bac95fbd Fix possible NULL-pointer dereference in _stat
When given NULL pointers as buffers to _stat, return EFAULT, just as
Linux and FreeBSD. Fixes #101.
2012-02-14 16:44:42 +01:00
Christian Prochaska f72ab94853 GDB monitor test for automatic testing
The following features are tested (currently on Fiasco.OC only):

- breakpoint in 'main()'
- breakpoint in a shared library function
- stack trace when not in a syscall
- thread info
- single stepping
- handling of segmention fault exception
- stack trace when in a syscall

This patch fixes #105.
2012-02-10 18:46:41 +01:00
Christian Prochaska 8b7252cdde Fix a typo in GDB monitor
This patch fixes #104.
2012-02-10 18:45:36 +01:00
Norman Feske da5bf709e6 Consider count_in in Noux terminal-read function
It does not suffice to constrain the amount of returned data with chunk
size of the transport buffer because the client may have specified an
even smaller value. For example, libreadline reads single characters
from the terminal and expects a single character in return. A different
amount is interpreted as EOF.
2012-01-28 02:54:29 +01:00
Althaf K Backer 31cda45e26 Fixed a typo (added 'require'), fix #87 2012-01-19 20:37:29 +01:00
Norman Feske 0a9d2dda7b Script for running bash interactively on Noux 2012-01-17 10:26:49 +01:00
Norman Feske cc85dc8afb Let GDB monitor use HLT for breakpoints, fix #83
The patch fixes a corner-case problem with using the two-byte 'INT 0'
instruction for breakpoints. The fix changes the breakpoint instruction
to the single-byte 'HLT'. 'HLT' is a privileged instruction and triggers
an exception when executed in user mode. Patch by Christian Prochaska.
2012-01-13 20:07:15 +01:00
Norman Feske 441d672440 Improved interactive GDB monitor run script
The new 'gdb_monitor_interactive.run' script extends the original
'gdb_monitor.run' script with a startup sequence that automates the
initial break-in at the main function of a dynamically linked binary.
Patch by Christian Prochaska.
2012-01-13 20:01:00 +01:00
Norman Feske 76127433b7 Rationale for not quoting single '"' chars 2012-01-12 09:18:34 +01:00
Norman Feske 8c3f832f09 Noux: quote env values, fix #66
When reading the values of environment variables supplied via Genode
config mechanism, the XML attribute values were taken as is. On the libc
side, however, the values are processed using Genode's 'Arg_string'
functions. When unquoted, 'Arg_string' expects values to be either
identifiers or numbers. In the general case, however, env values cannot
be expected to satisfy these requirements. Hence, it is better to always
quote these values when reading the XML config. An alternative (maybe
better) solution would be to not use the 'Arg_string' classes in the
libc side.
2012-01-12 09:18:13 +01:00
Julian Stecklina 3c54d39307 Provide a default implementation of chdir, fix #68
The default implementation relies on the sequence open, fchdir, close.
Enable this implementation for the Noux libc plugin.
2012-01-12 09:17:14 +01:00
Norman Feske 08ce32215d Bump year in copyright headers to 2012 2012-01-03 15:35:05 +01:00
Norman Feske b5d7a75a22 Return ECHO flag from TIOCGETA ioctl
This patch sets the ECHO flag for the TIOCGETA ioctrl operation. This
flag is examined by libreadline to control the policy of echoing user
input. This patch in needed to run bash in interactive mode in Noux.
2012-01-02 17:09:18 +01:00
Genode Labs da4e1feaa5 Imported Genode release 11.11 2011-12-22 16:19:25 +01:00