Commit Graph

622 Commits

Author SHA1 Message Date
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
Norman Feske
f4881a37c8 libc_noux: fix compile warnings 2012-08-22 09:51:31 +02:00
Josef Söntgen
95f71a5f71 Noux: add is_nonblocking() method
Certain programs tend to set their sockets non-blocking. As previously
descriptors in Noux were only blocking we now introduce a method to mark
the used Io_channel as non-blocking.
2012-08-22 09:51:30 +02:00
Josef Söntgen
343266b06e Noux: add F_GETFL handling to terminal_io_channel
There are certain programms which check if an fd is open by calling
fcntl(fd, F_GETFL, ...). So to keep them happy we return true if
such an request was done to our terminal fd's.
2012-08-22 09:51:30 +02:00
Josef Söntgen
7dfbd9e191 Noux/net: fix write() in socket_io_channel 2012-08-22 09:51:30 +02:00
Josef Söntgen
1c495b79f4 Noux/net: add proper fcntl() to socket_io_channel 2012-08-22 09:51:30 +02:00
Josef Söntgen
a6904b4deb Noux: add F_SETFL to libc_noux's fcntl()
Among other things it is used to set non-blocking mode, so we should
support it (e.g. fcntl(d, F_SETFL, fl | O_NONBLOCK)).
2012-08-22 09:51:30 +02:00
Josef Söntgen
4aac3933b3 Noux: add FIONBIO handling support to libc_noux 2012-08-22 09:51:30 +02:00
Josef Söntgen
8dfb3d5d81 Noux: add cleanup_socket_descriptors() function
When a child exists it makes sure that all remaining socket descriptors
are closed.
2012-08-22 09:51:30 +02:00
Josef Söntgen
2010a74fba Noux/net: add reset_all() method to sd registry
This method is called when a child is exiting to remove all remaining
sockets from the socket descriptor registry to close all sockets.
2012-08-22 09:51:30 +02:00
Josef Söntgen
57b0490fc6 Noux: remove {get,free}addrinfo
This dead-code will not be needed in the future because we now use
libc_resolv.
2012-08-22 09:51:29 +02:00
Josef Söntgen
6aa05e8d46 Noux: add noux-pkg/lynx
Explanation why --disable-rpath-hack is needed:

When building on pistachio_x86 $(LDFLAGS) contains '-L[...]/l4/lib'
which will be transformed by autoconf to '-rpath [...]/l4/lib'.
Now the problem at hand is that we pretend to be FreeBSD when we are
actually not. So autoconf assumes it is valid to use '-path'  when it
is actually not.

Also we use zlib for (de)compressing gzipped streams/files instead of
calling gzip as this currently somewhat buggy.
2012-08-22 09:51:29 +02:00
Josef Söntgen
42c259d9f0 Noux: add noux-pkg/etc
This package provides files in /etc which are needed for domain
resolving etc. pp.
2012-08-22 09:51:29 +02:00
Sebastian Sumpf
3e952f4e49 Demo: Increase quota for 'test_nit'
The quota was insufficient for foc64
2012-08-22 09:51:29 +02:00
Josef Söntgen
fd3b54a4fb Noux: add libc_resolv to noux-pkg/netcat 2012-08-22 09:51:29 +02:00
Josef Söntgen
b7dc9af447 Noux: rename noux-pkg/gnu-netcat
The other GNU based packages do not have a gnu- prefix either.
2012-08-22 09:51:29 +02:00
Norman Feske
2b5cf1342d libc: Dummy fallbacks for user and net support 2012-08-22 09:51:29 +02:00
Norman Feske
4fae082b34 Increase quota of OMAP4 USB driver in demo.run 2012-08-22 09:51:29 +02:00
Alexander Boettcher
5fcdd61a13 NOVA: fix placement of EC cap for recall
Put EC cap next to SM cap of Vcpu_dispatcher and not of the Vcpu.

Thanks @parthy for pointing out the issue.
2012-08-22 09:51:29 +02:00
Alexander Boettcher
125d274bc7 NOVA: fix locking in vancouver
Reported by @parthy.
2012-08-22 09:51:28 +02:00
Josef Söntgen
a4f4a5fb5a Noux: add /dev/null and /dev/zero filesystems
These device are mandatory for most programs (well, at least null
is required to be present for a POSIX compliant OS, which Noux is
actually not). But for proper shell-script support we will need
them anyway.
2012-08-22 09:51:28 +02:00