hw: implement multi-processor support for i.MX8

Fix #3520
This commit is contained in:
Stefan Kalkowski
2019-10-10 15:06:49 +02:00
committed by Christian Helmuth
parent e3f82b09d7
commit 1cbd77c806
12 changed files with 109 additions and 18 deletions

View File

@ -46,4 +46,6 @@ void Cpu::trigger_ip_interrupt()
}
Cpu::Ipi::Ipi(Cpu & cpu) : Irq(Board::Pic::IPI, cpu), cpu(cpu) { }
Cpu::Ipi::Ipi(Cpu & cpu)
: Irq(Board::Pic::IPI, cpu), cpu(cpu) {
cpu.pic().unmask(Board::Pic::IPI, cpu.id()); }

View File

@ -31,7 +31,7 @@ class Kernel::Lock
enum State { UNLOCKED, LOCKED };
State volatile _locked { UNLOCKED };
int volatile _locked { UNLOCKED };
unsigned volatile _current_cpu { INVALID };
public:

View File

@ -83,7 +83,7 @@ struct Genode::Cpu : Hw::Arm_64_cpu
/**
* Return kernel name of the executing CPU
*/
static unsigned executing_id() { return 0; }
static unsigned executing_id() { return Cpu::Mpidr::read() & 0xff; }
static void clean_data_cache_by_virt_region(addr_t, size_t);

View File

@ -77,6 +77,7 @@ _kernel_entry:
.global idle_thread_main
idle_thread_main:
wfi
b idle_thread_main