Skip to content

Commit d838add

Browse files
hexagonal-sunarihant2math
authored andcommitted
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.
1 parent bd64a67 commit d838add

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/arch/arm64/boot/secondary.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use crate::{
1515
memory::PAGE_ALLOC,
1616
sync::OnceLock,
1717
};
18+
use aarch64_cpu::asm::barrier::{SY, isb};
1819
use core::{
1920
arch::naked_asm,
2021
hint::spin_loop,
@@ -140,6 +141,8 @@ fn prepare_for_secondary_entry() -> Result<(PA, PA)> {
140141
// MMU enabled (and therefore caches), we can't reply on the CCI.
141142
// Therefore, manually flush the boot context to RAM.
142143
flush_to_ram(boot_ctx);
144+
145+
isb(SY);
143146
};
144147

145148
Ok((entry_fn, ctx))

0 commit comments

Comments
 (0)