Commit Graph

505 Commits

Author SHA1 Message Date
Alexander Boettcher
2f84fd0434 NOVA: allocate stack size depending on word size 2012-08-09 11:09:41 +02:00
Alexander Boettcher
f1fa55e804 NOVA: Suppress warnings in rpc_entrypoint 2012-08-09 11:09:41 +02:00
Alexander Boettcher
5620eca7b9 NOVA: force to map cap in pd_session::assing_pd 2012-08-09 11:09:41 +02:00
Alexander Boettcher
9c57fd7229 NOVA: delegate EC cap solely with recall right
Vancouver recalls the vCPU in the vCPU dispatcher code. Enable the right bit
in the mapped native cap so that Vancouver actually is able to perform this
operation.
2012-08-09 11:09:41 +02:00
Alexander Boettcher
4155585267 NOVA: Adjust native_capability type
It now can hold a right bit used during IPC to demote rights of the to be
transfered capability.

The local_name field in the native_capability type is not needed anymore
in NOVA. Simplify the class, remove it from constructors and adapt all
invocations in base-nova.

Unfortunately local_name in struct Raw is still used in generic base code
(process.cc, reload_parent_cap.cc), however has no effect in base-nova.
2012-08-09 11:09:41 +02:00
Alexander Boettcher
7550f243ad NOVA: use cap_session to allocate portals 2012-08-09 11:09:41 +02:00
Alexander Boettcher
0a89d8dbb4 NOVA: extend cpu_session for base-nova 2012-08-09 11:09:40 +02:00
Alexander Boettcher
cb859a4785 NOVA: extend cap session for base-nova 2012-08-09 11:09:40 +02:00
Alexander Boettcher
7aa75477e2 Propagate status code of Thread state and start 2012-08-09 11:09:40 +02:00
Alexander Boettcher
ddd4b9633d NOVA: add rights mask and enums for kernel errors 2012-08-09 11:09:40 +02:00
Alexander Boettcher
755ed3dc90 NOVA: Use solely unsigned types for selectors 2012-08-09 11:09:40 +02:00
Alexander Boettcher
a6d2042d5b NOVA: kernel patch - remove utcb if ec creation fails 2012-08-09 10:24:01 +02:00
Alexander Boettcher
49ab1bbc44 NOVA: kernel patch - deliver only local portal id 2012-08-09 10:24:01 +02:00
Alexander Boettcher
998ebfc01b NOVA: Fix cleanup of received capabilities, #268
MsgBuf has to keep the number of received capabilities in order
to free/know correctly unused and unwanted capabilities. Explicitly
call rcv_msg->post_ipc to store this information in a MsgBuf.

Don't reset rcv_msg in ipc.cc, since this is used during
un-marshalling of caps in ipc.h afterwards. The MsgBuf is reseted when its
de-constructor is called.
2012-08-09 10:24:01 +02:00
Alexander Boettcher
e829288069 NOVA: remove global unique ids for user objects
With this patch solely the local ids are used, no global unique ids
are transfered anymore during IPC.

demo.run, signal.run, noux_tool_chain.run works up to the same
point as before the patches for issue #268.

