Commit Graph

642 Commits

Author SHA1 Message Date
Norman Feske b57c629449 Adapt timer quota to change in 'Allocator_avl' 2012-09-18 17:14:28 +02:00
Stefan Kalkowski 689c08e411 Make first block of allocator_avl 64bit fit
The first metadata-block, which is inherent part of the allocator object
itself has a fixed size which isn't suitable enough for some 64bit platforms
(e.g. core's RAM-allocator on a 64bit platform with lots of different regions).
This commit let the block size be address-width aware.
2012-09-18 16:47:59 +02:00
Stefan Kalkowski 361a67d749 Fiasco.OC: fix io-port fault answer in sigma0
In sigma0 normally no answer tag to a request/fault is created. It simply uses
the message tag received with the request. This doesn't work out when I/O ports
are requested. This patch constructs an appropriate answer tag. Moreover,
we have to enable I/O port protection in the kernel configuration.
2012-09-18 16:47:59 +02:00
Norman Feske 3e406a1077 Increase quota of USB driver
The memory allocation heuristics in the usb driver provided by dde_linux
changed with the recent commit 71b2b42936.
Apparently, the new variant requires a larger memory pool. Increasing
the quota is a temporary fix until the memory allocator gets revisited.
2012-09-18 10:53:17 +02:00
Stefan Kalkowski efe3b8af74 L4Linux: update to recent version (svn rev. 25) 2012-09-18 10:53:16 +02:00
Stefan Kalkowski 1e87ef627b Fiasco.OC: update to recent version (svn rev. 40) 2012-09-18 10:53:16 +02:00
Josef Söntgen 6259fcf736 libports: add lwIP tests for Pandaboard on foc 2012-09-18 10:52:57 +02:00
Norman Feske b22920c3a7 Enable noux_bash and noux_gdb on Pandaboard 2012-09-17 15:18:34 +02:00
Stefan Kalkowski 760f37fc86 Fiasco.OC: enable SMP for L4Linux
This commit comprises the following changes to enable L4Linux to use several
CPUs:
* change default configuration for x86 and ARM
* add atomic cmpxchg operation to l4re library
* implement l4_sleep (per thread)
* enable setting affinity for VCPUs and IRQs
* move "per CPU" section within linker-script (x86 only)
* introduce SMP run-script for pandaboard
* deactivate direct scheduler (Fiasco.OC syscall) access by L4Linux
2012-09-14 12:30:29 +02:00
Stefan Kalkowski c63f3c07de Fiasco.OC: implement thread-affinity function 2012-09-14 12:29:58 +02:00
Josef Söntgen 83dd1640fc Noux: fix SYSCALL_READ return value
There is an error if reading from a Io_channel returns -1. In this
case the syscall should fail.

Fixes #356.
2012-09-14 12:24:13 +02:00
Christian Prochaska 97308f963a ffat_fs: work with absolute paths
The recently added 'Genode::Path' class makes it easy to create absolute
paths. With this patch the 'ffat_fs' server uses the 'Genode::Path' class
where possible instead of working with 'f_chdir()' and relative paths.
This also solves the problem reported in issue #355, which was caused by
storing a relative file name in the 'File' node.

Fixes #355.
2012-09-14 12:23:26 +02:00
Christian Prochaska d6402041bc Noux: return dummy time in 'gettimeofday()'
The 'find' program can abort if the 'gettimeofday()' function returns -1,
which it currently does. With this patch the 'gettimeofday()' returns a
dummy time instead to prevent such a termination.

Fixes #353.
2012-09-14 12:21:54 +02:00
Christian Prochaska 4b81cf3e63 Noux: fix 'Vfs_io_channel::lseek()' calculations
With this patch the 'Vfs_io_channel::lseek()' function takes the offset
argument into account when calculating the new seek offset in the SEEK_CUR
and SEEK_END cases.

Fixes #352.
2012-09-14 12:21:16 +02:00
Christian Prochaska 4ab9782b8b Noux: use correct member in Vfs_io_channel::size()
Fixes #351.
2012-09-14 12:20:33 +02:00
Christian Prochaska 3cfc691c77 libc_fs: handle 'Packet_alloc_failed' exception
With this patch, when a 'Packet_alloc_failed' exception occurs in the
'write()' function, the function waits for a packet acknowledgement and
the release of the packet and then tries the packet allocation again.

Fixes #348.
2012-09-14 12:13:05 +02:00
Alexander Boettcher 6994f6a8c5 Fix binary size for 64bit
Every 64-bit binary is effectively 4M too big currently [0]. The GNU linker ld
aligns the text section of the binary to the maximum page size. On i386
the default section alignment is fixed typically to 4K.

Avoid wasting mainly 4M on x86_64 by telling the linker the max page size to
be 4K.

[0] http://sourceware.org/ml/binutils/2009-04/msg00099.html
2012-09-05 15:06:52 +02:00
Norman Feske 83bdfea9b0 Extend Cpu_session with thread-affinity API
This patch introduces the functions 'affinity' and 'num_cpus' to the CPU
session interface. The interface extension will allow the assignment of
individual threads to CPUs. At this point, it is just a stub with no
actual platform support.
2012-09-05 10:25:04 +02:00
Norman Feske 43db231e77 Adapt Qt4 to change of stdcxx, issue #339
The new C++ standard library provided by libports is a shared library.
We need to include it in each run script that uses Qt4.
2012-09-04 12:38:06 +02:00
Norman Feske 9651974448 Add stdcxx-4.6.1 to libports, fix #339
This patch adds libstdc++ to libports. With the previous version of the
stdcxx library, the build system used the C++ standard library that
comes with the compiler. This mechanism was prone to inconsistencies of
types defined in the header files used at compile time of the tool chain
and the types provided by our libc. By building the C++ standard library
as part of the Genode build process, such inconsistencies cannot happen
anymore.

Note that the patch changes the meaning of the 'stdcxx' library for
users that happened to rely on 'stdcxx' for hybrid Linux/Genode
applications. For such uses, the original mechanism is still available,
in the renamed form of 'toolchain_stdcxx'.
2012-09-04 12:37:56 +02:00
Josef Söntgen f7dd8aa688 libports: adjust lwip's TCP_SND_BUF size
The old values were much too small and the current ones are probably to
large but the TCP send throuhgput has increased noticeable (a few MiB/s
on the Pandaboard).

Fixes #343.
2012-09-03 11:10:39 +02:00
Taru Karttunen bff86ab74d libc_terminal: TIOCGETA return always echo on 2012-09-03 11:05:23 +02:00
Taru Karttunen 27bbaf75ba libc_terminal: add fstat and fake some ioctls, fix #344 2012-09-03 11:05:00 +02:00
Stefan Kalkowski 28614ce518 Fiasco.OC: fix capability ref-counter issue in core
The Cap_mapping abstraction in core shouldn't use a Cap_index directly, but
use Native_capability instead, as it can break reference-counting, as long as
the same Cap_index gets used in a Cap_mapping and a Native_capability. This
commit finally fixes #208.
2012-09-03 11:00:09 +02:00
Stefan Kalkowski a5ea6765d1 Fiasco.OC: several capability ref-counter fixes.
This commit fixes several issues that were triggered e.g. by the
'noux_tool_chain' run-script (fix #208 in part). The following problems
are tackled:
* Don't reference count capability selectors within a task that are actually
  controlled by core (all beneath 0x200000), because it's undecideable which
  "version" of a capability selector we currently use, e.g. a thread gets
  destroyed and a new one gets created immediately some other thread might
  have a Native_capability pointing to the already destroyed thread's gate
  capability-slot, that is now a new valid one (the one of the new thread)
* In core we cannot invalidate and remove a capability from the so called
  Cap_map before each reference to it is destroyed, so don't do this in
  Cap_session_component::free, but only reference-decrement within there,
  the actual removal can only be done in Cap_map::remove. Because core also
  has to invalidate a capability to be removed in all protection-domains
  we have to implement a core specific Cap_map::remove method
* When a capability gets inserted into the Cap_map, and we detect an old
  invalid entry with the dame id in the tree, don't just overmap that
  invalid entry (as there exist remaining references to it), but just remove
  it from the tree and allocate an new entry.
* Use the Cap_session_component interface to free a Pager_object when it
  gets dissolved, as its also used for allocation
2012-09-03 10:59:54 +02:00
Stefan Kalkowski b71c1649d6 Fiasco.OC: check invoked capability (fix #341)
Let the Fiasco.OC base platform succeed the cap_integrity run-script meaning
that it is not feasible anymore to fake a capability by using a valid one
together with a guessed local_name.
2012-08-30 11:15:27 +02:00
Sebastian Sumpf c98a80251c USB: Sync interrupts
On systems that use multiple UHCI/EHCI controllers, synchronize access to low
level interrupt handler. Let 'device_may_wakeup' return 1, so suspended
controllers will send interrupts upon device connection. Make sure URBs are
shutdown upon disconnect.

Fixes #332
2012-08-30 11:12:49 +02:00
Sebastian Sumpf 71b2b42936 USB: Dimension back-end allocators dynamically
Use avaible ram session quota to determine the size of the memory allocators.

Fixes #331
2012-08-30 11:12:32 +02:00
Christian Prochaska 78b0bd57f7 Noux: store environment variables zero-separated
With this patch environment variables always get stored as zero-separated
strings in buffers of type 'Sysio::Env'. This fixes the problem that
environment variables with non-alphanumeric characters did not get set
correctly in child processes.

Fixes #340.
2012-08-30 10:44:53 +02:00
Josef Söntgen 1b9c356aa3 Noux: override uid/gid in SYSCALL_STAT
Change the uid/gid entries in the stat syscall to have the same values
on all filesystems that are used in the current noux-instance according
to the specified values in noux' config.

Fixes #338.
2012-08-30 10:44:22 +02:00
Josef Söntgen 9cff243f42 Noux: add proper errno handling to network funcs
Programs use the errno value to check which error exactly occured.
It is mandatory for non-blocking I/O, e.g. connect() gets the current
state of the connection by looking at the returned errno values.

Fixes #337.
2012-08-30 10:44:06 +02:00
Alexander Boettcher aae3ce348e NOVA: add single-step support used by gdb
Fixes #336
2012-08-30 10:42:38 +02:00
Alexander Boettcher 3b0e4372fe NOVA: setup all exception handlers of a thread 2012-08-30 10:42:38 +02:00
Alexander Boettcher fcd62729d4 NOVA: tunnel thread start parameters via state()
The cpu_session interface fails to be virtualized by gdb_monitor because
platform-nova uses an extended nova_cpu_session interface.

The problem was that threads have been created directly at core without
knowledge of gdb_monitor. This lead to the situation that gdb_monitor didn't
know of all threads to be debugged.

Tunnel the additional parameters required on base-nova through the state()
call of the cpu_session interface before the thread actual is started.
2012-08-30 10:42:26 +02:00
Alexander Boettcher 197a48a26c NOVA: implement pause using recall kernel feature 2012-08-30 10:40:00 +02:00
Alexander Boettcher 841a1fd579 NOVA: extend cpu_session with synchronous pause
The kernel provides a "recall" feature issued on threads to force a thread into
an exception. In the exception the current state of the thread can be obtained
and its execution can be halted/paused.

However, the recall exception is only delivered when the next time the thread
would leave the kernel. That means the delivery is asynchronous and Genode has
to wait until the exception triggered.

Waiting for the exception can either be done in the cpu_session service or
outside the service in the protection domain of the caller.

It turned out that waiting inside the cpu_service is prone to deadlock the
system. The cpu_session interface is one of many session interfaces handled by
the same thread inside Core.

Deadlock situation:
* The caller (thread_c) to pause some thread_p manages to establish the call
  to the cpu_session thread_s of Core but get be interrupted before issuing
  the actual pause (recall) command.
* Now the - to be recalled thread_p - is scheduled and tries to invoke another
  service of Core, like making log output.
* Since the Core thread_s is handling the session request of thread_c, the
  kernel uses the timeslice of thread_p to help to finish the request handled
  by thread_s.
* Thread_s issues the actual pause/recall on thread_p and blocks inside Core
  to wait for the recall exception to be issued.
* thread_p will leave not the kernel before finishing it actual IPC with
  thread_s which is blocked waiting for thread_p.

That is the reason why the waiting/blocking for the recall exception taking
place must be done on NOVA in the context of the caller (thread_1).

Introduce a pause_sync call to the cpu_session which returns a semaphore
capability to the caller. The caller blocks on the semaphore and is woken up
when the pager of thread_p receives the recall exception with the state of
thread_p.
2012-08-30 10:40:00 +02:00
Alexander Boettcher 7595823146 Propagate result of cpu_session::state call
State may fail, don't just return just true.
2012-08-30 10:40:00 +02:00
Alexander Boettcher 0d03a91b80 NOVA: Use thread_state with all registers 2012-08-30 10:40:00 +02:00
Alexander Boettcher 39957d17b2 Enable gdb_monitor for NOVA 2012-08-30 10:40:00 +02:00
Norman Feske 28402eb085 Add 'libports/include/pcre' to '.gitignore' 2012-08-28 20:53:36 +02:00
Norman Feske b7d3601624 Enable 'genode_org.run' examle for Pandaboard 2012-08-23 11:26:19 +02:00
Norman Feske 969cffd53a Release notes for Genode 12.08 2012-08-23 08:42:06 +02:00
Norman Feske 7483245dad News item for Genode 12.08 2012-08-23 08:41:59 +02:00
Norman Feske 3b3e78b52d Updated links in top-level README 2012-08-22 20:42:30 +02:00
Norman Feske 42b09924e1 Update of 'doc/components.txt' 2012-08-22 20:13:36 +02:00
Christian Prochaska 9c278d6b8f libc_fs: release libc file descriptor in 'close()'
Fixes #334.
2012-08-22 16:50:03 +02:00
Christian Prochaska 7f092be94c libc: allocate file descriptor sets on the stack
The 'fd_set' size calculation in the current version of the 'poll()'
function results in an  amount which is smaller than the size of the
'fd_set' data type. With this patch the file descriptor sets get
allocated as plain stack variables.

Fixes #335.
2012-08-22 16:48:35 +02:00
Norman Feske 59a9d1f2b0 Run script for hosting genode.org on Genode
This run script combines the lighttpd web server with the tar_fs file
system to host the genode.org website.
2012-08-22 10:32:03 +02:00
Christian Prochaska 3084c6f500 TAR file system service
This patch implements a service which provides the contents of a tar
archive via the 'File_system::Session' interface.

Configuration:

<config>
	<archive name="tar_archive.tar" />
	<policy label="label_of_client" root="/rootdir/for/client" />
</config>

Fixes #333.
2012-08-22 09:51:31 +02:00
Norman Feske 99ad554bef Minor style fix 2012-08-22 09:51:31 +02:00