To maximize boot performance we only invalidate the cache for regions
accessed before enabling the MMU. This makes the clean & invalidate
step of the entire image region after enabling the MMU redundant.
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1049
/* save lr */
mov x22, x30
- /*
- * Invalidate the D-Cache to avoid using invalid data that existed
- * in D-Cache. Invalidate ranges that may have been modified:
- * DATA, BSS, PAGETABLE and BOOTSTACK.
- */
- ur_ldr x0, _data
- ur_ldr x1, _end
-
- add x1, x1, #__STACK_SIZE
- sub x1, x1, x0
- bl clean_and_invalidate_dcache_range
-
/* Setup SCTLR */
ldr x2, =SCTLR_SET_BITS
ldr x3, =SCTLR_CLEAR_BITS