mirror of
https://github.com/hexagonal-sun/moss-kernel.git
synced 2026-04-23 08:38:48 -04:00
arm64: secondary: insert isb after cache flush
Insert an instruction barrier to ensure that the cache-flush operation has completed prior to the PSCI call.
This commit is contained in:
committed by
Ashwin Naren
parent
bd64a67eae
commit
d838add05c
@@ -15,6 +15,7 @@ use crate::{
|
||||
memory::PAGE_ALLOC,
|
||||
sync::OnceLock,
|
||||
};
|
||||
use aarch64_cpu::asm::barrier::{SY, isb};
|
||||
use core::{
|
||||
arch::naked_asm,
|
||||
hint::spin_loop,
|
||||
@@ -140,6 +141,8 @@ fn prepare_for_secondary_entry() -> Result<(PA, PA)> {
|
||||
// MMU enabled (and therefore caches), we can't reply on the CCI.
|
||||
// Therefore, manually flush the boot context to RAM.
|
||||
flush_to_ram(boot_ctx);
|
||||
|
||||
isb(SY);
|
||||
};
|
||||
|
||||
Ok((entry_fn, ctx))
|
||||
|
||||
Reference in New Issue
Block a user