Commit Graph

122 Commits

Author SHA1 Message Date
Sebastian Sumpf 2faca15b2b base-foc: Set executable bit when mapping pages
If these are not set, this leads to page faults, during code execution on
x86_64, ARM, and x86_32 with PAE enabled.
2013-05-18 11:23:02 +02:00
Christian Prochaska 562ac7d059 64-bit fixes
Fixes #734.
2013-05-10 11:16:12 +02:00
Alexander Boettcher 138a37765f run: add support for IP power switch NETIO-230B 2013-05-10 11:16:12 +02:00
Alexander Boettcher 94629ad493 run: adjust lwip pingpong test for x86 2013-05-10 11:16:11 +02:00
Christian Prochaska cab27dd713 run: adjust lwip pingpong test for foc_arndale 2013-05-10 11:16:10 +02:00
Alexander Boettcher 85c6640795 run: add support to specify 'serial' via RUN_OPT
If the target machine is connected locally one may specify
"serial" as target in the RUN_OPT variable to get the test output.

Used for panda and arndale on foc and hw.
2013-05-10 11:16:10 +02:00
Alexander Boettcher 2a761c7fea run: extend genode_until_run by a spawn id
genode_until_run can be called now with a spawn id to able to reattach to a
spawned process (amt, serial output). Run scripts can now call genode_until_run
multiple times.
2013-05-08 09:42:44 +02:00
Norman Feske 09e04d6378 Avoid leakage of signal-source reply capabilities
Issue #717
2013-05-07 21:56:06 +02:00
Stefan Kalkowski 8e9e866161 Unify framebuffer driver binary names (fix #720)
Introduce 'framebuffer' SPEC variable to distinguish hardware framebuffer
drivers furthermore from the SDL framebuffer driver used by Genode/Linux.
2013-05-07 13:04:30 +02:00
Alexander Boettcher 8a393183e9 run: PXE+AMT support for x86 kernels
Issue #679
2013-04-12 10:56:27 +02:00
Alexander Boettcher 455f606f31 run: add Pulsar PXE boot support for x86 kernels
Issue #679
2013-04-12 10:56:27 +02:00
Alexander Boettcher fff1a374ed run: add Intel AMT support to x86 kernels
Issue #679
2013-04-12 10:56:27 +02:00
Stefan Kalkowski 074e522990 base-foc: introduce state in platform thread
When destroying a thread, which was not bound to a protection domain via kernel
primitives beforehand, it is critical to change the pager and exregs the thread
in the destruction process. Therefore, this commit introduces two thread states:
DEAD and RUNNING. On the basis of the thread state, we can decide whether to
reset the thread before destroying it, or not.
2013-03-26 17:59:44 +01:00
Norman Feske 297538678e foc: Create thread at core at construction time
Originally, a thread was created at core not before calling the 'start'
function. In order to configure the thread affinity before starting the
thread, we have to make the thread known at core right at construction
time. This patch moves the needed thread-creation sequence from the
'start' function to the '_init_platform_thread' function.
2013-03-21 12:47:42 +01:00
Sebastian Sumpf 3ae2c1712e base-foc: Do not touch memory during map operation
Don't do anything in Mapping::prepare_map_operation.  At this point and in the
current implementation, the memory has been mapped and cleared already. Touching
the memory may only pollute the cache causing data corruption in DMA memory.

Fixes issue #452
2013-03-20 10:06:16 +01:00
Christian Prochaska 452624e1a6 Fiasco(.OC) KDB UART driver
The KDB UART driver uses the Fiasco(.OC) kernel debugger console as backend
for input and output. This is useful in the case that only one UART is
available.

Fixes #665.
2013-03-18 15:28:16 +01:00
Norman Feske 171aa332b7 foc: Extend irq mode heuristics
Explicitly set default mode for legacy interrupts to not rely on kernel
default settings. This patch fixes the constantly busy IRQ threads for
IRQ 1 and 12 as soon as the PS/2 driver was loaded until the point when
the first IRQ occurred.
2013-03-14 19:24:52 +01:00
Norman Feske 91b0578446 foc: Select "thread-ready" bit in pause function 2013-03-14 16:37:29 +01:00
Stefan Kalkowski 0f38335188 base-foc: remove links to obsolete initrd archives
Fix #686
2013-03-14 10:50:33 +01:00
Norman Feske 21de42c45d core: Introduce 'Address_space' interface
The new core-internal 'Address_space' interface enables cores RM service
to flush mappings of a PD in which a given 'Rm_client' thread resides.
Prior this patch, each platform invented their own way to flush mappings
in the respective 'rm_session_support.cc' implementation. However, those
implementations used to deal poorly with some corner cases. In
particular, if a PD session was destroyed prior a RM session, the RM
session would try to use no longer existing PD session. The new
'Address_space' uses the just added weak-pointer mechanism to deal with
this issue.

Furthermore, the generic 'Rm_session_component::detach' function has
been improved to avoid duplicated unmap operations for platforms that
implement the 'Address_space' interface. Therefore, it is related to
issue #595. Right now, this is OKL4 only, but other platforms will follow.
2013-03-12 21:53:08 +01:00
Christian Helmuth 05b7c3ae3d base-foc: Improve documentation of signal_session
Fixes #566.
2013-03-06 11:23:52 +01:00
Christian Prochaska 621b579023 base-foc: fix 'core' build for Arndale
Fixes #671.
2013-02-26 12:56:44 +01:00
Christian Prochaska a99193ad90 Rework the internal lock interface
With this patch, the 'futex' syscall gets used for blocking and unblocking
of threads in the Linux-specific lock implementation.

The 'Native_thread_id' type, which was previously used in the
lock-internal 'Applicant' class to identify a thread to be woken up,
was not suitable anymore for implementing this change. With this patch,
the 'Thread_base*' type gets used instead, which also has the positive
effect of making the public 'cancelable_lock.h' header file
platform-independent.

Fixes #646.
2013-02-25 22:14:21 +01:00
Christian Prochaska 2664afbd7d Remove context area from physical RAM allocator
In base-fiasco, base-foc and base-pistachio, physical memory gets mapped
1:1 to core virtual memory. When the 'Ram_session_component' allocates
physical memory for a client, it zeroes out the corresponding area in
core's virtual address space and then maps the area to the client. If this
area overlaps with core's virtual thread context area (usually at
0x40000000-0x4fffffff), the stack of one or more core threads can get
overwritten.

