Skip to content

Commit

Permalink
arm64: Add routines for cache maintainance
Browse files Browse the repository at this point in the history
  • Loading branch information
relokin committed Mar 8, 2021
1 parent 3a272f4 commit d8228dc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions arm/cstart64.S
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,32 @@ asm_mmu_disable:

ret

/*
* asm_clean_dcache_area_poc - Clean dcache region to PoC
* Inputs:
* x0 start of area
* x1 area size
*/
.globl asm_clean_dcache_area_poc
asm_clean_dcache_area_poc:
dcache_by_line_op cvac, sy, x0, x1, x2, x3
ret

/*
* asm_inval_dcache_area_poc - Invalidate dcache region to PoC
* Inputs:
* x0 start of area
* x1 area size
*
* Must be called with MMU disabled, otherwise the CPU can speculate reads and
* allocate cache lines from the invalidated area.
*/
.globl asm_inval_dcache_area_poc
asm_inval_dcache_area_poc:
dcache_by_line_op civac, sy, x0, x1, x2, x3
ret


/*
* Vectors
*/
Expand Down

0 comments on commit d8228dc

Please sign in to comment.