Fixes #268
2012-08-09 10:24:01 +02:00
Alexander Boettcher
54ed373468 NOVA: translate item patch, issue #268
Unfortunately, another kernel patch is required for Genode/NOVA to get rid
of global unique ids for objects (issue #268).

Kernel patch:

If a translate of a object capability item inside the same PD
(receiver/sender in same PD) is not successful then he very same item is
returned instead of the null item.

Genode:

Some code in Genode try to map/translate the "root" (the first instance of a)
object capability within the same PD. The translate fails since it is the
first cap and was not delegated beforehand. Instead the cap gets mapped to a
new capability index due to xlt_rcv kernel item patch.

The new local object capability index is used to lookup manged objects
in lists, which however fails because the object is only known by the original
object capability index.

Unfortunately, this happens not only once. Below one example trace and
description is attached.

There are several possible solutions possible:
* Find all places in Genode and replace normal function calls between objects
  with IPC calls, such that all capabilities can be translated during IPC.
** Time consuming to find all spots
** Rather platform specific issue requires re-adjustments in generic Genode
   code
** Not trivial to ever remember this fact during development of new components
   [other platforms have not such a issue, however have global object ids]
** Neither good in terms of performance.

* Use some special system call to the kernel to be able to translate a given
  capability index as long until you find the requested original index.
  (Obviously ...  no comment).

* Kernel patch as this one.

* <your proposal>

Example trace + code description showing the behavior above:

int main(): --- create local services ---
int main(): --- start init ---
[0] DEL OBJ PD:0xc000aa80->0xc000aa80 SB:0x000000aa RB:0x000000ac O:0x00 A:0x1f
int main(): transferred 42 MB to init
[0] DEL OBJ PD:0xc000aa80->0xc000aa80 SB:0x00000120 RB:0x0000013c O:0x00 A:0x1f
[0] DEL OBJ PD:0xc000aa80->0xc000aa80 SB:0x0000016c RB:0x00000168 O:0x00 A:0x1f
Setup ELF failed
[0] XLT OBJ PD:0xc000aa80->0xc000aa80 SB:0x00000168 RB:0x0000016c O:0x00
unknown exception?
int main(): --- init created, waiting for exit condition ---

thread   - file - line - text
-------------------------------------------------------------------------------
thread A - [ 0] -  228 - new Core_child(... rom_session.dataspace() ...)
thread A - [ 1] -   27 - IPC call    - ask for dataspace cap
thread B - [ 2] -   49 - function    - return dataspace cap index 0x120
thread A - [ 1] -   27 - IPC returned - map 0x120 -> 0x13c, translate failed
thread A - ...
thread A - [ 3] -  231 - call _setup_elf()
thread A - [ 3] -   60 - call env->rm_session()->attach()
thread A - [ 4] -   35 - do dataspace object lookup (0x13c)
thread A - [ 4] -   36 - lookup failed (object known as 0x120), throw Exception
thread A - [ 3] -   61 - catch Exception -> return error code "0"
thread A - [ 3] -  233 - "Setup ELF failed" - because error code "0"

File legend:

[0] base/src/core/main.cc
[1] base/include/rom_session/client.h
[2] base-nova/src/core/include/core_rm_session.h
[3] base/src/base/process/process.cc
[4] base-nova/src/core/core_rm_session.cc
2012-08-09 10:24:00 +02:00
Alexander Boettcher
40b40b33c6 NOVA: apply #4 patch to use only local ids, #268 2012-08-09 10:24:00 +02:00
Alexander Boettcher
b748d1f17f NOVA: use only local ids in pager code, issue #268 2012-08-09 10:24:00 +02:00
Alexander Boettcher
529a25e190 NOVA: enable map-translate transfer item use, #268 2012-08-09 10:24:00 +02:00
Alexander Boettcher
2b161b7aff NOVA: use translate feature of kernel, issue #268
Kernel patch:
Introduce a transfer item type to express that a cap should be translated
and if this fails to map it instead.

It would be possible without this combined transfer item type however
with additional overhead. In this case Genode/NOVA would
have to map and translate all caps used as parameter in IPC. It would look
like this:
* If the map and translation succeed, the cap at the new cap index
  would have to be revoked. Then the translated cap index can be used.
* If the map succeeds and the translation fails then the mapped cap index
  can be used.
* It would become complicated when multiple caps are mapped and translated
  and only some of the translation succeed. In such cases Genode would have
  to figure out the right relation of translated/mapped and not
  translated/mapped caps. It would require to make some assumption about the
  order how translated/mapped caps are reported at the UTCB by the kernel.
All the points above lead to the decision to create a separate transfer item
type for that.

Genode:
Most the times the translation succeeds, mapping of caps happens either
seldom. This takes now a bit the pressure of not enough aligned receive
cap windows as described in issue #247.

The patch mainly adds adjustments to handle the
translated and mapped caps correctly especially during freeing of the
receive window (don't free translated cap indexes).

Fixes #268
2012-08-09 10:24:00 +02:00
Alexander Boettcher
44ef8912d6 Add a bit array and bit allocator, issue #247
Add a allocator using bit maps to maintain used/unused caps.
It supports the allocation of 2^n aligned caps solely and
freeing of caps.

Fixes #247
2012-08-09 10:23:55 +02:00
Norman Feske
67fdc1b44b Increase quota of USB driver
The additional quota is needed because of the recent performance
optimizations of the USB/networking code, e.g., to support the
increased NIC packet-stream buffer size.
2012-08-08 12:32:13 +02:00
Christian Prochaska
a55b883146 Noux: fix setup of child environment
Fixes #315.
2012-08-07 22:27:53 +02:00
Norman Feske
a5e95167d9 L4Lx: downsize priority of multi-linux instances 2012-08-07 22:26:34 +02:00
Stefan Kalkowski
4753aee540 Fiasco.OC: hold irq-objects in core for resignment 2012-08-07 22:24:46 +02:00
Stefan Kalkowski
5118b5e1e6 L4Linux: make the l4lx library less verbose. 2012-08-07 22:24:23 +02:00
Sebastian Sumpf
3736b8b2f2 Nic_bridge: Use Nic::Packet_allocator
Calculate TX and RX dataspace sizes correctly.
2012-08-07 22:23:00 +02:00
Sebastian Sumpf
3207b4eed0 USB: Performance improvements
Added SKB bitmap allocator, use Nic::Packet_allocator in packet stream, use slab
allocators on top of back-end AVL allocator, split allocators in cached/uncached
for general purpose/DMA allocation, added patch to original code to distinguish
cached or uncached memory requests, take advantage of and implement TX bursts
(or SKB batching), call interrupt handlers until they return unhandled.
2012-08-07 22:22:45 +02:00
Sebastian Sumpf
8734eab6ac L4LX: Network interface fixes
Make calls using IPCs IRQ safe, handle packet exhaustion, removed
'Packet_pool', tweak TCP rmem and wmem buffer sizes to show better performance
results, use 'Net::Packet_allocator, fix 'update-patch' Makefile command
2012-08-07 22:22:28 +02:00
Sebastian Sumpf
18d005264e Nic: Added 'Nic::Packet_allocator'
This is a bitmap-range allocator that can be used in packet streams.
2012-08-07 22:22:06 +02:00
Sebastian Sumpf
88ac32e3bb Base: New 'memcpy' implementation
Added CPU specific memcpy function ('memcpy_cpu'), which is tried first in
default 'memcpy'. Improved default 'memcpy' to copy eight byte chunks.
2012-08-07 22:21:54 +02:00
Sebastian Sumpf
ae88dc233c ACPI: Increase quota of PCI service
Some tests trigger memory exhaustions of the PCI-slave service used by the
ACPI-driver.
2012-08-07 22:21:37 +02:00
Martin Stein
ff65f6f021 Run Genode directly on hardware with 'base-hw'. 2012-08-03 12:06:37 +02:00
Martin Stein
8220ea272c Timer session and timer test for 'base-hw'. 2012-08-03 12:06:36 +02:00
Martin Stein
4c710e853b Extend create_builddir for the base-hw platforms. 2012-08-03 12:06:36 +02:00
Norman Feske
d079ef51ae Adapt GDB monitor and Noux to CPU session changes 2012-08-03 12:06:31 +02:00
Martin Stein
9369057f90 Extend RAM/CPU session for base-hw context-areas. 2012-08-02 16:41:21 +02:00
Martin Stein
2e918da325 Enhance specs that concern 'base-hw'.
Add specs for the PandaboardBoard A2 and according devices.

Refine axisting specs for Cortex A9 systems.
2012-08-02 16:41:21 +02:00
Martin Stein
9b0a54e980 Fix several bugs in the Cortex A9 drivers.
Avoid the use of deprecated 'MASK' enum in CPU register 'Asid'.

Enable the use of the 'K' bit in MMU translations.

Treat any try to modify existing valid entries in section- and
pagetables when doing 'insert_translation' as error.

Beautify concerned files.
2012-08-02 16:41:21 +02:00
Christian Prochaska
23772b620f libc_fs: return resulting offset in 'lseek()'
Fixes #314.
2012-08-02 15:06:35 +02:00
Norman Feske
914897cf71 Adapt noux.run to recent changes of exit handling 2012-08-01 14:45:21 +02:00
Christian Prochaska
6c68850524 Noux: add virtual '~Vfs_handle()' destructor
This patch adds a virtual destructor to the 'Vfs_handle' class to have
subclass destructors called on 'destroy()' on a base class pointer.

Fixes #305.
2012-08-01 12:48:26 +02:00
Christian Prochaska
c708a28eff ffat_fs: don't throw exception in 'close()'
The 'close()' function is not supposed to throw any exceptions.

Fixes #304.
2012-08-01 12:47:50 +02:00
Christian Prochaska
fa541b4545 libc_noux: fix 'read()' function
This patch fixes the problem that data in the read buffer would get
overwritten in cases where multiple 'read()' syscalls are necessary.

Fixes #303.
2012-08-01 12:47:15 +02:00
Christian Prochaska
d6d45f870e ram_fs: fix recursive 'lookup_and_lock()' calls
With this patch the 'Directory::lookup_and_lock()' function passes its
'return_parent' argument to recursive calls of itself.

Fixes #306.
2012-08-01 12:45:10 +02:00
Christian Prochaska
4caaba64c3 libc: call 'genode_exit()' in '_exit()'
With this patch the libc '_exit()' function calls the 'genode_exit()'
function to get the registered exit handlers called.

Fixes #308.
2012-07-31 12:08:58 +02:00
Stefan Kalkowski
23f11a4dca Add run-script to start multiple Linux' 2012-07-31 12:08:15 +02:00
Martin Stein
66bec10276 Fix bug in MMIO framework and test it
Avoid that members of a inheritor overlay those of the
register- and MMIO-framework.

Beautify register- and MMIO-framework.
2012-07-31 12:08:03 +02:00
Norman Feske
e6b72030d3 Simplify run scripts 2012-07-27 17:00:44 +02:00
Norman Feske
eb70f28fff News about NOVA on x86_64 2012-07-27 13:23:06 +02:00