Fix second argument of [clean_and_]invalidate_dcache_range in `KVM`
entry to use the length of the range instead of the address of the
end of the range.
Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1056
ukplat_lcpu_disable_irq();
/* Invalidate the image from the data cache */
- clean_and_invalidate_dcache_range(__BASE_ADDR, __END);
+ clean_and_invalidate_dcache_range(__BASE_ADDR, __END - __BASE_ADDR);
SYSREG_WRITE64(sctlr_el1, SCTLR_SET_BITS);
SYSREG_WRITE64(contextidr_el1, 0);
ur_ldr x0, _start_ram_addr
ur_ldr x1, _end
+ sub x1, x1, x0
bl clean_and_invalidate_dcache_range
/* Disable the MMU and D-Cache. */
0:
ur_ldr x0, _start_ram_addr
ur_ldr x1, _end
+ sub x1, x1, x0
bl invalidate_dcache_range
#endif /* CONFIG_LIBUKRELOC */
1: