diff --git a/Kernel/Arch/ARM64/Machine.h b/Kernel/Arch/ARM64/Machine.h index 3809d59..73e5233 100644 --- a/Kernel/Arch/ARM64/Machine.h +++ b/Kernel/Arch/ARM64/Machine.h @@ -15,11 +15,16 @@ static inline void wfi(void) asm volatile("wfi" ::: "memory"); } -static inline void dsb(void) +static inline void dsb_sy(void) { asm volatile("dsb sy" ::: "memory"); } +static inline void dsb_ish(void) +{ + asm volatile("dsb ish" ::: "memory"); +} + static inline void dsb_ishst(void) { asm volatile("dsb ishst" ::: "memory"); @@ -92,3 +97,18 @@ static inline void fiq_disable(void) asm volatile("msr " reg ",%x0" :: "r" (_v));\ }while(0) +/* + * MMU Cache Maintenance operations + * + * Ref: developer.arm.com/documentation/den0024/a/Caches/Cache-maintenance + */ + +static inline void ic_ialluis() +{ + asm("IC IALLUIS" ::: "memory"); +} + +static inline void tlbi_vmalle1() +{ + asm("TLBI VMALLE1" ::: "memory"); +}