Commit Graph

80 Commits

Author SHA1 Message Date
Stefan Kalkowski 73eb7a8d4b hw: map core on demand (fix #723)
Instead of mapping all physical memory 1:1 into core/kernel's address space,
this commit limits the 1:1 mapping to the binary image, and I/O memory
regions used by the kernel only. All subsequent memory accesses of core
are done by mapping the corresponding memory on demand, and not necessarily
1:1.

This commit has several side effects:

The page table code had to be revisited completely. The kernel inserts no
longer anything into the page tables, apart from the initial translations
to have the core/kernel image available when enabling the MMU. The page
tables and higher level translation tables are no longer named Tlb, but
Translation_table instead. There is no indirection class required to define
the translation tables of a concrete SoC, the appropriated ARM specifier
is sufficient.
The ability to map core's memory the same way like it's done for all other
protection domains, makes a special treatment of core's threads (no context
area) obsolete.

Ref #567 (partly solves it)
Fix #723
Fix #1068
2014-05-07 10:37:39 +02:00
Stefan Kalkowski 34b18e9da2 hw: restrict processor broadcast to TLB flushing
Removes the generic processor broadcast function call. By now, that call
was used for cross processor TLB maintance operations only. When core/kernel
gets its memory mapped on demand, and unmapped again, the previous cross
processor flush routine doesn't work anymore, because of a hen-egg problem.
The previous cross processor broadcast is realized using a thread constructed
by core running on top of each processor core. When constructing threads in
core, a dataspace for its thread context is constructed. Each constructed
RAM dataspace gets attached, zeroed out, and detached again. The detach
routine requires a TLB flush operation executed on each processor core.

Instead of executing a thread on each processor core, now a thread waiting
for a global TLB flush is removed from the scheduler queue, and gets attached
to a TLB flush queue of each processor. The processor local queue gets checked
whenever the kernel is entered. The last processor, which executed the TLB
flush, re-attaches the blocked thread to its scheduler queue again.

To ease uo the above described mechanism, a platform thread is now directly
associated with a platform pd object, instead of just associate it with the
kernel pd's id.

Ref #723
2014-05-07 10:37:38 +02:00
Martin Stein 58c4f1585b hw: fix bug in Kernel::update_*_region
fix #1125
2014-04-17 14:01:35 +02:00
Martin Stein a9521853bd hw: provide Kernel::update_instr_region
fix #1115
2014-04-14 12:28:16 +02:00
Martin Stein 3f14defd9d hw: don't restrict update_data_region to core
ref #1115
2014-04-14 12:28:16 +02:00
Martin Stein 5a1fc6da60 hw: rename update_region in update_data_region
ref #1115
2014-04-14 12:28:16 +02:00
Martin Stein f8c2596259 hw: beautify flush_data_caches_by_virt_region
ref #1115
2014-04-07 17:11:46 +02:00
Martin Stein 9f95784f02 hw: diversify feedback from IPC node to thread
ref #1108
2014-04-07 17:11:20 +02:00
Martin Stein e856158824 hw: no msg_base argument to Ipc_node::send_request
ref #1108
2014-04-07 17:10:53 +02:00
Martin Stein b34ce7d2b0 hw: handier names for IPC methods
ref #1108
2014-04-07 17:10:45 +02:00
Martin Stein f0ec8b27c1 hw: no argument to Ipc_node::_await_ipc_succeeded
ref #1108
2014-04-07 17:10:38 +02:00
Martin Stein b55646e1b0 hw: remove Ipc_node::_received_ipc_request
ref #1108
2014-04-07 17:10:28 +02:00
Martin Stein 8d1e40eb5b hw: remove Ipc_node::_await_ipc
ref #1108
2014-04-07 17:10:22 +02:00
Martin Stein ebfd6a55b3 hw: remove useless argument of Thread::_call
ref #1108
2014-04-07 17:10:10 +02:00
Martin Stein 7ffcc74d72 hw: centralize permission check of kernel calls
ref #1101
2014-04-07 17:09:58 +02:00
Martin Stein 02c16e7106 hw: split resume_local_thread from resume_thread
Kernel::resume_thread was restricted to core when the targeted thread was in
another domain. Now there are two kernel calls, resume_local_thread and
resume_thread, where the former is never restricted and is provided via
public kernel/interface.h and the latter is always restricted to core and
is provided via core-local kernel/core_interface.h.

ref #1101
2014-04-07 17:09:52 +02:00
Martin Stein c72f91fefb hw: simplify return value of Kernel::resume_thread
ref #1101
2014-04-07 17:09:33 +02:00
Martin Stein 6974abcf41 hw: don't use assert in Kernel::pause_vm
ref #1101
2014-04-07 17:09:16 +02:00
Martin Stein 99db9e5246 hw: don't use assert in Kernel::run_vm
ref #1101
2014-04-07 17:08:59 +02:00
Martin Stein 7bbabcf817 hw: don't use assert in Kernel::new_vm
ref #1101
2014-04-07 17:08:49 +02:00
Martin Stein f8b4541e2b hw: get rid of fixme note in Kernel::update_region
ref #1101
2014-04-07 17:08:35 +02:00
Martin Stein 4f19d4869f hw: don't use assert in Kernel::update_region
ref #1101
2014-04-07 17:08:29 +02:00
Martin Stein ea156e18ec hw: don't use assert in Kernel::update_pd
ref #1101
2014-04-07 17:08:23 +02:00
Martin Stein dbad6f7061 hw: don't use assert in Kernel::bin_thread
ref #1101
2014-04-07 17:08:16 +02:00
Martin Stein 9e089e7e75 hw: don't use assert in Kernel::start_thread
ref #1101
2014-04-07 17:08:11 +02:00
Martin Stein fba4f54571 hw: split pause_current_thread from pause_thread
Kernel::pause_current_thread can be implemented much simpler and is not
restricted to core threads, in contrast to Kernel::pause_thread which
also benefits from the split and can be moved to core_interface.h.

