Skip to content

Commit

Permalink
arch: Added some MMU cache maintenance functions for ARM64.
Browse files Browse the repository at this point in the history
Signed-off-by: TunaCici <[email protected]>
  • Loading branch information
TunaCici committed Apr 25, 2024
1 parent aafa42f commit 1b95674
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Kernel/Arch/ARM64/Machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
}

0 comments on commit 1b95674

Please sign in to comment.