2013-10-16 11:47:19 +02:00
|
|
|
/*
|
|
|
|
* \brief Singlethreaded minimalistic kernel
|
|
|
|
* \author Martin Stein
|
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-04-28 20:36:00 +02:00
|
|
|
* \author Stefan Kalkowski
|
2013-10-16 11:47:19 +02:00
|
|
|
* \date 2013-09-30
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2016-01-11 11:02:52 +01:00
|
|
|
* Copyright (C) 2013-2016 Genode Labs GmbH
|
2013-10-16 11:47:19 +02:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
|
|
* under the terms of the GNU General Public License version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _KERNEL__KERNEL_H_
|
|
|
|
#define _KERNEL__KERNEL_H_
|
|
|
|
|
2015-02-19 14:50:27 +01:00
|
|
|
#include <pic.h>
|
2016-01-11 11:02:52 +01:00
|
|
|
#include <board.h>
|
2015-05-19 14:18:40 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Main routine of every kernel pass
|
|
|
|
*/
|
|
|
|
extern "C" void kernel();
|
|
|
|
|
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-04-28 20:36:00 +02:00
|
|
|
|
2014-04-28 21:31:57 +02:00
|
|
|
namespace Kernel {
|
2015-05-19 14:18:40 +02:00
|
|
|
|
|
|
|
class Pd;
|
|
|
|
|
2016-01-11 11:02:52 +01:00
|
|
|
Pd * core_pd();
|
|
|
|
Pic * pic();
|
|
|
|
Genode::Board & board();
|
2014-04-28 21:31:57 +02:00
|
|
|
}
|
2013-10-16 11:47:19 +02:00
|
|
|
|
|
|
|
#endif /* _KERNEL__KERNEL_H_ */
|