Commit Graph

61 Commits

Author SHA1 Message Date
Norman Feske 1ab0ae908b base-hw: Adaptation to signal API change
This patch is an interim fix for building base-hw until the signal
implementation is revisited on this platform.
2013-02-14 13:23:37 +01:00
Norman Feske bcdc706f42 Unify 'ipc.h' and 'ipc_generic.h' across platforms
The distinction between 'ipc.h' and 'ipc_generic.h' is no more. The only
use case for platform-specific extensions of the IPC support was the
marshalling of capabilities. However, this case is accommodated by a
function interface ('_marshal_capability', '_unmarshal_capability'). By
moving the implementation of these functions from the headers into the
respective ipc libraries, we can abandon the platform-specific 'ipc.h'
headers.
2013-02-14 13:23:37 +01:00
Norman Feske bbca9912e2 Remove 'Native_lock' type from 'native_types.h' 2013-02-14 13:23:36 +01:00
Alexander Boettcher 9453d319cb base: add remove_client to rm_session
Fixes #13
2013-02-11 12:01:25 +01:00
Norman Feske 73ab30c22c Update copyright headers to 2013 2013-01-10 21:44:47 +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
Martin Stein 0d7c6efa84 base-hw: Platform_thread::cancel_blocking
Ref #589
2013-01-08 11:36:52 +01:00
Martin Stein 1f340cbdd4 base-hw: use Genode::memcpy in kernel.cc
Fix #583
2013-01-08 11:36:52 +01:00
Martin Stein 19398159e1 base-hw: use Genode::memcpy in base/ipc.cc
Ref #583
2013-01-08 11:36:52 +01:00
Martin Stein e6ca122fe3 base-hw & arm: write-through cache on uncached RAM
Fix #473
2013-01-08 11:36:52 +01:00
Martin Stein 4fb5c23a3c base-hw: don't use 'long' unnecessarily
Fix #581
2013-01-08 11:36:52 +01:00
Martin Stein f2e462266e base-hw & cortex_a9: use caches in pagetable walks
Fix #472
2013-01-08 11:36:52 +01:00
Martin Stein 5f7ffe619b base-hw & imx31: use generic EPIT timer in core
Ref #577
2013-01-08 11:36:52 +01:00
Stefan Kalkowski edb48873c1 base-hw & imx53: enable nested init
Fix #575
2013-01-08 11:36:52 +01:00
Martin Stein 7f2f2d9120 base-hw: ease core build
Merge core only libs into the target make-files.

Use base-hw specific Board drivers that inherit
from generic Board_base.

Use Page_flags::access_t instead of additional
page_flags_t.

Fix #570
2013-01-08 11:36:52 +01:00
Martin Stein ee6f25a028 base-hw: reorganize core-driver headers
Ref #570
2013-01-08 11:36:51 +01:00
Martin Stein f1d599ae8a base: rename generic Board drivers Board_base
To enable a repo to name its specific board driver 'Board'.

Fix #569
2013-01-08 11:36:51 +01:00
Martin Stein 8b568a6029 base-hw: env bug that caused missing boot modules
Fixes #420
2013-01-08 11:36:51 +01:00
Martin Stein 9946f2b42f base-hw: fix clean- and alignment-bugs in env
Ref #420
2013-01-08 11:36:51 +01:00
Martin Stein 37864972b3 base-hw: build vea9x4 libs only with vea9x4 spec
Fix #561
2013-01-08 11:36:51 +01:00
Norman Feske dfaecfb5ab Make quota-upgrading message more clear
Fixes #592
2012-12-22 13:04:04 +01:00
Martin Stein e7bdae62ea base-hw: remove unused library startup_core
Fix #560
2012-12-21 14:54:22 +01:00
Ivan Loskutov 5b8a0e5423 Add OMAP4 UART driver
Fixes #444
2012-12-20 14:40:18 +01:00
Martin Stein 240f1e334f base: Don't complete line breaks in UART drivers. 2012-12-07 08:55:16 +01:00
Martin Stein bec35bb4b1 base-hw & imx31: compile error in kernel_support.h
Fix #548
2012-12-05 14:00:06 +01:00
Martin Stein bc24a21658 base-hw: embed kernel space into platform thread
Instead of allocating and freeing the space that is needed for the
kernel thread objects from core, wich is not convenient with the
quota system, platform thread now holds the space as array by
itself.