ref #1101
2014-04-07 17:07:24 +02:00
Martin Stein abd55fda9a hw: don't return a result in Kernel::pause_thread
ref #1101
2014-04-07 17:06:09 +02:00
Martin Stein 5e940da040 hw: don't use assert in Kernel::pause_thread
ref #1101
2014-04-07 17:05:43 +02:00
Martin Stein d5b38b674e hw: simplify buffer of Kernel::access_thread_regs
ref #1101
2014-04-07 17:05:29 +02:00
Martin Stein 06ea6cd462 hw: simplify result of Kernel::access_thread_regs
ref #1101
2014-04-07 17:04:50 +02:00
Martin Stein e2268c09a0 hw: move core-restricted interface to local header
fix #1096
2014-04-07 17:02:50 +02:00
Martin Stein 9affbf33ec hw: make kernel less noisy in release mode
In most cases an error report is not necessary in the kernel as the problem
does not affect the kernel itself but the according user-land context. Thus
we can also do a warning that is not printed in release mode and hence safe
execution time.

ref #1096
2014-04-07 17:01:46 +02:00
Martin Stein 852785324f hw: move Processor_client to processor.h
ref #1088
2014-03-14 13:17:37 +01:00
Martin Stein 8818d810a1 hw: clean-up destruction of processor clients
ref #1088
2014-03-14 13:17:36 +01:00
Martin Stein 17f17df74b hw: rename Execution_context in Processor_client
ref #1088
2014-03-14 13:17:36 +01:00
Martin Stein 044a109c3a hw: reset scheduling timeout implicitely
This is needed as soon as we do inter-processor interrupts to
inform a processor about a remote modification in its scheduling plan.
In this case we can not explicitely decide wether to reset timer
or not. Instead we must decide it according to the choices of the
scheduler before and after the modification.

ref #1088
2014-03-14 13:17:36 +01:00
Martin Stein 52addb591b hw: multiprocessor aware verbosity on thread start
ref #1076
2014-03-07 17:24:28 +01:00
Martin Stein ed9c4f4427 hw: get start-thread syscall multiprocessing aware
ref #1076
2014-03-07 17:24:12 +01:00
Martin Stein 194b6b64c1 hw: rename Multiprocessor in Processor_pool
fix #1083
2014-03-04 19:05:21 +01:00
Martin Stein 7bdb8c9007 hw: let Processor inherit from Processor_driver
ref #1083
2014-03-04 19:04:50 +01:00
Martin Stein 5d444a12dc hw: rename Genode::Cpu in Processor_driver
ref #1083
2014-03-04 19:04:16 +01:00
Martin Stein 1335b7b550 hw: rename handle_exception() in exception()
fix #1078
2014-03-04 19:02:30 +01:00
Martin Stein 3a4f7128fd hw: make _processor private to Execution_context
ref #1078
2014-03-04 19:01:45 +01:00
Martin Stein ce9e43ae51 hw: move handle_interrupt to Execution_context
ref #1078
2014-03-04 19:01:29 +01:00
Martin Stein 6a3368ee27 hw_arndale: idle threads on secondary processors
fix #1006
2014-03-04 15:03:43 +01:00
Martin Stein 722154f0a8 hw: kernel initialization in extra function
ref #1006
2014-03-04 14:56:44 +01:00
Martin Stein 49eeb485d9 hw: mark caller when printing an activity-table
ref #989
2013-12-20 14:48:06 +01:00
Martin Stein 906b4dc90a hw: format fix in activity table
ref #989
2013-12-20 14:48:06 +01:00
Martin Stein 8eef91f2ac hw: do not block on destruction of signal receiver
As synchronization of signal contexts is now the users business instead of
cores and the signal framework ensures that every context of a receiver gets
synchronously destructed before the destruction of the receiver itself
synchronization and thus blocking at the destruction of a kernel
receiver-object isn't necessary anymore.

ref #989
2013-12-20 14:48:06 +01:00
Martin Stein 1c8c30e1f4 hw: sync signal contexts directly as user
Kernel::signal_context_kill can be used by any program to halt the processing
of a signal context synchronously to prevent broken refs when core destructs
the according kernel object. In turn, Kernel::bin_signal_context doesn't block
anymore and destructs a signal context no matter if there are unacknowledged
signals. This way, cores entrypoint doesn't depend on signal acks of a
untrustworthy client anymore.

ref #989
2013-12-20 14:48:06 +01:00