To avoid this problem, with this patch, the thread context area gets
removed from the physical RAM allocator on these platforms.

Fixes #660.
2013-02-25 16:45:49 +01:00
Sebastian Sumpf ebc76fc13b foc: SVN revision r47 2013-02-25 16:45:49 +01:00
Sebastian Sumpf 79949bb338 foc: Add 'uboot' spec to Arndale 2013-02-25 16:45:48 +01:00
Sebastian Sumpf f9ba60e501 foc: Make context area configurable in core
Make 'context_area_virtual_base' platform configurable. On Arndale, we
need to move the context area to a location that does not interfere with
the address range of physical memory.
2013-02-25 16:45:48 +01:00
Sebastian Sumpf 6e034efca4 foc: Use L2-cache synchronization calls
Replace L1 cache clean operations with L2 versions.
2013-02-25 16:45:48 +01:00
Sebastian Sumpf f3ba58059a foc: Arndale kernel configuration 2013-02-25 16:45:48 +01:00
Sebastian Sumpf b10d6deb37 foc: Change core's base address 2013-02-25 16:45:48 +01:00
Sebastian Sumpf 7389e364fa Arndale: Build uImage, kernel, bootstrap 2013-02-25 16:45:48 +01:00
Sebastian Sumpf 805d5050f7 base-foc: Generate u-boot image if 'uboot' SPEC is set 2013-02-25 16:45:48 +01:00
Sebastian Sumpf 554876ceee foc_arndale: Added 'create_buildir' support 2013-02-25 16:45:47 +01:00
Sebastian Sumpf fe13cd2938 foc: SVN revision r42 2013-02-25 16:45:47 +01:00
Sebastian Sumpf 0ef936a1a0 foc: Use git for contrib preparation
Download Fiasco.OC/L4RE from our 'GitHub' fork. Deleted all patches.
2013-02-25 16:45:47 +01:00
Martin Stein 0f8803245a base: make signal framework usable for base-hw
ref #641
2013-02-22 20:28:28 +01:00
Norman Feske fae63f4fa9 Merge base libraries into a single library
This patch simplifies the way of how Genode's base libraries are
organized. Originally, the base API was implemented in the form of many
small libraries such as 'thread', 'env', 'server', etc. Most of them
used to consist of only a small number of files. Because those libraries
are incorporated in any build, the checking of their inter-dependencies
made the build process more verbose than desired. Also, the number of
libraries and their roles (core only, non-core only, shared by both core
and non-core) were not easy to capture.

