1
0
Fork 0

Compare commits

..

2 Commits

Author SHA1 Message Date
Simon Renblad 9d076d5c24 fix mmu deadlock on init 2024-11-18 10:17:44 +08:00
Simon Renblad 6d2c26fe73 remove unnecessary core1_enabled semaphore 2024-11-18 10:15:33 +08:00
1 changed files with 2 additions and 9 deletions

View File

@ -26,9 +26,6 @@ interrupt_handler!(Reset, reset_irq, __stack0_start, __stack1_start, {
boot_core0(); boot_core0();
} }
1 => { 1 => {
while !CORE1_ENABLED.get() {
spin_lock_yield();
}
boot_core1(); boot_core1();
} }
_ => unreachable!(), _ => unreachable!(),
@ -69,7 +66,8 @@ unsafe extern "C" fn boot_core1() -> ! {
let mpcore = mpcore::RegisterBlock::mpcore(); let mpcore = mpcore::RegisterBlock::mpcore();
mpcore.scu_invalidate.invalidate_core1(); mpcore.scu_invalidate.invalidate_core1();
let mmu_table = mmu::L1Table::get(); let mmu_table = mmu::L1Table::get()
.setup_flat_layout();
mmu::with_mmu(mmu_table, || { mmu::with_mmu(mmu_table, || {
ACTLR.enable_smp(); ACTLR.enable_smp();
ACTLR.enable_prefetch(); ACTLR.enable_prefetch();
@ -128,11 +126,6 @@ impl Core1 {
} }
} }
unsafe {
CORE1_ENABLED.set(true);
}
// Flush cache-line
cache::dcc(unsafe { &CORE1_ENABLED });
if sdram { if sdram {
cache::dccmvac(0); cache::dccmvac(0);
asm::dsb(); asm::dsb();