Unfortunately we cannot measure the space size by a static function
anymore, so kernel thread had to be moved from kernel.cc into its
own header. This way platform thread can use sizeof().

Fix #543
2012-11-30 16:23:16 +01:00
Martin Stein 8037277447 base-hw: reply to IPC without awaiting the next
Fix #544
2012-11-30 16:23:16 +01:00
Martin Stein 1258126986 base_hw: Enable ldso test
Fix #527, fix #350
2012-11-28 22:51:13 +01:00
Norman Feske 0dbb5e1696 Propagate 'Range_allocator::alloc_aligned' errors
This patch reflects eventual allocation errors in a more specific way to
the caller of 'alloc_aligned', in particular out-of-metadata and
out-of-memory are considered as different conditions.

Related to issue #526.
2012-11-28 22:51:09 +01:00
Norman Feske 4c01f261d3 base-hw: add 'Thread_base::join' to core
In the recent change of the RPC-entrypoint destruction, the
'~Rpc_entrypoint' calls 'Thread_base::join'. Hence, we need to provide
an implementation wherever RPC entrypoints are used.
2012-11-27 20:32:06 +01:00
Martin Stein 88b370bda2 base-hw: Full quota upgrading in signal receiver.
Fix #518
2012-11-26 20:58:10 +01:00
Stefan Kalkowski 88316abca1 Merge panda_a2 and panda SPEC (fix #505, fix #506)
There is no obvious reason for having two different SPEC variables, definitions,
and pathes for the Pandaboard platform. It even lead to problems regarding the
omap4 framebuffer driver (look at issue #505 and #506).
2012-11-23 12:20:27 +01:00
Martin Stein 1b73f80350 base-hw: Fix bug in 'thread_resume' syscall. 2012-11-23 12:20:26 +01:00
Martin Stein 05f5999e71 cpu_session: Access thread state by value 2012-11-23 12:20:22 +01:00
Martin Stein 4dadd6a437 base-hw: Read and write whole thread states.
By now there is no use case for read/write a single register
of a thread state. Thus the new syscalls 'read_thread_state' and
'write_thread_state' replace the old ones 'read_register' and
'write_register'.
2012-11-22 09:21:53 +01:00
Martin Stein 6cb89f79e3 base_hw & arm_v7: Use write-back caching.
Add 'resume_faulter' syscall that is similar to 'resume_thread', but
is called only when resuming a thread after resolving its pagefault.
This way the kernel can flush caches after resolving a pagefault. This is
because by now the MMU doesn't use caches when doing a pagetable walk.
2012-11-22 09:21:53 +01:00
Martin Stein 4723b08322 base_hw: Use TLB-specific 'struct Page_flags'.
'Page_flags' maps application-specific memory attributes
to the TLB-specific memory attributes. Thereby it avoids
functions with lots of parameters, by declaring appropriate
bitfields on a single POD value.
2012-11-22 09:21:53 +01:00
Norman Feske 959df5d46b Generalize handling of PD-session arguments
On Linux, we want to attach additional attributes to processes, i.e.,
the chroot location, the designated UID, and GID. Instead of polluting
the generic code with such Linux-specific platform details, I introduced
the new 'Native_pd_args' type, which can be customized for each
platform. The platform-dependent policy of init is factored out in the
new 'pd_args' library.

The new 'base-linux/run/lx_pd_args.run' script can be used to validate
the propagation of those attributes into core.

Note that this patch does not add the interpretation of the new UID and
PID attributes by core. This will be subject of a follow-up patch.

Related to #510.
2012-11-21 20:04:07 +01:00
Norman Feske bcabbe2c92 Add 'Thread_base::join()'
Using the new 'join()' function, the caller can explicitly block for the
completion of the thread's 'entry()' function. The test case for this
feature can be found at 'os/src/test/thread_join'. For hybrid
Linux/Genode programs, the 'Thread_base::join()' does not map directly
to 'pthread_join'. The latter function gets already called by the
destructor of 'Thread_base'. According to the documentation, subsequent
calls of 'pthread_join' for one thread may result in undefined behaviour.
So we use a 'Genode::Lock' on this platform, which is in line with the
other platforms.

Related to #194, #501
2012-11-19 12:43:34 +01:00
Martin Stein 8d03312528 base_hw: Use board-specific 'Core_tlb'.
'Core_tlb' ensures that core never throws pagefaults,
in contrast to its base 'Tlb' that is planned to use displacement
in the future.

'Core_tlb' enables the application of differenet memory attributes
in core, according to the board specific partitioning of the physical
address space. This way it enables caching in core.
2012-11-14 16:36:51 +01:00
Martin Stein 4d2a3de0ee base_hw: Rename 'Software_tlb' 'Tlb'. 2012-11-14 16:36:51 +01:00
Martin Stein dfcf55ff6e base_hw: Implement TLB as member of a kernel PD. 2012-11-14 16:36:51 +01:00
Martin Stein 53156de9f4 base_hw & arm: Memory attributes and light caching.
Enable caches. Core is not cached by now. This is because kernel
creates core space and doesn't know any memory attributes by now.
Cacheable pages are cached write-through without write-allocate.

Caching and write-combining is not supported for IOMEM by now.
2012-11-14 16:36:51 +01:00
Martin Stein 91c27f3f72 base: Tell a mapping wether it maps IO memory. 2012-11-14 16:36:51 +01:00
Martin Stein cfa0a40d5e base_hw & omap4: USB HID and framebuffer driver.
Implement 'Signal_receiver::pending()'.

Provide display-subsystem MMIO.

Avoid method ambiguousness in 'Irq_context' in
'dde_linux/src/drivers/usb/signal/irq.cc'
(it derives from two list element classes when using 'base_hw').

Enables demo scenario with 'hw_panda_a2'.
2012-11-14 16:36:50 +01:00
Martin Stein 612735732a base_hw & omap4: Timer driver.
Fix bug regarding idle thread in thread scheduling in
'base-hw/src/core/kernel.cc'.

Fix regarding signal submit in signal framework in
'base-hw/src/core/kernel.cc'.
2012-11-14 16:36:50 +01:00
Martin Stein 31d57a6257 Nested init on i.MX31 via base_hw. Rework base_hw.
Implies support for the ARMv6 architecture through 'base-hw'.

Get rid of 'base/include/drivers' expect of 'base/include/drivers/uart'.

Merge with the support for trustzone on VEA9X4 that came from
Stefan Kalkowski.

Leave board drivers in 'base/include/platform'.

Rework structure of the other drivers that were moved to
'base_hw/src/core' and those that came with the trustzone support.

Beautify further stuff in 'base_hw'.

Test 'nested_init' with 'hw_imx31' (hardware) and 'hw_panda_a2' (hardware),
'demo' and 'signal' with 'hw_pbxa9' (qemu) and 'hw_vea9x4'
(hardware, no trustzone), and 'vmm' with 'hw_vea9x4'
(hardware, with trustzone).
2012-11-14 16:36:41 +01:00
Christian Prochaska dc205e6937 base-hw: fix compile error with GCC 4.7
Fixes #438.
2012-10-30 17:47:52 +01:00
Stefan Kalkowski 8393ac6895 base-hw: implement vm_session for TrustZone
* Introduces Schedule_context
* Use fast-interrupts or normal interrupts
* Add mode-transition between secure/non-secure world
* Limit system resources for Genode apps due to non-secure world

This commit implements the newly introduced Vm session interface to be used
on top of TrustZone capable Armv7 CPUs. Therefore a new Schedule_context is
introduced in the kernel. Threads and Vms are both Schedule_contexts used
by the scheduler. In contrast to a thread a vm uses a different assembler
mode switch to the non-secure, virtual world, as well as another exception
is used, when the non-secure world is left. For both worlds to co-exist
the interrupt-controller needs to be configured, so that the secure (Genode)
world uses fast-interrupts only, and the non-secure world only legacy
interrupts.
The only TrustZone capable platform the base-hw kernel works on top of
is the CoreTile Express 9x4 for the Versatile Express motherboard. For a
virtual machine working properly on top some platform resources must be
reserved. Therefore there exist two flavours of this platform now, one with
the 'trustzone' spec-variable enabled, and one without. If 'trustzone' is
specified most platform resources (DDR-RAM, and most IRQs) are reserved
for the Vm and not available to the secure Genode world.
2012-10-29 10:08:30 +01:00
Stefan Kalkowski 965ffc1df2 base-hw: increase signal session initial quota 2012-10-29 10:08:29 +01:00