Hereby, the base libraries have been reduced to the following few
libraries:

- startup.mk contains the startup code for normal Genode processes.
  On some platform, core is able to use the library as well.
- base-common.mk contains the parts of the base library that are
  identical by core and non-core processes.
- base.mk contains the complete base API implementation for non-core
  processes

Consequently, the 'LIBS' declaration in 'target.mk' files becomes
simpler as well. In the most simple case, only the 'base' library must
be mentioned.

Fixes #18
2013-02-19 14:45:55 +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
Norman Feske b1f63e3356 Turn 'platform_env.h' into a private header
This patch removes 'platform_env.h' from the public API headers because
this header was not part of the API anyway.
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 bef78dd9f8 Core: Fix registration of CPU exception handler 2013-01-11 22:16:25 +01:00
Norman Feske 73ab30c22c Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
Alexander Boettcher e8c063a8b4 base: release signal context from signal list
Remove signal context object from signal source component list (_signal_queue)
before destruction, otherwise we get a dangling pointer.

On native hardware for base-nova, the signal source thread triggered page
faults in the Signal_source_component::wait_for_signal() method when the signal
context got freed up in Signal_session_component::free_context but was still
enqueued in Signal_source_component::_signal_queue.

Fixes #600
2013-01-10 21:17:42 +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
Norman Feske 9f82764316 core: Introduce default CPU exception handler
The CPU session interfaces comes with the ability to install an
exception handler per thread. This patch enhances the feature with the
provision of a default signal handler that is used if no thread-specific
handler is installed. The default signal handler can be set by
specifying an invalid thread capability and a valid signal context
capability.

Furthermore, this patch relaxes the requirement of the order of the
calls of 'exception_handler' and 'set_pager'. Originally, the exception
handler could be installed not before setting a pager. Now, we remember
the installed exception handler in the 'Cpu_thread' and propagate to to
the platform thread at a later time.
2013-01-04 15:26:16 +01:00
Alexander Boettcher 8c4e1b7eb0 base: extend cap_session with memory allocator
Required to allocate memory to remember per session created capabilities.
During session destruction all capabilities have to be freed up.
2012-12-21 14:54:20 +01:00
Stefan Kalkowski bc38a13353 Fiasco.OC: only access valid UTCB (fix #547)
If no platform thread was created before somebody destroys a thread object,
there is no valid UTCB available. Thereby, we've to check this before accessing
the UTCB when destroying a thread object.
2012-12-05 14:01:23 +01:00
Christian Prochaska 42cef716e1 CPU session meta data RAM quota upgrade support
Fixes #541.
2012-11-30 16:27:29 +01:00
Alexander Boettcher fa2cbdc7cb Fix: don't deference stale pager pointer in core
Reset pager pointer in platform_thread if pager object is removed.

Fixes #532
2012-11-29 13:44:07 +01:00