mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-18 00:12:03 +00:00
kernel_ldr::cpu: prevent reordering around barrier instructions
This commit is contained in:
parent
879f8a5147
commit
a85e20bcea
1 changed files with 4 additions and 4 deletions
|
@ -21,19 +21,19 @@ namespace ams::kern::arm64::cpu {
|
||||||
|
|
||||||
/* Helpers for managing memory state. */
|
/* Helpers for managing memory state. */
|
||||||
ALWAYS_INLINE void DataSynchronizationBarrier() {
|
ALWAYS_INLINE void DataSynchronizationBarrier() {
|
||||||
__asm__ __volatile__("dsb sy");
|
__asm__ __volatile__("dsb sy" ::: "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE void DataSynchronizationBarrierInnerShareable() {
|
ALWAYS_INLINE void DataSynchronizationBarrierInnerShareable() {
|
||||||
__asm__ __volatile__("dsb ish");
|
__asm__ __volatile__("dsb ish" ::: "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE void DataMemoryBarrier() {
|
ALWAYS_INLINE void DataMemoryBarrier() {
|
||||||
__asm__ __volatile__("dmb sy");
|
__asm__ __volatile__("dmb sy" ::: "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE void InstructionMemoryBarrier() {
|
ALWAYS_INLINE void InstructionMemoryBarrier() {
|
||||||
__asm__ __volatile__("isb");
|
__asm__ __volatile__("isb" ::: "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
ALWAYS_INLINE void EnsureInstructionConsistency() {
|
ALWAYS_INLINE void EnsureInstructionConsistency() {
|
||||||
|
|
Loading…
Reference in a new issue